Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / bootp / common / hwaddr.h
blob72022705c22d44bed86107bc1f8bdba2b81bc104
1 /* $NetBSD: hwaddr.h,v 1.5 2008/05/02 19:22:10 xtraeme Exp $ */
3 /* hwaddr.h */
4 #ifndef HWADDR_H
5 #define HWADDR_H
7 #define MAXHADDRLEN 8 /* Max hw address length in bytes */
9 /*
10 * This structure holds information about a specific network type. The
11 * length of the network hardware address is stored in "hlen".
12 * The string pointed to by "name" is the canonical name of the network.
14 struct hwinfo {
15 unsigned int hlen;
16 const char *name;
19 extern struct hwinfo hwinfolist[];
20 extern size_t hwinfocnt;
22 extern void setarp(int, struct in_addr *, u_char *, int);
23 extern char *haddrtoa(u_char *, int);
24 extern void haddr_conv802(u_char *, u_char *, int);
27 * Return the length in bytes of a hardware address of the given type.
28 * Return the canonical name of the network of the given type.
30 #define haddrlength(type) ((hwinfolist[(int) (type)]).hlen)
31 #define netname(type) ((hwinfolist[(int) (type)]).name)
33 #endif /* HWADDR_H */