X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b466dcdfe6fc9b962122fa5e7a94ffd721065599..309ca62193772fd8ba532fd413b51a61be0c741e:/bootp.h diff --git a/bootp.h b/bootp.h index 35f6297e..b1b81dce 100644 --- a/bootp.h +++ b/bootp.h @@ -1,4 +1,4 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.14 2003-04-28 07:43:03 hannes Exp $ (LBL) */ +/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.19 2008-04-22 09:46:03 hannes Exp $ (LBL) */ /* * Bootstrap Protocol (BOOTP). RFC951 and RFC1048. * @@ -27,7 +27,8 @@ struct bootp { u_int8_t bp_hops; /* gateway hops */ u_int32_t bp_xid; /* transaction ID */ u_int16_t bp_secs; /* seconds since boot began */ - u_int16_t bp_flags; /* flags - see bootp_flag_values[] */ + u_int16_t bp_flags; /* flags - see bootp_flag_values[] + in print-bootp.c */ struct in_addr bp_ciaddr; /* client IP address */ struct in_addr bp_yiaddr; /* 'your' IP address */ struct in_addr bp_siaddr; /* server IP address */ @@ -36,12 +37,7 @@ struct bootp { u_int8_t bp_sname[64]; /* server host name */ u_int8_t bp_file[128]; /* boot file name */ u_int8_t bp_vend[64]; /* vendor-specific area */ -}; - -static const struct tok bootp_flag_values[] = { - { 0x8000, "Broadcast" }, - { 0, NULL} -}; +} UNALIGNED; /* * UDP port numbers, server and client. @@ -52,12 +48,6 @@ static const struct tok bootp_flag_values[] = { #define BOOTPREPLY 2 #define BOOTPREQUEST 1 -static const struct tok bootp_op_values[] = { - { BOOTPREQUEST, "Request" }, - { BOOTPREPLY, "Reply" }, - { 0, NULL} -}; - /* * Vendor magic cookie (v_magic) for CMU */ @@ -172,6 +162,9 @@ static const struct tok bootp_op_values[] = { #define TAG_NS_SEARCH ((u_int8_t) 117) /* RFC 3011 */ #define TAG_IP4_SUBNET_SELECT ((u_int8_t) 118) +/* RFC 3442 */ +#define TAG_CLASSLESS_STATIC_RT ((u_int8_t) 121) +#define TAG_CLASSLESS_STA_RT_MS ((u_int8_t) 249) /* ftp://ftp.isi.edu/.../assignments/bootp-dhcp-extensions */ #define TAG_USER_CLASS ((u_int8_t) 77) #define TAG_SLP_NAMING_AUTH ((u_int8_t) 80) @@ -224,8 +217,15 @@ struct cmu_vend { struct in_addr v_ins1, v_ins2; /* IEN-116 name servers */ struct in_addr v_ts1, v_ts2; /* Time servers */ u_int8_t v_unused[24]; /* currently unused */ -}; +} UNALIGNED; /* v_flags values */ #define VF_SMASK 1 /* Subnet mask field contains valid data */ + +/* RFC 4702 DHCP Client FQDN Option */ + +#define CLIENT_FQDN_FLAGS_S 0x01 +#define CLIENT_FQDN_FLAGS_O 0x02 +#define CLIENT_FQDN_FLAGS_E 0x04 +#define CLIENT_FQDN_FLAGS_N 0x08