NetworkPkg/TcpDxe/TcpDriver.h File Reference


Data Structures

struct  _TCP_HEARTBEAT_TIMER
struct  _TCP_SERVICE_DATA
struct  _TCP_PROTO_DATA

Defines

#define TCP_DRIVER_SIGNATURE   SIGNATURE_32 ('T', 'C', 'P', 'D')
#define TCP_PORT_KNOWN   1024
#define TCP_PORT_USER_RESERVED   65535
#define TCP_SERVICE_FROM_THIS(a)

Typedefs

typedef struct _TCP_HEARTBEAT_TIMER TCP_HEARTBEAT_TIMER
typedef struct _TCP_SERVICE_DATA TCP_SERVICE_DATA
typedef struct _TCP_PROTO_DATA TCP_PROTO_DATA

Functions

EFI_STATUS EFIAPI TcpDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI Tcp4DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI Tcp4DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI Tcp4DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI Tcp6DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI Tcp6DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI Tcp6DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS TcpCreateSocketCallback (IN SOCKET *This, IN VOID *Context)
VOID TcpDestroySocketCallback (IN SOCKET *This, IN VOID *Context)
EFI_STATUS EFIAPI TcpServiceBindingCreateChild (IN EFI_SERVICE_BINDING_PROTOCOL *This, IN OUT EFI_HANDLE *ChildHandle)
EFI_STATUS EFIAPI TcpServiceBindingDestroyChild (IN EFI_SERVICE_BINDING_PROTOCOL *This, IN EFI_HANDLE ChildHandle)

Detailed Description

The prototype of driver binding and service binding protocol for TCP driver.

Copyright (c) 2009 - 2014, 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.


Define Documentation

#define TCP_DRIVER_SIGNATURE   SIGNATURE_32 ('T', 'C', 'P', 'D')

Referenced by TcpCreateService().

#define TCP_PORT_KNOWN   1024

Referenced by TcpBind(), and TcpDriverEntryPoint().

#define TCP_PORT_USER_RESERVED   65535

Referenced by TcpBind().

#define TCP_SERVICE_FROM_THIS (  ) 

Value:

CR ( \
  (a), \
  TCP_SERVICE_DATA, \
  ServiceBinding, \
  TCP_DRIVER_SIGNATURE \
  )

Referenced by TcpDestroyService(), and TcpServiceBindingCreateChild().


Typedef Documentation


Function Documentation

EFI_STATUS EFIAPI Tcp4DriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Start this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS The driver was added to ControllerHandle.
EFI_OUT_OF_RESOURCES There are not enough resources to start the driver.
other The driver cannot be added to ControllerHandle.
Start this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS The driver is added to ControllerHandle.
EFI_OUT_OF_RESOURCES There are not enough resources to start the driver.
other The driver cannot be added to ControllerHandle.

References TcpCreateService().

EFI_STATUS EFIAPI Tcp4DriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *  ChildHandleBuffer 
)

Stop this driver on ControllerHandle.

