freebsd-skq/libexec/bootpd/hwaddr.h

41 lines
944 B
C
Raw Normal View History

1996-09-22 21:56:57 +00:00
/*
* hwaddr.h
*
1999-08-28 00:22:10 +00:00
* $FreeBSD$
1996-09-22 21:56:57 +00:00
*/
1994-09-30 05:45:07 +00:00
#ifndef HWADDR_H
#define HWADDR_H
#define MAXHADDRLEN 8 /* Max hw address length in bytes */
/*
* This structure holds information about a specific network type. The
* length of the network hardware address is stored in "hlen".
* The string pointed to by "name" is the cononical name of the network.
*/
struct hwinfo {
unsigned int hlen;
char *name;
};
extern struct hwinfo hwinfolist[];
extern int hwinfocnt;
#define P(args) args
1996-01-23 01:35:04 +00:00
extern void setarp P((int, struct in_addr *, int, u_char *, int));
1994-09-30 05:45:07 +00:00
extern char *haddrtoa P((u_char *, int));
extern void haddr_conv802 P((u_char *, u_char *, int));
#undef P
/*
* Return the length in bytes of a hardware address of the given type.
* Return the canonical name of the network of the given type.
*/
#define haddrlength(type) ((hwinfolist[(int) (type)]).hlen)
#define netname(type) ((hwinfolist[(int) (type)]).name)
#endif /* HWADDR_H */