mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 05:24:37 +08:00
moved 2 enums from 'prot' headers to where they belong (dns, dhcp)
This commit is contained in:
parent
967516aa40
commit
9725a496b5
@ -183,6 +183,14 @@ struct dns_answer {
|
|||||||
/* maximum allowed size for the struct due to non-packed */
|
/* maximum allowed size for the struct due to non-packed */
|
||||||
#define SIZEOF_DNS_ANSWER_ASSERT 12
|
#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 */
|
/** DNS table entry */
|
||||||
struct dns_table_entry {
|
struct dns_table_entry {
|
||||||
u32_t ttl;
|
u32_t ttl;
|
||||||
|
@ -58,6 +58,12 @@ extern "C" {
|
|||||||
|
|
||||||
#define DHCP_BOOT_FILE_LEN 128U
|
#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
|
struct dhcp
|
||||||
{
|
{
|
||||||
/** transaction identifier of last sent request */
|
/** transaction identifier of last sent request */
|
||||||
|
@ -114,12 +114,6 @@ typedef enum {
|
|||||||
DHCP_STATE_BACKING_OFF = 12
|
DHCP_STATE_BACKING_OFF = 12
|
||||||
} dhcp_state_enum_t;
|
} 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 */
|
/* DHCP op codes */
|
||||||
#define DHCP_BOOTREQUEST 1
|
#define DHCP_BOOTREQUEST 1
|
||||||
#define DHCP_BOOTREPLY 2
|
#define DHCP_BOOTREPLY 2
|
||||||
@ -172,7 +166,7 @@ typedef enum {
|
|||||||
#define DHCP_OPTION_T2 59 /* T2 rebinding time */
|
#define DHCP_OPTION_T2 59 /* T2 rebinding time */
|
||||||
#define DHCP_OPTION_US 60
|
#define DHCP_OPTION_US 60
|
||||||
#define DHCP_OPTION_CLIENT_ID 61
|
#define DHCP_OPTION_CLIENT_ID 61
|
||||||
#define DHCP_OPTION_TFTP_SERVERNAME 66
|
#define DHCP_OPTION_TFTP_SERVERNAME 66
|
||||||
#define DHCP_OPTION_BOOTFILE 67
|
#define DHCP_OPTION_BOOTFILE 67
|
||||||
|
|
||||||
/* possible combinations of overloading the file and sname fields with options */
|
/* possible combinations of overloading the file and sname fields with options */
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "lwip/arch.h"
|
#include "lwip/arch.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -114,18 +114,9 @@ PACK_STRUCT_END
|
|||||||
# include "arch/epstruct.h"
|
# include "arch/epstruct.h"
|
||||||
#endif
|
#endif
|
||||||
#define SIZEOF_DNS_HDR 12
|
#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
|
||||||
|
|
||||||
#endif /* LWIP_HDR_PROT_DNS_H */
|
#endif /* LWIP_HDR_PROT_DNS_H */
|
||||||
|
|
||||||
|
@ -78,10 +78,9 @@ PACK_STRUCT_END
|
|||||||
# include "arch/epstruct.h"
|
# include "arch/epstruct.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Compatibility defines, old versions used to combine type and code to an u16_t */
|
||||||
#define ICMPH_TYPE(hdr) ((hdr)->type)
|
#define ICMPH_TYPE(hdr) ((hdr)->type)
|
||||||
#define ICMPH_CODE(hdr) ((hdr)->code)
|
#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_TYPE_SET(hdr, t) ((hdr)->type = (t))
|
||||||
#define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c))
|
#define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user