TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip4Icmp.h File Reference

Go to the source code of this file.

Data Structures

struct  IP4_ICMP_CLASS
 

Macros

#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
 
#define ICMP_DEFAULT_CODE   0
 
#define ICMP_NET_UNREACHABLE   0
 
#define ICMP_HOST_UNREACHABLE   1
 
#define ICMP_PROTO_UNREACHABLE   2
 
#define ICMP_PORT_UNREACHABLE   3
 
#define ICMP_FRAGMENT_FAILED   4
 
#define ICMP_SOURCEROUTE_FAILED   5
 
#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
 
#define ICMP_TIMEOUT_IN_TRANSIT   0
 
#define ICMP_TIMEOUT_REASSEMBLE   1
 
#define ICMP_NET_REDIRECT   0
 
#define ICMP_HOST_REDIRECT   1
 
#define ICMP_NET_TOS_REDIRECT   2
 
#define ICMP_HOST_TOS_REDIRECT   3
 
#define ICMP_INVALID_MESSAGE   0
 
#define ICMP_ERROR_MESSAGE   1
 
#define ICMP_QUERY_MESSAGE   2
 

Functions

EFI_STATUS Ip4IcmpHandle (IN IP4_SERVICE *IpSb, IN IP4_HEAD *Head, IN NET_BUF *Packet)
 

Variables

IP4_ICMP_CLASS mIcmpClass []
 
EFI_IP4_ICMP_TYPE mIp4SupportedIcmp []
 

Detailed Description

Header file for ICMP protocol.

Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip4Icmp.h.

Macro Definition Documentation

◆ ICMP_DEFAULT_CODE

#define ICMP_DEFAULT_CODE   0

Definition at line 27 of file Ip4Icmp.h.

◆ ICMP_DEST_UNREACHABLE

#define ICMP_DEST_UNREACHABLE   3

Definition at line 16 of file Ip4Icmp.h.

◆ ICMP_ECHO_REPLY

#define ICMP_ECHO_REPLY   0

Definition at line 15 of file Ip4Icmp.h.

◆ ICMP_ECHO_REQUEST

#define ICMP_ECHO_REQUEST   8

Definition at line 19 of file Ip4Icmp.h.

◆ ICMP_ERROR_MESSAGE

#define ICMP_ERROR_MESSAGE   1

Definition at line 65 of file Ip4Icmp.h.

◆ ICMP_FRAGMENT_FAILED

#define ICMP_FRAGMENT_FAILED   4

Definition at line 36 of file Ip4Icmp.h.

◆ ICMP_HOST_PROHIBITED

#define ICMP_HOST_PROHIBITED   10

Definition at line 42 of file Ip4Icmp.h.

◆ ICMP_HOST_REDIRECT

#define ICMP_HOST_REDIRECT   1

Definition at line 56 of file Ip4Icmp.h.

◆ ICMP_HOST_TOS_REDIRECT

#define ICMP_HOST_TOS_REDIRECT   3

Definition at line 58 of file Ip4Icmp.h.

◆ ICMP_HOST_UNKNOWN

#define ICMP_HOST_UNKNOWN   7

Definition at line 39 of file Ip4Icmp.h.

◆ ICMP_HOST_UNREACHABLE

#define ICMP_HOST_UNREACHABLE   1

Definition at line 33 of file Ip4Icmp.h.

◆ ICMP_HOST_UNREACHABLE_TOS

#define ICMP_HOST_UNREACHABLE_TOS   12

Definition at line 44 of file Ip4Icmp.h.

◆ ICMP_INFO_REPLY

#define ICMP_INFO_REPLY   16

Definition at line 24 of file Ip4Icmp.h.

◆ ICMP_INFO_REQUEST

#define ICMP_INFO_REQUEST   15

Definition at line 23 of file Ip4Icmp.h.

◆ ICMP_INVALID_MESSAGE

#define ICMP_INVALID_MESSAGE   0

Definition at line 64 of file Ip4Icmp.h.

◆ ICMP_NET_PROHIBITED

#define ICMP_NET_PROHIBITED   9

