]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Protocol/Tcp.h
Code scrube for MdeModule Definitions.
[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 // PXE Base Code protocol
25 //
26
27 #define EFI_TCP_PROTOCOL_GUID \
28 { 0x02b3d5f2, 0xac28, 0x11d3, { 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }}
29
30
31 typedef UINT16 EFI_PXE_BASE_CODE_TCP_PORT;
32
33 //
34 // Port Receive Filter definitions
35 //
36 #define EFI_PXE_BASE_CODE_MAX_PORTCNT 8
37 typedef struct {
38 UINT8 Filters;
39 UINT8 IpCnt;
40 UINT16 reserved;
41 EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_PORTCNT];
42 } EFI_TCP_PORT_FILTER;
43
44 typedef
45 EFI_STATUS
46 (EFIAPI *EFI_TCP_WRITE) (
47 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
48 IN UINT16 OpFlags,
49 IN UINT16 *UrgentPointer,
50 IN UINT32 *SequenceNumber,
51 IN UINT32 *AckNumber,
52 IN UINT16 *HlenResCode,
53 IN UINT16 *Window,
54 IN EFI_IP_ADDRESS *DestIp,
55 IN UINT16 *DestPort,
56 IN EFI_IP_ADDRESS *GatewayIp, OPTIONAL
57 IN EFI_IP_ADDRESS *SrcIp, OPTIONAL
58 IN UINT16 *SrcPort, OPTIONAL
59 IN UINTN *HeaderSize, OPTIONAL
60 IN VOID *HeaderPtr, OPTIONAL
61 IN UINTN *BufferSize,
62 IN VOID *BufferPtr
63 );
64
65 typedef
66 EFI_STATUS
67 (EFIAPI *EFI_TCP_READ) (
68 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
69 IN UINT16 OpFlags,
70 IN OUT EFI_IP_ADDRESS *DestIp, OPTIONAL
71 IN OUT UINT16 *DestPort, OPTIONAL
72 IN OUT EFI_IP_ADDRESS *SrcIp, OPTIONAL
73 IN OUT UINT16 *SrcPort, OPTIONAL
74 IN UINTN *HeaderSize, OPTIONAL
75 IN VOID *HeaderPtr, OPTIONAL
76 IN OUT UINTN *BufferSize,
77 IN VOID *BufferPtr
78 );
79
80 typedef
81 EFI_STATUS
82 (EFIAPI *EFI_TCP_SET_PORT_FILTER) (
83 IN EFI_PXE_BASE_CODE_PROTOCOL *This,
84 IN EFI_TCP_PORT_FILTER *NewFilter
85 );
86
87 //
88 // TCP Protocol structure
89 //
90 typedef struct _EFI_TCP_PROTOCOL {
91 EFI_TCP_WRITE TcpWrite;
92 EFI_TCP_READ TcpRead;
93 EFI_TCP_SET_PORT_FILTER SetPortFilter;
94 } EFI_TCP_PROTOCOL;
95
96 extern EFI_GUID gEfiTcpProtocolGuid;
97
98 #endif /* _EFITCP_H */