1130b656e5
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
45 lines
992 B
C
45 lines
992 B
C
/*
|
|
* hwaddr.h
|
|
*
|
|
* $FreeBSD$
|
|
*/
|
|
|
|
#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;
|
|
|
|
#ifdef __STDC__
|
|
#define P(args) args
|
|
#else
|
|
#define P(args) ()
|
|
#endif
|
|
|
|
extern void setarp P((int, struct in_addr *, int, u_char *, int));
|
|
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 */
|