[Change summary]:
1. Update NetLib to a combined NetLib support dual network stack: 1) Add Network Debug facility for IPv4 stack. 2) Extend the library APIs to support IPv6 stack: a. NetIp6IsUnspecifiedAddr b. NetIp6IsLinkLocalAddr c. NetIp6IsNetEqual d. NetLibCreateIPv6DPathNode. e. NetIp6PseudoHeadChecksum f. NetIp6IsValidUnicast 3) Update the structure definitions: a. Update NET_BUF to add EFI_IP6_HEADER and EFI_UDP_HEADER b. Add NET_IP6_PSEUDO_HDR 4) Update Ip4IsUnicast to NetIp4IsUnicast 2. Update the impacted modules to adopt the combined NetLib. 3. Clean up coding style errors in all network drivers and libraries. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9391 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for ICMP protocol.
|
||||
|
||||
Copyright (c) 2005 - 2006, Intel Corporation.<BR>
|
||||
Copyright (c) 2005 - 2009, Intel Corporation.<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -15,63 +15,61 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#ifndef __EFI_IP4_ICMP_H__
|
||||
#define __EFI_IP4_ICMP_H__
|
||||
|
||||
typedef enum {
|
||||
//
|
||||
// ICMP type definations
|
||||
//
|
||||
ICMP_ECHO_REPLY = 0,
|
||||
ICMP_DEST_UNREACHABLE = 3,
|
||||
ICMP_SOURCE_QUENCH = 4,
|
||||
ICMP_REDIRECT = 5,
|
||||
ICMP_ECHO_REQUEST = 8,
|
||||
ICMP_TIME_EXCEEDED = 11,
|
||||
ICMP_PARAMETER_PROBLEM = 12,
|
||||
ICMP_TIMESTAMP = 13,
|
||||
ICMP_INFO_REQUEST = 15,
|
||||
ICMP_INFO_REPLY = 16,
|
||||
ICMP_TYPE_MAX = ICMP_INFO_REPLY,
|
||||
#define ICMP_ECHO_REPLY 0
|
||||
#define ICMP_DEST_UNREACHABLE 3
|
||||
#define ICMP_SOURCE_QUENCH 4
|
||||
#define ICMP_REDIRECT 5
|
||||
#define ICMP_ECHO_REQUEST 8
|
||||
#define ICMP_TIME_EXCEEDED 11
|
||||
#define ICMP_PARAMETER_PROBLEM 12
|
||||
#define ICMP_TIMESTAMP 13
|
||||
#define ICMP_INFO_REQUEST 15
|
||||
#define ICMP_INFO_REPLY 16
|
||||
#define ICMP_TYPE_MAX ICMP_INFO_REPLY
|
||||
|
||||
ICMP_DEFAULT_CODE = 0,
|
||||
#define ICMP_DEFAULT_CODE 0
|
||||
|
||||
//
|
||||
// ICMP code definations for ICMP_DEST_UNREACHABLE
|
||||
//
|
||||
ICMP_NET_UNREACHABLE = 0,
|
||||
ICMP_HOST_UNREACHABLE = 1,
|
||||
ICMP_PROTO_UNREACHABLE = 2, // Host may generate
|
||||
ICMP_PORT_UNREACHABLE = 3, // Host may generate
|
||||
ICMP_FRAGMENT_FAILED = 4,
|
||||
ICMP_SOURCEROUTE_FAILED = 5, // Host may generate
|
||||
ICMP_NET_UNKNOWN = 6,
|
||||
ICMP_HOST_UNKNOWN = 7,
|
||||
ICMP_SOURCE_ISOLATED = 8,
|
||||
ICMP_NET_PROHIBITED = 9,
|
||||
ICMP_HOST_PROHIBITED = 10,
|
||||
ICMP_NET_UNREACHABLE_TOS = 11,
|
||||
ICMP_HOST_UNREACHABLE_TOS = 12,
|
||||
#define ICMP_NET_UNREACHABLE 0
|
||||
#define ICMP_HOST_UNREACHABLE 1
|
||||
#define ICMP_PROTO_UNREACHABLE 2 // Host may generate
|
||||
#define ICMP_PORT_UNREACHABLE 3 // Host may generate
|
||||
#define ICMP_FRAGMENT_FAILED 4
|
||||
#define ICMP_SOURCEROUTE_FAILED 5 // Host may generate
|
||||
#define ICMP_NET_UNKNOWN 6
|
||||
#define ICMP_HOST_UNKNOWN 7
|
||||
#define ICMP_SOURCE_ISOLATED 8
|
||||
#define ICMP_NET_PROHIBITED 9
|
||||
#define ICMP_HOST_PROHIBITED 10
|
||||
#define ICMP_NET_UNREACHABLE_TOS 11
|
||||
#define ICMP_HOST_UNREACHABLE_TOS 12
|
||||
|
||||
//
|
||||
// ICMP code definations for ICMP_TIME_EXCEEDED
|
||||
//
|
||||
ICMP_TIMEOUT_IN_TRANSIT = 0,
|
||||
ICMp_TIMEOUT_REASSEMBLE = 1, // Host may generate
|
||||
#define ICMP_TIMEOUT_IN_TRANSIT 0
|
||||
#define ICMP_TIMEOUT_REASSEMBLE 1 // Host may generate
|
||||
|
||||
//
|
||||
// ICMP code definations for ICMP_TIME_EXCEEDED
|
||||
//
|
||||
ICMP_NET_REDIRECT = 0,
|
||||
ICMP_HOST_REDIRECT = 1,
|
||||
ICMP_NET_TOS_REDIRECT = 2,
|
||||
ICMP_HOST_TOS_REDIRECT = 3,
|
||||
#define ICMP_NET_REDIRECT 0
|
||||
#define ICMP_HOST_REDIRECT 1
|
||||
#define ICMP_NET_TOS_REDIRECT 2
|
||||
#define ICMP_HOST_TOS_REDIRECT 3
|
||||
|
||||
//
|
||||
// ICMP message classes, each class of ICMP message shares
|
||||
// a common message format. INVALID_MESSAGE is only a flag.
|
||||
//
|
||||
ICMP_INVALID_MESSAGE = 0,
|
||||
ICMP_ERROR_MESSAGE = 1,
|
||||
ICMP_QUERY_MESSAGE = 2
|
||||
} ICMP_ENUM_TYPES;
|
||||
#define ICMP_INVALID_MESSAGE 0
|
||||
#define ICMP_ERROR_MESSAGE 1
|
||||
#define ICMP_QUERY_MESSAGE 2
|
||||
|
||||
typedef struct {
|
||||
UINT8 IcmpType;
|
||||
|
Reference in New Issue
Block a user