![](/media/cache/profiles/68a15b5278e4f7c4c056df9d5f1d3b1f.jpg.50x50_q85.jpg)
This is an OSC library for the mbed, created to be compatible with Recotana\'s OSCClass library (http://recotana.com) for the Arduino with Ethernet shield. I have also used parts of the OSC Transceiver(Sender/Receiver) code by xshige. It has many limitations, but it works for simple things (check comments on the mbedOSC.h). It will be evolving. written by: Alvaro Cassinelli, 7.10.2011
EthernetNetIf/LPC1768/lwip/include/lwip/dhcp.h@0:f76708a93fb3, 2011-10-15 (annotated)
- Committer:
- mbedalvaro
- Date:
- Sat Oct 15 14:15:55 2011 +0000
- Revision:
- 0:f76708a93fb3
First working test of this simple OSC library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedalvaro | 0:f76708a93fb3 | 1 | /** @file |
mbedalvaro | 0:f76708a93fb3 | 2 | */ |
mbedalvaro | 0:f76708a93fb3 | 3 | |
mbedalvaro | 0:f76708a93fb3 | 4 | #ifndef __LWIP_DHCP_H__ |
mbedalvaro | 0:f76708a93fb3 | 5 | #define __LWIP_DHCP_H__ |
mbedalvaro | 0:f76708a93fb3 | 6 | |
mbedalvaro | 0:f76708a93fb3 | 7 | #include "lwip/opt.h" |
mbedalvaro | 0:f76708a93fb3 | 8 | |
mbedalvaro | 0:f76708a93fb3 | 9 | #if LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ |
mbedalvaro | 0:f76708a93fb3 | 10 | |
mbedalvaro | 0:f76708a93fb3 | 11 | #include "lwip/netif.h" |
mbedalvaro | 0:f76708a93fb3 | 12 | #include "lwip/udp.h" |
mbedalvaro | 0:f76708a93fb3 | 13 | |
mbedalvaro | 0:f76708a93fb3 | 14 | #ifdef __cplusplus |
mbedalvaro | 0:f76708a93fb3 | 15 | extern "C" { |
mbedalvaro | 0:f76708a93fb3 | 16 | #endif |
mbedalvaro | 0:f76708a93fb3 | 17 | |
mbedalvaro | 0:f76708a93fb3 | 18 | /** period (in seconds) of the application calling dhcp_coarse_tmr() */ |
mbedalvaro | 0:f76708a93fb3 | 19 | #define DHCP_COARSE_TIMER_SECS 60 |
mbedalvaro | 0:f76708a93fb3 | 20 | /** period (in milliseconds) of the application calling dhcp_coarse_tmr() */ |
mbedalvaro | 0:f76708a93fb3 | 21 | #define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL) |
mbedalvaro | 0:f76708a93fb3 | 22 | /** period (in milliseconds) of the application calling dhcp_fine_tmr() */ |
mbedalvaro | 0:f76708a93fb3 | 23 | #define DHCP_FINE_TIMER_MSECS 500 |
mbedalvaro | 0:f76708a93fb3 | 24 | |
mbedalvaro | 0:f76708a93fb3 | 25 | #define DHCP_CHADDR_LEN 16U |
mbedalvaro | 0:f76708a93fb3 | 26 | #define DHCP_SNAME_LEN 64U |
mbedalvaro | 0:f76708a93fb3 | 27 | #define DHCP_FILE_LEN 128U |
mbedalvaro | 0:f76708a93fb3 | 28 | |
mbedalvaro | 0:f76708a93fb3 | 29 | struct dhcp |
mbedalvaro | 0:f76708a93fb3 | 30 | { |
mbedalvaro | 0:f76708a93fb3 | 31 | /** transaction identifier of last sent request */ |
mbedalvaro | 0:f76708a93fb3 | 32 | u32_t xid; |
mbedalvaro | 0:f76708a93fb3 | 33 | /** our connection to the DHCP server */ |
mbedalvaro | 0:f76708a93fb3 | 34 | struct udp_pcb *pcb; |
mbedalvaro | 0:f76708a93fb3 | 35 | /** incoming msg */ |
mbedalvaro | 0:f76708a93fb3 | 36 | struct dhcp_msg *msg_in; |
mbedalvaro | 0:f76708a93fb3 | 37 | /** current DHCP state machine state */ |
mbedalvaro | 0:f76708a93fb3 | 38 | u8_t state; |
mbedalvaro | 0:f76708a93fb3 | 39 | /** retries of current request */ |
mbedalvaro | 0:f76708a93fb3 | 40 | u8_t tries; |
mbedalvaro | 0:f76708a93fb3 | 41 | #if LWIP_DHCP_AUTOIP_COOP |
mbedalvaro | 0:f76708a93fb3 | 42 | u8_t autoip_coop_state; |
mbedalvaro | 0:f76708a93fb3 | 43 | #endif |
mbedalvaro | 0:f76708a93fb3 | 44 | u8_t subnet_mask_given; |
mbedalvaro | 0:f76708a93fb3 | 45 | |
mbedalvaro | 0:f76708a93fb3 | 46 | struct pbuf *p_out; /* pbuf of outcoming msg */ |
mbedalvaro | 0:f76708a93fb3 | 47 | struct dhcp_msg *msg_out; /* outgoing msg */ |
mbedalvaro | 0:f76708a93fb3 | 48 | u16_t options_out_len; /* outgoing msg options length */ |
mbedalvaro | 0:f76708a93fb3 | 49 | u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */ |
mbedalvaro | 0:f76708a93fb3 | 50 | u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */ |
mbedalvaro | 0:f76708a93fb3 | 51 | u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */ |
mbedalvaro | 0:f76708a93fb3 | 52 | ip_addr_t server_ip_addr; /* dhcp server address that offered this lease */ |
mbedalvaro | 0:f76708a93fb3 | 53 | ip_addr_t offered_ip_addr; |
mbedalvaro | 0:f76708a93fb3 | 54 | ip_addr_t offered_sn_mask; |
mbedalvaro | 0:f76708a93fb3 | 55 | ip_addr_t offered_gw_addr; |
mbedalvaro | 0:f76708a93fb3 | 56 | |
mbedalvaro | 0:f76708a93fb3 | 57 | u32_t offered_t0_lease; /* lease period (in seconds) */ |
mbedalvaro | 0:f76708a93fb3 | 58 | u32_t offered_t1_renew; /* recommended renew time (usually 50% of lease period) */ |
mbedalvaro | 0:f76708a93fb3 | 59 | u32_t offered_t2_rebind; /* recommended rebind time (usually 66% of lease period) */ |
mbedalvaro | 0:f76708a93fb3 | 60 | /* @todo: LWIP_DHCP_BOOTP_FILE configuration option? |
mbedalvaro | 0:f76708a93fb3 | 61 | integrate with possible TFTP-client for booting? */ |
mbedalvaro | 0:f76708a93fb3 | 62 | #if LWIP_DHCP_BOOTP_FILE |
mbedalvaro | 0:f76708a93fb3 | 63 | ip_addr_t offered_si_addr; |
mbedalvaro | 0:f76708a93fb3 | 64 | char boot_file_name[DHCP_FILE_LEN]; |
mbedalvaro | 0:f76708a93fb3 | 65 | #endif /* LWIP_DHCP_BOOTPFILE */ |
mbedalvaro | 0:f76708a93fb3 | 66 | }; |
mbedalvaro | 0:f76708a93fb3 | 67 | |
mbedalvaro | 0:f76708a93fb3 | 68 | /* MUST be compiled with "pack structs" or equivalent! */ |
mbedalvaro | 0:f76708a93fb3 | 69 | #ifdef PACK_STRUCT_USE_INCLUDES |
mbedalvaro | 0:f76708a93fb3 | 70 | # include "arch/bpstruct.h" |
mbedalvaro | 0:f76708a93fb3 | 71 | #endif |
mbedalvaro | 0:f76708a93fb3 | 72 | PACK_STRUCT_BEGIN |
mbedalvaro | 0:f76708a93fb3 | 73 | /** minimum set of fields of any DHCP message */ |
mbedalvaro | 0:f76708a93fb3 | 74 | struct dhcp_msg |
mbedalvaro | 0:f76708a93fb3 | 75 | { |
mbedalvaro | 0:f76708a93fb3 | 76 | PACK_STRUCT_FIELD(u8_t op); |
mbedalvaro | 0:f76708a93fb3 | 77 | PACK_STRUCT_FIELD(u8_t htype); |
mbedalvaro | 0:f76708a93fb3 | 78 | PACK_STRUCT_FIELD(u8_t hlen); |
mbedalvaro | 0:f76708a93fb3 | 79 | PACK_STRUCT_FIELD(u8_t hops); |
mbedalvaro | 0:f76708a93fb3 | 80 | PACK_STRUCT_FIELD(u32_t xid); |
mbedalvaro | 0:f76708a93fb3 | 81 | PACK_STRUCT_FIELD(u16_t secs); |
mbedalvaro | 0:f76708a93fb3 | 82 | PACK_STRUCT_FIELD(u16_t flags); |
mbedalvaro | 0:f76708a93fb3 | 83 | PACK_STRUCT_FIELD(ip_addr_p_t ciaddr); |
mbedalvaro | 0:f76708a93fb3 | 84 | PACK_STRUCT_FIELD(ip_addr_p_t yiaddr); |
mbedalvaro | 0:f76708a93fb3 | 85 | PACK_STRUCT_FIELD(ip_addr_p_t siaddr); |
mbedalvaro | 0:f76708a93fb3 | 86 | PACK_STRUCT_FIELD(ip_addr_p_t giaddr); |
mbedalvaro | 0:f76708a93fb3 | 87 | PACK_STRUCT_FIELD(u8_t chaddr[DHCP_CHADDR_LEN]); |
mbedalvaro | 0:f76708a93fb3 | 88 | PACK_STRUCT_FIELD(u8_t sname[DHCP_SNAME_LEN]); |
mbedalvaro | 0:f76708a93fb3 | 89 | PACK_STRUCT_FIELD(u8_t file[DHCP_FILE_LEN]); |
mbedalvaro | 0:f76708a93fb3 | 90 | PACK_STRUCT_FIELD(u32_t cookie); |
mbedalvaro | 0:f76708a93fb3 | 91 | #define DHCP_MIN_OPTIONS_LEN 68U |
mbedalvaro | 0:f76708a93fb3 | 92 | /** make sure user does not configure this too small */ |
mbedalvaro | 0:f76708a93fb3 | 93 | #if ((defined(DHCP_OPTIONS_LEN)) && (DHCP_OPTIONS_LEN < DHCP_MIN_OPTIONS_LEN)) |
mbedalvaro | 0:f76708a93fb3 | 94 | # undef DHCP_OPTIONS_LEN |
mbedalvaro | 0:f76708a93fb3 | 95 | #endif |
mbedalvaro | 0:f76708a93fb3 | 96 | /** allow this to be configured in lwipopts.h, but not too small */ |
mbedalvaro | 0:f76708a93fb3 | 97 | #if (!defined(DHCP_OPTIONS_LEN)) |
mbedalvaro | 0:f76708a93fb3 | 98 | /** set this to be sufficient for your options in outgoing DHCP msgs */ |
mbedalvaro | 0:f76708a93fb3 | 99 | # define DHCP_OPTIONS_LEN DHCP_MIN_OPTIONS_LEN |
mbedalvaro | 0:f76708a93fb3 | 100 | #endif |
mbedalvaro | 0:f76708a93fb3 | 101 | PACK_STRUCT_FIELD(u8_t options[DHCP_OPTIONS_LEN]); |
mbedalvaro | 0:f76708a93fb3 | 102 | } PACK_STRUCT_STRUCT; |
mbedalvaro | 0:f76708a93fb3 | 103 | PACK_STRUCT_END |
mbedalvaro | 0:f76708a93fb3 | 104 | #ifdef PACK_STRUCT_USE_INCLUDES |
mbedalvaro | 0:f76708a93fb3 | 105 | # include "arch/epstruct.h" |
mbedalvaro | 0:f76708a93fb3 | 106 | #endif |
mbedalvaro | 0:f76708a93fb3 | 107 | |
mbedalvaro | 0:f76708a93fb3 | 108 | void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp); |
mbedalvaro | 0:f76708a93fb3 | 109 | /** start DHCP configuration */ |
mbedalvaro | 0:f76708a93fb3 | 110 | err_t dhcp_start(struct netif *netif); |
mbedalvaro | 0:f76708a93fb3 | 111 | /** enforce early lease renewal (not needed normally)*/ |
mbedalvaro | 0:f76708a93fb3 | 112 | err_t dhcp_renew(struct netif *netif); |
mbedalvaro | 0:f76708a93fb3 | 113 | /** release the DHCP lease, usually called before dhcp_stop()*/ |
mbedalvaro | 0:f76708a93fb3 | 114 | err_t dhcp_release(struct netif *netif); |
mbedalvaro | 0:f76708a93fb3 | 115 | /** stop DHCP configuration */ |
mbedalvaro | 0:f76708a93fb3 | 116 | void dhcp_stop(struct netif *netif); |
mbedalvaro | 0:f76708a93fb3 | 117 | /** inform server of our manual IP address */ |
mbedalvaro | 0:f76708a93fb3 | 118 | void dhcp_inform(struct netif *netif); |
mbedalvaro | 0:f76708a93fb3 | 119 | /** Handle a possible change in the network configuration */ |
mbedalvaro | 0:f76708a93fb3 | 120 | void dhcp_network_changed(struct netif *netif); |
mbedalvaro | 0:f76708a93fb3 | 121 | |
mbedalvaro | 0:f76708a93fb3 | 122 | /** if enabled, check whether the offered IP address is not in use, using ARP */ |
mbedalvaro | 0:f76708a93fb3 | 123 | #if DHCP_DOES_ARP_CHECK |
mbedalvaro | 0:f76708a93fb3 | 124 | void dhcp_arp_reply(struct netif *netif, ip_addr_t *addr); |
mbedalvaro | 0:f76708a93fb3 | 125 | #endif |
mbedalvaro | 0:f76708a93fb3 | 126 | |
mbedalvaro | 0:f76708a93fb3 | 127 | /** to be called every minute */ |
mbedalvaro | 0:f76708a93fb3 | 128 | void dhcp_coarse_tmr(void); |
mbedalvaro | 0:f76708a93fb3 | 129 | /** to be called every half second */ |
mbedalvaro | 0:f76708a93fb3 | 130 | void dhcp_fine_tmr(void); |
mbedalvaro | 0:f76708a93fb3 | 131 | |
mbedalvaro | 0:f76708a93fb3 | 132 | /** DHCP message item offsets and length */ |
mbedalvaro | 0:f76708a93fb3 | 133 | #define DHCP_OP_OFS 0 |
mbedalvaro | 0:f76708a93fb3 | 134 | #define DHCP_HTYPE_OFS 1 |
mbedalvaro | 0:f76708a93fb3 | 135 | #define DHCP_HLEN_OFS 2 |
mbedalvaro | 0:f76708a93fb3 | 136 | #define DHCP_HOPS_OFS 3 |
mbedalvaro | 0:f76708a93fb3 | 137 | #define DHCP_XID_OFS 4 |
mbedalvaro | 0:f76708a93fb3 | 138 | #define DHCP_SECS_OFS 8 |
mbedalvaro | 0:f76708a93fb3 | 139 | #define DHCP_FLAGS_OFS 10 |
mbedalvaro | 0:f76708a93fb3 | 140 | #define DHCP_CIADDR_OFS 12 |
mbedalvaro | 0:f76708a93fb3 | 141 | #define DHCP_YIADDR_OFS 16 |
mbedalvaro | 0:f76708a93fb3 | 142 | #define DHCP_SIADDR_OFS 20 |
mbedalvaro | 0:f76708a93fb3 | 143 | #define DHCP_GIADDR_OFS 24 |
mbedalvaro | 0:f76708a93fb3 | 144 | #define DHCP_CHADDR_OFS 28 |
mbedalvaro | 0:f76708a93fb3 | 145 | #define DHCP_SNAME_OFS 44 |
mbedalvaro | 0:f76708a93fb3 | 146 | #define DHCP_FILE_OFS 108 |
mbedalvaro | 0:f76708a93fb3 | 147 | #define DHCP_MSG_LEN 236 |
mbedalvaro | 0:f76708a93fb3 | 148 | |
mbedalvaro | 0:f76708a93fb3 | 149 | #define DHCP_COOKIE_OFS DHCP_MSG_LEN |
mbedalvaro | 0:f76708a93fb3 | 150 | #define DHCP_OPTIONS_OFS (DHCP_MSG_LEN + 4) |
mbedalvaro | 0:f76708a93fb3 | 151 | |
mbedalvaro | 0:f76708a93fb3 | 152 | #define DHCP_CLIENT_PORT 68 |
mbedalvaro | 0:f76708a93fb3 | 153 | #define DHCP_SERVER_PORT 67 |
mbedalvaro | 0:f76708a93fb3 | 154 | |
mbedalvaro | 0:f76708a93fb3 | 155 | /** DHCP client states */ |
mbedalvaro | 0:f76708a93fb3 | 156 | #define DHCP_OFF 0 |
mbedalvaro | 0:f76708a93fb3 | 157 | #define DHCP_REQUESTING 1 |
mbedalvaro | 0:f76708a93fb3 | 158 | #define DHCP_INIT 2 |
mbedalvaro | 0:f76708a93fb3 | 159 | #define DHCP_REBOOTING 3 |
mbedalvaro | 0:f76708a93fb3 | 160 | #define DHCP_REBINDING 4 |
mbedalvaro | 0:f76708a93fb3 | 161 | #define DHCP_RENEWING 5 |
mbedalvaro | 0:f76708a93fb3 | 162 | #define DHCP_SELECTING 6 |
mbedalvaro | 0:f76708a93fb3 | 163 | #define DHCP_INFORMING 7 |
mbedalvaro | 0:f76708a93fb3 | 164 | #define DHCP_CHECKING 8 |
mbedalvaro | 0:f76708a93fb3 | 165 | #define DHCP_PERMANENT 9 |
mbedalvaro | 0:f76708a93fb3 | 166 | #define DHCP_BOUND 10 |
mbedalvaro | 0:f76708a93fb3 | 167 | /** not yet implemented #define DHCP_RELEASING 11 */ |
mbedalvaro | 0:f76708a93fb3 | 168 | #define DHCP_BACKING_OFF 12 |
mbedalvaro | 0:f76708a93fb3 | 169 | |
mbedalvaro | 0:f76708a93fb3 | 170 | /** AUTOIP cooperatation flags */ |
mbedalvaro | 0:f76708a93fb3 | 171 | #define DHCP_AUTOIP_COOP_STATE_OFF 0 |
mbedalvaro | 0:f76708a93fb3 | 172 | #define DHCP_AUTOIP_COOP_STATE_ON 1 |
mbedalvaro | 0:f76708a93fb3 | 173 | |
mbedalvaro | 0:f76708a93fb3 | 174 | #define DHCP_BOOTREQUEST 1 |
mbedalvaro | 0:f76708a93fb3 | 175 | #define DHCP_BOOTREPLY 2 |
mbedalvaro | 0:f76708a93fb3 | 176 | |
mbedalvaro | 0:f76708a93fb3 | 177 | /** DHCP message types */ |
mbedalvaro | 0:f76708a93fb3 | 178 | #define DHCP_DISCOVER 1 |
mbedalvaro | 0:f76708a93fb3 | 179 | #define DHCP_OFFER 2 |
mbedalvaro | 0:f76708a93fb3 | 180 | #define DHCP_REQUEST 3 |
mbedalvaro | 0:f76708a93fb3 | 181 | #define DHCP_DECLINE 4 |
mbedalvaro | 0:f76708a93fb3 | 182 | #define DHCP_ACK 5 |
mbedalvaro | 0:f76708a93fb3 | 183 | #define DHCP_NAK 6 |
mbedalvaro | 0:f76708a93fb3 | 184 | #define DHCP_RELEASE 7 |
mbedalvaro | 0:f76708a93fb3 | 185 | #define DHCP_INFORM 8 |
mbedalvaro | 0:f76708a93fb3 | 186 | |
mbedalvaro | 0:f76708a93fb3 | 187 | /** DHCP hardware type, currently only ethernet is supported */ |
mbedalvaro | 0:f76708a93fb3 | 188 | #define DHCP_HTYPE_ETH 1 |
mbedalvaro | 0:f76708a93fb3 | 189 | |
mbedalvaro | 0:f76708a93fb3 | 190 | #define DHCP_MAGIC_COOKIE 0x63825363UL |
mbedalvaro | 0:f76708a93fb3 | 191 | |
mbedalvaro | 0:f76708a93fb3 | 192 | /* This is a list of options for BOOTP and DHCP, see RFC 2132 for descriptions */ |
mbedalvaro | 0:f76708a93fb3 | 193 | |
mbedalvaro | 0:f76708a93fb3 | 194 | /** BootP options */ |
mbedalvaro | 0:f76708a93fb3 | 195 | #define DHCP_OPTION_PAD 0 |
mbedalvaro | 0:f76708a93fb3 | 196 | #define DHCP_OPTION_SUBNET_MASK 1 /* RFC 2132 3.3 */ |
mbedalvaro | 0:f76708a93fb3 | 197 | #define DHCP_OPTION_ROUTER 3 |
mbedalvaro | 0:f76708a93fb3 | 198 | #define DHCP_OPTION_DNS_SERVER 6 |
mbedalvaro | 0:f76708a93fb3 | 199 | #define DHCP_OPTION_HOSTNAME 12 |
mbedalvaro | 0:f76708a93fb3 | 200 | #define DHCP_OPTION_IP_TTL 23 |
mbedalvaro | 0:f76708a93fb3 | 201 | #define DHCP_OPTION_MTU 26 |
mbedalvaro | 0:f76708a93fb3 | 202 | #define DHCP_OPTION_BROADCAST 28 |
mbedalvaro | 0:f76708a93fb3 | 203 | #define DHCP_OPTION_TCP_TTL 37 |
mbedalvaro | 0:f76708a93fb3 | 204 | #define DHCP_OPTION_END 255 |
mbedalvaro | 0:f76708a93fb3 | 205 | |
mbedalvaro | 0:f76708a93fb3 | 206 | /** DHCP options */ |
mbedalvaro | 0:f76708a93fb3 | 207 | #define DHCP_OPTION_REQUESTED_IP 50 /* RFC 2132 9.1, requested IP address */ |
mbedalvaro | 0:f76708a93fb3 | 208 | #define DHCP_OPTION_LEASE_TIME 51 /* RFC 2132 9.2, time in seconds, in 4 bytes */ |
mbedalvaro | 0:f76708a93fb3 | 209 | #define DHCP_OPTION_OVERLOAD 52 /* RFC2132 9.3, use file and/or sname field for options */ |
mbedalvaro | 0:f76708a93fb3 | 210 | |
mbedalvaro | 0:f76708a93fb3 | 211 | #define DHCP_OPTION_MESSAGE_TYPE 53 /* RFC 2132 9.6, important for DHCP */ |
mbedalvaro | 0:f76708a93fb3 | 212 | #define DHCP_OPTION_MESSAGE_TYPE_LEN 1 |
mbedalvaro | 0:f76708a93fb3 | 213 | |
mbedalvaro | 0:f76708a93fb3 | 214 | #define DHCP_OPTION_SERVER_ID 54 /* RFC 2132 9.7, server IP address */ |
mbedalvaro | 0:f76708a93fb3 | 215 | #define DHCP_OPTION_PARAMETER_REQUEST_LIST 55 /* RFC 2132 9.8, requested option types */ |
mbedalvaro | 0:f76708a93fb3 | 216 | |
mbedalvaro | 0:f76708a93fb3 | 217 | #define DHCP_OPTION_MAX_MSG_SIZE 57 /* RFC 2132 9.10, message size accepted >= 576 */ |
mbedalvaro | 0:f76708a93fb3 | 218 | #define DHCP_OPTION_MAX_MSG_SIZE_LEN 2 |
mbedalvaro | 0:f76708a93fb3 | 219 | |
mbedalvaro | 0:f76708a93fb3 | 220 | #define DHCP_OPTION_T1 58 /* T1 renewal time */ |
mbedalvaro | 0:f76708a93fb3 | 221 | #define DHCP_OPTION_T2 59 /* T2 rebinding time */ |
mbedalvaro | 0:f76708a93fb3 | 222 | #define DHCP_OPTION_US 60 |
mbedalvaro | 0:f76708a93fb3 | 223 | #define DHCP_OPTION_CLIENT_ID 61 |
mbedalvaro | 0:f76708a93fb3 | 224 | #define DHCP_OPTION_TFTP_SERVERNAME 66 |
mbedalvaro | 0:f76708a93fb3 | 225 | #define DHCP_OPTION_BOOTFILE 67 |
mbedalvaro | 0:f76708a93fb3 | 226 | |
mbedalvaro | 0:f76708a93fb3 | 227 | /** possible combinations of overloading the file and sname fields with options */ |
mbedalvaro | 0:f76708a93fb3 | 228 | #define DHCP_OVERLOAD_NONE 0 |
mbedalvaro | 0:f76708a93fb3 | 229 | #define DHCP_OVERLOAD_FILE 1 |
mbedalvaro | 0:f76708a93fb3 | 230 | #define DHCP_OVERLOAD_SNAME 2 |
mbedalvaro | 0:f76708a93fb3 | 231 | #define DHCP_OVERLOAD_SNAME_FILE 3 |
mbedalvaro | 0:f76708a93fb3 | 232 | |
mbedalvaro | 0:f76708a93fb3 | 233 | #ifdef __cplusplus |
mbedalvaro | 0:f76708a93fb3 | 234 | } |
mbedalvaro | 0:f76708a93fb3 | 235 | #endif |
mbedalvaro | 0:f76708a93fb3 | 236 | |
mbedalvaro | 0:f76708a93fb3 | 237 | #endif /* LWIP_DHCP */ |
mbedalvaro | 0:f76708a93fb3 | 238 | |
mbedalvaro | 0:f76708a93fb3 | 239 | #endif /*__LWIP_DHCP_H__*/ |