dhcp.h

Go to the documentation of this file.
00001 #ifndef _GPXE_DHCP_H
00002 #define _GPXE_DHCP_H
00003 
00004 /** @file
00005  *
00006  * Dynamic Host Configuration Protocol
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011 
00012 #include <stdint.h>
00013 #include <gpxe/in.h>
00014 #include <gpxe/list.h>
00015 #include <gpxe/refcnt.h>
00016 #include <gpxe/tables.h>
00017 #include <gpxe/uuid.h>
00018 #include <gpxe/netdevice.h>
00019 #include <gpxe/uaccess.h>
00020 
00021 struct job_interface;
00022 struct dhcp_options;
00023 struct dhcp_packet;
00024 
00025 /** BOOTP/DHCP server port */
00026 #define BOOTPS_PORT 67
00027 
00028 /** BOOTP/DHCP client port */
00029 #define BOOTPC_PORT 68
00030 
00031 /** PXE server port */
00032 #define PXE_PORT 4011
00033 
00034 /** Construct a tag value for an encapsulated option
00035  *
00036  * This tag value can be passed to Etherboot functions when searching
00037  * for DHCP options in order to search for a tag within an
00038  * encapsulated options block.
00039  */
00040 #define DHCP_ENCAP_OPT( encapsulator, encapsulated ) \
00041         ( ( (encapsulator) << 8 ) | (encapsulated) )
00042 /** Extract encapsulating option block tag from encapsulated tag value */
00043 #define DHCP_ENCAPSULATOR( encap_opt ) ( (encap_opt) >> 8 )
00044 /** Extract encapsulated option tag from encapsulated tag value */
00045 #define DHCP_ENCAPSULATED( encap_opt ) ( (encap_opt) & 0xff )
00046 /** Option is encapsulated */
00047 #define DHCP_IS_ENCAP_OPT( opt ) DHCP_ENCAPSULATOR( opt )
00048 
00049 /**
00050  * @defgroup dhcpopts DHCP option tags
00051  * @{
00052  */
00053 
00054 /** Padding
00055  *
00056  * This tag does not have a length field; it is always only a single
00057  * byte in length.
00058  */
00059 #define DHCP_PAD 0
00060 
00061 /** Minimum normal DHCP option */
00062 #define DHCP_MIN_OPTION 1
00063 
00064 /** Subnet mask */
00065 #define DHCP_SUBNET_MASK 1
00066 
00067 /** Routers */
00068 #define DHCP_ROUTERS 3
00069 
00070 /** DNS servers */
00071 #define DHCP_DNS_SERVERS 6
00072 
00073 /** Syslog servers */
00074 #define DHCP_LOG_SERVERS 7
00075 
00076 /** Host name */
00077 #define DHCP_HOST_NAME 12
00078 
00079 /** Domain name */
00080 #define DHCP_DOMAIN_NAME 15
00081 
00082 /** Root path */
00083 #define DHCP_ROOT_PATH 17
00084 
00085 /** Vendor encapsulated options */
00086 #define DHCP_VENDOR_ENCAP 43
00087 
00088 /** PXE boot server discovery control */
00089 #define DHCP_PXE_DISCOVERY_CONTROL DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 6 )
00090 
00091 /** PXE boot server discovery control bits */
00092 enum dhcp_pxe_discovery_control {
00093         /** Inhibit broadcast discovery */
00094         PXEBS_NO_BROADCAST = 1,
00095         /** Inhibit multicast discovery */
00096         PXEBS_NO_MULTICAST = 2,
00097         /** Accept only servers in DHCP_PXE_BOOT_SERVERS list */
00098         PXEBS_NO_UNKNOWN_SERVERS = 4,
00099         /** Skip discovery if filename present */
00100         PXEBS_SKIP = 8,
00101 };
00102 
00103 /** PXE boot server multicast address */
00104 #define DHCP_PXE_BOOT_SERVER_MCAST DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 7 )
00105 
00106 /** PXE boot servers */
00107 #define DHCP_PXE_BOOT_SERVERS DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 8 )
00108 
00109 /** PXE boot server */
00110 struct dhcp_pxe_boot_server {
00111         /** "Type" */
00112         uint16_t type;
00113         /** Number of IPv4 addresses */
00114         uint8_t num_ip;
00115         /** IPv4 addresses */
00116         struct in_addr ip[0];
00117 } __attribute__ (( packed ));
00118 
00119 /** PXE boot menu */
00120 #define DHCP_PXE_BOOT_MENU DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 9 )
00121 
00122 /** PXE boot menu */
00123 struct dhcp_pxe_boot_menu {
00124         /** "Type" */
00125         uint16_t type;
00126         /** Description length */
00127         uint8_t desc_len;
00128         /** Description */
00129         char desc[0];
00130 } __attribute__ (( packed ));
00131 
00132 /** PXE boot menu prompt */
00133 #define DHCP_PXE_BOOT_MENU_PROMPT DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 10 )
00134 
00135 /** PXE boot menu prompt */
00136 struct dhcp_pxe_boot_menu_prompt {
00137         /** Timeout
00138          *
00139          * A value of 0 means "time out immediately and select first
00140          * boot item, without displaying the prompt".  A value of 255
00141          * means "display menu immediately with no timeout".  Any
00142          * other value means "display prompt, wait this many seconds
00143          * for keypress, if key is F8, display menu, otherwise select
00144          * first boot item".
00145          */
00146         uint8_t timeout;
00147         /** Prompt to press F8 */
00148         char prompt[0];
00149 } __attribute__ (( packed ));
00150 
00151 /** PXE boot menu item */
00152 #define DHCP_PXE_BOOT_MENU_ITEM DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 71 )
00153 
00154 /** PXE boot menu item */
00155 struct dhcp_pxe_boot_menu_item {
00156         /** "Type"
00157          *
00158          * This field actually identifies the specific boot server (or
00159          * cluster of boot servers offering identical boot files).
00160          */
00161         uint16_t type;
00162         /** "Layer"
00163          *
00164          * Just don't ask.
00165          */
00166         uint16_t layer;
00167 } __attribute__ (( packed ));
00168 
00169 /** Requested IP address */
00170 #define DHCP_REQUESTED_ADDRESS 50
00171 
00172 /** Lease time */
00173 #define DHCP_LEASE_TIME 51
00174 
00175 /** Option overloading
00176  *
00177  * The value of this option is the bitwise-OR of zero or more
00178  * DHCP_OPTION_OVERLOAD_XXX constants.
00179  */
00180 #define DHCP_OPTION_OVERLOAD 52
00181 
00182 /** The "file" field is overloaded to contain extra DHCP options */
00183 #define DHCP_OPTION_OVERLOAD_FILE 1
00184 
00185 /** The "sname" field is overloaded to contain extra DHCP options */
00186 #define DHCP_OPTION_OVERLOAD_SNAME 2
00187 
00188 /** DHCP message type */
00189 #define DHCP_MESSAGE_TYPE 53
00190 #define DHCPNONE 0
00191 #define DHCPDISCOVER 1
00192 #define DHCPOFFER 2
00193 #define DHCPREQUEST 3
00194 #define DHCPDECLINE 4
00195 #define DHCPACK 5
00196 #define DHCPNAK 6
00197 #define DHCPRELEASE 7
00198 #define DHCPINFORM 8
00199 
00200 /** DHCP server identifier */
00201 #define DHCP_SERVER_IDENTIFIER 54
00202 
00203 /** Parameter request list */
00204 #define DHCP_PARAMETER_REQUEST_LIST 55
00205 
00206 /** Maximum DHCP message size */
00207 #define DHCP_MAX_MESSAGE_SIZE 57
00208 
00209 /** Vendor class identifier */
00210 #define DHCP_VENDOR_CLASS_ID 60
00211 
00212 /** Client identifier */
00213 #define DHCP_CLIENT_ID 61
00214 
00215 /** Client identifier */
00216 struct dhcp_client_id {
00217         /** Link-layer protocol */
00218         uint8_t ll_proto;
00219         /** Link-layer address */
00220         uint8_t ll_addr[MAX_LL_ADDR_LEN];
00221 } __attribute__ (( packed ));
00222 
00223 /** TFTP server name
00224  *
00225  * This option replaces the fixed "sname" field, when that field is
00226  * used to contain overloaded options.
00227  */
00228 #define DHCP_TFTP_SERVER_NAME 66
00229 
00230 /** Bootfile name
00231  *
00232  * This option replaces the fixed "file" field, when that field is
00233  * used to contain overloaded options.
00234  */
00235 #define DHCP_BOOTFILE_NAME 67
00236 
00237 /** User class identifier */
00238 #define DHCP_USER_CLASS_ID 77
00239 
00240 /** Client system architecture */
00241 #define DHCP_CLIENT_ARCHITECTURE 93
00242 
00243 /** Client network device interface */
00244 #define DHCP_CLIENT_NDI 94
00245 
00246 /** UUID client identifier */
00247 #define DHCP_CLIENT_UUID 97
00248 
00249 /** UUID client identifier */
00250 struct dhcp_client_uuid {
00251         /** Identifier type */
00252         uint8_t type;
00253         /** UUID */
00254         union uuid uuid;
00255 } __attribute__ (( packed ));
00256 
00257 #define DHCP_CLIENT_UUID_TYPE 0
00258 
00259 /** Etherboot-specific encapsulated options
00260  *
00261  * This encapsulated options field is used to contain all options
00262  * specific to Etherboot (i.e. not assigned by IANA or other standards
00263  * bodies).
00264  */
00265 #define DHCP_EB_ENCAP 175
00266 
00267 /** Priority of this options block
00268  *
00269  * This is a signed 8-bit integer field indicating the priority of
00270  * this block of options.  It can be used to specify the relative
00271  * priority of multiple option blocks (e.g. options from non-volatile
00272  * storage versus options from a DHCP server).
00273  */
00274 #define DHCP_EB_PRIORITY DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x01 )
00275 
00276 /** "Your" IP address
00277  *
00278  * This option is used internally to contain the value of the "yiaddr"
00279  * field, in order to provide a consistent approach to storing and
00280  * processing options.  It should never be present in a DHCP packet.
00281  */
00282 #define DHCP_EB_YIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x02 )
00283 
00284 /** "Server" IP address
00285  *
00286  * This option is used internally to contain the value of the "siaddr"
00287  * field, in order to provide a consistent approach to storing and
00288  * processing options.  It should never be present in a DHCP packet.
00289  */
00290 #define DHCP_EB_SIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x03 )
00291 
00292 /** Keep SAN drive registered
00293  *
00294  * If set to a non-zero value, gPXE will not detach any SAN drive
00295  * after failing to boot from it.  (This option is required in order
00296  * to perform a Windows Server 2008 installation direct to an iSCSI
00297  * target.)
00298  */
00299 #define DHCP_EB_KEEP_SAN DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x08 )
00300 
00301 /*
00302  * Tags in the range 0x10-0x7f are reserved for feature markers
00303  *
00304  */
00305 
00306 /** Skip PXE DHCP protocol extensions such as ProxyDHCP
00307  *
00308  * If set to a non-zero value, gPXE will not wait for ProxyDHCP offers
00309  * and will ignore any PXE-specific DHCP options that it receives.
00310  */
00311 #define DHCP_EB_NO_PXEDHCP DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb0 )
00312 
00313 /** Network device descriptor
00314  *
00315  * Byte 0 is the bus type ID; remaining bytes depend on the bus type.
00316  *
00317  * PCI devices:
00318  * Byte 0 : 1 (PCI)
00319  * Byte 1 : PCI vendor ID MSB
00320  * Byte 2 : PCI vendor ID LSB
00321  * Byte 3 : PCI device ID MSB
00322  * Byte 4 : PCI device ID LSB
00323  */
00324 #define DHCP_EB_BUS_ID DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb1 )
00325 
00326 /** Network device descriptor */
00327 struct dhcp_netdev_desc {
00328         /** Bus type ID */
00329         uint8_t type;
00330         /** Vendor ID */
00331         uint16_t vendor;
00332         /** Device ID */
00333         uint16_t device;
00334 } __attribute__ (( packed ));
00335 
00336 /** Use cached network settings
00337  *
00338  * Cached network settings may be available from a prior DHCP request
00339  * (if running as a PXE NBP), non-volatile storage on the NIC, or
00340  * settings set via the command line or an embedded image. If this
00341  * flag is not set, it will be assumed that those sources are
00342  * insufficient and that DHCP should still be run when autobooting.
00343  */
00344 #define DHCP_EB_USE_CACHED DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb2 )
00345 
00346 /** BIOS drive number
00347  *
00348  * This is the drive number for a drive emulated via INT 13.  0x80 is
00349  * the first hard disk, 0x81 is the second hard disk, etc.
00350  */
00351 #define DHCP_EB_BIOS_DRIVE DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbd )
00352 
00353 /** Username
00354  *
00355  * This will be used as the username for any required authentication.
00356  * It is expected that this option's value will be held in
00357  * non-volatile storage, rather than transmitted as part of a DHCP
00358  * packet.
00359  */
00360 #define DHCP_EB_USERNAME DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbe )
00361 
00362 /** Password
00363  *
00364  * This will be used as the password for any required authentication.
00365  * It is expected that this option's value will be held in
00366  * non-volatile storage, rather than transmitted as part of a DHCP
00367  * packet.
00368  */
00369 #define DHCP_EB_PASSWORD DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbf )
00370 
00371 /** Reverse username
00372  *
00373  * This will be used as the reverse username (i.e. the username
00374  * provided by the server) for any required authentication.  It is
00375  * expected that this option's value will be held in non-volatile
00376  * storage, rather than transmitted as part of a DHCP packet.
00377  */
00378 #define DHCP_EB_REVERSE_USERNAME DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc0 )
00379 
00380 /** Reverse password
00381  *
00382  * This will be used as the reverse password (i.e. the password
00383  * provided by the server) for any required authentication.  It is
00384  * expected that this option's value will be held in non-volatile
00385  * storage, rather than transmitted as part of a DHCP packet.
00386  */
00387 #define DHCP_EB_REVERSE_PASSWORD DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc1 )
00388 
00389 /** gPXE version number */
00390 #define DHCP_EB_VERSION DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xeb )
00391 
00392 /** iSCSI primary target IQN */
00393 #define DHCP_ISCSI_PRIMARY_TARGET_IQN 201
00394 
00395 /** iSCSI secondary target IQN */
00396 #define DHCP_ISCSI_SECONDARY_TARGET_IQN 202
00397 
00398 /** iSCSI initiator IQN */
00399 #define DHCP_ISCSI_INITIATOR_IQN 203
00400 
00401 /** Maximum normal DHCP option */
00402 #define DHCP_MAX_OPTION 254
00403 
00404 /** End of options
00405  *
00406  * This tag does not have a length field; it is always only a single
00407  * byte in length.
00408  */
00409 #define DHCP_END 255
00410 
00411 /** @} */
00412 
00413 /**
00414  * Count number of arguments to a variadic macro
00415  *
00416  * This rather neat, non-iterative solution is courtesy of Laurent
00417  * Deniau.
00418  *
00419  */
00420 #define _VA_ARG_COUNT(  _1,  _2,  _3,  _4,  _5,  _6,  _7,  _8,          \
00421                         _9, _10, _11, _12, _13, _14, _15, _16,          \
00422                        _17, _18, _19, _20, _21, _22, _23, _24,          \
00423                        _25, _26, _27, _28, _29, _30, _31, _32,          \
00424                        _33, _34, _35, _36, _37, _38, _39, _40,          \
00425                        _41, _42, _43, _44, _45, _46, _47, _48,          \
00426                        _49, _50, _51, _52, _53, _54, _55, _56,          \
00427                        _57, _58, _59, _60, _61, _62, _63,   N, ... ) N
00428 #define VA_ARG_COUNT( ... )                                             \
00429         _VA_ARG_COUNT ( __VA_ARGS__,                                    \
00430                         63, 62, 61, 60, 59, 58, 57, 56,                 \
00431                         55, 54, 53, 52, 51, 50, 49, 48,                 \
00432                         47, 46, 45, 44, 43, 42, 41, 40,                 \
00433                         39, 38, 37, 36, 35, 34, 33, 32,                 \
00434                         31, 30, 29, 28, 27, 26, 25, 24,                 \
00435                         23, 22, 21, 20, 19, 18, 17, 16,                 \
00436                         15, 14, 13, 12, 11, 10,  9,  8,                 \
00437                          7,  6,  5,  4,  3,  2,  1,  0 )
00438 
00439 /** Construct a DHCP option from a list of bytes */
00440 #define DHCP_OPTION( ... ) VA_ARG_COUNT ( __VA_ARGS__ ), __VA_ARGS__
00441 
00442 /** Construct a DHCP option from a list of characters */
00443 #define DHCP_STRING( ... ) DHCP_OPTION ( __VA_ARGS__ )
00444 
00445 /** Construct a byte-valued DHCP option */
00446 #define DHCP_BYTE( value ) DHCP_OPTION ( value )
00447 
00448 /** Construct a word-valued DHCP option */
00449 #define DHCP_WORD( value ) DHCP_OPTION ( ( ( (value) >> 8 ) & 0xff ),   \
00450                                          ( ( (value) >> 0 ) & 0xff ) )
00451 
00452 /** Construct a dword-valued DHCP option */
00453 #define DHCP_DWORD( value ) DHCP_OPTION ( ( ( (value) >> 24 ) & 0xff ), \
00454                                           ( ( (value) >> 16 ) & 0xff ), \
00455                                           ( ( (value) >> 8  ) & 0xff ), \
00456                                           ( ( (value) >> 0  ) & 0xff ) )
00457 
00458 /** Construct a DHCP encapsulated options field */
00459 #define DHCP_ENCAP( ... ) DHCP_OPTION ( __VA_ARGS__, DHCP_END )
00460 
00461 /**
00462  * A DHCP option
00463  *
00464  * DHCP options consist of a mandatory tag, a length field that is
00465  * mandatory for all options except @c DHCP_PAD and @c DHCP_END, and a
00466  * payload.  
00467  */
00468 struct dhcp_option {
00469         /** Tag
00470          *
00471          * Must be a @c DHCP_XXX value.
00472          */
00473         uint8_t tag;
00474         /** Length
00475          *
00476          * This is the length of the data field (i.e. excluding the
00477          * tag and length fields).  For the two tags @c DHCP_PAD and
00478          * @c DHCP_END, the length field is implicitly zero and is
00479          * also missing, i.e. these DHCP options are only a single
00480          * byte in length.
00481          */
00482         uint8_t len;
00483         /** Option data */
00484         uint8_t data[0];
00485 } __attribute__ (( packed ));
00486 
00487 /**
00488  * Length of a DHCP option header
00489  *
00490  * The header is the portion excluding the data, i.e. the tag and the
00491  * length.
00492  */
00493 #define DHCP_OPTION_HEADER_LEN ( offsetof ( struct dhcp_option, data ) )
00494 
00495 /** Maximum length for a single DHCP option */
00496 #define DHCP_MAX_LEN 0xff
00497 
00498 /**
00499  * A DHCP header
00500  *
00501  */
00502 struct dhcphdr {
00503         /** Operation
00504          *
00505          * This must be either @c BOOTP_REQUEST or @c BOOTP_REPLY.
00506          */
00507         uint8_t op;
00508         /** Hardware address type
00509          *
00510          * This is an ARPHRD_XXX constant.  Note that ARPHRD_XXX
00511          * constants are nominally 16 bits wide; this could be
00512          * considered to be a bug in the BOOTP/DHCP specification.
00513          */
00514         uint8_t htype;
00515         /** Hardware address length */
00516         uint8_t hlen;
00517         /** Number of hops from server */
00518         uint8_t hops;
00519         /** Transaction ID */
00520         uint32_t xid;
00521         /** Seconds since start of acquisition */
00522         uint16_t secs;
00523         /** Flags */
00524         uint16_t flags;
00525         /** "Client" IP address
00526          *
00527          * This is filled in if the client already has an IP address
00528          * assigned and can respond to ARP requests.
00529          */
00530         struct in_addr ciaddr;
00531         /** "Your" IP address
00532          *
00533          * This is the IP address assigned by the server to the client.
00534          */
00535         struct in_addr yiaddr;
00536         /** "Server" IP address
00537          *
00538          * This is the IP address of the next server to be used in the
00539          * boot process.
00540          */
00541         struct in_addr siaddr;
00542         /** "Gateway" IP address
00543          *
00544          * This is the IP address of the DHCP relay agent, if any.
00545          */
00546         struct in_addr giaddr;
00547         /** Client hardware address */
00548         uint8_t chaddr[16];
00549         /** Server host name (null terminated)
00550          *
00551          * This field may be overridden and contain DHCP options
00552          */
00553         char sname[64];
00554         /** Boot file name (null terminated)
00555          *
00556          * This field may be overridden and contain DHCP options
00557          */
00558         char file[128];
00559         /** DHCP magic cookie
00560          *
00561          * Must have the value @c DHCP_MAGIC_COOKIE.
00562          */
00563         uint32_t magic;
00564         /** DHCP options
00565          *
00566          * Variable length; extends to the end of the packet.  Minimum
00567          * length (for the sake of sanity) is 1, to allow for a single
00568          * @c DHCP_END tag.
00569          */
00570         uint8_t options[0];
00571 };
00572 
00573 /** Opcode for a request from client to server */
00574 #define BOOTP_REQUEST 1
00575 
00576 /** Opcode for a reply from server to client */
00577 #define BOOTP_REPLY 2
00578 
00579 /** BOOTP reply must be broadcast
00580  *
00581  * Clients that cannot accept unicast BOOTP replies must set this
00582  * flag.
00583  */
00584 #define BOOTP_FL_BROADCAST 0x8000
00585 
00586 /** DHCP magic cookie */
00587 #define DHCP_MAGIC_COOKIE 0x63825363UL
00588 
00589 /** DHCP minimum packet length
00590  *
00591  * This is the mandated minimum packet length that a DHCP participant
00592  * must be prepared to receive.
00593  */
00594 #define DHCP_MIN_LEN 552
00595 
00596 /** Timeouts for sending DHCP packets */
00597 #define DHCP_MIN_TIMEOUT ( 1 * TICKS_PER_SEC )
00598 #define DHCP_MAX_TIMEOUT ( 10 * TICKS_PER_SEC )
00599 
00600 /** Maximum time that we will wait for ProxyDHCP responses */
00601 #define PROXYDHCP_MAX_TIMEOUT ( 2 * TICKS_PER_SEC )
00602 
00603 /** Maximum time that we will wait for Boot Server responses */
00604 #define PXEBS_MAX_TIMEOUT ( 3 * TICKS_PER_SEC )
00605 
00606 /** Settings block name used for DHCP responses */
00607 #define DHCP_SETTINGS_NAME "dhcp"
00608 
00609 /** Settings block name used for ProxyDHCP responses */
00610 #define PROXYDHCP_SETTINGS_NAME "proxydhcp"
00611 
00612 /** Setting block name used for BootServerDHCP responses */
00613 #define PXEBS_SETTINGS_NAME "pxebs"
00614 
00615 extern void * dhcp_chaddr ( struct net_device *netdev, uint8_t *hlen,
00616                             uint16_t *flags );
00617 extern int dhcp_create_packet ( struct dhcp_packet *dhcppkt,
00618                                 struct net_device *netdev, uint8_t msgtype,
00619                                 const void *options, size_t options_len,
00620                                 void *data, size_t max_len );
00621 extern int dhcp_create_request ( struct dhcp_packet *dhcppkt,
00622                                  struct net_device *netdev,
00623                                  unsigned int msgtype, struct in_addr ciaddr,
00624                                  void *data, size_t max_len );
00625 extern int start_dhcp ( struct job_interface *job, struct net_device *netdev );
00626 extern int start_pxebs ( struct job_interface *job, struct net_device *netdev,
00627                          unsigned int pxe_type );
00628 
00629 /* In environments that can provide cached DHCP packets, this function
00630  * should look for such a packet and call store_cached_dhcpack() with
00631  * it if it exists.
00632  */
00633 __weak_decl ( void, get_cached_dhcpack, ( void ), (), );
00634 
00635 extern void store_cached_dhcpack ( userptr_t data, size_t len );
00636 
00637 #endif /* _GPXE_DHCP_H */

Generated on Tue Apr 6 20:01:06 2010 for gPXE by  doxygen 1.5.7.1