2 Interface function of the Socket.
4 Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
13 Check whether the Event is in the List.
15 @param[in] List Pointer to the token list to be searched.
16 @param[in] Event The event to be checked.
18 @retval TRUE The specific Event exists in the List.
19 @retval FALSE The specific Event is not in the List.
23 SockTokenExistedInList (
28 LIST_ENTRY
*ListEntry
;
29 SOCK_TOKEN
*SockToken
;
31 NET_LIST_FOR_EACH (ListEntry
, List
) {
32 SockToken
= NET_LIST_USER_STRUCT (
38 if (Event
== SockToken
->Token
->Event
) {
47 Call SockTokenExistedInList() to check whether the Event is
48 in the related socket's lists.
50 @param[in] Sock Pointer to the instance's socket.
51 @param[in] Event The event to be checked.
53 @retval TRUE The Event exists in related socket's lists.
54 @retval FALSE The Event is not in related socket's lists.
64 if (SockTokenExistedInList (&Sock
->SndTokenList
, Event
) ||
65 SockTokenExistedInList (&Sock
->ProcessingSndTokenList
, Event
) ||
66 SockTokenExistedInList (&Sock
->RcvTokenList
, Event
) ||
67 SockTokenExistedInList (&Sock
->ListenTokenList
, Event
)
73 if ((Sock
->ConnectionToken
!= NULL
) && (Sock
->ConnectionToken
->Event
== Event
)) {
78 if ((Sock
->CloseToken
!= NULL
) && (Sock
->CloseToken
->Event
== Event
)) {
86 Buffer a token into the specific list of the socket Sock.
88 @param[in] Sock Pointer to the instance's socket.
89 @param[in] List Pointer to the list to store the token.
90 @param[in] Token Pointer to the token to be buffered.
91 @param[in] DataLen The data length of the buffer contained in Token.
93 @return Pointer to the token that wraps Token. If NULL, an error condition occurred.
104 SOCK_TOKEN
*SockToken
;
106 SockToken
= AllocateZeroPool (sizeof (SOCK_TOKEN
));
107 if (NULL
== SockToken
) {
111 "SockBufferIOToken: No Memory to allocate SockToken\n")
117 SockToken
->Sock
= Sock
;
118 SockToken
->Token
= (SOCK_COMPLETION_TOKEN
*) Token
;
119 SockToken
->RemainDataLen
= DataLen
;
120 InsertTailList (List
, &SockToken
->TokenList
);
126 Destroy the socket Sock and its associated protocol control block.
128 @param[in, out] Sock The socket to be destroyed.
130 @retval EFI_SUCCESS The socket Sock was destroyed successfully.
131 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
140 TCP_PROTO_DATA
*ProtoData
;
142 EFI_GUID
*IpProtocolGuid
;
143 EFI_GUID
*TcpProtocolGuid
;
146 ASSERT ((Sock
!= NULL
) && (Sock
->ProtoHandler
!= NULL
));
148 if (Sock
->InDestroy
) {
152 Sock
->InDestroy
= TRUE
;
154 if (Sock
->IpVersion
== IP_VERSION_4
) {
155 IpProtocolGuid
= &gEfiIp4ProtocolGuid
;
156 TcpProtocolGuid
= &gEfiTcp4ProtocolGuid
;
158 IpProtocolGuid
= &gEfiIp6ProtocolGuid
;
159 TcpProtocolGuid
= &gEfiTcp6ProtocolGuid
;
161 ProtoData
= (TCP_PROTO_DATA
*) Sock
->ProtoReserved
;
162 Tcb
= ProtoData
->TcpPcb
;
164 ASSERT (Tcb
!= NULL
);
167 // Close the IP protocol.
170 Tcb
->IpInfo
->ChildHandle
,
172 ProtoData
->TcpService
->IpIo
->Image
,
176 if (Sock
->DestroyCallback
!= NULL
) {
177 Sock
->DestroyCallback (Sock
, Sock
->Context
);
181 // Retrieve the protocol installed on this sock
183 Status
= gBS
->OpenProtocol (
189 EFI_OPEN_PROTOCOL_GET_PROTOCOL
192 if (EFI_ERROR (Status
)) {
196 "SockDestroyChild: Open protocol installed on socket failed with %r\n",
202 // Uninstall the protocol installed on this sock
204 gBS
->UninstallMultipleProtocolInterfaces (
212 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
213 if (EFI_ERROR (Status
)) {
217 "SockDestroyChild: Get the lock to access socket failed with %r\n",
221 return EFI_ACCESS_DENIED
;
225 // force protocol layer to detach the PCB
227 Status
= Sock
->ProtoHandler (Sock
, SOCK_DETACH
, NULL
);
229 if (EFI_ERROR (Status
)) {
233 "SockDestroyChild: Protocol detach socket failed with %r\n",
237 Sock
->InDestroy
= FALSE
;
238 } else if (SOCK_IS_CONFIGURED (Sock
)) {
240 SockConnFlush (Sock
);
241 SockSetState (Sock
, SO_CLOSED
);
243 Sock
->ConfigureState
= SO_UNCONFIGURED
;
246 EfiReleaseLock (&(Sock
->Lock
));
248 if (EFI_ERROR (Status
)) {
257 Create a socket and its associated protocol control block
258 with the initial data SockInitData and protocol specific
261 @param[in] SockInitData Initial data to setting the socket.
263 @return Pointer to the newly created socket. If NULL, an error condition occurred.
268 IN SOCK_INIT_DATA
*SockInitData
274 EFI_GUID
*TcpProtocolGuid
;
277 // create a new socket
279 Sock
= SockCreate (SockInitData
);
284 "SockCreateChild: No resource to create a new socket\n")
290 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
291 if (EFI_ERROR (Status
)) {
295 "SockCreateChild: Get the lock to access socket failed with %r\n",
301 // inform the protocol layer to attach the socket
302 // with a new protocol control block
304 Status
= Sock
->ProtoHandler (Sock
, SOCK_ATTACH
, NULL
);
305 EfiReleaseLock (&(Sock
->Lock
));
306 if (EFI_ERROR (Status
)) {
310 "SockCreateChild: Protocol failed to attach a socket with %r\n",
320 if (Sock
->DestroyCallback
!= NULL
) {
321 Sock
->DestroyCallback (Sock
, Sock
->Context
);
324 if (Sock
->IpVersion
== IP_VERSION_4
) {
325 TcpProtocolGuid
= &gEfiTcp4ProtocolGuid
;
327 TcpProtocolGuid
= &gEfiTcp6ProtocolGuid
;
336 EFI_OPEN_PROTOCOL_GET_PROTOCOL
339 // Uninstall the protocol installed on this sock
341 gBS
->UninstallMultipleProtocolInterfaces (
352 Configure the specific socket Sock using configuration data ConfigData.
354 @param[in] Sock Pointer to the socket to be configured.
355 @param[in] ConfigData Pointer to the configuration data.
357 @retval EFI_SUCCESS The socket configured successfully.
358 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
359 socket is already configured.
370 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
371 if (EFI_ERROR (Status
)) {
375 "SockConfigure: Get the access for socket failed with %r",
379 return EFI_ACCESS_DENIED
;
382 if (SOCK_IS_CONFIGURED (Sock
)) {
383 Status
= EFI_ACCESS_DENIED
;
387 ASSERT (Sock
->State
== SO_CLOSED
);
389 Status
= Sock
->ProtoHandler (Sock
, SOCK_CONFIGURE
, ConfigData
);
392 EfiReleaseLock (&(Sock
->Lock
));
398 Initiate a connection establishment process.
400 @param[in] Sock Pointer to the socket to initiate the
402 @param[in] Token Pointer to the token used for the connection
405 @retval EFI_SUCCESS The connection initialized successfully.
406 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
407 socket is closed, or the socket is not configured to
408 be an active one, or the token is already in one of
410 @retval EFI_NO_MAPPING The IP address configuration operation is not
412 @retval EFI_NOT_STARTED The socket is not configured.
424 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
425 if (EFI_ERROR (Status
)) {
429 "SockConnect: Get the access for socket failed with %r",
433 return EFI_ACCESS_DENIED
;
436 if (SOCK_IS_NO_MAPPING (Sock
)) {
437 Status
= EFI_NO_MAPPING
;
441 if (SOCK_IS_UNCONFIGURED (Sock
)) {
443 Status
= EFI_NOT_STARTED
;
447 if (!SOCK_IS_CLOSED (Sock
) || !SOCK_IS_CONFIGURED_ACTIVE (Sock
)) {
449 Status
= EFI_ACCESS_DENIED
;
453 Event
= ((SOCK_COMPLETION_TOKEN
*) Token
)->Event
;
455 if (SockTokenExisted (Sock
, Event
)) {
457 Status
= EFI_ACCESS_DENIED
;
461 Sock
->ConnectionToken
= (SOCK_COMPLETION_TOKEN
*) Token
;
462 SockSetState (Sock
, SO_CONNECTING
);
463 Status
= Sock
->ProtoHandler (Sock
, SOCK_CONNECT
, NULL
);
466 EfiReleaseLock (&(Sock
->Lock
));
471 Issue a listen token to get an existed connected network instance
472 or wait for a connection if there is none.
474 @param[in] Sock Pointer to the socket to accept connections.
475 @param[in] Token The token to accept a connection.
477 @retval EFI_SUCCESS Either a connection is accepted or the Token is
478 buffered for further acception.
479 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
480 socket is closed, or the socket is not configured to
481 be a passive one, or the token is already in one of
483 @retval EFI_NO_MAPPING The IP address configuration operation is not
485 @retval EFI_NOT_STARTED The socket is not configured.
486 @retval EFI_OUT_OF_RESOURCE Failed to buffer the Token due to memory limits.
495 EFI_TCP4_LISTEN_TOKEN
*ListenToken
;
496 LIST_ENTRY
*ListEntry
;
501 ASSERT (SockStream
== Sock
->Type
);
503 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
504 if (EFI_ERROR (Status
)) {
508 "SockAccept: Get the access for socket failed with %r",
512 return EFI_ACCESS_DENIED
;
515 if (SOCK_IS_NO_MAPPING (Sock
)) {
516 Status
= EFI_NO_MAPPING
;
520 if (SOCK_IS_UNCONFIGURED (Sock
)) {
522 Status
= EFI_NOT_STARTED
;
526 if (!SOCK_IS_LISTENING (Sock
)) {
528 Status
= EFI_ACCESS_DENIED
;
532 Event
= ((SOCK_COMPLETION_TOKEN
*) Token
)->Event
;
534 if (SockTokenExisted (Sock
, Event
)) {
536 Status
= EFI_ACCESS_DENIED
;
540 ListenToken
= (EFI_TCP4_LISTEN_TOKEN
*) Token
;
543 // Check if a connection has already in this Sock->ConnectionList
545 NET_LIST_FOR_EACH (ListEntry
, &Sock
->ConnectionList
) {
547 Socket
= NET_LIST_USER_STRUCT (ListEntry
, SOCKET
, ConnectionList
);
549 if (SOCK_IS_CONNECTED (Socket
)) {
550 ListenToken
->NewChildHandle
= Socket
->SockHandle
;
551 SIGNAL_TOKEN (&(ListenToken
->CompletionToken
), EFI_SUCCESS
);
553 RemoveEntryList (ListEntry
);
555 ASSERT (Socket
->Parent
!= NULL
);
557 Socket
->Parent
->ConnCnt
--;
561 "SockAccept: Accept a socket, now conncount is %d",
562 Socket
->Parent
->ConnCnt
)
564 Socket
->Parent
= NULL
;
571 // Buffer this token for latter incoming connection request
573 if (NULL
== SockBufferToken (Sock
, &(Sock
->ListenTokenList
), Token
, 0)) {
575 Status
= EFI_OUT_OF_RESOURCES
;
579 EfiReleaseLock (&(Sock
->Lock
));
585 Issue a token with data to the socket to send out.
587 @param[in] Sock Pointer to the socket to process the token with
589 @param[in] Token The token with data that needs to send out.
591 @retval EFI_SUCCESS The token processed successfully.
592 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
593 socket is closed, or the socket is not in a
594 synchronized state , or the token is already in one
595 of this socket's lists.
596 @retval EFI_NO_MAPPING The IP address configuration operation is not
598 @retval EFI_NOT_STARTED The socket is not configured.
599 @retval EFI_OUT_OF_RESOURCE Failed to buffer the token due to memory limits.
608 SOCK_IO_TOKEN
*SndToken
;
611 EFI_TCP4_TRANSMIT_DATA
*TxData
;
613 SOCK_TOKEN
*SockToken
;
616 ASSERT (SockStream
== Sock
->Type
);
618 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
619 if (EFI_ERROR (Status
)) {
623 "SockSend: Get the access for socket failed with %r",
627 return EFI_ACCESS_DENIED
;
630 if (SOCK_IS_NO_MAPPING (Sock
)) {
631 Status
= EFI_NO_MAPPING
;
635 SndToken
= (SOCK_IO_TOKEN
*) Token
;
636 TxData
= (EFI_TCP4_TRANSMIT_DATA
*) SndToken
->Packet
.TxData
;
638 if (SOCK_IS_UNCONFIGURED (Sock
)) {
639 Status
= EFI_NOT_STARTED
;
643 if (!(SOCK_IS_CONNECTING (Sock
) || SOCK_IS_CONNECTED (Sock
))) {
645 Status
= EFI_ACCESS_DENIED
;
650 // check if a token is already in the token buffer
652 Event
= SndToken
->Token
.Event
;
654 if (SockTokenExisted (Sock
, Event
)) {
655 Status
= EFI_ACCESS_DENIED
;
659 DataLen
= TxData
->DataLength
;
662 // process this sending token now or buffer it only?
664 FreeSpace
= SockGetFreeSpace (Sock
, SOCK_SND_BUF
);
666 if ((FreeSpace
< Sock
->SndBuffer
.LowWater
) || !SOCK_IS_CONNECTED (Sock
)) {
668 SockToken
= SockBufferToken (
675 if (NULL
== SockToken
) {
676 Status
= EFI_OUT_OF_RESOURCES
;
680 SockToken
= SockBufferToken (
682 &Sock
->ProcessingSndTokenList
,
687 if (NULL
== SockToken
) {
690 "SockSend: Failed to buffer IO token into socket processing SndToken List\n",
694 Status
= EFI_OUT_OF_RESOURCES
;
698 Status
= SockProcessTcpSndData (Sock
, TxData
);
700 if (EFI_ERROR (Status
)) {
703 "SockSend: Failed to process Snd Data\n",
707 RemoveEntryList (&(SockToken
->TokenList
));
708 FreePool (SockToken
);
713 EfiReleaseLock (&(Sock
->Lock
));
718 Issue a token to get data from the socket.
720 @param[in] Sock Pointer to the socket to get data from.
721 @param[in] Token The token to store the received data from the
724 @retval EFI_SUCCESS The token processed successfully.
725 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
726 socket is closed, or the socket is not in a
727 synchronized state , or the token is already in one
728 of this socket's lists.
729 @retval EFI_NO_MAPPING The IP address configuration operation is not
731 @retval EFI_NOT_STARTED The socket is not configured.
732 @retval EFI_CONNECTION_FIN The connection is closed and there is no more data.
733 @retval EFI_OUT_OF_RESOURCE Failed to buffer the token due to memory limit.
742 SOCK_IO_TOKEN
*RcvToken
;
747 ASSERT (SockStream
== Sock
->Type
);
749 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
750 if (EFI_ERROR (Status
)) {
754 "SockRcv: Get the access for socket failed with %r",
758 return EFI_ACCESS_DENIED
;
761 if (SOCK_IS_NO_MAPPING (Sock
)) {
763 Status
= EFI_NO_MAPPING
;
767 if (SOCK_IS_UNCONFIGURED (Sock
)) {
769 Status
= EFI_NOT_STARTED
;
773 if (!(SOCK_IS_CONNECTED (Sock
) || SOCK_IS_CONNECTING (Sock
))) {
775 Status
= EFI_ACCESS_DENIED
;
779 RcvToken
= (SOCK_IO_TOKEN
*) Token
;
782 // check if a token is already in the token buffer of this socket
784 Event
= RcvToken
->Token
.Event
;
785 if (SockTokenExisted (Sock
, Event
)) {
786 Status
= EFI_ACCESS_DENIED
;
790 RcvToken
= (SOCK_IO_TOKEN
*) Token
;
791 RcvdBytes
= GET_RCV_DATASIZE (Sock
);
794 // check whether an error has happened before
796 if (EFI_ABORTED
!= Sock
->SockError
) {
798 SIGNAL_TOKEN (&(RcvToken
->Token
), Sock
->SockError
);
799 Sock
->SockError
= EFI_ABORTED
;
804 // check whether can not receive and there is no any
805 // data buffered in Sock->RcvBuffer
807 if (SOCK_IS_NO_MORE_DATA (Sock
) && (0 == RcvdBytes
)) {
809 Status
= EFI_CONNECTION_FIN
;
813 if (RcvdBytes
!= 0) {
814 SockProcessRcvToken (Sock
, RcvToken
);
816 Status
= Sock
->ProtoHandler (Sock
, SOCK_CONSUMED
, NULL
);
819 if (NULL
== SockBufferToken (Sock
, &Sock
->RcvTokenList
, RcvToken
, 0)) {
820 Status
= EFI_OUT_OF_RESOURCES
;
825 EfiReleaseLock (&(Sock
->Lock
));
830 Reset the socket and its associated protocol control block.
832 @param[in, out] Sock Pointer to the socket to be flushed.
834 @retval EFI_SUCCESS The socket is flushed successfully.
835 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
845 ASSERT (SockStream
== Sock
->Type
);
847 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
848 if (EFI_ERROR (Status
)) {
852 "SockFlush: Get the access for socket failed with %r",
856 return EFI_ACCESS_DENIED
;
859 if (!SOCK_IS_CONFIGURED (Sock
)) {
861 Status
= EFI_ACCESS_DENIED
;
865 Status
= Sock
->ProtoHandler (Sock
, SOCK_FLUSH
, NULL
);
866 if (EFI_ERROR (Status
)) {
870 "SockFlush: Protocol failed handling SOCK_FLUSH with %r",
877 SOCK_ERROR (Sock
, EFI_ABORTED
);
878 SockConnFlush (Sock
);
879 SockSetState (Sock
, SO_CLOSED
);
881 Sock
->ConfigureState
= SO_UNCONFIGURED
;
884 EfiReleaseLock (&(Sock
->Lock
));
889 Close or abort the socket associated connection.
891 @param[in, out] Sock Pointer to the socket of the connection to close
893 @param[in] Token The token for a close operation.
894 @param[in] OnAbort TRUE for aborting the connection; FALSE to close it.
896 @retval EFI_SUCCESS The close or abort operation initialized
898 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket, or the
899 socket is closed, or the socket is not in a
900 synchronized state , or the token is already in one
901 of this socket's lists.
902 @retval EFI_NO_MAPPING The IP address configuration operation is not
904 @retval EFI_NOT_STARTED The socket is not configured.
917 ASSERT (SockStream
== Sock
->Type
);
919 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
920 if (EFI_ERROR (Status
)) {
923 "SockClose: Get the access for socket failed with %r",
927 return EFI_ACCESS_DENIED
;
930 if (SOCK_IS_NO_MAPPING (Sock
)) {
931 Status
= EFI_NO_MAPPING
;
935 if (SOCK_IS_UNCONFIGURED (Sock
)) {
936 Status
= EFI_NOT_STARTED
;
940 if (SOCK_IS_DISCONNECTING (Sock
)) {
941 Status
= EFI_ACCESS_DENIED
;
945 Event
= ((SOCK_COMPLETION_TOKEN
*) Token
)->Event
;
947 if (SockTokenExisted (Sock
, Event
)) {
948 Status
= EFI_ACCESS_DENIED
;
952 Sock
->CloseToken
= Token
;
953 SockSetState (Sock
, SO_DISCONNECTING
);
956 Status
= Sock
->ProtoHandler (Sock
, SOCK_ABORT
, NULL
);
958 Status
= Sock
->ProtoHandler (Sock
, SOCK_CLOSE
, NULL
);
962 EfiReleaseLock (&(Sock
->Lock
));
967 Abort the socket associated connection, listen, transmission or receive request.
969 @param[in, out] Sock Pointer to the socket to abort.
970 @param[in] Token Pointer to a token that has been issued by
971 Connect(), Accept(), Transmit() or Receive(). If
972 NULL, all pending tokens issued by the four
973 functions listed above will be aborted.
975 @retval EFI_UNSUPPORTED The operation is not supported in the current
986 Status
= EFI_SUCCESS
;
988 ASSERT (SockStream
== Sock
->Type
);
990 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
991 if (EFI_ERROR (Status
)) {
994 "SockCancel: Get the access for socket failed with %r",
998 return EFI_ACCESS_DENIED
;
1001 if (SOCK_IS_UNCONFIGURED (Sock
)) {
1002 Status
= EFI_NOT_STARTED
;
1007 // 1. Check ConnectionToken.
1009 if (Token
== NULL
|| (SOCK_COMPLETION_TOKEN
*) Token
== Sock
->ConnectionToken
) {
1010 if (Sock
->ConnectionToken
!= NULL
) {
1011 SIGNAL_TOKEN (Sock
->ConnectionToken
, EFI_ABORTED
);
1012 Sock
->ConnectionToken
= NULL
;
1015 if (Token
!= NULL
) {
1016 Status
= EFI_SUCCESS
;
1022 // 2. Check ListenTokenList.
1024 Status
= SockCancelToken (Token
, &Sock
->ListenTokenList
);
1025 if (Token
!= NULL
&& !EFI_ERROR (Status
)) {
1030 // 3. Check RcvTokenList.
1032 Status
= SockCancelToken (Token
, &Sock
->RcvTokenList
);
1033 if (Token
!= NULL
&& !EFI_ERROR (Status
)) {
1038 // 4. Check SndTokenList.
1040 Status
= SockCancelToken (Token
, &Sock
->SndTokenList
);
1041 if (Token
!= NULL
&& !EFI_ERROR (Status
)) {
1046 // 5. Check ProcessingSndTokenList.
1048 Status
= SockCancelToken (Token
, &Sock
->ProcessingSndTokenList
);
1051 EfiReleaseLock (&(Sock
->Lock
));
1057 Get the mode data of the low layer protocol.
1059 @param[in] Sock Pointer to the socket to get mode data from.
1060 @param[in, out] Mode Pointer to the data to store the low layer mode
1063 @retval EFI_SUCCESS The mode data was obtained successfully.
1064 @retval EFI_NOT_STARTED The socket is not configured.
1073 return Sock
->ProtoHandler (Sock
, SOCK_MODE
, Mode
);
1077 Add or remove route information in IP route table associated
1080 @param[in] Sock Pointer to the socket associated with the IP route
1081 table to operate on.
1082 @param[in] RouteInfo Pointer to the route information to be processed.
1084 @retval EFI_SUCCESS The route table updated successfully.
1085 @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket.
1086 @retval EFI_NO_MAPPING The IP address configuration operation is not
1088 @retval EFI_NOT_STARTED The socket is not configured.
1099 Status
= EfiAcquireLockOrFail (&(Sock
->Lock
));
1100 if (EFI_ERROR (Status
)) {
1103 "SockRoute: Get the access for socket failed with %r",
1107 return EFI_ACCESS_DENIED
;
1110 if (SOCK_IS_NO_MAPPING (Sock
)) {
1111 Status
= EFI_NO_MAPPING
;
1115 if (SOCK_IS_UNCONFIGURED (Sock
)) {
1116 Status
= EFI_NOT_STARTED
;
1120 Status
= Sock
->ProtoHandler (Sock
, SOCK_ROUTE
, RouteInfo
);
1123 EfiReleaseLock (&(Sock
->Lock
));