TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6OptionGoogleTest.h File Reference
#include <Uefi.h>
#include "../Ip6Impl.h"

Go to the source code of this file.

Functions

BOOLEAN Ip6IsOptionValid (IN IP6_SERVICE *IpSb, IN NET_BUF *Packet, IN UINT8 *Option, IN UINT16 OptionLen, IN UINT32 Pointer)
 

Detailed Description

Exposes the functions needed to test the Ip6Option module.

Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip6OptionGoogleTest.h.

Function Documentation

◆ Ip6IsOptionValid()

BOOLEAN Ip6IsOptionValid ( IN IP6_SERVICE IpSb,
IN NET_BUF Packet,
IN UINT8 *  Option,
IN UINT16  OptionLen,
IN UINT32  Pointer 
)

Validate the IP6 option format for both the packets we received and that we will transmit. It will compute the ICMPv6 error message fields if the option is malformatted.

Parameters
[in]IpSbThe IP6 service data.
[in]PacketThe to be validated packet.
[in]OptionThe first byte of the option.
[in]OptionLenThe length of the whole option.
[in]PointerIdentifies the octet offset within the invoking packet where the error was detected.
Return values
TRUEThe option is properly formatted.
FALSEThe option is malformatted.

Validate the IP6 option format for both the packets we received and that we will transmit. It will compute the ICMPv6 error message fields if the option is malformatted.

Parameters
[in]IpSbThe IP6 service data.
[in]PacketThe to be validated packet.
[in]OptionThe first byte of the option.
[in]OptionLenThe length of all options, expressed in byte length of octets. Maximum length is 2046 bytes or ((n + 1) * 8) - 2 where n is 255.
[in]PointerIdentifies the octet offset within the invoking packet where the error was detected.
Return values
TRUEThe option is properly formatted.
FALSEThe option is malformatted.

Definition at line 31 of file Ip6Option.c.