TianoCore EDK2 master
Loading...
Searching...
No Matches
TcpFunc.h
Go to the documentation of this file.
1
10#ifndef _TCP_FUNC_H_
11#define _TCP_FUNC_H_
12
13#include "TcpOption.h"
14
15#define TCP_COMP_VAL(Min, Max, Default, Val) \
16 ((((Val) <= (Max)) && ((Val) >= (Min))) ? (Val) : (Default))
17
24typedef
25VOID
27 IN OUT TCP_CB *Tcb
28 );
29
30//
31// Functions in TcpMisc.c
32//
33
45 IN OUT TCP_CB *Tcb
46 );
47
56VOID
58 IN OUT TCP_CB *Tcb,
59 IN TCP_SEG *Seg,
60 IN TCP_OPTION *Opt
61 );
62
76BOOLEAN
78 IN EFI_IP_ADDRESS *Addr,
79 IN TCP_PORTNO Port,
80 IN UINT8 Version
81 );
82
97TCP_CB *
99 IN TCP_PORTNO LocalPort,
100 IN EFI_IP_ADDRESS *LocalIp,
101 IN TCP_PORTNO RemotePort,
102 IN EFI_IP_ADDRESS *RemoteIp,
103 IN UINT8 Version,
104 IN BOOLEAN Syn
105 );
106
116INTN
118 IN TCP_CB *Tcb
119 );
120
129TCP_CB *
131 IN TCP_CB *Tcb
132 );
133
142UINT16
144 IN SOCKET *Sock
145 );
146
154VOID
156 IN TCP_CB *Tcb,
157 IN UINT8 State
158 );
159
169UINT16
171 IN NET_BUF *Nbuf,
172 IN UINT16 HeadSum
173 );
174
185TCP_SEG *
187 IN TCP_CB *Tcb,
188 IN OUT NET_BUF *Nbuf
189 );
190
203 IN OUT TCP_CB *Tcb
204 );
205
213VOID
215 IN TCP_CB *Tcb
216 );
217
225VOID
227 IN OUT TCP_CB *Tcb
228 );
229
240INTN
242 IN OUT TCP_CB *Tcb
243 );
244
252VOID
254 IN TCP_CB *Tcb
255 );
256
263VOID
265 IN TCP_CB *Tcb
266 );
267
279 IN SOCKET *Sock
280 );
281
282//
283// Functions in TcpOutput.c
284//
285
294UINT32
296 IN TCP_CB *Tcb
297 );
298
307UINT32
309 IN TCP_CB *Tcb
310 );
311
320TCP_SEQNO
322 IN TCP_CB *Tcb
323 );
324
335UINT32
337 IN TCP_CB *Tcb,
338 IN INTN Force
339 );
340
351INTN
353 IN TCP_CB *Tcb,
354 IN TCP_SEQNO Seq
355 );
356
367INTN
369 IN OUT TCP_CB *Tcb,
370 IN INTN Force
371 );
372
379VOID
381 IN OUT TCP_CB *Tcb
382 );
383
390VOID
392 IN OUT TCP_CB *Tcb
393 );
394
404INTN
406 IN OUT TCP_CB *Tcb
407 );
408
424INTN
426 IN TCP_CB *Tcb,
427 IN TCP_HEAD *Head,
428 IN INT32 Len,
429 IN EFI_IP_ADDRESS *Local,
430 IN EFI_IP_ADDRESS *Remote,
431 IN UINT8 Version
432 );
433
443INTN
445 IN NET_BUF *Nbuf
446 );
447
448//
449// Functions from TcpInput.c
450//
451
464VOID
466 IN NET_BUF *Nbuf,
467 IN UINT8 IcmpErr,
468 IN EFI_IP_ADDRESS *Src,
469 IN EFI_IP_ADDRESS *Dst,
470 IN UINT8 Version
471 );
472
488INTN
489TcpInput (
490 IN NET_BUF *Nbuf,
491 IN EFI_IP_ADDRESS *Src,
492 IN EFI_IP_ADDRESS *Dst,
493 IN UINT8 Version
494 );
495
496//
497// Functions in TcpTimer.c
498//
499
506VOID
507TcpClose (
508 IN OUT TCP_CB *Tcb
509 );
510
518VOID
519EFIAPI
521 IN EFI_EVENT Event,
522 IN VOID *Context
523 );
524
533VOID
535 IN OUT TCP_CB *Tcb,
536 IN UINT16 Timer,
537 IN UINT32 TimeOut
538 );
539
547VOID
549 IN OUT TCP_CB *Tcb,
550 IN UINT16 Timer
551 );
552
559VOID
561 IN OUT TCP_CB *Tcb
562 );
563
570VOID
572 IN OUT TCP_CB *Tcb
573 );
574
581VOID
583 IN OUT TCP_CB *Tcb
584 );
585
586//
587// Functions in TcpIo.c
588//
589
603VOID
604EFIAPI
606 IN EFI_STATUS Status,
607 IN UINT8 IcmpErr,
608 IN EFI_NET_SESSION_DATA *NetSession,
609 IN NET_BUF *Pkt,
610 IN VOID *Context OPTIONAL
611 );
612
626INTN
628 IN TCP_CB *Tcb,
629 IN NET_BUF *Nbuf,
630 IN EFI_IP_ADDRESS *Src,
631 IN EFI_IP_ADDRESS *Dest,
632 IN UINT8 Version
633 );
634
655 IN TCP_CB *Tcb,
656 IN EFI_IP_ADDRESS *Neighbor,
657 IN UINT32 Timeout
658 );
659
660//
661// Functions in TcpDispatcher.c
662//
663
682 IN SOCKET *Sock,
683 IN UINT8 Request,
684 IN VOID *Data OPTIONAL
685 );
686
687#endif
INT64 INTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS Tcp6RefreshNeighbor(IN TCP_CB *Tcb, IN EFI_IP_ADDRESS *Neighbor, IN UINT32 Timeout)
Definition: TcpIo.c:157
VOID EFIAPI TcpTicking(IN EFI_EVENT Event, IN VOID *Context)
Definition: TcpTimer.c:563
INTN TcpOnAppSend(IN OUT TCP_CB *Tcb)
Definition: TcpMisc.c:1012
VOID TcpClose(IN OUT TCP_CB *Tcb)
Definition: TcpTimer.c:96
EFI_STATUS TcpInitTcbLocal(IN OUT TCP_CB *Tcb)
Definition: TcpMisc.c:76
INTN TcpRetransmit(IN TCP_CB *Tcb, IN TCP_SEQNO Seq)
Definition: TcpOutput.c:632
VOID TcpClearTimer(IN OUT TCP_CB *Tcb, IN UINT16 Timer)
Definition: TcpTimer.c:384
INTN TcpVerifySegment(IN NET_BUF *Nbuf)
Definition: TcpOutput.c:1184
INTN TcpSendReset(IN TCP_CB *Tcb, IN TCP_HEAD *Head, IN INT32 Len, IN EFI_IP_ADDRESS *Local, IN EFI_IP_ADDRESS *Remote, IN UINT8 Version)
Definition: TcpOutput.c:1095
EFI_STATUS TcpDispatcher(IN SOCKET *Sock, IN UINT8 Request, IN VOID *Data OPTIONAL)
INTN TcpToSendData(IN OUT TCP_CB *Tcb, IN INTN Force)
Definition: TcpOutput.c:776
VOID TcpSetProbeTimer(IN OUT TCP_CB *Tcb)
Definition: TcpTimer.c:415
UINT32 TcpRcvWinNow(IN TCP_CB *Tcb)
Definition: TcpOutput.c:62
INTN TcpInsertTcb(IN TCP_CB *Tcb)
Definition: TcpMisc.c:478
VOID TcpOnAppConsume(IN TCP_CB *Tcb)
Definition: TcpMisc.c:1054
VOID TcpSetTimer(IN OUT TCP_CB *Tcb, IN UINT16 Timer, IN UINT32 TimeOut)
Definition: TcpTimer.c:364
UINT32 TcpRcvWinOld(IN TCP_CB *Tcb)
Definition: TcpOutput.c:35
INTN TcpSendIpPacket(IN TCP_CB *Tcb, IN NET_BUF *Nbuf, IN EFI_IP_ADDRESS *Src, IN EFI_IP_ADDRESS *Dest, IN UINT8 Version)
Definition: TcpIo.c:62
EFI_STATUS TcpOnAppConnect(IN OUT TCP_CB *Tcb)
Definition: TcpMisc.c:934
VOID TcpOnAppClose(IN OUT TCP_CB *Tcb)
Definition: TcpMisc.c:961
BOOLEAN TcpFindTcbByPeer(IN EFI_IP_ADDRESS *Addr, IN TCP_PORTNO Port, IN UINT8 Version)
Definition: TcpMisc.c:364
VOID TcpSetState(IN TCP_CB *Tcb, IN UINT8 State)
Definition: TcpMisc.c:801
VOID EFIAPI TcpRxCallback(IN EFI_STATUS Status, IN UINT8 IcmpErr, IN EFI_NET_SESSION_DATA *NetSession, IN NET_BUF *Pkt, IN VOID *Context OPTIONAL)
Definition: TcpIo.c:27
TCP_CB * TcpLocateTcb(IN TCP_PORTNO LocalPort, IN EFI_IP_ADDRESS *LocalIp, IN TCP_PORTNO RemotePort, IN EFI_IP_ADDRESS *RemoteIp, IN UINT8 Version, IN BOOLEAN Syn)
Definition: TcpMisc.c:420
VOID(* TCP_TIMER_HANDLER)(IN OUT TCP_CB *Tcb)
Definition: TcpFunc.h:26
VOID TcpIcmpInput(IN NET_BUF *Nbuf, IN UINT8 IcmpErr, IN EFI_IP_ADDRESS *Src, IN EFI_IP_ADDRESS *Dst, IN UINT8 Version)
Definition: TcpInput.c:1569
VOID TcpOnAppAbort(IN TCP_CB *Tcb)
Definition: TcpMisc.c:1098
VOID TcpResetConnection(IN TCP_CB *Tcb)
Definition: TcpMisc.c:1130
EFI_STATUS TcpInstallDevicePath(IN SOCKET *Sock)
Definition: TcpMisc.c:1180
TCP_CB * TcpCloneTcb(IN TCP_CB *Tcb)
Definition: TcpMisc.c:534
TCP_SEG * TcpFormatNetbuf(IN TCP_CB *Tcb, IN OUT NET_BUF *Nbuf)
Definition: TcpMisc.c:883
INTN TcpSendZeroProbe(IN OUT TCP_CB *Tcb)
Definition: TcpOutput.c:1005
VOID TcpInitTcbPeer(IN OUT TCP_CB *Tcb, IN TCP_SEG *Seg, IN TCP_OPTION *Opt)
Definition: TcpMisc.c:157
VOID TcpSendAck(IN OUT TCP_CB *Tcb)
Definition: TcpOutput.c:967
VOID TcpClearAllTimer(IN OUT TCP_CB *Tcb)
Definition: TcpTimer.c:400
UINT16 TcpGetRcvMss(IN SOCKET *Sock)
Definition: TcpMisc.c:737
UINT32 TcpDataToSend(IN TCP_CB *Tcb, IN INTN Force)
Definition: TcpOutput.c:166
TCP_SEQNO TcpGetMaxSndNxt(IN TCP_CB *Tcb)
Definition: TcpOutput.c:137
INTN TcpInput(IN NET_BUF *Nbuf, IN EFI_IP_ADDRESS *Src, IN EFI_IP_ADDRESS *Dst, IN UINT8 Version)
Definition: TcpInput.c:710
VOID TcpSetKeepaliveTimer(IN OUT TCP_CB *Tcb)
Definition: TcpTimer.c:442
VOID TcpToSendAck(IN OUT TCP_CB *Tcb)
Definition: TcpOutput.c:1043
UINT16 TcpChecksum(IN NET_BUF *Nbuf, IN UINT16 HeadSum)
Definition: TcpMisc.c:854
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37