diff options
| author | 1996-09-27 07:44:41 +0000 | |
|---|---|---|
| committer | 1996-09-27 07:44:41 +0000 | |
| commit | 0a46c4a01a0a44ff4328ff020eb34604b7ab3f3b (patch) | |
| tree | f900ea26073ba8e334240806ae1531898733bdb0 | |
| parent | use nfs/{nfsv2.h,rpcv2.h} instead. (diff) | |
| download | wireguard-openbsd-0a46c4a01a0a44ff4328ff020eb34604b7ab3f3b.tar.xz wireguard-openbsd-0a46c4a01a0a44ff4328ff020eb34604b7ab3f3b.zip | |
update up to the current bootpd.
| -rw-r--r-- | sys/lib/libsa/bootp.c | 4 | ||||
| -rw-r--r-- | sys/lib/libsa/bootp.h | 53 |
2 files changed, 39 insertions, 18 deletions
diff --git a/sys/lib/libsa/bootp.c b/sys/lib/libsa/bootp.c index 615c6e654ba..f54ee0cb487 100644 --- a/sys/lib/libsa/bootp.c +++ b/sys/lib/libsa/bootp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bootp.c,v 1.2 1996/09/23 14:18:47 mickey Exp $ */ +/* $OpenBSD: bootp.c,v 1.3 1996/09/27 07:44:41 mickey Exp $ */ /* $NetBSD: bootp.c,v 1.7 1995/09/18 21:19:20 pk Exp $ */ /* @@ -100,7 +100,7 @@ bootp(sock) bzero(bp, sizeof(*bp)); bp->bp_op = BOOTREQUEST; - bp->bp_htype = 1; /* 10Mb Ethernet (48 bits) */ + bp->bp_htype = HTYPE_ETHERNET; /* 10Mb Ethernet (48 bits) */ bp->bp_hlen = 6; bp->bp_xid = htonl(d->xid); MACPY(d->myea, bp->bp_chaddr); diff --git a/sys/lib/libsa/bootp.h b/sys/lib/libsa/bootp.h index 2faf0b2357e..726dc618628 100644 --- a/sys/lib/libsa/bootp.h +++ b/sys/lib/libsa/bootp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bootp.h,v 1.2 1996/09/23 14:18:48 mickey Exp $ */ +/* $OpenBSD: bootp.h,v 1.3 1996/09/27 07:44:42 mickey Exp $ */ /* $NetBSD: bootp.h,v 1.2 1994/10/26 05:44:39 cgd Exp $ */ /* @@ -21,23 +21,29 @@ * without express or implied warranty. */ +#define BP_CHADDR_LEN 16 +#define BP_SNAME_LEN 64 +#define BP_FILE_LEN 128 +#define BP_VEND_LEN 64 +#define BP_MINPKTSZ 300 /* to check sizeof(struct bootp) */ + struct bootp { - unsigned char bp_op; /* packet opcode type */ - unsigned char bp_htype; /* hardware addr type */ - unsigned char bp_hlen; /* hardware addr length */ - unsigned char bp_hops; /* gateway hops */ - unsigned long bp_xid; /* transaction ID */ - unsigned short bp_secs; /* seconds since boot began */ - unsigned short bp_unused; - struct in_addr bp_ciaddr; /* client IP address */ - struct in_addr bp_yiaddr; /* 'your' IP address */ - struct in_addr bp_siaddr; /* server IP address */ - struct in_addr bp_giaddr; /* gateway IP address */ - unsigned char bp_chaddr[16]; /* client hardware address */ - unsigned char bp_sname[64]; /* server host name */ - unsigned char bp_file[128]; /* boot file name */ - unsigned char bp_vend[64]; /* vendor-specific area */ + u_char bp_op; /* packet opcode type */ + u_char bp_htype; /* hardware addr type */ + u_char bp_hlen; /* hardware addr length */ + u_char bp_hops; /* gateway hops */ + u_long bp_xid; /* transaction ID */ + u_short bp_secs; /* seconds since boot began */ + u_short bp_flags; /* RFC1532 broadcast, etc. */ + struct in_addr bp_ciaddr; /* client IP address */ + struct in_addr bp_yiaddr; /* 'your' IP address */ + struct in_addr bp_siaddr; /* server IP address */ + struct in_addr bp_giaddr; /* gateway IP address */ + u_char bp_chaddr[BP_CHADDR_LEN];/* client hardware address */ + u_char bp_sname[BP_SNAME_LEN]; /* server host name */ + u_char bp_file[BP_FILE_LEN]; /* boot file name */ + u_char bp_vend[BP_VEND_LEN]; /* vendor-specific area */ }; /* @@ -49,6 +55,16 @@ struct bootp { #define BOOTREPLY 2 #define BOOTREQUEST 1 +/* + * Hardware types from Assigned Numbers RFC. + */ +#define HTYPE_ETHERNET 1 +#define HTYPE_EXP_ETHERNET 2 +#define HTYPE_AX25 3 +#define HTYPE_PRONET 4 +#define HTYPE_CHAOS 5 +#define HTYPE_IEEE802 6 +#define HTYPE_ARCNET 7 /* * Vendor magic cookie (v_magic) for CMU @@ -85,6 +101,11 @@ struct bootp { #define TAG_DOMAINNAME ((unsigned char) 15) #define TAG_SWAPSERVER ((unsigned char) 16) #define TAG_ROOTPATH ((unsigned char) 17) +#define TAG_EXTEN_FILE ((unsigned char) 18) +#define TAG_NIS_DOMAIN ((unsigned char) 40) +#define TAG_NIS_SERVER ((unsigned char) 41) +#define TAG_NTP_SERVER ((unsigned char) 42) +#define TAG_MAX_MSGSZ ((unsigned char) 57) #define TAG_END ((unsigned char) 255) |
