… | … | ||
---|---|---|---|
28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
29 | #include <sys/wait.h> | 29 | #include <sys/wait.h> |
30 | #include <unistd.h> | 30 | #include <unistd.h> |
31 | #include <time.h> | 31 | #include <time.h> |
32 | 32 | ||
33 | #include <sys/mman.h> | ||
34 | |||
35 | #include "netcompat.h" | 33 | #include "netcompat.h" |
36 | 34 | ||
37 | #include "gettext.h" | 35 | #include "gettext.h" |
38 | #include "pidfile.h" | 36 | #include "pidfile.h" |
39 | #include "dropin.h" | 37 | #include "dropin.h" |
… | … | ||
204 | 202 | ||
205 | return res; | 203 | return res; |
206 | } | 204 | } |
207 | #endif | 205 | #endif |
208 | 206 | ||
207 | void | ||
208 | id2mac (unsigned int id, void *m) | ||
209 | { | ||
210 | mac &p = *(mac *)m; | ||
211 | |||
212 | if (id) | ||
213 | { | ||
214 | p[0] = 0xfe; | ||
215 | p[1] = 0xfd; | ||
216 | p[2] = 0x80; | ||
217 | p[3] = 0x00; | ||
218 | p[4] = id >> 8; | ||
219 | p[5] = id; | ||
220 | } | ||
221 | else | ||
222 | { | ||
223 | p[0] = 0xff; | ||
224 | p[1] = 0xff; | ||
225 | p[2] = 0xff; | ||
226 | p[3] = 0xff; | ||
227 | p[4] = 0xff; | ||
228 | p[5] = 0xff; | ||
229 | } | ||
230 | } | ||
231 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |