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,
18 /* find first ip addr that isn't the friggin loopback address */
19 /* unless there are no others */
21 myipaddr(uchar *ip, char *net)
26 uchar mynet[IPaddrlen];
28 ifc = readipifc(net, nil, -1);
29 for(nifc = ifc; nifc; nifc = nifc->next)
30 for(lifc = nifc->lifc; lifc; lifc = lifc->next){
31 maskip(lifc->ip, loopbackmask, mynet);
32 if(ipcmp(mynet, loopbacknet) == 0){
35 if(ipcmp(lifc->ip, IPnoaddr) != 0){