]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IpSecImpl.h
NetworkPkg: Clean up source files
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecImpl.h
index 4237119d93c54d32d2f5c2c6a7d72c8d93807795..94cbaa77e3491676a30d36ccb5e30b511671141d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The definitions related to IPsec protocol implementation.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -76,6 +76,7 @@ typedef struct _EFI_ESP_TAIL {
 struct _IPSEC_SPD_DATA {\r
   CHAR16                    Name[100];\r
   UINT32                    PackageFlag;\r
+  EFI_IPSEC_TRAFFIC_DIR     TrafficDirection;\r
   EFI_IPSEC_ACTION          Action;\r
   EFI_IPSEC_PROCESS_POLICY  *ProcessingPolicy;\r
   LIST_ENTRY                Sas;\r
@@ -124,9 +125,9 @@ typedef struct _IPSEC_RECYCLE_CONTEXT {
 //\r
 // Struct used to store the Hash and its data.\r
 //\r
-typedef struct {
-  UINTN DataSize;
-  UINT8 *Data;
+typedef struct {\r
+  UINTN DataSize;\r
+  UINT8 *Data;\r
 } HASH_DATA_FRAGMENT;\r
 \r
 struct _IPSEC_PRIVATE_DATA {\r
@@ -150,16 +151,16 @@ struct _IPSEC_PRIVATE_DATA {
 /**\r
   This function processes the inbound traffic with IPsec.\r
 \r
-  It checks the received packet security property, trims the ESP/AH header, and then \r
+  It checks the received packet security property, trims the ESP/AH header, and then\r
   returns without an IPsec protected IP Header and FragmentTable.\r
-  \r
+\r
   @param[in]      IpVersion          The version of IP.\r
-  @param[in, out] IpHead             Points to IP header containing the ESP/AH header \r
+  @param[in, out] IpHead             Points to IP header containing the ESP/AH header\r
                                      to be trimed on input, and without ESP/AH header\r
                                      on return.\r
   @param[in, out] LastHead           The Last Header in IP header on return.\r
-  @param[in, out] OptionsBuffer      Pointer to the options buffer. It is optional.\r
-  @param[in, out] OptionsLength      Length of the options buffer. It is optional.\r
+  @param[in, out] OptionsBuffer      Pointer to the options buffer.\r
+  @param[in, out] OptionsLength      Length of the options buffer.\r
   @param[in, out] FragmentTable      Pointer to a list of fragments in form of IPsec\r
                                      protected on input, and without IPsec protected\r
                                      on return.\r
@@ -176,8 +177,8 @@ IpSecProtectInboundPacket (
   IN     UINT8                       IpVersion,\r
   IN OUT VOID                        *IpHead,\r
   IN OUT UINT8                       *LastHead,\r
-  IN OUT VOID                        **OptionsBuffer, OPTIONAL\r
-  IN OUT UINT32                      *OptionsLength,  OPTIONAL\r
+  IN OUT VOID                        **OptionsBuffer,\r
+  IN OUT UINT32                      *OptionsLength,\r
   IN OUT EFI_IPSEC_FRAGMENT_DATA     **FragmentTable,\r
   IN OUT UINT32                      *FragmentCount,\r
      OUT EFI_IPSEC_SPD_SELECTOR      **SpdEntry,\r
@@ -196,8 +197,8 @@ IpSecProtectInboundPacket (
                                      to be processed on input, and inserted ESP/AH header\r
                                      on return.\r
   @param[in, out] LastHead           The Last Header in IP header.\r
-  @param[in, out] OptionsBuffer      Pointer to the options buffer. It is optional.\r
-  @param[in, out] OptionsLength      Length of the options buffer. It is optional.\r
+  @param[in, out] OptionsBuffer      Pointer to the options buffer.\r
+  @param[in, out] OptionsLength      Length of the options buffer.\r
   @param[in, out] FragmentTable      Pointer to a list of fragments to be protected by\r
                                      IPsec on input, and with IPsec protected\r
                                      on return.\r
@@ -214,8 +215,8 @@ IpSecProtectOutboundPacket (
   IN     UINT8                       IpVersion,\r
   IN OUT VOID                        *IpHead,\r
   IN OUT UINT8                       *LastHead,\r
-  IN OUT VOID                        **OptionsBuffer, OPTIONAL\r
-  IN OUT UINT32                      *OptionsLength,  OPTIONAL\r
+  IN OUT VOID                        **OptionsBuffer,\r
+  IN OUT UINT32                      *OptionsLength,\r
   IN OUT EFI_IPSEC_FRAGMENT_DATA     **FragmentTable,\r
   IN OUT UINT32                      *FragmentCount,\r
   IN     IPSEC_SAD_ENTRY             *SadEntry,\r
@@ -280,7 +281,7 @@ IpSecLookupSpdEntry (
   IN     VOID                    *IpHead,\r
   IN     UINT8                   *IpPayload,\r
   IN     UINT8                   Protocol,\r
-  IN     BOOLEAN                 IsOutbound, \r
+  IN     BOOLEAN                 IsOutbound,\r
      OUT EFI_IPSEC_ACTION        *Action\r
   );\r
 \r