5 static uchar loopbacknet[IPaddrlen] = {
11 static uchar loopbackmask[IPaddrlen] = {
12 0xff, 0xff, 0xff, 0xff,
13 0xff, 0xff, 0xff, 0xff,
14 0xff, 0xff, 0xff, 0xff,
17 static uchar loopback6[IPaddrlen] = {
24 // find first ip addr that isn't the friggin loopback address
25 // unless there are no others
27 myipaddr(uchar *ip, char *net)
32 uchar mynet[IPaddrlen];
34 ifc = readipifc(net, ifc, -1);
35 for(nifc = ifc; nifc; nifc = nifc->next)
36 for(lifc = nifc->lifc; lifc; lifc = lifc->next){
38 if(ipcmp(lifc->ip, IPnoaddr) == 0)
42 if(ipcmp(lifc->ip, loopback6) == 0)
46 maskip(lifc->ip, loopbackmask, mynet);
47 if(ipcmp(mynet, loopbacknet) == 0)