Home | History | Annotate | Download | only in TcpDxe

Lines Matching defs:SOCKET

2   Common head file for TCP socket.

48 // When a socket is created it enters into SO_UNCONFIGURED,
49 // no actions can be taken on this socket, only after calling
50 // SockConfigure. The state transition diagram of socket is
59 // A passive socket can only go into SO_LISTENING and
61 // when a socket is undergoing a protocol procedure such
68 /// Socket state
77 /// Socket configure state
85 /// The request issued from socket layer to protocol layer.
87 #define SOCK_ATTACH 0 ///< Attach current socket to a new PCB
88 #define SOCK_DETACH 1 ///< Detach current socket from the PCB
94 #define SOCK_CONSUMED 7 ///< Application has retrieved data from socket
104 Set socket SO_NO_MORE_DATA flag.
106 @param[in] Sock Pointer to the socket
112 Check whether the socket is unconfigured.
114 @param[in] Sock Pointer to the socket.
116 @retval TRUE The socket is unconfigued.
117 @retval FALSE The socket is not unconfigued.
123 Check whether the socket is configured.
125 @param[in] Sock Pointer to the socket
127 @retval TRUE The socket is configued
128 @retval FALSE The socket is not configued
136 Check whether the socket is configured to active mode.
138 @param[in] Sock Pointer to the socket.
140 @retval TRUE The socket is configued to active mode.
141 @retval FALSE The socket is not configued to active mode.
147 Check whether the socket is configured to passive mode.
149 @param[in] Sock Pointer to the socket.
151 @retval TRUE The socket is configued to passive mode.
152 @retval FALSE The socket is not configued to passive mode.
158 Check whether the socket is mapped.
160 @param[in] Sock Pointer to the socket.
162 @retval TRUE The socket is not mapping.
163 @retval FALSE The socket is mapped.
169 Check whether the socket is closed.
171 @param[in] Sock Pointer to the socket.
173 @retval TRUE The socket is closed.
174 @retval FALSE The socket is not closed.
180 Check whether the socket is listening.
182 @param[in] Sock Pointer to the socket.
184 @retval TRUE The socket is listening.
185 @retval FALSE The socket is not listening.
191 Check whether the socket is connecting.
193 @param[in] Sock Pointer to the socket.
195 @retval TRUE The socket is connecting.
196 @retval FALSE The socket is not connecting.
202 Check whether the socket has connected.
204 @param[in] Sock Pointer to the socket.
206 @retval TRUE The socket has connected.
207 @retval FALSE The socket has not connected.
213 Check whether the socket is disconnecting.
215 @param[in] Sock Pointer to the socket.
217 @retval TRUE The socket is disconnecting.
218 @retval FALSE The socket is not disconnecting.
224 Check whether the socket is no more data.
226 @param[in] Sock Pointer to the socket.
228 @retval TRUE The socket is no more data.
229 @retval FALSE The socket still has data.
237 @param[in] Sock Pointer to the socket.
246 @param[in] Sock Pointer to the socket.
256 @param[in] Sock Pointer to the socket.
266 @param[in] Sock Pointer to the socket.
275 @param[in] Sock Pointer to the socket.
285 @param[in] Sock Pointer to the socket.
293 Set the backlog value of the socket.
295 @param[in] Sock Pointer to the socket.
302 Get the backlog value of the socket.
304 @param[in] Sock Pointer to the socket.
312 Set the socket with error state.
314 @param[in] Sock Pointer to the socket.
322 #define SOCK_FROM_THIS(a) CR ((a), SOCKET, NetProtocol, SOCK_SIGNATURE)
328 typedef struct _TCP_SOCKET SOCKET;
331 /// Socket completion token
352 /// The socket type.
355 SockDgram, ///< This socket providing datagram service
356 SockStream ///< This socket providing stream service
360 /// The buffer structure of rcvd data and send data used by socket.
369 The handler of protocol for request from socket.
371 @param[in] Socket The socket issuing the request to protocol.
372 @param[in] Request The request issued by socket.
375 @retval EFI_SUCCESS The socket request is completed successfully.
383 IN SOCKET *Socket,
389 The Callback funtion called after the TCP socket is created.
391 @param[in] This Pointer to the socket just created.
392 @param[in] Context Context of the socket.
401 IN SOCKET *This,
406 The callback function called before the TCP socket is to be destroyed.
408 @param[in] This The TCP socket to be destroyed.
415 IN SOCKET *This,
420 /// The initialize data for create a new socket.
426 SOCKET *Parent; ///< The parent of this socket
427 UINT32 BackLog; ///< The connection limit for listening socket
432 ///< wanted to install on socket
435 // Callbacks after socket is created and before socket is to be destroyed.
447 SOCK_PROTO_HANDLER ProtoHandler; ///< The handler of protocol for socket request
460 /// The socket structure representing a network service access point.
464 // Socket description information
466 UINT32 Signature; ///< Signature of the socket
467 EFI_HANDLE SockHandle; ///< The virtual handle of the socket
468 EFI_HANDLE DriverBinding; ///< Socket's driver binding protocol
476 EFI_LOCK Lock; ///< The lock of socket
485 UINT32 BackLog; ///< the limit of connection to this socket
487 SOCKET *Parent; ///< listening parent that accept the connection
488 LIST_ENTRY ConnectionList; ///< the connections maintained by this socket
505 NET_PROTOCOL NetProtocol; ///< TCP or UDP protocol socket used
507 // Callbacks after socket is created and before socket is to be destroyed.
515 /// The token structure buffered in socket layer.
521 SOCKET *Sock; ///< The poninter to the socket this token
533 // Socket provided oprerations for low layer protocol implemented in SockImpl.c
537 Set the state of the socket.
539 @param[in, out] Sock Pointer to the socket.
540 @param[in] State The new socket state to be set.
545 IN OUT SOCKET *Sock,
550 Clone a new socket including its associated protocol control block.
552 @param[in] Sock Pointer to the socket to be cloned.
554 @return Pointer to the newly cloned socket. If NULL, an error condition occurred.
557 SOCKET *
559 IN SOCKET *Sock
563 Called by the low layer protocol to indicate the socket a connection is
566 This function just changes the socket's state to SO_CONNECTED
569 @param[in, out] Sock Pointer to the socket associated with the
575 IN OUT SOCKET *Sock
581 This function flushes the socket, sets the state to SO_CLOSED, and signals
584 @param[in, out] Sock Pointer to the socket associated with the closed
590 IN OUT SOCKET *Sock
596 This function trims the sent data in the socket send buffer and signals the data
599 @param[in, out] Sock Pointer to the socket.
605 IN OUT SOCKET *Sock,
610 Called by the low layer protocol to copy some data in socket send
614 @param[in] Sock Pointer to the socket.
624 IN SOCKET *Sock,
631 Called by the low layer protocol to deliver received data to socket layer.
633 This function appends the data to the socket receive buffer, set the
636 @param[in, out] Sock Pointer to the socket.
643 IN OUT SOCKET *Sock,
649 Get the length of the free space of the specific socket buffer.
651 @param[in] Sock Pointer to the socket.
652 @param[in] Which Flag to indicate which socket buffer to check:
660 IN SOCKET *Sock,
668 This function sets the socket's state to SO_NO_MORE_DATA and signals all queued
671 @param[in, out] Sock Pointer to the socket.
676 IN OUT SOCKET *Sock
680 // Socket provided operations for user interface implemented in SockInterface.c
684 Create a socket and its associated protocol control block
688 @param[in] SockInitData Inital data to setting the socket.
690 @return Pointer to the newly created socket. If NULL, an error condition occured.
693 SOCKET *
699 Destroy the socket Sock and its associated protocol control block.
701 @param[in, out] Sock The socket to be destroyed.
703 @retval EFI_SUCCESS The socket Sock was destroyed successfully.
704 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
709 IN OUT SOCKET *Sock
713 Configure the specific socket Sock using configuration data ConfigData.
715 @param[in] Sock Pointer to the socket to be configured.
718 @retval EFI_SUCCESS The socket configured successfully.
719 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
720 socket is already configured.
725 IN SOCKET *Sock,
732 @param[in] Sock Pointer to the socket to initiate the initate the
738 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
739 socket is closed, or the socket is not configured to
741 this socket's lists.
744 @retval EFI_NOT_STARTED The socket is not configured.
749 IN SOCKET *Sock,
757 @param[in] Sock Pointer to the socket to accept connections.
762 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
763 socket is closed, or the socket is not configured to
765 this socket's lists.
768 @retval EFI_NOT_STARTED The socket is not configured.
774 IN SOCKET *Sock,
779 Issue a token with data to the socket to send out.
781 @param[in] Sock Pointer to the socket to process the token with
786 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
787 socket is closed, or the socket is not in a
789 of this socket's lists.
792 @retval EFI_NOT_STARTED The socket is not configured.
798 IN SOCKET *Sock,
803 Issue a token to get data from the socket.
805 @param[in] Sock Pointer to the socket to get data from.
807 socket.
810 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
811 socket is closed, or the socket is not in a
813 of this socket's lists.
816 @retval EFI_NOT_STARTED The socket is not configured.
823 IN SOCKET *Sock,
828 Reset the socket and its associated protocol control block.
830 @param[in, out] Sock Pointer to the socket to be flushed.
832 @retval EFI_SUCCESS The socket flushed successfully.
833 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
838 IN OUT SOCKET *Sock
842 Close or abort the socket associated connection.
844 @param[in, out] Sock Pointer to the socket of the connection to close
851 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
852 socket is closed, or the socket is not in a
854 of this socket's lists.
857 @retval EFI_NOT_STARTED The socket is not configured.
862 IN OUT SOCKET *Sock,
868 Abort the socket associated connection, listen, transmission or receive request.
870 @param[in, out] Sock Pointer to the socket to abort.
881 IN OUT SOCKET *Sock,
888 @param[in] Sock Pointer to the socket to get mode data from.
893 @retval EFI_NOT_STARTED The socket is not configured.
898 IN SOCKET *Sock,
904 this socket's connection.
906 @param[in] Sock Pointer to the socket of the connection to join the
911 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
912 @retval EFI_NOT_STARTED The socket is not configured.
917 IN SOCKET *Sock,
923 with this socket.
925 @param[in] Sock Pointer to the socket associated with the IP route
930 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
933 @retval EFI_NOT_STARTED The socket is not configured.
938 IN SOCKET *Sock,