mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 23:52:51 +00:00
Convert state #defines in autoip.h and dhcp.h to enums. May be useful in *_state structs to simplify debugging in the future.
This commit is contained in:
parent
6f62fe5998
commit
b34baff546
@ -64,10 +64,12 @@ extern "C" {
|
|||||||
#define DEFEND_INTERVAL 10 /* seconds (min. wait between defensive ARPs) */
|
#define DEFEND_INTERVAL 10 /* seconds (min. wait between defensive ARPs) */
|
||||||
|
|
||||||
/* AutoIP client states */
|
/* AutoIP client states */
|
||||||
#define AUTOIP_STATE_OFF 0
|
typedef enum {
|
||||||
#define AUTOIP_STATE_PROBING 1
|
AUTOIP_STATE_OFF = 0,
|
||||||
#define AUTOIP_STATE_ANNOUNCING 2
|
AUTOIP_STATE_PROBING = 1,
|
||||||
#define AUTOIP_STATE_BOUND 3
|
AUTOIP_STATE_ANNOUNCING = 2,
|
||||||
|
AUTOIP_STATE_BOUND = 3
|
||||||
|
} autoip_state_enum_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -98,23 +98,27 @@ PACK_STRUCT_END
|
|||||||
|
|
||||||
|
|
||||||
/* DHCP client states */
|
/* DHCP client states */
|
||||||
#define DHCP_STATE_OFF 0
|
typedef enum {
|
||||||
#define DHCP_STATE_REQUESTING 1
|
DHCP_STATE_OFF = 0,
|
||||||
#define DHCP_STATE_INIT 2
|
DHCP_STATE_REQUESTING = 1,
|
||||||
#define DHCP_STATE_REBOOTING 3
|
DHCP_STATE_INIT = 2,
|
||||||
#define DHCP_STATE_REBINDING 4
|
DHCP_STATE_REBOOTING = 3,
|
||||||
#define DHCP_STATE_RENEWING 5
|
DHCP_STATE_REBINDING = 4,
|
||||||
#define DHCP_STATE_SELECTING 6
|
DHCP_STATE_RENEWING = 5,
|
||||||
#define DHCP_STATE_INFORMING 7
|
DHCP_STATE_SELECTING = 6,
|
||||||
#define DHCP_STATE_CHECKING 8
|
DHCP_STATE_INFORMING = 7,
|
||||||
/* not yet implemented \#define DHCP_STATE_PERMANENT 9 */
|
DHCP_STATE_CHECKING = 8,
|
||||||
#define DHCP_STATE_BOUND 10
|
DHCP_STATE_PERMANENT = 9, /* not yet implemented */
|
||||||
/* not yet implemented \#define DHCP_STATE_RELEASING 11 */
|
DHCP_STATE_BOUND = 10,
|
||||||
#define DHCP_STATE_BACKING_OFF 12
|
DHCP_STATE_RELEASING = 11, /* not yet implemented */
|
||||||
|
DHCP_STATE_BACKING_OFF = 12
|
||||||
|
} dhcp_state_enum_t;
|
||||||
|
|
||||||
/* AutoIP cooperation flags */
|
/* AutoIP cooperation flags */
|
||||||
#define DHCP_AUTOIP_COOP_STATE_OFF 0
|
typedef enum {
|
||||||
#define DHCP_AUTOIP_COOP_STATE_ON 1
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user