70 |
void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t); |
void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t); |
71 |
void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t); |
void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t); |
72 |
|
|
73 |
|
#include "arch/bpstruct.h" |
74 |
PACK_STRUCT_BEGIN |
PACK_STRUCT_BEGIN |
75 |
struct icmp_echo_hdr { |
struct icmp_echo_hdr { |
76 |
PACK_STRUCT_FIELD(u16_t _type_code); |
PACK_STRUCT_FIELD(u16_t _type_code); |
79 |
PACK_STRUCT_FIELD(u16_t seqno); |
PACK_STRUCT_FIELD(u16_t seqno); |
80 |
} PACK_STRUCT_STRUCT; |
} PACK_STRUCT_STRUCT; |
81 |
PACK_STRUCT_END |
PACK_STRUCT_END |
82 |
|
#include "arch/epstruct.h" |
83 |
|
|
84 |
|
#include "arch/bpstruct.h" |
85 |
PACK_STRUCT_BEGIN |
PACK_STRUCT_BEGIN |
86 |
struct icmp_dur_hdr { |
struct icmp_dur_hdr { |
87 |
PACK_STRUCT_FIELD(u16_t _type_code); |
PACK_STRUCT_FIELD(u16_t _type_code); |
89 |
PACK_STRUCT_FIELD(u32_t unused); |
PACK_STRUCT_FIELD(u32_t unused); |
90 |
} PACK_STRUCT_STRUCT; |
} PACK_STRUCT_STRUCT; |
91 |
PACK_STRUCT_END |
PACK_STRUCT_END |
92 |
|
#include "arch/epstruct.h" |
93 |
|
|
94 |
|
#include "arch/bpstruct.h" |
95 |
PACK_STRUCT_BEGIN |
PACK_STRUCT_BEGIN |
96 |
struct icmp_te_hdr { |
struct icmp_te_hdr { |
97 |
PACK_STRUCT_FIELD(u16_t _type_code); |
PACK_STRUCT_FIELD(u16_t _type_code); |
99 |
PACK_STRUCT_FIELD(u32_t unused); |
PACK_STRUCT_FIELD(u32_t unused); |
100 |
} PACK_STRUCT_STRUCT; |
} PACK_STRUCT_STRUCT; |
101 |
PACK_STRUCT_END |
PACK_STRUCT_END |
102 |
|
#include "arch/epstruct.h" |
103 |
|
|
104 |
#define ICMPH_TYPE(hdr) (NTOHS((hdr)->_type_code) >> 8) |
#define ICMPH_TYPE(hdr) (NTOHS((hdr)->_type_code) >> 8) |
105 |
#define ICMPH_CODE(hdr) (NTOHS((hdr)->_type_code) & 0xff) |
#define ICMPH_CODE(hdr) (NTOHS((hdr)->_type_code) & 0xff) |