Parameters:
[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
[in] ControllerHandle A handle to the device being stopped. The handle must support a bus specific I/O protocol for the driver to use to stop the device.
[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0.
Return values:
EFI_SUCCESS The device was stopped.
EFI_DEVICE_ERROR The device could not be stopped due to a device error.

References TcpDestroyService().

EFI_STATUS EFIAPI Tcp4DriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of the device to test.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.
Test to see if this driver supports ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to test.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.

EFI_STATUS EFIAPI Tcp6DriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Start this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS The driver was added to ControllerHandle.
EFI_OUT_OF_RESOURCES There are not enough resources to start the driver.
other The driver cannot be added to ControllerHandle.
Start this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS The driver is added to ControllerHandle.
EFI_OUT_OF_RESOURCES There are not enough resources to start the driver.
other The driver cannot be added to ControllerHandle.

References TcpCreateService().

EFI_STATUS EFIAPI Tcp6DriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *  ChildHandleBuffer 
)

Stop this driver on ControllerHandle.

Parameters:
[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
[in] ControllerHandle A handle to the device being stopped. The handle must support a bus specific I/O protocol for the driver to use to stop the device.
[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0.
Return values:
EFI_SUCCESS The device was stopped.
EFI_DEVICE_ERROR The device could not be stopped due to a device error.

References TcpDestroyService().

EFI_STATUS EFIAPI Tcp6DriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of the device to test.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.
Test to see if this driver supports ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to test.
[in] RemainingDevicePath Optional parameter use to pick a specific child device to start.
Return values:
EFI_SUCCESS This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.

EFI_STATUS TcpCreateSocketCallback ( IN SOCKET This,
IN VOID *  Context 
)

The Callback funtion called after the TCP socket is created.

Parameters:
[in] This Pointer to the socket just created.
[in] Context The context of the socket.
Return values:
EFI_SUCCESS This protocol is installed successfully.
other An error occured.
The Callback funtion called after the TCP socket was created.

Parameters:
[in] This Pointer to the socket just created
[in] Context Context of the socket
Return values:
EFI_SUCCESS This protocol installed successfully.
other An error occured.

References _TCP_SERVICE_DATA::ControllerHandle, _TCP_SERVICE_DATA::DriverBindingHandle, _TCP_SERVICE_DATA::IpIo, and _TCP_SERVICE_DATA::SocketList.

VOID TcpDestroySocketCallback ( IN SOCKET This,
IN VOID *  Context 
)

The callback function called before the TCP socket is to be destroyed.

Parameters:
[in] This The TCP socket to be destroyed.
[in] Context The context of the socket.
The callback function called before the TCP socket was to be destroyed.

Parameters:
[in] This The TCP socket to be destroyed.
[in] Context The context of the socket.

References _TCP_SERVICE_DATA::DriverBindingHandle, and _TCP_SERVICE_DATA::IpIo.

EFI_STATUS EFIAPI TcpDriverEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE *  SystemTable 
)

The entry point for Tcp driver, used to install Tcp driver on the ImageHandle.

Parameters:
[in] ImageHandle The firmware allocated handle for this driver image.
[in] SystemTable Pointer to the EFI system table.
Return values:
EFI_SUCCESS The driver loaded.
other The driver did not load.
The entry point for Tcp driver, which is used to install Tcp driver on the ImageHandle.

Parameters:
[in] ImageHandle The firmware allocated handle for this driver image.
[in] SystemTable Pointer to the EFI system table.
Return values:
EFI_SUCCESS The driver loaded.
other The driver did not load.

References gTcp4DriverBinding, gTcp6DriverBinding, gTcpComponentName, gTcpComponentName2, mTcp4RandomPort, mTcp6RandomPort, mTcpGlobalIss, and TCP_PORT_KNOWN.

EFI_STATUS EFIAPI TcpServiceBindingCreateChild ( IN EFI_SERVICE_BINDING_PROTOCOL *  This,
IN OUT EFI_HANDLE *  ChildHandle 
)

Creates a child handle with a set of TCP services.

The CreateChild() function installs a protocol on ChildHandle. If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.

Parameters:
[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
[in,out] ChildHandle Pointer to the handle of the child to create. If it is NULL, then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle.
Return values:
EFI_SUCCES The protocol was added to ChildHandle.
EFI_INVALID_PARAMETER ChildHandle is NULL.
EFI_OUT_OF_RESOURCES There are not enough resources available to create the child.
other The child handle was not created.
Creates a child handle with a set of TCP services.

The CreateChild() function installs a protocol on ChildHandle. If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.

Parameters:
[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
[in,out] ChildHandle Pointer to the handle of the child to create. If it is NULL, then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle.
Return values:
EFI_SUCCES The protocol was added to ChildHandle.
EFI_INVALID_PARAMETER ChildHandle is NULL.
EFI_OUT_OF_RESOURCES There are not enough resources availabe to create the child.
other The child handle was not created.

References _SOCK_INIT_DATA::DataSize, _SOCK_INIT_DATA::DriverBinding, _TCP_SERVICE_DATA::DriverBindingHandle, gTcp4ProtocolTemplate, gTcp6ProtocolTemplate, _TCP_SERVICE_DATA::IpVersion, _SOCK_INIT_DATA::IpVersion, _SOCK_INIT_DATA::Protocol, _SOCK_INIT_DATA::ProtoData, SockCreateChild(), _TCP_SOCKET::SockHandle, TCP_SERVICE_FROM_THIS, _TCP_PROTO_DATA::TcpPcb, and _TCP_PROTO_DATA::TcpService.

EFI_STATUS EFIAPI TcpServiceBindingDestroyChild ( IN EFI_SERVICE_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ChildHandle 
)

Destroys a child handle with a set of TCP services.

The DestroyChild() function does the opposite of CreateChild(). It removes a protocol that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed.

Parameters:
This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
ChildHandle Handle of the child to destroy.
Return values:
EFI_SUCCES The protocol was removed from ChildHandle.
EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
EFI_INVALID_PARAMETER The child handle is NULL.
EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle because its services are being used.
other The child handle was not destroyed.
Destroys a child handle with a set of TCP services.

The DestroyChild() function does the opposite of CreateChild(). It removes a protocol that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed.

Parameters:
This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
ChildHandle Handle of the child to be destroyed.
Return values:
EFI_SUCCES The protocol was removed from ChildHandle.
EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.
EFI_INVALID_PARAMETER Child handle is NULL.
EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle because its services are being used.
other The child handle was not destroyed.

References gTcp4DriverBinding, gTcp6DriverBinding, SOCK_FROM_THIS, and SockDestroyChild().


Generated on Mon Sep 28 08:49:06 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1