hwaddr.h revision 13572
1/* hwaddr.h */
2#ifndef	HWADDR_H
3#define HWADDR_H
4
5#define MAXHADDRLEN		8	/* Max hw address length in bytes */
6
7/*
8 * This structure holds information about a specific network type.  The
9 * length of the network hardware address is stored in "hlen".
10 * The string pointed to by "name" is the cononical name of the network.
11 */
12struct hwinfo {
13    unsigned int hlen;
14    char *name;
15};
16
17extern struct hwinfo hwinfolist[];
18extern int hwinfocnt;
19
20#ifdef	__STDC__
21#define P(args) args
22#else
23#define P(args) ()
24#endif
25
26extern void setarp P((int, struct in_addr *, int, u_char *, int));
27extern char *haddrtoa P((u_char *, int));
28extern void haddr_conv802 P((u_char *, u_char *, int));
29
30#undef P
31
32/*
33 * Return the length in bytes of a hardware address of the given type.
34 * Return the canonical name of the network of the given type.
35 */
36#define haddrlength(type)	((hwinfolist[(int) (type)]).hlen)
37#define netname(type)		((hwinfolist[(int) (type)]).name)
38
39#endif	/* HWADDR_H */
40