VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/NetworkPkg/IpSecDxe/IpSecDebug.h@ 69111

最後變更 在這個檔案從69111是 58466,由 vboxsync 提交於 9 年 前

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.0 KB
 
1/** @file
2 The definition of functions and MACROs used for IPsec debug information printting.
3
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
5
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14**/
15#ifndef _EFI_IPSEC_DEBUG_H_
16#define _EFI_IPSEC_DEBUG_H_
17
18#include "IkeCommon.h"
19#include "IkePacket.h"
20
21#define IPSEC_DUMP_ADDRESS(Level, Ip, Version) IpSecDumpAddress (Level, Ip, Version)
22#define IKEV1_DUMP_STATE(Previous, Current) IkeDumpState (Previous, Current, 1)
23#define IKEV2_DUMP_STATE(Previous, Current) IkeDumpState (Previous, Current, 2)
24#define IPSEC_DUMP_PACKET(Packet, Direction, IpVersion) IpSecDumpPacket (Packet, Direction, IpVersion)
25#define IPSEC_DUMP_PAYLOAD(IkePayload) IpSecDumpPayload (IkePayload, 1)
26#define IKEV2_DUMP_PAYLOAD(IkePayload) IpSecDumpPayload (IkePayload, 2)
27#define IPSEC_DUMP_BUF(Title, Data, DataSize) IpSecDumpBuf (Title, Data, DataSize)
28
29#define IPSEC_DEBUG_BYTE_PER_LINE 8
30#define IKE_STATE_NUM 7
31
32
33
34/**
35 Print the IP address.
36
37 @param[in] Level Debug print error level. Pass to DEBUG().
38 @param[in] Ip Point to specified IP address.
39 @param[in] IpVersion The IP Version.
40
41**/
42VOID
43IpSecDumpAddress (
44 IN UINTN Level,
45 IN EFI_IP_ADDRESS *Ip,
46 IN UINT8 IpVersion
47 );
48
49/**
50 Print IKE Current states.
51
52 @param[in] Previous The Previous state of IKE.
53 @param[in] Current The current state of IKE.
54 @param[in] IkeVersion The version of IKE.
55
56**/
57VOID
58IkeDumpState (
59 IN UINT32 Previous,
60 IN UINT32 Current,
61 IN UINT8 IkeVersion
62 );
63
64/**
65 Print the IKE Packet.
66
67 @param[in] Packet Point to IKE packet to be printed.
68 @param[in] Direction Point to the IKE packet is inbound or outbound.
69 @param[in] IpVersion Specified IP Version.
70
71**/
72VOID
73IpSecDumpPacket (
74 IN IKE_PACKET *Packet,
75 IN EFI_IPSEC_TRAFFIC_DIR Direction,
76 IN UINT8 IpVersion
77 );
78
79/**
80 Print the IKE Paylolad.
81
82 @param[in] IkePayload Point to payload to be printed.
83 @param[in] IkeVersion The specified version of IKE.
84
85**/
86VOID
87IpSecDumpPayload (
88 IN IKE_PAYLOAD *IkePayload,
89 IN UINT8 IkeVersion
90 );
91
92/**
93 Print the buffer in form of Hex.
94
95 @param[in] Title The strings to be printed before the data of the buffer.
96 @param[in] Data Point to buffer to be printed.
97 @param[in] DataSize The size of the buffer to be printed.
98
99**/
100VOID
101IpSecDumpBuf (
102 IN CHAR8 *Title,
103 IN UINT8 *Data,
104 IN UINTN DataSize
105 );
106
107#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette