diff options
author | pst <pst@FreeBSD.org> | 1994-09-30 05:45:07 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1994-09-30 05:45:07 +0000 |
commit | 68e1cd350c0146bb7a6af8a084a7eb13d724ec1b (patch) | |
tree | 8c70e536438757114c4e79a725249f364f81be06 /libexec/bootpd/hwaddr.h | |
download | FreeBSD-src-68e1cd350c0146bb7a6af8a084a7eb13d724ec1b.zip FreeBSD-src-68e1cd350c0146bb7a6af8a084a7eb13d724ec1b.tar.gz |
Rearrange bootpd
Diffstat (limited to 'libexec/bootpd/hwaddr.h')
-rw-r--r-- | libexec/bootpd/hwaddr.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libexec/bootpd/hwaddr.h b/libexec/bootpd/hwaddr.h new file mode 100644 index 0000000..dea7158 --- /dev/null +++ b/libexec/bootpd/hwaddr.h @@ -0,0 +1,39 @@ +/* hwaddr.h */ +#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 *, 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 */ |