ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/util.C
(Generate patch)

Comparing gvpe/src/util.C (file contents):
Revision 1.9 by pcg, Tue Oct 14 19:46:46 2003 UTC vs.
Revision 1.11 by pcg, Thu Oct 16 02:41:21 2003 UTC

1/* 1/*
2 util.C -- process management and other utility functions 2 util.C -- process management and other utility functions
3 Copyright (C) 2003 Marc Lehmann <pcg@goof.com>
3 4
4 Some of these are taken from tinc, see the AUTHORS file. 5 Some of these are taken from tinc, see the AUTHORS file.
5 6
6 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
202 203
203 return res; 204 return res;
204} 205}
205#endif 206#endif
206 207
208void
209id2mac (unsigned int id, void *m)
210{
211 mac &p = *(mac *)m;
212
213 if (id)
214 {
215 p[0] = 0xfe;
216 p[1] = 0xfd;
217 p[2] = 0x80;
218 p[3] = 0x00;
219 p[4] = id >> 8;
220 p[5] = id;
221 }
222 else
223 {
224 p[0] = 0xff;
225 p[1] = 0xff;
226 p[2] = 0xff;
227 p[3] = 0xff;
228 p[4] = 0xff;
229 p[5] = 0xff;
230 }
231}
232

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines