ref: 95114db7e087da60a878df5c3e4cb5f7a1b3b28a
dir: /sys/src/libip/ipremoteonifc.c/
#include <u.h> #include <libc.h> #include <ctype.h> #include <ip.h> Iplifc* ipremoteonifc(Ipifc *ifc, uchar *ip) { uchar net[IPaddrlen]; Iplifc *lifc; for(lifc = ifc->lifc; lifc != nil; lifc = lifc->next){ maskip(ip, lifc->mask, net); if(ipcmp(net, lifc->net) == 0) return lifc; } return nil; }