]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h
3 Copyright (c) 2005 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 IP4 option support routines.
24 #ifndef __EFI_IP4_OPTION_H__
25 #define __EFI_IP4_OPTION_H__
30 IP4_OPTION_LSRR
= 131, // Loss source and record routing, 10000011
31 IP4_OPTION_SSRR
= 137, // Strict source and record routing, 10001001
32 IP4_OPTION_RR
= 7, // Record routing, 00000111
34 IP4_OPTION_COPY_MASK
= 0x80
35 } IP4_OPTION_ENUM_TYPES
;
38 Validate the IP4 option format for both the packets we received
39 and will transmit. It will compute the ICMP error message fields
40 if the option is mal-formated. But this information isn't used.
42 @param Option The first byte of the option
43 @param OptionLen The length of the whole option
44 @param Rcvd The option is from the packet we received if TRUE,
45 otherwise the option we wants to transmit.
47 @retval TRUE The option is properly formatted
48 @retval FALSE The option is mal-formated
59 Copy the option from the original option to buffer. It
60 handles the details such as:
61 1. whether copy the single IP4 option to the first/non-first
63 2. Pad the options copied over to aligned to 4 bytes.
65 @param Option The original option to copy from
66 @param OptionLen The length of the original option
67 @param FirstFragment Whether it is the first fragment
68 @param Buf The buffer to copy options to. NULL
69 @param BufLen The length of the buffer
71 @retval EFI_SUCCESS The options are copied over
72 @retval EFI_BUFFER_TOO_SMALL Buf is NULL or BufLen provided is too small.
79 IN BOOLEAN FirstFragment
,
80 IN OUT UINT8
*Buf
, OPTIONAL