MeterLogger
Data Structures | Macros | Enumerations | Variables
icmp.h File Reference
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
Include dependency graph for icmp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  icmp_echo_hdr
 

Macros

#define ICMP_ER   0 /* echo reply */
 
#define ICMP_DUR   3 /* destination unreachable */
 
#define ICMP_SQ   4 /* source quench */
 
#define ICMP_RD   5 /* redirect */
 
#define ICMP_ECHO   8 /* echo */
 
#define ICMP_TE   11 /* time exceeded */
 
#define ICMP_PP   12 /* parameter problem */
 
#define ICMP_TS   13 /* timestamp */
 
#define ICMP_TSR   14 /* timestamp reply */
 
#define ICMP_IRQ   15 /* information request */
 
#define ICMP_IR   16 /* information reply */
 
#define ICMPH_TYPE(hdr)   ((hdr)->type)
 
#define ICMPH_CODE(hdr)   ((hdr)->code)
 
#define ICMPH_TYPE_SET(hdr, t)   ((hdr)->type = (t))
 
#define ICMPH_CODE_SET(hdr, c)   ((hdr)->code = (c))
 

Enumerations

enum  icmp_dur_type {
  ICMP_DUR_NET = 0, ICMP_DUR_HOST = 1, ICMP_DUR_PROTO = 2, ICMP_DUR_PORT = 3,
  ICMP_DUR_FRAG = 4, ICMP_DUR_SR = 5
}
 
enum  icmp_te_type { ICMP_TE_TTL = 0, ICMP_TE_FRAG = 1 }
 

Variables

PACK_STRUCT_BEGIN struct icmp_echo_hdr PACK_STRUCT_STRUCT
 

Macro Definition Documentation

◆ ICMP_DUR

#define ICMP_DUR   3 /* destination unreachable */

Definition at line 45 of file icmp.h.

◆ ICMP_ECHO

#define ICMP_ECHO   8 /* echo */

Definition at line 48 of file icmp.h.

Referenced by ip_router().

◆ ICMP_ER

#define ICMP_ER   0 /* echo reply */

Definition at line 44 of file icmp.h.

Referenced by ip_router().

◆ ICMP_IR

#define ICMP_IR   16 /* information reply */

Definition at line 54 of file icmp.h.

◆ ICMP_IRQ

#define ICMP_IRQ   15 /* information request */

Definition at line 53 of file icmp.h.

◆ ICMP_PP

#define ICMP_PP   12 /* parameter problem */

Definition at line 50 of file icmp.h.

◆ ICMP_RD

#define ICMP_RD   5 /* redirect */

Definition at line 47 of file icmp.h.

◆ ICMP_SQ

#define ICMP_SQ   4 /* source quench */

Definition at line 46 of file icmp.h.

◆ ICMP_TE

#define ICMP_TE   11 /* time exceeded */

Definition at line 49 of file icmp.h.

◆ ICMP_TS

#define ICMP_TS   13 /* timestamp */

Definition at line 51 of file icmp.h.

◆ ICMP_TSR

#define ICMP_TSR   14 /* timestamp reply */

Definition at line 52 of file icmp.h.

◆ ICMPH_CODE

#define ICMPH_CODE (   hdr)    ((hdr)->code)

Definition at line 96 of file icmp.h.

◆ ICMPH_CODE_SET

#define ICMPH_CODE_SET (   hdr,
 
)    ((hdr)->code = (c))

Definition at line 100 of file icmp.h.

◆ ICMPH_TYPE

#define ICMPH_TYPE (   hdr)    ((hdr)->type)

Definition at line 95 of file icmp.h.

◆ ICMPH_TYPE_SET

#define ICMPH_TYPE_SET (   hdr,
 
)    ((hdr)->type = (t))

Combines type and code to an u16_t 向ICMP报文首部字段中写入相应值

Definition at line 99 of file icmp.h.

Enumeration Type Documentation

◆ icmp_dur_type

Enumerator
ICMP_DUR_NET 
ICMP_DUR_HOST 
ICMP_DUR_PROTO 
ICMP_DUR_PORT 
ICMP_DUR_FRAG 
ICMP_DUR_SR 

Definition at line 56 of file icmp.h.

56  {
57  ICMP_DUR_NET = 0, /* net unreachable */
58  ICMP_DUR_HOST = 1, /* host unreachable */
59  ICMP_DUR_PROTO = 2, /* protocol unreachable */
60  ICMP_DUR_PORT = 3, /* port unreachable */
61  ICMP_DUR_FRAG = 4, /* fragmentation needed and DF set */
62  ICMP_DUR_SR = 5 /* source route failed */
63 };

◆ icmp_te_type

Enumerator
ICMP_TE_TTL 
ICMP_TE_FRAG 

Definition at line 65 of file icmp.h.

65  {
66  ICMP_TE_TTL = 0, /* time to live exceeded in transit */
67  ICMP_TE_FRAG = 1 /* fragment reassembly time exceeded */
68 };

Variable Documentation

◆ PACK_STRUCT_STRUCT

PACK_STRUCT_BEGIN struct icmp_echo_hdr PACK_STRUCT_STRUCT