VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/TcpDxe/SockImpl.h@ 80721

Last change on this file since 80721 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
1/** @file
2 The function declaration that provided for Socket Interface.
3
4 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#ifndef _SOCK_IMPL_H_
11#define _SOCK_IMPL_H_
12
13#include "Socket.h"
14#include "TcpMain.h"
15
16/**
17 Signal a event with the given status.
18
19 @param[in] Token The token's event is to be signaled.
20 @param[in] TokenStatus The status to be sent with the event.
21
22**/
23#define SIGNAL_TOKEN(Token, TokenStatus) \
24 do { \
25 (Token)->Status = (TokenStatus); \
26 gBS->SignalEvent ((Token)->Event); \
27 } while (0)
28
29#define SOCK_HEADER_SPACE (60 + 60 + 72)
30
31/**
32 Process the TCP send data, buffer the tcp txdata and append
33 the buffer to socket send buffer, then try to send it.
34
35 @param[in] Sock Pointer to the socket.
36 @param[in] TcpTxData Pointer to the application provided send buffer.
37
38 @retval EFI_SUCCESS The operation completed successfully.
39 @retval EFI_OUT_OF_RESOURCES Failed due to resource limits.
40
41**/
42EFI_STATUS
43SockProcessTcpSndData (
44 IN SOCKET *Sock,
45 IN VOID *TcpTxData
46 );
47
48/**
49 Get received data from the socket layer to the receive token.
50
51 @param[in, out] Sock Pointer to the socket.
52 @param[in, out] RcvToken Pointer to the application provided receive token.
53
54 @return The length of data received in this token.
55
56**/
57UINT32
58SockProcessRcvToken (
59 IN OUT SOCKET *Sock,
60 IN OUT SOCK_IO_TOKEN *RcvToken
61 );
62
63/**
64 Flush the sndBuffer and rcvBuffer of socket.
65
66 @param[in, out] Sock Pointer to the socket.
67
68**/
69VOID
70SockConnFlush (
71 IN OUT SOCKET *Sock
72 );
73
74/**
75 Cancel the tokens in the specific token list.
76
77 @param[in] Token Pointer to the Token. If NULL, all tokens
78 in SpecifiedTokenList will be canceled.
79 @param[in, out] SpecifiedTokenList Pointer to the token list to be checked.
80
81 @retval EFI_SUCCESS Cancel the tokens in the specific token listsuccessfully.
82 @retval EFI_NOT_FOUND The Token is not found in SpecifiedTokenList.
83
84**/
85EFI_STATUS
86SockCancelToken (
87 IN SOCK_COMPLETION_TOKEN *Token,
88 IN OUT LIST_ENTRY *SpecifiedTokenList
89 );
90
91/**
92 Create a socket with initial data SockInitData.
93
94 @param[in] SockInitData Pointer to the initial data of the socket.
95
96 @return Pointer to the newly created socket, return NULL when exception occured.
97
98**/
99SOCKET *
100SockCreate (
101 IN SOCK_INIT_DATA *SockInitData
102 );
103
104/**
105 Destroy a socket.
106
107 @param[in, out] Sock Pointer to the socket.
108
109**/
110VOID
111SockDestroy (
112 IN OUT SOCKET *Sock
113 );
114
115#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette