moved 2 enums from 'prot' headers to where they belong (dns, dhcp)

This commit is contained in:
goldsimon 2016-08-19 09:40:27 +02:00
parent 967516aa40
commit 9725a496b5
5 changed files with 19 additions and 21 deletions

View File

@ -183,6 +183,14 @@ struct dns_answer {
/* maximum allowed size for the struct due to non-packed */
#define SIZEOF_DNS_ANSWER_ASSERT 12
/* DNS table entry states */
typedef enum {
DNS_STATE_UNUSED = 0,
DNS_STATE_NEW = 1,
DNS_STATE_ASKING = 2,
DNS_STATE_DONE = 3
} dns_state_enum_t;
/** DNS table entry */
struct dns_table_entry {
u32_t ttl;

View File

@ -58,6 +58,12 @@ extern "C" {
#define DHCP_BOOT_FILE_LEN 128U
/* AutoIP cooperation flags (struct dhcp.autoip_coop_state) */
typedef enum {
DHCP_AUTOIP_COOP_STATE_OFF = 0,
DHCP_AUTOIP_COOP_STATE_ON = 1
} dhcp_autoip_coop_state_enum_t;
struct dhcp
{
/** transaction identifier of last sent request */

View File

@ -114,12 +114,6 @@ typedef enum {
DHCP_STATE_BACKING_OFF = 12
} dhcp_state_enum_t;
/* AutoIP cooperation flags */
typedef enum {
DHCP_AUTOIP_COOP_STATE_OFF = 0,
DHCP_AUTOIP_COOP_STATE_ON = 1
} dhcp_autoip_coop_state_enum_t;
/* DHCP op codes */
#define DHCP_BOOTREQUEST 1
#define DHCP_BOOTREPLY 2
@ -172,7 +166,7 @@ typedef enum {
#define DHCP_OPTION_T2 59 /* T2 rebinding time */
#define DHCP_OPTION_US 60
#define DHCP_OPTION_CLIENT_ID 61
#define DHCP_OPTION_TFTP_SERVERNAME 66
#define DHCP_OPTION_TFTP_SERVERNAME 66
#define DHCP_OPTION_BOOTFILE 67
/* possible combinations of overloading the file and sname fields with options */

View File

@ -42,7 +42,7 @@
#include "lwip/arch.h"
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
#endif
@ -114,18 +114,9 @@ PACK_STRUCT_END
# include "arch/epstruct.h"
#endif
#define SIZEOF_DNS_HDR 12
/* DNS protocol states */
typedef enum {
DNS_STATE_UNUSED = 0,
DNS_STATE_NEW = 1,
DNS_STATE_ASKING = 2,
DNS_STATE_DONE = 3
} dns_state_enum_t;
#ifdef __cplusplus
#ifdef __cplusplus
}
#endif
#endif /* LWIP_HDR_PROT_DNS_H */
#endif /* LWIP_HDR_PROT_DNS_H */

View File

@ -78,10 +78,9 @@ PACK_STRUCT_END
# include "arch/epstruct.h"
#endif
/* Compatibility defines, old versions used to combine type and code to an u16_t */
#define ICMPH_TYPE(hdr) ((hdr)->type)
#define ICMPH_CODE(hdr) ((hdr)->code)
/** Combines type and code to an u16_t */
#define ICMPH_TYPE_SET(hdr, t) ((hdr)->type = (t))
#define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c))