next up previous contents index
Next: 27.3.2 bootp_gen: Generate a Up: 27.3 API reference Previous: 27.3 API reference

27.3.1 bootp_net_info: BOOTP protocol information structures

 

SYNOPSIS

struct bootp_addr_array {
        struct in_addr *addr;   /* array of addresses */
        int             len;    /* number of addresses */
};

struct bootp_net_info {
        oskit_u32_t    flags;           /* which fields are valid */
        struct in_addr ip;              /* client IP address */
        struct in_addr netmask;         /* subnet mask */
        struct in_addr server;          /* server that replied  */
        struct bootp_addr_array gateway;        /* gateways */
        struct bootp_addr_array dns_server;     /* DNS server address  */
        struct bootp_addr_array time_server;    /* time server address  */
        struct bootp_addr_array log_server;     /* log server address  */
        struct bootp_addr_array lpr_server;     /* LPR server address  */
        oskit_s32_t    time_offset;     /* offset from UTC */
        char *hostname;                 /* client hostname */
        char *server_name;              /* name of replying server */
        char *bootfile_name;            /* boot file name */
        char *domainname;               /* domain name */
        unsigned char server_hwaddr[ETHER_ADDR_SIZE];   /* server address */
};

DESCRIPTION

The first field of the struct bootp_net_info structure, flags, denotes which of the other fields are valid. flags is an ORed combination of the flag values below. Each flag corresponds to a field in the structure with the same name (in lower case).

All other fields are of one of three types:

  1. An IP address encoded as a struct in_addr,
  2. A string encoded as a char *,
  3. A list of IP addresses encoded in a struct bootp_addr_array.

The following table gives an overview of the flags that are currently supported and the types of the corresponding fields.

Field Type Function
BOOTP_NET_IP IP address IP address
BOOTP_NET_NETMASK IP address netmask
BOOTP_NET_GATEWAY IP address gateway
BOOTP_NET_SERVER IP address server that answered BOOTP request
BOOTP_NET_DNS_SERVER List of IP addrs domain name servers
BOOTP_NET_TIME_SERVER List of IP addrs time servers
BOOTP_NET_LOG_SERVER List of IP addrs log servers
BOOTP_NET_LPR_SERVER List of IP addrs LPR servers
BOOTP_NET_TIME_OFFSET unsigned int see below
BOOTP_NET_HOSTNAME string hostname
BOOTP_NET_SERVER_NAME string name of the BOOTP server
BOOTP_NET_BOOTFILE_NAME string bootfile name
BOOTP_NET_DOMAINNAME string DNS domain name
BOOTP_NET_SERVER_ADDR unsigned char[6] Ethernet MAC address of BOOTP server

The time_offset field specifies the time offset of the local subnet in seconds from Coordinated Universal Time (UTC). It is a signed 32-bit integer, positive numbers indicate west of the Prime Meridian.


next up previous contents index
Next: 27.3.2 bootp_gen: Generate a Up: 27.3 API reference Previous: 27.3 API reference

University of Utah Flux Research Group