Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 1 | /* dhcpc.h */ |
| 2 | #ifndef _DHCPC_H |
| 3 | #define _DHCPC_H |
| 4 | |
Russ Dill | 4e864a3 | 2003-12-18 22:25:38 +0000 | [diff] [blame] | 5 | #define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" |
| 6 | |
| 7 | /* allow libbb_udhcp.h to redefine DEFAULT_SCRIPT */ |
| 8 | #include "libbb_udhcp.h" |
| 9 | |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 10 | #define INIT_SELECTING 0 |
| 11 | #define REQUESTING 1 |
| 12 | #define BOUND 2 |
| 13 | #define RENEWING 3 |
| 14 | #define REBINDING 4 |
| 15 | #define INIT_REBOOT 5 |
| 16 | #define RENEW_REQUESTED 6 |
| 17 | #define RELEASED 7 |
| 18 | |
| 19 | |
| 20 | struct client_config_t { |
| 21 | char foreground; /* Do not fork */ |
| 22 | char quit_after_lease; /* Quit after obtaining lease */ |
| 23 | char abort_if_no_lease; /* Abort if no lease */ |
| 24 | char background_if_no_lease; /* Fork to background if no lease */ |
| 25 | char *interface; /* The name of the interface to use */ |
| 26 | char *pidfile; /* Optionally store the process ID */ |
| 27 | char *script; /* User script to run at dhcp events */ |
Eric Andersen | ad95373 | 2004-01-30 23:45:53 +0000 | [diff] [blame] | 28 | uint8_t *clientid; /* Optional client id to use */ |
| 29 | uint8_t *hostname; /* Optional hostname to use */ |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 30 | int ifindex; /* Index number of the interface to use */ |
Eric Andersen | ad95373 | 2004-01-30 23:45:53 +0000 | [diff] [blame] | 31 | uint8_t arp[6]; /* Our arp address */ |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | extern struct client_config_t client_config; |
| 35 | |
| 36 | |
| 37 | #endif |