… | … | ||
---|---|---|---|
202 | 202 | ||
203 | return res; | 203 | return res; |
204 | } | 204 | } |
205 | #endif | 205 | #endif |
206 | 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 |