]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h
Use Mde library and definition instead of some native definitions in NetLib, to simpl...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / SockImpl.h
CommitLineData
83cbd279 1/** @file\r
2\r
3Copyright (c) 2005 - 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 SockImpl.h\r
15\r
16Abstract:\r
17\r
18\r
19**/\r
20\r
21#ifndef _SOCK_IMPL_H_\r
22#define _SOCK_IMPL_H_\r
23\r
24#include "Socket.h"\r
25\r
83cbd279 26\r
27#define SOCK_TRIM_RCV_BUFF(Sock, Len) \\r
28 (NetbufQueTrim ((Sock)->RcvBuffer.DataQueue, (Len)))\r
29\r
30#define SIGNAL_TOKEN(Token, TokenStatus) \\r
31 do { \\r
32 (Token)->Status = (TokenStatus); \\r
33 gBS->SignalEvent ((Token)->Event); \\r
34 } while (0)\r
35\r
36#define SOCK_HEADER_SPACE (60 + 60 + 72)\r
37\r
38//\r
39// Supporting function for both SockImpl and SockInterface\r
40//\r
41VOID\r
42SockFreeFoo (\r
43 IN EFI_EVENT Event\r
44 );\r
45\r
46EFI_STATUS\r
47SockProcessTcpSndData (\r
48 IN SOCKET *Sock,\r
49 IN VOID *TcpTxData\r
50 );\r
51\r
52VOID\r
53SockSetTcpRxData (\r
54 IN SOCKET *Sock,\r
55 IN VOID *TcpRxData,\r
56 IN UINT32 RcvdBytes,\r
57 IN BOOLEAN IsOOB\r
58 );\r
59\r
60UINT32\r
61SockProcessRcvToken (\r
62 IN SOCKET *Sock,\r
63 IN SOCK_IO_TOKEN *RcvToken\r
64 );\r
65\r
66VOID\r
67SockConnFlush (\r
68 IN SOCKET *Sock\r
69 );\r
70\r
71SOCKET *\r
72SockCreate (\r
73 IN SOCK_INIT_DATA *SockInitData\r
74 );\r
75\r
76VOID\r
77SockDestroy (\r
78 IN SOCKET *Sock\r
79 );\r
80\r
81#endif\r