]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Icmp.h
CommitLineData
772db4bb 1/** @file
2
3Copyright (c) 2005 - 2006, Intel Corporation
4All rights reserved. This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13Module Name:
14
15 Ip4Icmp.h
16
17Abstract:
18
19 Header file for ICMP protocol.
20
21
22**/
23
24#ifndef __EFI_IP4_ICMP_H__
25#define __EFI_IP4_ICMP_H__
26
27enum {
28 //
29 // ICMP type definations
30 //
31 ICMP_ECHO_REPLY = 0,
32 ICMP_DEST_UNREACHABLE = 3,
33 ICMP_SOURCE_QUENCH = 4,
34 ICMP_REDIRECT = 5,
35 ICMP_ECHO_REQUEST = 8,
36 ICMP_TIME_EXCEEDED = 11,
37 ICMP_PARAMETER_PROBLEM = 12,
38 ICMP_TIMESTAMP = 13,
39 ICMP_INFO_REQUEST = 15,
40 ICMP_INFO_REPLY = 16,
41 ICMP_TYPE_MAX = ICMP_INFO_REPLY,
42
43 ICMP_DEFAULT_CODE = 0,
44
45 //
46 // ICMP code definations for ICMP_DEST_UNREACHABLE
47 //
48 ICMP_NET_UNREACHABLE = 0,
49 ICMP_HOST_UNREACHABLE = 1,
50 ICMP_PROTO_UNREACHABLE = 2, // Host may generate
51 ICMP_PORT_UNREACHABLE = 3, // Host may generate
52 ICMP_FRAGMENT_FAILED = 4,
53 ICMP_SOURCEROUTE_FAILED = 5, // Host may generate
54 ICMP_NET_UNKNOWN = 6,
55 ICMP_HOST_UNKNOWN = 7,
56 ICMP_SOURCE_ISOLATED = 8,
57 ICMP_NET_PROHIBITED = 9,
58 ICMP_HOST_PROHIBITED = 10,
59 ICMP_NET_UNREACHABLE_TOS = 11,
60 ICMP_HOST_UNREACHABLE_TOS = 12,
61
62 //
63 // ICMP code definations for ICMP_TIME_EXCEEDED
64 //
65 ICMP_TIMEOUT_IN_TRANSIT = 0,
66 ICMp_TIMEOUT_REASSEMBLE = 1, // Host may generate
67
68 //
69 // ICMP code definations for ICMP_TIME_EXCEEDED
70 //
71 ICMP_NET_REDIRECT = 0,
72 ICMP_HOST_REDIRECT = 1,
73 ICMP_NET_TOS_REDIRECT = 2,
74 ICMP_HOST_TOS_REDIRECT = 3,
75
76 //
77 // ICMP message classes, each class of ICMP message shares
78 // a common message format. INVALID_MESSAGE is only a flag.
79 //
80 ICMP_INVALID_MESSAGE = 0,
81 ICMP_ERROR_MESSAGE = 1,
687a2e5f 82 ICMP_QUERY_MESSAGE = 2
772db4bb 83};
84
85typedef struct {
86 UINT8 IcmpType;
87 UINT8 IcmpClass;
88} IP4_ICMP_CLASS;
89
90extern IP4_ICMP_CLASS mIcmpClass[];
91extern EFI_IP4_ICMP_TYPE mIp4SupportedIcmp[];
92
93EFI_STATUS
94Ip4IcmpHandle (
95 IN IP4_SERVICE *IpSb,
96 IN IP4_HEAD *Header,
97 IN NET_BUF *Packet
98 );
99#endif