TianoCore EDK2 master
|
Go to the source code of this file.
Macros | |
#define | IP4_OPTION_EOP 0 |
#define | IP4_OPTION_NOP 1 |
#define | IP4_OPTION_LSRR 131 |
#define | IP4_OPTION_SSRR 137 |
#define | IP4_OPTION_RR 7 |
#define | IP4_OPTION_COPY_MASK 0x80 |
Functions | |
BOOLEAN | Ip4OptionIsValid (IN UINT8 *Option, IN UINT32 OptionLen, IN BOOLEAN Rcvd) |
EFI_STATUS | Ip4CopyOption (IN UINT8 *Option, IN UINT32 OptionLen, IN BOOLEAN FirstFragment, IN OUT UINT8 *Buf OPTIONAL, IN OUT UINT32 *BufLen) |
IP4 option support routines.
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip4Option.h.
#define IP4_OPTION_COPY_MASK 0x80 |
Definition at line 18 of file Ip4Option.h.
#define IP4_OPTION_EOP 0 |
Definition at line 12 of file Ip4Option.h.
#define IP4_OPTION_LSRR 131 |
Definition at line 14 of file Ip4Option.h.
#define IP4_OPTION_NOP 1 |
Definition at line 13 of file Ip4Option.h.
#define IP4_OPTION_RR 7 |
Definition at line 16 of file Ip4Option.h.
#define IP4_OPTION_SSRR 137 |
Definition at line 15 of file Ip4Option.h.
EFI_STATUS Ip4CopyOption | ( | IN UINT8 * | Option, |
IN UINT32 | OptionLen, | ||
IN BOOLEAN | FirstFragment, | ||
IN OUT UINT8 *Buf | OPTIONAL, | ||
IN OUT UINT32 * | BufLen | ||
) |
Copy the option from the original option to buffer. It handles the details such as:
[in] | Option | The original option to copy from |
[in] | OptionLen | The length of the original option |
[in] | FirstFragment | Whether it is the first fragment |
[in,out] | Buf | The buffer to copy options to. NULL |
[in,out] | BufLen | The length of the buffer |
EFI_SUCCESS | The options are copied over |
EFI_BUFFER_TOO_SMALL | Buf is NULL or BufLen provided is too small. |
Definition at line 111 of file Ip4Option.c.
Validate the IP4 option format for both the packets we received and will transmit. It will compute the ICMP error message fields if the option is malformatted. But this information isn't used.
[in] | Option | The first byte of the option |
[in] | OptionLen | The length of the whole option |
[in] | Rcvd | The option is from the packet we received if TRUE, otherwise the option we wants to transmit. |
TRUE | The option is properly formatted |
FALSE | The option is malformatted |
Validate the IP4 option format for both the packets we received and will transmit.
[in] | Option | The first byte of the option |
[in] | OptionLen | The length of the whole option |
[in] | Rcvd | The option is from the packet we received if TRUE, otherwise the option we wants to transmit. |
TRUE | The option is properly formatted |
FALSE | The option is malformatted |
Definition at line 25 of file Ip4Option.c.