TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip4Icmp.h
Go to the documentation of this file.
1
9#ifndef __EFI_IP4_ICMP_H__
10#define __EFI_IP4_ICMP_H__
11
12//
13// ICMP type definitions
14//
15#define ICMP_ECHO_REPLY 0
16#define ICMP_DEST_UNREACHABLE 3
17#define ICMP_SOURCE_QUENCH 4
18#define ICMP_REDIRECT 5
19#define ICMP_ECHO_REQUEST 8
20#define ICMP_TIME_EXCEEDED 11
21#define ICMP_PARAMETER_PROBLEM 12
22#define ICMP_TIMESTAMP 13
23#define ICMP_INFO_REQUEST 15
24#define ICMP_INFO_REPLY 16
25#define ICMP_TYPE_MAX ICMP_INFO_REPLY
26
27#define ICMP_DEFAULT_CODE 0
28
29//
30// ICMP code definitions for ICMP_DEST_UNREACHABLE
31//
32#define ICMP_NET_UNREACHABLE 0
33#define ICMP_HOST_UNREACHABLE 1
34#define ICMP_PROTO_UNREACHABLE 2 // Host may generate
35#define ICMP_PORT_UNREACHABLE 3 // Host may generate
36#define ICMP_FRAGMENT_FAILED 4
37#define ICMP_SOURCEROUTE_FAILED 5 // Host may generate
38#define ICMP_NET_UNKNOWN 6
39#define ICMP_HOST_UNKNOWN 7
40#define ICMP_SOURCE_ISOLATED 8
41#define ICMP_NET_PROHIBITED 9
42#define ICMP_HOST_PROHIBITED 10
43#define ICMP_NET_UNREACHABLE_TOS 11
44#define ICMP_HOST_UNREACHABLE_TOS 12
45
46//
47// ICMP code definitions for ICMP_TIME_EXCEEDED
48//
49#define ICMP_TIMEOUT_IN_TRANSIT 0
50#define ICMP_TIMEOUT_REASSEMBLE 1 // Host may generate
51
52//
53// ICMP code definitions for ICMP_TIME_EXCEEDED
54//
55#define ICMP_NET_REDIRECT 0
56#define ICMP_HOST_REDIRECT 1
57#define ICMP_NET_TOS_REDIRECT 2
58#define ICMP_HOST_TOS_REDIRECT 3
59
60//
61// ICMP message classes, each class of ICMP message shares
62// a common message format. INVALID_MESSAGE is only a flag.
63//
64#define ICMP_INVALID_MESSAGE 0
65#define ICMP_ERROR_MESSAGE 1
66#define ICMP_QUERY_MESSAGE 2
67
68typedef struct {
69 UINT8 IcmpType;
70 UINT8 IcmpClass;
72
73extern IP4_ICMP_CLASS mIcmpClass[];
74extern EFI_IP4_ICMP_TYPE mIp4SupportedIcmp[];
75
93 IN IP4_SERVICE *IpSb,
94 IN IP4_HEAD *Head,
95 IN NET_BUF *Packet
96 );
97
98#endif
EFI_STATUS Ip4IcmpHandle(IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet)
Definition: Ip4Icmp.c:322
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29