EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions | Variables

StdLib/EfiSocketLib/UseEfiSocketLib.c File Reference

#include "Socket.h"

Go to the source code of this file.

Functions

int EslServiceGetProtocol (IN EFI_SOCKET_PROTOCOL **ppSocketProtocol)
EFI_STATUS EslServiceNetworkConnect (VOID)
EFI_STATUS EslServiceNetworkDisconnect (VOID)

Variables

CONST EFI_GUID mEslIp4ServiceGuid
 Tag GUID for the IPv4 layer.
CONST EFI_GUID mEslTcp4ServiceGuid
 Tag GUID for the TCPv4 layer.
CONST EFI_GUID mEslUdp4ServiceGuid
 Tag GUID for the UDPv4 layer.
CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding
PFN_ESL_xSTRUCTOR mpfnEslConstructor = EslServiceNetworkConnect
 Constructor for EfiSocketLib.
PFN_ESL_xSTRUCTOR mpfnEslDestructor = EslServiceNetworkDisconnect
 Destructor for EfiSocketLib.

Detailed Description

Implement the connection to the EFI socket library

Copyright (c) 2011, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file UseEfiSocketLib.c.


Function Documentation

int EslServiceGetProtocol ( IN EFI_SOCKET_PROTOCOL **  ppSocketProtocol)

Connect to the EFI socket library

This routine creates the ESL_SOCKET structure and returns the API (EFI_SOCKET_PROTOCOL address) to the socket file system layer in BsdSocketLib.

This routine is called from the socket routine in BsdSocketLib to create the data structure and initialize the API for a socket. Note that this implementation is only used by socket applications that link directly to EslSocketLib.

Parameters:
[in]ppSocketProtocolAddress to receive the EFI_SOCKET_PROTOCOL structure address
Returns:
Value for errno, zero (0) indicates success.

Definition at line 66 of file UseEfiSocketLib.c.

EFI_STATUS EslServiceNetworkConnect ( VOID  )

Connect to the network layer

This routine is the constructor for the EfiSocketLib when the library is linked directly to an application. This routine walks the cEslSocketBinding table to create ESL_SERVICE structures, associated with the network adapters, which this routine links to the ESL_LAYER structure.

This routine is called from EslConstructor as a result of the constructor redirection in mpfnEslConstructor at the end of this file.

Return values:
EFI_SUCCESSSuccessfully connected to the network layer

Definition at line 124 of file UseEfiSocketLib.c.

EFI_STATUS EslServiceNetworkDisconnect ( VOID  )

Disconnect from the network layer

Destructor for the EfiSocketLib when the library is linked directly to an application. This routine walks the cEslSocketBinding table to remove the ESL_SERVICE structures (network connections) from the ESL_LAYER structure.

This routine is called from EslDestructor as a result of the destructor redirection in mpfnEslDestructor at the end of this file.

Return values:
EFI_SUCCESSSuccessfully disconnected from the network layer

Definition at line 221 of file UseEfiSocketLib.c.


Variable Documentation

Initial value:
 {
  NULL,
  NULL
}

Socket layer's service binding protocol delcaration.

Definition at line 300 of file UseEfiSocketLib.c.

Initial value:
 {
  0x9c756011, 0x5d44, 0x4ee0, { 0xbc, 0xe7, 0xc3, 0x82, 0x18, 0xfe, 0x39, 0x8d }
}

Tag GUID for the IPv4 layer.

The following GUID values are only used when an application links against EfiSocketLib. An alternative set of values exists in SocketDxe\EntryUnload.c which the SocketDxe driver uses to coexist with socket applications.

Tag GUID - IPv4 in use by an application using EfiSocketLib

Definition at line 26 of file UseEfiSocketLib.c.

Initial value:
 {
  0xffc659c2, 0x4ef2, 0x4532, { 0xb8, 0x75, 0xcd, 0x9a, 0xa4, 0x27, 0x4c, 0xde }
}

Tag GUID for the TCPv4 layer.

Tag GUID - TCPv4 in use by an application using EfiSocketLib

Definition at line 34 of file UseEfiSocketLib.c.

Initial value:
 {
  0x44e03a55, 0x8d97, 0x4511, { 0xbf, 0xef, 0xa, 0x8b, 0xc6, 0x2c, 0x25, 0xae }
}

Tag GUID for the UDPv4 layer.

Tag GUID - UDPv4 in use by an application using EfiSocketLib

Definition at line 42 of file UseEfiSocketLib.c.

PFN_ESL_xSTRUCTOR mpfnEslConstructor = EslServiceNetworkConnect

Constructor for EfiSocketLib.

Constructor address for EslSocketLib.

The following entries redirect the constructor and destructor for any socket application that links against the EfiSocketLib. Note that the SocketDxe driver uses different redirection.

Definition at line 311 of file UseEfiSocketLib.c.

PFN_ESL_xSTRUCTOR mpfnEslDestructor = EslServiceNetworkDisconnect

Destructor for EfiSocketLib.

Destructor address for EslSocketLib.

Definition at line 312 of file UseEfiSocketLib.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines