TianoCore EDK2 master
Loading...
Searching...
No Matches
TcpDriver.h File Reference

Go to the source code of this file.

Data Structures

struct  _TCP_HEARTBEAT_TIMER
 
struct  _TCP_SERVICE_DATA
 
struct  _TCP_PROTO_DATA
 

Macros

#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 OPTIONAL)
 
EFI_STATUS EFIAPI Tcp4DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI Tcp4DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
 
EFI_STATUS EFIAPI Tcp6DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI Tcp6DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL)
 
EFI_STATUS EFIAPI Tcp6DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer OPTIONAL)
 
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 - 2016, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TcpDriver.h.

Macro Definition Documentation

◆ TCP_DRIVER_SIGNATURE

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

Definition at line 13 of file TcpDriver.h.

◆ TCP_PORT_KNOWN

#define TCP_PORT_KNOWN   1024

Definition at line 15 of file TcpDriver.h.

◆ TCP_PORT_USER_RESERVED

#define TCP_PORT_USER_RESERVED   65535

Definition at line 16 of file TcpDriver.h.

◆ TCP_SERVICE_FROM_THIS

#define TCP_SERVICE_FROM_THIS (   a)
Value:
CR ( \
(a), \
ServiceBinding, \
TCP_DRIVER_SIGNATURE \
)
#define CR(Record, TYPE, Field, TestSignature)
Definition: DebugLib.h:659

Definition at line 38 of file TcpDriver.h.

Function Documentation

◆ Tcp4DriverBindingStart()

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

Start this driver on ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThe driver was added to ControllerHandle.
EFI_OUT_OF_RESOURCESThere are not enough resources to start the driver.
otherThe driver cannot be added to ControllerHandle.

Start this driver on ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThe driver is added to ControllerHandle.
EFI_OUT_OF_RESOURCESThere are not enough resources to start the driver.
otherThe driver cannot be added to ControllerHandle.

Definition at line 646 of file TcpDriver.c.

◆ Tcp4DriverBindingStop()

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

Stop this driver on ControllerHandle.

Parameters
[in]ThisA pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
[in]ControllerHandleA 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]NumberOfChildrenThe number of child device handles in ChildHandleBuffer.
[in]ChildHandleBufferAn array of child handles to be freed. May be NULL if NumberOfChildren is 0.
Return values
EFI_SUCCESSThe device was stopped.
EFI_DEVICE_ERRORThe device could not be stopped due to a device error.

Definition at line 679 of file TcpDriver.c.

◆ Tcp4DriverBindingSupported()

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

Test to see if this driver supports ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of the device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
otherThis driver does not support this device.

Test to see if this driver supports ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
otherThis driver does not support this device.

Definition at line 593 of file TcpDriver.c.

◆ Tcp6DriverBindingStart()

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

Start this driver on ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThe driver was added to ControllerHandle.
EFI_OUT_OF_RESOURCESThere are not enough resources to start the driver.
otherThe driver cannot be added to ControllerHandle.

Start this driver on ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to bind driver to.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThe driver is added to ControllerHandle.
EFI_OUT_OF_RESOURCESThere are not enough resources to start the driver.
otherThe driver cannot be added to ControllerHandle.

Definition at line 763 of file TcpDriver.c.

◆ Tcp6DriverBindingStop()

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

Stop this driver on ControllerHandle.

Parameters
[in]ThisA pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
[in]ControllerHandleA 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]NumberOfChildrenThe number of child device handles in ChildHandleBuffer.
[in]ChildHandleBufferAn array of child handles to be freed. May be NULL if NumberOfChildren is 0.
Return values
EFI_SUCCESSThe device was stopped.
EFI_DEVICE_ERRORThe device could not be stopped due to a device error.

Definition at line 796 of file TcpDriver.c.

◆ Tcp6DriverBindingSupported()

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

Test to see if this driver supports ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of the device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
otherThis driver does not support this device.

Test to see if this driver supports ControllerHandle.

Parameters
[in]ThisProtocol instance pointer.
[in]ControllerHandleHandle of device to test.
[in]RemainingDevicePathOptional parameter use to pick a specific child device to start.
Return values
EFI_SUCCESSThis driver supports this device.
EFI_ALREADY_STARTEDThis driver is already running on this device.
otherThis driver does not support this device.

Definition at line 710 of file TcpDriver.c.

◆ TcpCreateSocketCallback()

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

The Callback function called after the TCP socket is created.

Parameters
[in]ThisPointer to the socket just created.
[in]ContextThe context of the socket.
Return values
EFI_SUCCESSThis protocol is installed successfully.
otherAn error occurred.

The Callback function called after the TCP socket was created.

Parameters
[in]ThisPointer to the socket just created
[in]ContextContext of the socket
Return values
EFI_SUCCESSThis protocol installed successfully.
otherAn error occurred.

Definition at line 823 of file TcpDriver.c.

◆ TcpDestroySocketCallback()

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

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

Parameters
[in]ThisThe TCP socket to be destroyed.
[in]ContextThe context of the socket.

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

Parameters
[in]ThisThe TCP socket to be destroyed.
[in]ContextThe context of the socket.

Definition at line 892 of file TcpDriver.c.

◆ TcpDriverEntryPoint()

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]ImageHandleThe firmware allocated handle for this driver image.
[in]SystemTablePointer to the EFI system table.
Return values
EFI_SUCCESSThe driver loaded.
otherThe driver did not load.

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

Parameters
[in]ImageHandleThe firmware allocated handle for this driver image.
[in]SystemTablePointer to the EFI system table.
Return values
EFI_SUCCESSThe driver loaded.
otherThe driver did not load.

Definition at line 166 of file TcpDriver.c.

◆ TcpServiceBindingCreateChild()

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]ThisPointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
[in,out]ChildHandlePointer 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_SUCCESSThe protocol was added to ChildHandle.
EFI_INVALID_PARAMETERChildHandle is NULL.
EFI_OUT_OF_RESOURCESThere are not enough resources available to create the child.
otherThe child handle was not created.

Definition at line 946 of file TcpDriver.c.

◆ TcpServiceBindingDestroyChild()

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
ThisPointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
ChildHandleHandle of the child to destroy.
Return values
EFI_SUCCESSThe protocol was removed from ChildHandle.
EFI_UNSUPPORTEDChildHandle does not support the protocol that is being removed.
EFI_INVALID_PARAMETERThe child handle is NULL.
EFI_ACCESS_DENIEDThe protocol could not be removed from the ChildHandle because its services are being used.
otherThe 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
ThisPointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
ChildHandleHandle of the child to be destroyed.
Return values
EFI_SUCCESSThe protocol was removed from ChildHandle.
EFI_UNSUPPORTEDChildHandle does not support the protocol that is being removed.
EFI_INVALID_PARAMETERChild handle is NULL.
EFI_ACCESS_DENIEDThe protocol could not be removed from the ChildHandle because its services are being used.
otherThe child handle was not destroyed.

Definition at line 1021 of file TcpDriver.c.