TianoCore EDK2 master
Loading...
Searching...
No Matches
TcpMain.h
Go to the documentation of this file.
1
11#ifndef _TCP_MAIN_H_
12#define _TCP_MAIN_H_
13
16#include <Protocol/Hash2.h>
17#include <Library/IpIoLib.h>
19#include <Library/PrintLib.h>
20
21#include "Socket.h"
22#include "TcpProto.h"
23#include "TcpDriver.h"
24#include "TcpFunc.h"
25
26extern UINT16 mTcp4RandomPort;
27extern UINT16 mTcp6RandomPort;
28extern CHAR16 *mTcpStateName[];
31extern EFI_UNICODE_STRING_TABLE *gTcpControllerNameTable;
32
33extern LIST_ENTRY mTcpRunQue;
34extern LIST_ENTRY mTcpListenQue;
35extern TCP_SEQNO mTcpGlobalSecret;
36extern UINT32 mTcpTick;
37
41#define TCP6_KEEP_NEIGHBOR_TIME 30
45#define TCP6_REFRESH_NEIGHBOR_TICK 25
46
47#define TCP_EXPIRE_TIME 65535
48
49typedef union {
50 EFI_TCP4_CONFIG_DATA Tcp4CfgData;
51 EFI_TCP6_CONFIG_DATA Tcp6CfgData;
53
54typedef union {
58
59typedef struct _TCP4_MODE_DATA {
61 EFI_TCP4_CONFIG_DATA *Tcp4ConfigData;
62 EFI_IP4_MODE_DATA *Ip4ModeData;
64 EFI_SIMPLE_NETWORK_MODE *SnpModeData;
66
67typedef struct _TCP6_MODE_DATA {
69 EFI_TCP6_CONFIG_DATA *Tcp6ConfigData;
70 EFI_IP6_MODE_DATA *Ip6ModeData;
72 EFI_SIMPLE_NETWORK_MODE *SnpModeData;
74
75typedef struct _TCP4_ROUTE_INFO {
76 BOOLEAN DeleteRoute;
77 EFI_IPv4_ADDRESS *SubnetAddress;
78 EFI_IPv4_ADDRESS *SubnetMask;
79 EFI_IPv4_ADDRESS *GatewayAddress;
81
82typedef struct {
83 EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
84 UINTN NumberOfChildren;
85 EFI_HANDLE *ChildHandleBuffer;
87
88//
89// EFI_TCP4_PROTOCOL definitions.
90//
91
116EFIAPI
118 IN EFI_TCP4_PROTOCOL *This,
119 OUT EFI_TCP4_CONNECTION_STATE *Tcp4State OPTIONAL,
120 OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL,
121 OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
122 OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
123 OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
124 );
125
149EFIAPI
151 IN EFI_TCP4_PROTOCOL *This,
152 IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL
153 );
154
181EFIAPI
183 IN EFI_TCP4_PROTOCOL *This,
184 IN BOOLEAN DeleteRoute,
185 IN EFI_IPv4_ADDRESS *SubnetAddress,
186 IN EFI_IPv4_ADDRESS *SubnetMask,
187 IN EFI_IPv4_ADDRESS *GatewayAddress
188 );
189
210EFIAPI
212 IN EFI_TCP4_PROTOCOL *This,
213 IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken
214 );
215
237EFIAPI
239 IN EFI_TCP4_PROTOCOL *This,
240 IN EFI_TCP4_LISTEN_TOKEN *ListenToken
241 );
242
273EFIAPI
275 IN EFI_TCP4_PROTOCOL *This,
276 IN EFI_TCP4_IO_TOKEN *Token
277 );
278
311EFIAPI
313 IN EFI_TCP4_PROTOCOL *This,
314 IN EFI_TCP4_IO_TOKEN *Token
315 );
316
340EFIAPI
341Tcp4Close (
342 IN EFI_TCP4_PROTOCOL *This,
343 IN EFI_TCP4_CLOSE_TOKEN *CloseToken
344 );
345
371EFIAPI
373 IN EFI_TCP4_PROTOCOL *This,
374 IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL
375 );
376
392EFIAPI
393Tcp4Poll (
395 );
396
397//
398// EFI_TCP6_PROTOCOL definitions.
399//
400
430EFIAPI
432 IN EFI_TCP6_PROTOCOL *This,
433 OUT EFI_TCP6_CONNECTION_STATE *Tcp6State OPTIONAL,
434 OUT EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL,
435 OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL,
436 OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
437 OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
438 );
439
488EFIAPI
490 IN EFI_TCP6_PROTOCOL *This,
491 IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL
492 );
493
525EFIAPI
527 IN EFI_TCP6_PROTOCOL *This,
528 IN EFI_TCP6_CONNECTION_TOKEN *ConnectionToken
529 );
530
568EFIAPI
570 IN EFI_TCP6_PROTOCOL *This,
571 IN EFI_TCP6_LISTEN_TOKEN *ListenToken
572 );
573
612EFIAPI
614 IN EFI_TCP6_PROTOCOL *This,
615 IN EFI_TCP6_IO_TOKEN *Token
616 );
617
665EFIAPI
667 IN EFI_TCP6_PROTOCOL *This,
668 IN EFI_TCP6_IO_TOKEN *Token
669 );
670
699EFIAPI
700Tcp6Close (
701 IN EFI_TCP6_PROTOCOL *This,
702 IN EFI_TCP6_CLOSE_TOKEN *CloseToken
703 );
704
741EFIAPI
743 IN EFI_TCP6_PROTOCOL *This,
744 IN EFI_TCP6_COMPLETION_TOKEN *Token OPTIONAL
745 );
746
765EFIAPI
766Tcp6Poll (
768 );
769
806TcpGetIsn (
807 IN UINT8 *LocalIp,
808 IN UINTN LocalIpSize,
809 IN UINT16 LocalPort,
810 IN UINT8 *RemoteIp,
811 IN UINTN RemoteIpSize,
812 IN UINT16 RemotePort,
813 OUT TCP_SEQNO *Isn
814 );
815
816#endif
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_TCP4_CONNECTION_STATE
Definition: Tcp4.h:103
EFI_TCP6_CONNECTION_STATE
Definition: Tcp6.h:243
EFI_STATUS EFIAPI Tcp4GetModeData(IN EFI_TCP4_PROTOCOL *This, OUT EFI_TCP4_CONNECTION_STATE *Tcp4State OPTIONAL, OUT EFI_TCP4_CONFIG_DATA *Tcp4ConfigData OPTIONAL, OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
Definition: TcpMain.c:76
EFI_STATUS EFIAPI Tcp4Accept(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_LISTEN_TOKEN *ListenToken)
Definition: TcpMain.c:297
EFI_COMPONENT_NAME2_PROTOCOL gTcpComponentName2
EFI_STATUS EFIAPI Tcp4Cancel(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL)
Definition: TcpMain.c:509
EFI_STATUS EFIAPI Tcp4Receive(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)
Definition: TcpMain.c:410
EFI_STATUS EFIAPI Tcp6Close(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_CLOSE_TOKEN *CloseToken)
Definition: TcpMain.c:1004
EFI_STATUS EFIAPI Tcp6Connect(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_CONNECTION_TOKEN *ConnectionToken)
Definition: TcpMain.c:753
EFI_STATUS EFIAPI Tcp6GetModeData(IN EFI_TCP6_PROTOCOL *This, OUT EFI_TCP6_CONNECTION_STATE *Tcp6State OPTIONAL, OUT EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL, OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL)
Definition: TcpMain.c:589
EFI_STATUS EFIAPI Tcp6Configure(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_CONFIG_DATA *Tcp6ConfigData OPTIONAL)
Definition: TcpMain.c:665
EFI_STATUS EFIAPI Tcp6Receive(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_IO_TOKEN *Token)
Definition: TcpMain.c:942
EFI_STATUS TcpGetIsn(IN UINT8 *LocalIp, IN UINTN LocalIpSize, IN UINT16 LocalPort, IN UINT8 *RemoteIp, IN UINTN RemoteIpSize, IN UINT16 RemotePort, OUT TCP_SEQNO *Isn)
Definition: TcpMisc.c:605
EFI_STATUS EFIAPI Tcp4Transmit(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_IO_TOKEN *Token)
Definition: TcpMain.c:344
EFI_STATUS EFIAPI Tcp4Close(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CLOSE_TOKEN *CloseToken)
Definition: TcpMain.c:467
EFI_STATUS EFIAPI Tcp6Poll(IN EFI_TCP6_PROTOCOL *This)
Definition: TcpMain.c:1092
EFI_STATUS EFIAPI Tcp4Poll(IN EFI_TCP4_PROTOCOL *This)
Definition: TcpMain.c:541
EFI_STATUS EFIAPI Tcp6Transmit(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_IO_TOKEN *Token)
Definition: TcpMain.c:861
EFI_STATUS EFIAPI Tcp6Cancel(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_COMPLETION_TOKEN *Token OPTIONAL)
Definition: TcpMain.c:1057
EFI_STATUS EFIAPI Tcp4Routes(IN EFI_TCP4_PROTOCOL *This, IN BOOLEAN DeleteRoute, IN EFI_IPv4_ADDRESS *SubnetAddress, IN EFI_IPv4_ADDRESS *SubnetMask, IN EFI_IPv4_ADDRESS *GatewayAddress)
Definition: TcpMain.c:213
EFI_COMPONENT_NAME_PROTOCOL gTcpComponentName
EFI_STATUS EFIAPI Tcp6Accept(IN EFI_TCP6_PROTOCOL *This, IN EFI_TCP6_LISTEN_TOKEN *ListenToken)
Definition: TcpMain.c:806
EFI_STATUS EFIAPI Tcp4Connect(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken)
Definition: TcpMain.c:259
EFI_STATUS EFIAPI Tcp4Configure(IN EFI_TCP4_PROTOCOL *This, IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL)
Definition: TcpMain.c:127
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33