1148531efSWolfram Schneider /* 2148531efSWolfram Schneider * hwaddr.h 3148531efSWolfram Schneider */ 4148531efSWolfram Schneider 544099b7bSPaul Traina #ifndef HWADDR_H 644099b7bSPaul Traina #define HWADDR_H 744099b7bSPaul Traina 844099b7bSPaul Traina #define MAXHADDRLEN 8 /* Max hw address length in bytes */ 944099b7bSPaul Traina 1044099b7bSPaul Traina /* 1144099b7bSPaul Traina * This structure holds information about a specific network type. The 1244099b7bSPaul Traina * length of the network hardware address is stored in "hlen". 1344099b7bSPaul Traina * The string pointed to by "name" is the cononical name of the network. 1444099b7bSPaul Traina */ 1544099b7bSPaul Traina struct hwinfo { 1644099b7bSPaul Traina unsigned int hlen; 1744099b7bSPaul Traina char *name; 1844099b7bSPaul Traina }; 1944099b7bSPaul Traina 2044099b7bSPaul Traina extern struct hwinfo hwinfolist[]; 2144099b7bSPaul Traina extern int hwinfocnt; 2244099b7bSPaul Traina 23f19d047aSAlfred Perlstein extern void setarp(int, struct in_addr *, int, u_char *, int); 24f19d047aSAlfred Perlstein extern char *haddrtoa(u_char *, int); 25f19d047aSAlfred Perlstein extern void haddr_conv802(u_char *, u_char *, int); 2644099b7bSPaul Traina 2744099b7bSPaul Traina /* 2844099b7bSPaul Traina * Return the length in bytes of a hardware address of the given type. 2944099b7bSPaul Traina * Return the canonical name of the network of the given type. 3044099b7bSPaul Traina */ 3144099b7bSPaul Traina #define haddrlength(type) ((hwinfolist[(int) (type)]).hlen) 3244099b7bSPaul Traina #define netname(type) ((hwinfolist[(int) (type)]).name) 3344099b7bSPaul Traina 3444099b7bSPaul Traina #endif /* HWADDR_H */ 35