]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Protocol/Tcp.h
remove EFI 1.10 network stack.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / Tcp.h
1 /** @file
2
3 This file defines EFI Transmission Control Protocol.
4
5 Copyright (c) 2004 - 2008, Intel Corporation
6 All rights reserved. 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
17 #ifndef __EFI_TCP_H__
18 #define __EFI_TCP_H__
19
20
21 #include <Protocol/PxeBaseCode.h>
22
23 ///
24 /// EFI Transmission Control Protocol
25 ///
26 #define EFI_TCP_PROTOCOL_GUID \
27 { 0x02b3d5f2, 0xac28, 0x11d3, { 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }}
28
29
30 typedef UINT16 EFI_PXE_BASE_CODE_TCP_PORT;
31
32 //
33 // Port Receive Filter definitions
34 //
35 #define EFI_PXE_BASE_CODE_MAX_PORTCNT 8
36 typedef struct {
37 UINT8 Filters;
38 UINT8 IpCnt;
39 UINT16 reserved;
40 EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_PORTCNT];
41 } EFI_TCP_PORT_FILTER;
42
43 typedef
44 EFI_STATUS
45 (EFIAPI *EFI_TCP_WRITE)(
46 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
47 IN UINT16 OpFlags,
48 IN UINT16 *UrgentPointer,
49 IN UINT32 *SequenceNumber,
50 IN UINT32 *AckNumber,
51 IN UINT16 *HlenResCode,
52 IN UINT16 *Window,
53 IN EFI_IP_ADDRESS *DestIp,
54 IN UINT16 *DestPort,
55 IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
56 IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
57 IN UINT16 *SrcPort, OPTIONAL
58 IN UINTN *HeaderSize, OPTIONAL
59 IN VOID *HeaderPtr, OPTIONAL
60 IN UINTN *BufferSize,
61 IN VOID *BufferPtr
62 );
63
64 typedef
65 EFI_STATUS
66 (EFIAPI *EFI_TCP_READ)(
67 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
68 IN UINT16 OpFlags,
69 IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
70 IN OUT UINT16 *DestPort, OPTIONAL
71 IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
72 IN OUT UINT16 *SrcPort, OPTIONAL
73 IN UINTN *HeaderSize, OPTIONAL
74 IN VOID *HeaderPtr, OPTIONAL
75 IN OUT UINTN *BufferSize,
76 IN VOID *BufferPtr
77 );
78
79 typedef
80 EFI_STATUS
81 (EFIAPI *EFI_TCP_SET_PORT_FILTER)(
82 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
83 IN EFI_TCP_PORT_FILTER *NewFilter
84 );
85
86 ///
87 /// TCP Protocol structure
88 ///
89 typedef struct _EFI_TCP_PROTOCOL {
90 EFI_TCP_WRITE TcpWrite;
91 EFI_TCP_READ TcpRead;
92 EFI_TCP_SET_PORT_FILTER SetPortFilter;
93 } EFI_TCP_PROTOCOL;
94
95 extern EFI_GUID gEfiTcpProtocolGuid;
96
97 #endif
98