--- gvpe/src/util.C 2003/10/14 19:46:46 1.9 +++ gvpe/src/util.C 2004/01/29 18:55:10 1.12 @@ -1,5 +1,6 @@ /* util.C -- process management and other utility functions + Copyright (C) 2003 Marc Lehmann Some of these are taken from tinc, see the AUTHORS file. @@ -21,6 +22,7 @@ #include "config.h" #include +#include #include #include @@ -144,7 +146,7 @@ char *filename; asprintf (&filename, "%s/%s", confbase, cb()); execl (filename, filename, (char *) 0); - exit (255); + exit (126); } else if (pid > 0) { @@ -204,3 +206,28 @@ } #endif +void +id2mac (unsigned int id, void *m) +{ + mac &p = *(mac *)m; + + if (id) + { + p[0] = 0xfe; + p[1] = 0xfd; + p[2] = 0x80; + p[3] = 0x00; + p[4] = id >> 8; + p[5] = id; + } + else + { + p[0] = 0xff; + p[1] = 0xff; + p[2] = 0xff; + p[3] = 0xff; + p[4] = 0xff; + p[5] = 0xff; + } +} +