#include <netinet/bootp.h>

netinet/bootp.h

Bootstrap Protocol (BOOTP). RFC 951.
23 macros · 4 structs

macroiaddr_t

#define iaddr_t struct in_addr

structbootp

size 300, align 4
u_charbp_oppacket opcode type
u_charbp_htypehardware addr type
u_charbp_hlenhardware addr length
u_charbp_hopsgateway hops
u_int32_tbp_xidtransaction ID
u_shortbp_secsseconds since boot began
u_shortbp_unused
struct in_addrbp_ciaddrclient IP address
struct in_addrbp_yiaddr'your' IP address
struct in_addrbp_siaddrserver IP address
struct in_addrbp_giaddrgateway IP address
u_char[16]bp_chaddrclient hardware address
u_char[64]bp_snameserver host name
u_char[128]bp_fileboot file name
u_char[64]bp_vendvendor-specific area

macroBOOTREQUEST

#define BOOTREQUEST 1

macroBOOTREPLY

#define BOOTREPLY 2

macroIPPORT_BOOTPS

UDP port numbers, server and client.
#define IPPORT_BOOTPS 67

macroIPPORT_BOOTPC

#define IPPORT_BOOTPC 68

structvend

"vendor" data permitted for Stanford boot clients.
size 64, align 4
u_char[4]v_magicmagic number
u_int32_tv_flagsflags/opcodes, etc.
u_char[56]v_unusedcurrently unused

macroVM_STANFORD

#define VM_STANFORD "STAN"
v_magic for Stanford

macroVF_PCBOOT

v_flags values
#define VF_PCBOOT 1
an IBMPC or Mac wants environment info

macroVF_HELP

#define VF_HELP 2
help me, I'm not registered

macroNVMAXTEXT

#define NVMAXTEXT 55
don't change this, it just fits RFC951

structnextvend

size 64, align 1
u_char[4]nv_magicMagic number for vendor specificity
u_charnv_versionNeXT protocol version
unsigned short:0Round 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:2nv_U
u_char[58]NV0
unnamed struct at netinet/bootp.h:105:3NV1
u_charNV1_opcodeopcode - Version 1
u_charNV1_xidtranscation id
u_char[55]NV1_texttext
u_charNV1_nullnull terminator

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

macroVM_NEXT

Magic number
#define VM_NEXT "NeXT"
v_magic for NeXT, Inc.

macroBPOP_OK

Opcodes
#define BPOP_OK 0

macroBPOP_QUERY

#define BPOP_QUERY 1

macroBPOP_QUERY_NE

#define BPOP_QUERY_NE 2

macroBPOP_ERROR

#define BPOP_ERROR 3

structbootp_packet

size 328, align 4
struct ipbp_ip
struct udphdrbp_udp
struct bootpbp_bootp

macroBOOTP_PKTSIZE

#define BOOTP_PKTSIZE (sizeof (struct bootp_packet))

macroBOOTP_MIN_BACKOFF

backoffs must be masks
#define BOOTP_MIN_BACKOFF 0x7ff
2.048 sec

macroBOOTP_MAX_BACKOFF

#define BOOTP_MAX_BACKOFF 0xffff
65.535 sec

macroBOOTP_RETRY

#define BOOTP_RETRY 6
# retries