/* Definitions for the Boot Protocol (bootp). */

#define BOOTP_SERVER_PORT 67
#define BOOTP_CLIENT_PORT 68

#define ETHER_HTYPE 1
#define VII_HTYPE 4

#define CHADDR_LEN 16
#define SNAME_LEN 64
#define FILE_LEN 128
#define VEND_LEN 64

#define BOOTREQUEST 1
#define BOOTREPLY 2

struct bootp_pkt {
    unsigned char bp_op;	/* opcode */
    unsigned char bp_htype;	/* hardware type */
    unsigned char bp_hlen;	/* hardware address length */
    unsigned char bp_hops;	/* hop count for cross-gateway booting */
    long bp_xid;		/* transaction ID */
    unsigned short bp_secs;	/* seconds since client started booting */
    short bp_unused;
    long bp_ciaddr;		/* client IP address */
    long bp_yiaddr;		/* 'your' (client) IP address */
    long bp_siaddr;		/* server IP address */
    long bp_giaddr;		/* gateway IP address */
    unsigned char bp_chaddr[CHADDR_LEN]; /* client hardware address */
    char bp_sname[SNAME_LEN];	/* server host name */
    char bp_file[FILE_LEN];	/* file name */
    char bp_vend[VEND_LEN];	/* vendor specific */
};
