#include <netinet/bootp.h>
netinet/bootp.h
Bootstrap Protocol (BOOTP). RFC 951.
structbootp
| 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_int32_t | bp_xid | transaction ID |
| u_short | bp_secs | seconds since boot began |
| u_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 |
| u_char[16] | bp_chaddr | client hardware address |
| u_char[64] | bp_sname | server host name |
| u_char[128] | bp_file | boot file name |
| u_char[64] | bp_vend | vendor-specific area |
macroBOOTREQUEST
#define BOOTREQUEST 1
macroBOOTREPLY
#define BOOTREPLY 2
macroIPPORT_BOOTPC
#define IPPORT_BOOTPC 68
structvend
"vendor" data permitted for Stanford boot clients.
| u_char[4] | v_magic | magic number |
| u_int32_t | v_flags | flags/opcodes, etc. |
| u_char[56] | v_unused | currently unused |
structnextvend
| u_char[4] | nv_magic | Magic number for vendor specificity | |||||||||||||||||||||
| u_char | nv_version | NeXT protocol version | |||||||||||||||||||||
| unsigned short:0 | Round the beginning of the union to a 16 bit boundary due to struct/union alignment on the m68k. | ||||||||||||||||||||||
| unnamed union at netinet/bootp.h:103:2 | nv_U | ||||||||||||||||||||||
| |||||||||||||||||||||||
macronv_unused
#define nv_unused nv_U.NV0
macronv_opcode
#define nv_opcode nv_U.NV1.NV1_opcode
macronv_xid
#define nv_xid nv_U.NV1.NV1_xid
macronv_text
#define nv_text nv_U.NV1.NV1_text
macronv_null
#define nv_null nv_U.NV1.NV1_null
macroBPOP_QUERY
#define BPOP_QUERY 1
macroBPOP_QUERY_NE
#define BPOP_QUERY_NE 2
macroBPOP_ERROR
#define BPOP_ERROR 3
structbootp_packet
| struct ip | bp_ip | |
| struct udphdr | bp_udp | |
| struct bootp | bp_bootp |
macroBOOTP_PKTSIZE
#define BOOTP_PKTSIZE (sizeof (struct bootp_packet))