]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Protocol/Tcp/Tcp.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Protocol / Tcp / Tcp.h
1 /*++
2
3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 tcp.h
15
16 Abstract:
17
18 EFI Transmission Control Protocol
19
20
21
22 Revision History
23
24 --*/
25
26
27 #ifndef _EFITCP_H
28 #define _EFITCP_H
29
30
31 #include EFI_PROTOCOL_DEFINITION(PxeBaseCode)
32
33 //
34 // PXE Base Code protocol
35 //
36
37 #define EFI_TCP_PROTOCOL_GUID \
38 { 0x02b3d5f2, 0xac28, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
39
40 EFI_FORWARD_DECLARATION (EFI_TCP_PROTOCOL);
41
42
43 typedef UINT16 EFI_PXE_BASE_CODE_TCP_PORT;
44
45 //
46 // Port Receive Filter definitions
47 //
48 #define EFI_PXE_BASE_CODE_MAX_PORTCNT 8
49 typedef struct {
50 UINT8 Filters;
51 UINT8 IpCnt;
52 UINT16 reserved;
53 EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_PORTCNT];
54 } EFI_TCP_PORT_FILTER;
55
56 typedef
57 EFI_STATUS
58 (EFIAPI *EFI_TCP_WRITE) (
59 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
60 IN UINT16 OpFlags,
61 IN UINT16 *UrgentPointer,
62 IN UINT32 *SequenceNumber,
63 IN UINT32 *AckNumber,
64 IN UINT16 *HlenResCode,
65 IN UINT16 *Window,
66 IN EFI_IP_ADDRESS *DestIp,
67 IN UINT16 *DestPort,
68 IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
69 IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
70 IN UINT16 *SrcPort, OPTIONAL
71 IN UINTN *HeaderSize, OPTIONAL
72 IN VOID *HeaderPtr, OPTIONAL
73 IN UINTN *BufferSize,
74 IN VOID *BufferPtr
75 );
76
77 typedef
78 EFI_STATUS
79 (EFIAPI *EFI_TCP_READ) (
80 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
81 IN UINT16 OpFlags,
82 IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
83 IN OUT UINT16 *DestPort, OPTIONAL
84 IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
85 IN OUT UINT16 *SrcPort, OPTIONAL
86 IN UINTN *HeaderSize, OPTIONAL
87 IN VOID *HeaderPtr, OPTIONAL
88 IN OUT UINTN *BufferSize,
89 IN VOID *BufferPtr
90 );
91
92 typedef
93 EFI_STATUS
94 (EFIAPI *EFI_TCP_SET_PORT_FILTER) (
95 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
96 IN EFI_TCP_PORT_FILTER *NewFilter
97 );
98
99 //
100 // TCP Protocol structure
101 //
102 typedef struct _EFI_TCP_PROTOCOL {
103 EFI_TCP_WRITE TcpWrite;
104 EFI_TCP_READ TcpRead;
105 EFI_TCP_SET_PORT_FILTER SetPortFilter;
106 } EFI_TCP_PROTOCOL;
107
108 extern EFI_GUID gEfiTcpProtocolGuid;
109
110 #endif /* _EFITCP_H */