]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/IpSecDxe/IpSecDebug.h
Add NetworkPkg (P.UDK2010.UP3.Network.P1)
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecDebug.h
1 /** @file
2 The definition of functions and MACROs used for IPsec debug information print.
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
16 #ifndef _EFI_IPSEC_DEBUG_H_
17 #define _EFI_IPSEC_DEBUG_H_
18
19 #include <Library/DebugLib.h>
20
21 #define IPSEC_DUMP_ADDRESS(Level, Ip, Version) IpSecDumpAddress (Level, Ip, Version)
22 #define IPSEC_DUMP_STATE(Previous, Current) IpSecDumpState (Previous, Current)
23 #define IPSEC_DUMP_PACKET(Packet, Direction, IpVersion) IpSecDumpPacket (Packet, Direction, IpVersion)
24 #define IPSEC_DUMP_PAYLOAD(IkePayload) IpSecDumpPayload (IkePayload)
25 #define IPSEC_DUMP_BUF(Title, Data, DataSize) IpSecDumpBuf (Title, Data, DataSize)
26
27 #define IPSEC_DEBUG_BYTE_PER_LINE 8
28
29
30 /**
31 Print the IP address.
32
33 @param[in] Level Debug print error level. Pass to DEBUG().
34 @param[in] Ip Point to specified IP address.
35 @param[in] IpVersion The IP Version.
36
37 **/
38 VOID
39 IpSecDumpAddress (
40 IN UINTN Level,
41 IN EFI_IP_ADDRESS *Ip,
42 IN UINT8 IpVersion
43 );
44
45 /**
46 Print IKEv1 Current states.
47
48 @param[in] Previous The Previous state of IKEv1.
49 @param[in] Current The current state of IKEv1.
50
51 **/
52 VOID
53 IpSecDumpState (
54 IN UINT32 Previous,
55 IN UINT32 Current
56 );
57
58 /**
59 Print the Ike Packet.
60
61 @param[in] Packet Point to IKE packet to be printed.
62 @param[in] Direction Point to the IKE packet is inbound or outbound.
63 @param[in] IpVersion Specified IP Version.
64
65 **/
66 /*
67 VOID
68 IpSecDumpPacket (
69 IN IKE_PACKET *Packet,
70 IN EFI_IPSEC_TRAFFIC_DIR Direction,
71 IN UINT8 IpVersion
72 );
73 */
74
75 /**
76 Print the IKE Paylolad.
77
78 @param[in] IkePayload Points to the payload to be printed.
79
80 **/
81 /*
82 VOID
83 IpSecDumpPayload (
84 IN IKE_PAYLOAD *IkePayload
85 );
86 */
87 /**
88 Print the buffer in form of Hex.
89
90 @param[in] Title The strings to be printed before the data of the buffer.
91 @param[in] Data Points to the buffer to be printed.
92 @param[in] DataSize The size of the buffer to be printed.
93
94 **/
95 VOID
96 IpSecDumpBuf (
97 IN CHAR8 *Title,
98 IN UINT8 *Data,
99 IN UINTN DataSize
100 );
101
102 #endif