1 #pragma src "/sys/src/libip" 2 #pragma lib "libip.a" 3 4 int eipconv(void*, Fconv*); 5 int parseip(uchar*, char*); 6 int parseether(uchar*, char*); 7 int myipaddr(uchar*, char*); 8 int myetheraddr(uchar*, char*); 9 void maskip(uchar*, uchar*, uchar*); 10 int equivip(uchar*, uchar*); 11 12 extern uchar classmask[4][4]; 13 14 #define CLASS(p) ((*(uchar*)(p))>>6) 15 16 /* 17 * for user level udp headers 18 */ 19 enum 20 { 21 Udphdrsize= 6, /* size if a to/from user Udp header */ 22 }; 23 24 typedef struct Udphdr Udphdr; 25 struct Udphdr 26 { 27 uchar ipaddr[4]; 28 uchar port[2]; 29 }; 30