dhcp_debug.c
Go to the documentation of this file.
1 /**
2  * @file dhcp_debug.c
3  * @brief Data logging functions for debugging purpose (DHCP)
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 1.9.6
29  **/
30 
31 //Switch to the appropriate trace level
32 #define TRACE_LEVEL DHCP_TRACE_LEVEL
33 
34 //Dependencies
35 #include "core/net.h"
36 #include "dhcp/dhcp_debug.h"
37 #include "debug.h"
38 
39 //Check TCP/IP stack configuration
40 #if (IPV4_SUPPORT == ENABLED && DHCP_TRACE_LEVEL >= TRACE_LEVEL_DEBUG)
41 
42 //DHCP message opcodes
43 static const char_t *opcodeLabel[] =
44 {
45  "", //0
46  "BOOTREQUEST", //1
47  "BOOTREPLY" //2
48 };
49 
50 //DHCP message types
51 static const char_t *messageLabel[] =
52 {
53  "", //0
54  "DHCPDISCOVER", //1
55  "DHCPOFFER", //2
56  "DHCPREQUEST", //3
57  "DHCPDECLINE", //4
58  "DHCPACK", //5
59  "DHCPNAK", //6
60  "DHCPRELEASE", //7
61  "DHCPINFORM" //8
62 };
63 
64 //DHCP options
65 static const char_t *optionLabel[] =
66 {
67  "Pad", //0
68  "Subnet Mask", //1
69  "Time Offset", //2
70  "Router", //3
71  "Time Server", //4
72  "Name Server", //5
73  "DNS Server", //6
74  "Log Server", //7
75  "Cookie Server", //8
76  "LPR Server", //9
77  "Impress Server", //10
78  "Resource Location Server", //11
79  "Host Name", //12
80  "Boot File Size", //13
81  "Merit Dump File", //14
82  "Domain Name", //15
83  "Swap Server", //16
84  "Root Path", //17
85  "Extensions Path", //18
86  "IP Forwarding", //19
87  "Non-Local Source Routing", //20
88  "Policy Filter", //21
89  "Max Datagram Reassembly Size", //22
90  "Default IP TTL", //23
91  "Path MTU Aging Timeout", //24
92  "Path MTU Plateau Table", //25
93  "Interface MTU", //26
94  "All Subnets Are Local", //27
95  "Broadcast Address", //28
96  "Perform Mask Discovery", //29
97  "Mask Supplier", //30
98  "Perform Router Discovery", //31
99  "Router Solicitation Address", //32
100  "Static Route", //33
101  "Trailer Encapsulation", //34
102  "ARP Cache Timeout", //35
103  "Ethernet Encapsulation", //36
104  "TCP Default TTL", //37
105  "TCP Keepalive Interval", //38
106  "TCP Keepalive Garbage", //39
107  "NIS Domain", //40
108  "NIS Server", //41
109  "NTP Server", //42
110  "Vendor Specific Information", //43
111  "NetBIOS NBNS Server", //44
112  "NetBIOS NBDD Server", //45
113  "NetBIOS Node Type", //46
114  "NetBIOS Scope", //47
115  "X11 Font Server", //48
116  "X11 Display Manager", //49
117  "Requested IP Address", //50
118  "IP Address Lease Time", //51
119  "Option Overload", //52
120  "DHCP Message Type", //53
121  "Server Identifier", //54
122  "Parameter Request List", //55
123  "Message", //56
124  "Max DHCP Message Size", //57
125  "Renewal (T1) Time Value", //58
126  "Rebinding (T2) Time Value", //59
127  "Vendor Class Identifier", //60
128  "Client Identifier", //61
129  "", //62
130  "", //63
131  "NISP Domain", //64
132  "NISP Server", //65
133  "TFTP Server Name", //66
134  "Bootfile Name", //67
135  "Mobile IP Home Agent", //68
136  "SMTP Server", //69
137  "POP3 Server", //70
138  "NNTP Server", //71
139  "Default WWW Server", //72
140  "Default Finger Server", //73
141  "Default IRC Server", //74
142  "StreetTalk Server", //75
143  "STDA Server", //76
144  "", //77
145  "", //78
146  "", //79
147  "Rapid Commit" //80
148 };
149 
150 
151 /**
152  * @brief Dump DHCP message for debugging purpose
153  * @param[in] message Pointer to the DHCP message to dump
154  * @param[in] length Length of the message
155  * @return Error code
156  **/
157 
159 {
160  error_t error;
161  uint_t i;
162  const char_t *label;
163  DhcpOption *option;
164 
165  //Ensure the length of the DHCP message is acceptable
166  if(length < sizeof(DhcpMessage))
167  {
168  //Report a warning
169  TRACE_WARNING("DHCP message length is invalid!\r\n");
170  //Dump message contents for debugging purpose
172  //Report an error
173  return ERROR_INVALID_LENGTH;
174  }
175 
176  //Retrieve the name associated with the opcode
177  label = (message->op < arraysize(opcodeLabel)) ? opcodeLabel[message->op] : "";
178 
179  //Dump DHCP message contents
180  TRACE_DEBUG(" Op Code (op) = %" PRIu8 " (%s)\r\n", message->op, label);
181  TRACE_DEBUG(" Hardware Type (htype) = %" PRIu8 "\r\n", message->htype);
182  TRACE_DEBUG(" Hardware Address Length (hlen) = %" PRIu8 "\r\n", message->hlen);
183  TRACE_DEBUG(" Hops (hops) = %" PRIu8 "\r\n", message->hops);
184  TRACE_DEBUG(" Transaction ID (xid) = 0x%08" PRIX32 "\r\n", ntohl(message->xid));
185  TRACE_DEBUG(" Seconds (secs) = %" PRIu16 "s\r\n", ntohs(message->secs));
186  TRACE_DEBUG(" Flags (flags) = 0x%04" PRIX16 "\r\n", ntohs(message->flags));
187  TRACE_DEBUG(" Client IP Address (ciaddr) = %s\r\n", ipv4AddrToString(message->ciaddr, NULL));
188  TRACE_DEBUG(" Your IP Address (yiaddr) = %s\r\n", ipv4AddrToString(message->yiaddr, NULL));
189  TRACE_DEBUG(" Server IP Address (siaddr) = %s\r\n", ipv4AddrToString(message->siaddr, NULL));
190  TRACE_DEBUG(" Relay IP Address (giaddr) = %s\r\n", ipv4AddrToString(message->giaddr, NULL));
191  TRACE_DEBUG(" Client Hardware Address (chaddr) = %s\r\n", macAddrToString(&message->chaddr, NULL));
192  TRACE_DEBUG(" Magic Cookie = 0x%08" PRIX32 "\r\n", ntohl(message->magicCookie));
193 
194  //Get the length of the options field
195  length -= sizeof(DhcpMessage);
196 
197  //Parse DHCP options
198  for(i = 0; i < length; i++)
199  {
200  //Point to the current option
201  option = (DhcpOption *) (message->options + i);
202 
203  //Pad option detected?
204  if(option->code == DHCP_OPT_PAD)
205  continue;
206  //End option detected?
207  if(option->code == DHCP_OPT_END)
208  break;
209  //Check option length
210  if((i + 1) >= length || (i + 1 + option->length) >= length)
211  {
212  //Report a warning
213  TRACE_WARNING("DHCP option length is invalid!\r\n");
214  //Dump message contents for debugging purpose
216  //Report an error
217  return ERROR_INVALID_LENGTH;
218  }
219 
220  //Display the name of the current option
221  if(option->code < arraysize(optionLabel))
222  TRACE_DEBUG(" %s option (%" PRIu8 " bytes)\r\n", optionLabel[option->code], option->length);
223  else
224  TRACE_DEBUG(" Option %" PRIu8 " (%" PRIu8 " bytes)\r\n", option->code, option->length);
225 
226  //Check option code
227  switch(option->code)
228  {
229  //Message type?
231  error = dhcpDumpMessageType(option);
232  break;
233  //Parameter Request List option
235  error = dhcpDumpParamRequestList(option);
236  break;
237  //Boolean value?
247  error = dhcpDumpBoolean(option);
248  break;
249  //8-bit unsigned integer?
254  error = dhcpDumpInt8(option);
255  break;
256  //16-bit unsigned integer?
261  error = dhcpDumpInt16(option);
262  break;
263  //32-bit unsigned integer?
270  error = dhcpDumpInt32(option);
271  break;
272  //Character strings?
273  case DHCP_OPT_HOST_NAME:
276  case DHCP_OPT_ROOT_PATH:
278  case DHCP_OPT_NIS_DOMAIN:
279  case DHCP_OPT_MESSAGE:
283  error = dhcpDumpString(option);
284  break;
285  //IPv4 address?
292  error = dhcpDumpIpv4Addr(option);
293  break;
294  //List of IPv4 addresses?
295  case DHCP_OPT_ROUTER:
298  case DHCP_OPT_DNS_SERVER:
299  case DHCP_OPT_LOG_SERVER:
301  case DHCP_OPT_LPR_SERVER:
304  case DHCP_OPT_NIS_SERVER:
305  case DHCP_OPT_NTP_SERVER:
320  error = dhcpDumpIpv4AddrList(option);
321  break;
322  //Raw data?
323  default:
324  error = dhcpDumpRawData(option);
325  break;
326  }
327 
328  //Failed to parse current option?
329  if(error)
330  {
331  //Report a warning
332  TRACE_WARNING("Failed to parse DHCP options!\r\n");
333  //Dump message contents for debugging purpose
335  }
336 
337  //Jump to the next option
338  i += option->length + 1;
339  }
340 
341  //No error to report
342  return NO_ERROR;
343 }
344 
345 
346 /**
347  * @brief Dump Message Type option
348  * @param[in] option Pointer to the option to dump
349  * @return Error code
350  **/
351 
353 {
354  uint8_t type;
355  const char_t *label;
356 
357  //Check option length
358  if(option->length != 1)
359  return ERROR_INVALID_OPTION;
360 
361  //Get the message type
362  type = option->value[0];
363  //Retrieve the name of the current DHCP message
364  label = (type < arraysize(messageLabel)) ? messageLabel[type] : "Unknown";
365  //Display message type
366  TRACE_DEBUG(" %" PRIu8 " (%s)\r\n", type, label);
367 
368  //No error to report
369  return NO_ERROR;
370 }
371 
372 
373 /**
374  * @brief Dump Parameter Request List option
375  * @param[in] option Pointer to the option to dump
376  * @return Error code
377  **/
378 
380 {
381  size_t i;
382  uint8_t code;
383  const char_t *label;
384 
385  //Parse the list of requested options
386  for(i = 0; i < option->length; i++)
387  {
388  //Get current option code
389  code = option->value[i];
390  //Find the name associated with this option code
391  label = (code < arraysize(optionLabel)) ? optionLabel[code] : "Unknown";
392  //Display option code and option name
393  TRACE_DEBUG(" %" PRIu8 " (%s option)\r\n", code, label);
394  }
395 
396  //No error to report
397  return NO_ERROR;
398 }
399 
400 
401 /**
402  * @brief Dump an option containing a boolean
403  * @param[in] option Pointer to the option to dump
404  * @return Error code
405  **/
406 
408 {
409  //Check option length
410  if(option->length != 1)
411  return ERROR_INVALID_OPTION;
412 
413  //Dump option contents
414  TRACE_DEBUG(" %" PRIu8 " (%s)\r\n", option->value[0], option->value[0] ? "True" : "False");
415 
416  //No error to report
417  return NO_ERROR;
418 }
419 
420 
421 /**
422  * @brief Dump an option containing a 8-bit integer
423  * @param[in] option Pointer to the option to dump
424  * @return Error code
425  **/
426 
428 {
429  //Check option length
430  if(option->length != 1)
431  return ERROR_INVALID_OPTION;
432 
433  //Dump option contents
434  TRACE_DEBUG(" %" PRIu8 "\r\n", option->value[0]);
435 
436  //No error to report
437  return NO_ERROR;
438 }
439 
440 
441 /**
442  * @brief Dump an option containing a 16-bit integer
443  * @param[in] option Pointer to the option to dump
444  * @return Error code
445  **/
446 
448 {
449  uint16_t value;
450 
451  //Check option length
452  if(option->length != 2)
453  return ERROR_INVALID_OPTION;
454 
455  //Retrieve 16-bit value
456  value = LOAD16BE(option->value);
457  //Dump option contents
458  TRACE_DEBUG(" %" PRIu16 "\r\n", value);
459 
460  //No error to report
461  return NO_ERROR;
462 }
463 
464 
465 /**
466  * @brief Dump an option containing a 32-bit integer
467  * @param[in] option Pointer to the option to dump
468  * @return Error code
469  **/
470 
472 {
473  uint32_t value;
474 
475  //Check option length
476  if(option->length != 4)
477  return ERROR_INVALID_OPTION;
478 
479  //Retrieve 32-bit value
480  value = LOAD32BE(option->value);
481  //Dump option contents
482  TRACE_DEBUG(" %" PRIu32 "\r\n", value);
483 
484  //No error to report
485  return NO_ERROR;
486 }
487 
488 
489 /**
490  * @brief Dump an option containing a string
491  * @param[in] option Pointer to the option to dump
492  * @return Error code
493  **/
494 
496 {
497  size_t i;
498 
499  //Append prefix
500  TRACE_DEBUG(" ");
501  //Dump option contents
502  for(i = 0; i < option->length; i++)
503  TRACE_DEBUG("%c", option->value[i]);
504  //Add a line feed
505  TRACE_DEBUG("\r\n");
506 
507  //No error to report
508  return NO_ERROR;
509 }
510 
511 
512 /**
513  * @brief Dump an option containing an IPv4 address
514  * @param[in] option Pointer to the option to dump
515  * @return Error code
516  **/
517 
519 {
521 
522  //Check option length
523  if(option->length != sizeof(Ipv4Addr))
524  return ERROR_INVALID_OPTION;
525 
526  //Retrieve IPv4 address
527  ipv4CopyAddr(&ipAddr, option->value);
528  //Dump option contents
529  TRACE_DEBUG(" %s\r\n", ipv4AddrToString(ipAddr, NULL));
530 
531  //No error to report
532  return NO_ERROR;
533 }
534 
535 
536 /**
537  * @brief Dump an option containing a list of IPv4 addresses
538  * @param[in] option Pointer to the option to dump
539  * @return Error code
540  **/
541 
543 {
544  size_t i;
546 
547  //Check option length
548  if((option->length % sizeof(Ipv4Addr)) != 0)
549  return ERROR_INVALID_OPTION;
550 
551  //Parse the list of IPv4 addresses
552  for(i = 0; i < option->length; i += sizeof(Ipv4Addr))
553  {
554  //Retrieve the current IPv4 address
555  ipv4CopyAddr(&ipAddr, option->value + i);
556  //Display current address
557  TRACE_DEBUG(" %s\r\n", ipv4AddrToString(ipAddr, NULL));
558  }
559 
560  //No error to report
561  return NO_ERROR;
562 }
563 
564 
565 /**
566  * @brief Dump an option containing raw data
567  * @param[in] option Pointer to the option to dump
568  * @return Error code
569  **/
570 
572 {
573  //Dump option contents
574  TRACE_DEBUG_ARRAY(" ", option->value, option->length);
575 
576  //No error to report
577  return NO_ERROR;
578 }
579 
580 #endif
@ DHCP_OPT_TCP_KEEPALIVE_GARBAGE
Definition: dhcp_common.h:145
error_t dhcpDumpMessage(const DhcpMessage *message, size_t length)
Dump DHCP message for debugging purpose.
Definition: dhcp_debug.c:158
uint8_t length
Definition: dtls_misc.h:149
@ DHCP_OPT_MOBILE_IP_HOME_AGENT
Definition: dhcp_common.h:172
@ DHCP_OPT_NETBIOS_NBNS_SERVER
Definition: dhcp_common.h:150
error_t dhcpDumpInt16(const DhcpOption *option)
Dump an option containing a 16-bit integer.
Definition: dhcp_debug.c:447
uint8_t code
Definition: coap_common.h:181
@ DHCP_OPT_BOOTFILE_NAME
Definition: dhcp_common.h:171
@ DHCP_OPT_IMPRESS_SERVER
Definition: dhcp_common.h:116
__start_packed struct @124 DhcpOption
DHCP option.
#define LOAD32BE(p)
Definition: cpu_endian.h:194
@ DHCP_OPT_BOOT_FILE_SIZE
Definition: dhcp_common.h:119
@ DHCP_OPT_NNTP_SERVER
Definition: dhcp_common.h:175
@ DHCP_OPT_TCP_KEEPALIVE_INTERVAL
Definition: dhcp_common.h:144
@ DHCP_OPT_DEFAULT_WWW_SERVER
Definition: dhcp_common.h:176
@ DHCP_OPT_DOMAIN_NAME
Definition: dhcp_common.h:121
@ DHCP_OPT_NETBIOS_NODE_TYPE
Definition: dhcp_common.h:152
@ DHCP_OPT_TFTP_SERVER_NAME
Definition: dhcp_common.h:170
@ DHCP_OPT_SERVER_IDENTIFIER
Definition: dhcp_common.h:160
error_t dhcpDumpInt32(const DhcpOption *option)
Dump an option containing a 32-bit integer.
Definition: dhcp_debug.c:471
@ DHCP_OPT_TRAILER_ENCAPSULATION
Definition: dhcp_common.h:140
@ DHCP_OPT_NTP_SERVER
Definition: dhcp_common.h:148
@ DHCP_OPT_ROUTER_SOLICITATION_ADDRESS
Definition: dhcp_common.h:138
uint32_t Ipv4Addr
IPv4 network address.
Definition: ipv4.h:239
@ DHCP_OPT_ROUTER
Definition: dhcp_common.h:109
error_t dhcpDumpBoolean(const DhcpOption *option)
Dump an option containing a boolean.
Definition: dhcp_debug.c:407
__start_packed struct @123 DhcpMessage
DHCP message.
@ DHCP_OPT_MESSAGE
Definition: dhcp_common.h:162
@ DHCP_OPT_END
Definition: dhcp_common.h:183
@ DHCP_OPT_DEFAULT_IP_TTL
Definition: dhcp_common.h:129
error_t dhcpDumpString(const DhcpOption *option)
Dump an option containing a string.
Definition: dhcp_debug.c:495
@ DHCP_OPT_MERIT_DUMP_FILE
Definition: dhcp_common.h:120
@ DHCP_OPT_TCP_DEFAULT_TTL
Definition: dhcp_common.h:143
@ DHCP_OPT_X11_DISPLAY_MANAGER
Definition: dhcp_common.h:155
error_t dhcpDumpIpv4Addr(const DhcpOption *option)
Dump an option containing an IPv4 address.
Definition: dhcp_debug.c:518
char_t type
@ DHCP_OPT_OPTION_OVERLOAD
Definition: dhcp_common.h:158
@ DHCP_OPT_PAD
Definition: dhcp_common.h:106
@ DHCP_OPT_ARP_CACHE_TIMEOUT
Definition: dhcp_common.h:141
error_t
Error codes.
Definition: error.h:42
@ DHCP_OPT_LOG_SERVER
Definition: dhcp_common.h:113
@ DHCP_OPT_NIS_SERVER
Definition: dhcp_common.h:147
@ DHCP_OPT_ALL_SUBNETS_ARE_LOCAL
Definition: dhcp_common.h:133
char_t * macAddrToString(const MacAddr *macAddr, char_t *str)
Convert a MAC address to a dash delimited string.
Definition: ethernet.c:777
@ DHCP_OPT_HOST_NAME
Definition: dhcp_common.h:118
@ DHCP_OPT_MAX_DATAGRAM_REASSEMBLY_SIZE
Definition: dhcp_common.h:128
@ DHCP_OPT_NETBIOS_NBDD_SERVER
Definition: dhcp_common.h:151
@ DHCP_OPT_X11_FONT_SERVER
Definition: dhcp_common.h:154
@ DHCP_OPT_SWAP_SERVER
Definition: dhcp_common.h:122
@ ERROR_INVALID_LENGTH
Definition: error.h:109
@ DHCP_OPT_ROOT_PATH
Definition: dhcp_common.h:123
@ DHCP_OPT_IP_FORWARDING
Definition: dhcp_common.h:125
@ DHCP_OPT_RESOURCE_LOCATION_SERVER
Definition: dhcp_common.h:117
@ DHCP_OPT_IP_ADDRESS_LEASE_TIME
Definition: dhcp_common.h:157
@ DHCP_OPT_NON_LOCAL_SOURCE_ROUTING
Definition: dhcp_common.h:126
@ DHCP_OPT_DHCP_MESSAGE_TYPE
Definition: dhcp_common.h:159
@ DHCP_OPT_POP3_SERVER
Definition: dhcp_common.h:174
@ DHCP_OPT_EXTENSIONS_PATH
Definition: dhcp_common.h:124
@ DHCP_OPT_STREETTALK_SERVER
Definition: dhcp_common.h:179
@ DHCP_OPT_MAX_DHCP_MESSAGE_SIZE
Definition: dhcp_common.h:163
error_t dhcpDumpParamRequestList(const DhcpOption *option)
Dump Parameter Request List option.
Definition: dhcp_debug.c:379
@ DHCP_OPT_DEFAULT_IRC_SERVER
Definition: dhcp_common.h:178
error_t dhcpDumpInt8(const DhcpOption *option)
Dump an option containing a 8-bit integer.
Definition: dhcp_debug.c:427
#define ntohs(value)
Definition: cpu_endian.h:398
#define TRACE_WARNING(...)
Definition: debug.h:84
#define TRACE_DEBUG(...)
Definition: debug.h:106
@ DHCP_OPT_PERFORM_MASK_DISCOVERY
Definition: dhcp_common.h:135
char char_t
Definition: compiler_port.h:43
@ DHCP_OPT_STDA_SERVER
Definition: dhcp_common.h:180
@ DHCP_OPT_LPR_SERVER
Definition: dhcp_common.h:115
@ DHCP_OPT_INTERFACE_MTU
Definition: dhcp_common.h:132
#define TRACE_DEBUG_ARRAY(p, a, n)
Definition: debug.h:107
@ DHCP_OPT_MASK_SUPPLIER
Definition: dhcp_common.h:136
@ DHCP_OPT_SMTP_SERVER
Definition: dhcp_common.h:173
@ DHCP_OPT_PATH_MTU_AGING_TIMEOUT
Definition: dhcp_common.h:130
@ DHCP_OPT_REBINDING_TIME_VALUE
Definition: dhcp_common.h:165
@ DHCP_OPT_COOKIE_SERVER
Definition: dhcp_common.h:114
Data logging functions for debugging purpose (DHCP)
@ DHCP_OPT_NISP_DOMAIN
Definition: dhcp_common.h:168
@ DHCP_OPT_SUBNET_MASK
Definition: dhcp_common.h:107
@ DHCP_OPT_DNS_SERVER
Definition: dhcp_common.h:112
error_t dhcpDumpRawData(const DhcpOption *option)
Dump an option containing raw data.
Definition: dhcp_debug.c:571
@ DHCP_OPT_NAME_SERVER
Definition: dhcp_common.h:111
uint8_t message[]
Definition: chap.h:152
@ DHCP_OPT_NIS_DOMAIN
Definition: dhcp_common.h:146
#define ipv4CopyAddr(destIpAddr, srcIpAddr)
Definition: ipv4.h:142
@ DHCP_OPT_PERFORM_ROUTER_DISCOVERY
Definition: dhcp_common.h:137
@ ERROR_INVALID_OPTION
Definition: error.h:97
@ DHCP_OPT_ETHERNET_ENCAPSULATION
Definition: dhcp_common.h:142
error_t dhcpDumpMessageType(const DhcpOption *option)
Dump Message Type option.
Definition: dhcp_debug.c:352
@ DHCP_OPT_PARAM_REQUEST_LIST
Definition: dhcp_common.h:161
@ DHCP_OPT_TIME_SERVER
Definition: dhcp_common.h:110
uint8_t value[]
Definition: dtls_misc.h:150
unsigned int uint_t
Definition: compiler_port.h:45
#define LOAD16BE(p)
Definition: cpu_endian.h:170
error_t dhcpDumpIpv4AddrList(const DhcpOption *option)
Dump an option containing a list of IPv4 addresses.
Definition: dhcp_debug.c:542
TCP/IP stack core.
@ DHCP_OPT_REQUESTED_IP_ADDRESS
Definition: dhcp_common.h:156
char_t * ipv4AddrToString(Ipv4Addr ipAddr, char_t *str)
Convert a binary IPv4 address to dot-decimal notation.
Definition: ipv4.c:1466
@ DHCP_OPT_RENEWAL_TIME_VALUE
Definition: dhcp_common.h:164
@ DHCP_OPT_DEFAULT_FINGER_SERVER
Definition: dhcp_common.h:177
uint8_t ipAddr[4]
Definition: mib_common.h:187
#define ntohl(value)
Definition: cpu_endian.h:399
@ DHCP_OPT_NISP_SERVER
Definition: dhcp_common.h:169
@ DHCP_OPT_BROADCAST_ADDRESS
Definition: dhcp_common.h:134
@ NO_ERROR
Success.
Definition: error.h:44
Debugging facilities.
#define arraysize(a)
Definition: os_port.h:70