summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Protocol/Tcp
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-28 07:00:39 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-28 07:00:39 +0000
commit3eb9473ea9a949badfe06ae61d2d3fcfa53651c7 (patch)
treee9d8c368dbb1e58794b2c00acefe4bbad270f8c4 /EdkCompatibilityPkg/Foundation/Protocol/Tcp
parent30d4a0c7ec19938196b1308006b990e0945150da (diff)
downloadedk2-platforms-3eb9473ea9a949badfe06ae61d2d3fcfa53651c7.tar.xz
Add in the 1st version of ECP.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2832 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Protocol/Tcp')
-rw-r--r--EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.c29
-rw-r--r--EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.h110
2 files changed, 139 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.c b/EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.c
new file mode 100644
index 0000000000..8575d076d1
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.c
@@ -0,0 +1,29 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ Tcp.c
+
+Abstract:
+
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION(Tcp)
+
+
+EFI_GUID gEfiTcpProtocolGuid = EFI_TCP_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiTcpProtocolGuid, "Transmission Control Protocol", "EFI Transmission Control Protocol");
diff --git a/EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.h b/EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.h
new file mode 100644
index 0000000000..f1b79fa6e1
--- /dev/null
+++ b/EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.h
@@ -0,0 +1,110 @@
+/*++
+
+Copyright (c) 2004, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ tcp.h
+
+Abstract:
+
+ EFI Transmission Control Protocol
+
+
+
+Revision History
+
+--*/
+
+
+#ifndef _EFITCP_H
+#define _EFITCP_H
+
+
+#include EFI_PROTOCOL_DEFINITION(PxeBaseCode)
+
+//
+// PXE Base Code protocol
+//
+
+#define EFI_TCP_PROTOCOL_GUID \
+ { 0x02b3d5f2, 0xac28, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
+
+EFI_FORWARD_DECLARATION (EFI_TCP_PROTOCOL);
+
+
+typedef UINT16 EFI_PXE_BASE_CODE_TCP_PORT;
+
+//
+// Port Receive Filter definitions
+//
+#define EFI_PXE_BASE_CODE_MAX_PORTCNT 8
+typedef struct {
+ UINT8 Filters;
+ UINT8 IpCnt;
+ UINT16 reserved;
+ EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_PORTCNT];
+} EFI_TCP_PORT_FILTER;
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_WRITE) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL *This,
+ IN UINT16 OpFlags,
+ IN UINT16 *UrgentPointer,
+ IN UINT32 *SequenceNumber,
+ IN UINT32 *AckNumber,
+ IN UINT16 *HlenResCode,
+ IN UINT16 *Window,
+ IN EFI_IP_ADDRESS *DestIp,
+ IN UINT16 *DestPort,
+ IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
+ IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
+ IN UINT16 *SrcPort, OPTIONAL
+ IN UINTN *HeaderSize, OPTIONAL
+ IN VOID *HeaderPtr, OPTIONAL
+ IN UINTN *BufferSize,
+ IN VOID *BufferPtr
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_READ) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL *This,
+ IN UINT16 OpFlags,
+ IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
+ IN OUT UINT16 *DestPort, OPTIONAL
+ IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
+ IN OUT UINT16 *SrcPort, OPTIONAL
+ IN UINTN *HeaderSize, OPTIONAL
+ IN VOID *HeaderPtr, OPTIONAL
+ IN OUT UINTN *BufferSize,
+ IN VOID *BufferPtr
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_TCP_SET_PORT_FILTER) (
+ IN EFI_PXE_BASE_CODE_PROTOCOL *This,
+ IN EFI_TCP_PORT_FILTER *NewFilter
+ );
+
+//
+// TCP Protocol structure
+//
+typedef struct _EFI_TCP_PROTOCOL {
+ EFI_TCP_WRITE TcpWrite;
+ EFI_TCP_READ TcpRead;
+ EFI_TCP_SET_PORT_FILTER SetPortFilter;
+} EFI_TCP_PROTOCOL;
+
+extern EFI_GUID gEfiTcpProtocolGuid;
+
+#endif /* _EFITCP_H */