1 |
/* vi: set sw=4 ts=4: */ |
/* vi: set sw=4 ts=4: */ |
2 |
/* dhcpc.h */ |
/* dhcpc.h */ |
3 |
|
#ifndef UDHCP_DHCPC_H |
4 |
|
#define UDHCP_DHCPC_H 1 |
5 |
|
|
6 |
#ifndef _DHCPC_H |
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
|
#define _DHCPC_H |
|
|
|
|
|
#if __GNUC_PREREQ(4,1) |
|
|
# pragma GCC visibility push(hidden) |
|
|
#endif |
|
7 |
|
|
8 |
struct client_config_t { |
struct client_config_t { |
9 |
uint8_t arp[6]; /* Our arp address */ |
uint8_t client_mac[6]; /* Our mac address */ |
10 |
/* TODO: combine flag fields into single "unsigned opt" */ |
char no_default_options; /* Do not include default options in request */ |
11 |
/* (can be set directly to the result of getopt32) */ |
IF_FEATURE_UDHCP_PORT(uint16_t port;) |
|
char no_default_options; /* Do not include default optins in request */ |
|
|
USE_FEATURE_UDHCP_PORT(uint16_t port;) |
|
12 |
int ifindex; /* Index number of the interface to use */ |
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) */ |
uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */ |
15 |
const char *interface; /* The name of the interface to use */ |
const char *interface; /* The name of the interface to use */ |
16 |
char *pidfile; /* Optionally store the process ID */ |
char *pidfile; /* Optionally store the process ID */ |
43 |
int send_renew(uint32_t xid, uint32_t server, uint32_t ciaddr) FAST_FUNC; |
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; |
int send_release(uint32_t server, uint32_t ciaddr) FAST_FUNC; |
45 |
|
|
46 |
int udhcp_recv_raw_packet(struct dhcpMessage *payload, int fd) FAST_FUNC; |
int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd) FAST_FUNC; |
47 |
|
|
48 |
#if __GNUC_PREREQ(4,1) |
POP_SAVED_FUNCTION_VISIBILITY |
|
# pragma GCC visibility pop |
|
|
#endif |
|
49 |
|
|
50 |
#endif |
#endif |