Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 816 - (show annotations) (download)
Fri Apr 24 18:33:46 2009 UTC (15 years, 1 month ago) by niro
File MIME type: text/plain
File size: 2049 byte(s)
-updated to busybox-1.13.4
1 /* vi: set sw=4 ts=4: */
2 /* dhcpc.h */
3
4 #ifndef _DHCPC_H
5 #define _DHCPC_H
6
7 #if __GNUC_PREREQ(4,1)
8 # pragma GCC visibility push(hidden)
9 #endif
10
11 struct client_config_t {
12 uint8_t arp[6]; /* Our arp address */
13 /* TODO: combine flag fields into single "unsigned opt" */
14 /* (can be set directly to the result of getopt32) */
15 char no_default_options; /* Do not include default optins in request */
16 USE_FEATURE_UDHCP_PORT(uint16_t port;)
17 int ifindex; /* Index number of the interface to use */
18 uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */
19 const char *interface; /* The name of the interface to use */
20 char *pidfile; /* Optionally store the process ID */
21 const char *script; /* User script to run at dhcp events */
22 uint8_t *clientid; /* Optional client id to use */
23 uint8_t *vendorclass; /* Optional vendor class-id to use */
24 uint8_t *hostname; /* Optional hostname to use */
25 uint8_t *fqdn; /* Optional fully qualified domain name to use */
26 };
27
28 /* server_config sits in 1st half of bb_common_bufsiz1 */
29 #define client_config (*(struct client_config_t*)(&bb_common_bufsiz1[COMMON_BUFSIZE / 2]))
30
31 #if ENABLE_FEATURE_UDHCP_PORT
32 #define CLIENT_PORT (client_config.port)
33 #else
34 #define CLIENT_PORT 68
35 #endif
36
37
38 /*** clientpacket.h ***/
39
40 uint32_t random_xid(void) FAST_FUNC;
41 int send_discover(uint32_t xid, uint32_t requested) FAST_FUNC;
42 int send_select(uint32_t xid, uint32_t server, uint32_t requested) FAST_FUNC;
43 #if ENABLE_FEATURE_UDHCPC_ARPING
44 int send_decline(uint32_t xid, uint32_t server, uint32_t requested) FAST_FUNC;
45 #endif
46 int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) FAST_FUNC;
47 int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) FAST_FUNC;
48 int send_release(uint32_t server, uint32_t ciaddr) FAST_FUNC;
49
50 int udhcp_recv_raw_packet(struct dhcpMessage *payload, int fd) FAST_FUNC;
51
52 #if __GNUC_PREREQ(4,1)
53 # pragma GCC visibility pop
54 #endif
55
56 #endif