blob: 9c4aa95f7b19b0a749aa5891b9d2ffe053261852 [file] [log] [blame]
Russ Dill61fb4892002-10-14 21:41:28 +00001/* dhcpc.h */
2#ifndef _DHCPC_H
3#define _DHCPC_H
4
Russ Dill4e864a32003-12-18 22:25:38 +00005#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 Dill61fb4892002-10-14 21:41:28 +000010#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
20struct 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 Andersenad953732004-01-30 23:45:53 +000028 uint8_t *clientid; /* Optional client id to use */
29 uint8_t *hostname; /* Optional hostname to use */
Russ Dill61fb4892002-10-14 21:41:28 +000030 int ifindex; /* Index number of the interface to use */
Eric Andersenad953732004-01-30 23:45:53 +000031 uint8_t arp[6]; /* Our arp address */
Russ Dill61fb4892002-10-14 21:41:28 +000032};
33
34extern struct client_config_t client_config;
35
36
37#endif