118471Swosch/* 218471Swosch * hwaddr.h 318471Swosch * 450476Speter * $FreeBSD$ 518471Swosch */ 618471Swosch 73229Spst#ifndef HWADDR_H 83229Spst#define HWADDR_H 93229Spst 103229Spst#define MAXHADDRLEN 8 /* Max hw address length in bytes */ 113229Spst 123229Spst/* 133229Spst * This structure holds information about a specific network type. The 143229Spst * length of the network hardware address is stored in "hlen". 153229Spst * The string pointed to by "name" is the cononical name of the network. 163229Spst */ 173229Spststruct hwinfo { 183229Spst unsigned int hlen; 193229Spst char *name; 203229Spst}; 213229Spst 223229Spstextern struct hwinfo hwinfolist[]; 233229Spstextern int hwinfocnt; 243229Spst 2597417Salfredextern void setarp(int, struct in_addr *, int, u_char *, int); 2697417Salfredextern char *haddrtoa(u_char *, int); 2797417Salfredextern void haddr_conv802(u_char *, u_char *, int); 283229Spst 293229Spst/* 303229Spst * Return the length in bytes of a hardware address of the given type. 313229Spst * Return the canonical name of the network of the given type. 323229Spst */ 333229Spst#define haddrlength(type) ((hwinfolist[(int) (type)]).hlen) 343229Spst#define netname(type) ((hwinfolist[(int) (type)]).name) 353229Spst 363229Spst#endif /* HWADDR_H */ 37