Annotation of /trunk/mkinitrd-magellan/busybox/networking/udhcp/dhcpc.h
Parent Directory | Revision Log
Revision 984 -
(hide annotations)
(download)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File MIME type: text/plain
File size: 1908 byte(s)
Sun May 30 11:32:42 2010 UTC (14 years 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 | niro | 532 | /* vi: set sw=4 ts=4: */ |
2 | /* dhcpc.h */ | ||
3 | niro | 984 | #ifndef UDHCP_DHCPC_H |
4 | #define UDHCP_DHCPC_H 1 | ||
5 | niro | 816 | |
6 | niro | 984 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
7 | niro | 532 | |
8 | struct client_config_t { | ||
9 | niro | 984 | 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 | niro | 816 | int ifindex; /* Index number of the interface to use */ |
13 | niro | 984 | int verbose; |
14 | niro | 816 | 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 | niro | 532 | char *pidfile; /* Optionally store the process ID */ |
17 | niro | 816 | const char *script; /* User script to run at dhcp events */ |
18 | niro | 532 | 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 | niro | 816 | /* 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 | niro | 532 | |
27 | niro | 816 | #if ENABLE_FEATURE_UDHCP_PORT |
28 | #define CLIENT_PORT (client_config.port) | ||
29 | #else | ||
30 | #define CLIENT_PORT 68 | ||
31 | #endif | ||
32 | niro | 532 | |
33 | niro | 816 | |
34 | niro | 532 | /*** clientpacket.h ***/ |
35 | |||
36 | niro | 816 | 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 | niro | 532 | |
46 | niro | 984 | int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd) FAST_FUNC; |
47 | niro | 532 | |
48 | niro | 984 | POP_SAVED_FUNCTION_VISIBILITY |
49 | niro | 816 | |
50 | #endif |