udhcp: make rfc derived doc more readable (but it still is contradictory)
[oweals/busybox.git] / networking / udhcp / dhcpc.h
1 /* vi: set sw=4 ts=4: */
2 #ifndef UDHCP_DHCPC_H
3 #define UDHCP_DHCPC_H 1
4
5 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
6
7 struct client_config_t {
8         uint8_t client_mac[6];          /* Our mac address */
9         char no_default_options;        /* Do not include default options in request */
10         IF_FEATURE_UDHCP_PORT(uint16_t port;)
11         int ifindex;                    /* Index number of the interface to use */
12         int verbose;
13         uint8_t opt_mask[256 / 8];      /* Bitmask of options to send (-O option) */
14         const char *interface;          /* The name of the interface to use */
15         char *pidfile;                  /* Optionally store the process ID */
16         const char *script;             /* User script to run at dhcp events */
17         uint8_t *clientid;              /* Optional client id to use */
18         uint8_t *vendorclass;           /* Optional vendor class-id to use */
19         uint8_t *hostname;              /* Optional hostname to use */
20         uint8_t *fqdn;                  /* Optional fully qualified domain name to use */
21 } FIX_ALIASING;
22
23 /* server_config sits in 1st half of bb_common_bufsiz1 */
24 #define client_config (*(struct client_config_t*)(&bb_common_bufsiz1[COMMON_BUFSIZE / 2]))
25
26 #if ENABLE_FEATURE_UDHCP_PORT
27 #define CLIENT_PORT (client_config.port)
28 #else
29 #define CLIENT_PORT 68
30 #endif
31
32 POP_SAVED_FUNCTION_VISIBILITY
33
34 #endif