Definition at line 41 of file Ip4Icmp.h.

◆ ICMP_NET_REDIRECT

#define ICMP_NET_REDIRECT   0

Definition at line 55 of file Ip4Icmp.h.

◆ ICMP_NET_TOS_REDIRECT

#define ICMP_NET_TOS_REDIRECT   2

Definition at line 57 of file Ip4Icmp.h.

◆ ICMP_NET_UNKNOWN

#define ICMP_NET_UNKNOWN   6

Definition at line 38 of file Ip4Icmp.h.

◆ ICMP_NET_UNREACHABLE

#define ICMP_NET_UNREACHABLE   0

Definition at line 32 of file Ip4Icmp.h.

◆ ICMP_NET_UNREACHABLE_TOS

#define ICMP_NET_UNREACHABLE_TOS   11

Definition at line 43 of file Ip4Icmp.h.

◆ ICMP_PARAMETER_PROBLEM

#define ICMP_PARAMETER_PROBLEM   12

Definition at line 21 of file Ip4Icmp.h.

◆ ICMP_PORT_UNREACHABLE

#define ICMP_PORT_UNREACHABLE   3

Definition at line 35 of file Ip4Icmp.h.

◆ ICMP_PROTO_UNREACHABLE

#define ICMP_PROTO_UNREACHABLE   2

Definition at line 34 of file Ip4Icmp.h.

◆ ICMP_QUERY_MESSAGE

#define ICMP_QUERY_MESSAGE   2

Definition at line 66 of file Ip4Icmp.h.

◆ ICMP_REDIRECT

#define ICMP_REDIRECT   5

Definition at line 18 of file Ip4Icmp.h.

◆ ICMP_SOURCE_ISOLATED

#define ICMP_SOURCE_ISOLATED   8

Definition at line 40 of file Ip4Icmp.h.

◆ ICMP_SOURCE_QUENCH

#define ICMP_SOURCE_QUENCH   4

Definition at line 17 of file Ip4Icmp.h.

◆ ICMP_SOURCEROUTE_FAILED

#define ICMP_SOURCEROUTE_FAILED   5

Definition at line 37 of file Ip4Icmp.h.

◆ ICMP_TIME_EXCEEDED

#define ICMP_TIME_EXCEEDED   11

Definition at line 20 of file Ip4Icmp.h.

◆ ICMP_TIMEOUT_IN_TRANSIT

#define ICMP_TIMEOUT_IN_TRANSIT   0

Definition at line 49 of file Ip4Icmp.h.

◆ ICMP_TIMEOUT_REASSEMBLE

#define ICMP_TIMEOUT_REASSEMBLE   1

Definition at line 50 of file Ip4Icmp.h.

◆ ICMP_TIMESTAMP

#define ICMP_TIMESTAMP   13

Definition at line 22 of file Ip4Icmp.h.

◆ ICMP_TYPE_MAX

#define ICMP_TYPE_MAX   ICMP_INFO_REPLY

Definition at line 25 of file Ip4Icmp.h.

Function Documentation

◆ Ip4IcmpHandle()

EFI_STATUS Ip4IcmpHandle ( IN IP4_SERVICE IpSb,
IN IP4_HEAD Head,
IN NET_BUF Packet 
)

Handle the ICMP packet. First validate the message format, then according to the message types, process it as query or error packet.

Parameters
[in]IpSbThe IP4 service that receivd the packet.
[in]HeadThe IP4 head of the ICMP query packet.
[in]PacketThe content of the ICMP query with IP4 head removed.
Return values
EFI_INVALID_PARAMETERThe packet is malformatted.
EFI_SUCCESSThe ICMP message is successfully processed.
OthersFailed to handle ICMP packet.

Definition at line 322 of file Ip4Icmp.c.

Variable Documentation

◆ mIcmpClass

IP4_ICMP_CLASS mIcmpClass[]
extern

Definition at line 11 of file Ip4Icmp.c.

◆ mIp4SupportedIcmp

EFI_IP4_ICMP_TYPE mIp4SupportedIcmp[]
extern

Definition at line 32 of file Ip4Icmp.c.