]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/IpSecDxe/IpSecDebug.h
Add NetworkPkg (P.UDK2010.UP3.Network.P1)
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecDebug.h
CommitLineData
a3bcde70
HT
1/** @file\r
2 The definition of functions and MACROs used for IPsec debug information print.\r
3\r
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _EFI_IPSEC_DEBUG_H_\r
17#define _EFI_IPSEC_DEBUG_H_\r
18\r
19#include <Library/DebugLib.h>\r
20\r
21#define IPSEC_DUMP_ADDRESS(Level, Ip, Version) IpSecDumpAddress (Level, Ip, Version)\r
22#define IPSEC_DUMP_STATE(Previous, Current) IpSecDumpState (Previous, Current)\r
23#define IPSEC_DUMP_PACKET(Packet, Direction, IpVersion) IpSecDumpPacket (Packet, Direction, IpVersion)\r
24#define IPSEC_DUMP_PAYLOAD(IkePayload) IpSecDumpPayload (IkePayload)\r
25#define IPSEC_DUMP_BUF(Title, Data, DataSize) IpSecDumpBuf (Title, Data, DataSize)\r
26\r
27#define IPSEC_DEBUG_BYTE_PER_LINE 8\r
28\r
29\r
30/**\r
31 Print the IP address.\r
32\r
33 @param[in] Level Debug print error level. Pass to DEBUG().\r
34 @param[in] Ip Point to specified IP address.\r
35 @param[in] IpVersion The IP Version.\r
36\r
37**/\r
38VOID\r
39IpSecDumpAddress (\r
40 IN UINTN Level,\r
41 IN EFI_IP_ADDRESS *Ip,\r
42 IN UINT8 IpVersion\r
43 );\r
44\r
45/**\r
46 Print IKEv1 Current states.\r
47\r
48 @param[in] Previous The Previous state of IKEv1.\r
49 @param[in] Current The current state of IKEv1.\r
50\r
51**/\r
52VOID\r
53IpSecDumpState (\r
54 IN UINT32 Previous,\r
55 IN UINT32 Current\r
56 );\r
57\r
58/**\r
59 Print the Ike Packet.\r
60\r
61 @param[in] Packet Point to IKE packet to be printed.\r
62 @param[in] Direction Point to the IKE packet is inbound or outbound.\r
63 @param[in] IpVersion Specified IP Version.\r
64\r
65**/\r
66/*\r
67VOID\r
68IpSecDumpPacket (\r
69 IN IKE_PACKET *Packet,\r
70 IN EFI_IPSEC_TRAFFIC_DIR Direction,\r
71 IN UINT8 IpVersion\r
72 );\r
73*/\r
74\r
75/**\r
76 Print the IKE Paylolad.\r
77\r
78 @param[in] IkePayload Points to the payload to be printed.\r
79\r
80**/\r
81/*\r
82VOID\r
83IpSecDumpPayload (\r
84 IN IKE_PAYLOAD *IkePayload\r
85 );\r
86*/\r
87/**\r
88 Print the buffer in form of Hex.\r
89\r
90 @param[in] Title The strings to be printed before the data of the buffer.\r
91 @param[in] Data Points to the buffer to be printed.\r
92 @param[in] DataSize The size of the buffer to be printed.\r
93\r
94**/\r
95VOID\r
96IpSecDumpBuf (\r
97 IN CHAR8 *Title,\r
98 IN UINT8 *Data,\r
99 IN UINTN DataSize\r
100 );\r
101\r
102#endif\r