Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/networking/udhcp/dhcpc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (show annotations) (download)
Sun May 30 11:32:42 2010 UTC (13 years, 11 months ago) by niro
File MIME type: text/plain
File size: 1908 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 /* vi: set sw=4 ts=4: */
2 /* dhcpc.h */
3 #ifndef UDHCP_DHCPC_H
4 #define UDHCP_DHCPC_H 1
5
6 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
7
8 struct client_config_t {
9 uint8_t client_mac[6]; /* Our mac address */
10 char no_default_options; /* Do not include default options in request */
11 IF_FEATURE_UDHCP_PORT(uint16_t port;)
12 int ifindex; /* Index number of the interface to use */
13 int verbose;
14 uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */
15 const char *interface; /* The name of the interface to use */
16 char *pidfile; /* Optionally store the process ID */
17 const char *script; /* User script to run at dhcp events */
18 uint8_t *clientid; /* Optional client id to use */
19 uint8_t *vendorclass; /* Optional vendor class-id to use */
20 uint8_t *hostname; /* Optional hostname to use */
21 uint8_t *fqdn; /* Optional fully qualified domain name to use */
22 };
23
24 /* server_config sits in 1st half of bb_common_bufsiz1 */
25 #define client_config (*(struct client_config_t*)(&bb_common_bufsiz1[COMMON_BUFSIZE / 2]))
26
27 #if ENABLE_FEATURE_UDHCP_PORT
28 #define CLIENT_PORT (client_config.port)
29 #else
30 #define CLIENT_PORT 68
31 #endif
32
33
34 /*** clientpacket.h ***/
35
36 uint32_t random_xid(void) FAST_FUNC;
37 int send_discover(uint32_t xid, uint32_t requested) FAST_FUNC;
38 int send_select(uint32_t xid, uint32_t server, uint32_t requested) FAST_FUNC;
39 #if ENABLE_FEATURE_UDHCPC_ARPING
40 int send_decline(uint32_t xid, uint32_t server, uint32_t requested) FAST_FUNC;
41 #endif
42 int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) FAST_FUNC;
43 int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) FAST_FUNC;
44 int send_release(uint32_t server, uint32_t ciaddr) FAST_FUNC;
45
46 int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd) FAST_FUNC;
47
48 POP_SAVED_FUNCTION_VISIBILITY
49
50 #endif