3 Copyright (c) 2005 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 #ifndef _TCP4_DRIVER_H_
22 #define _TCP4_DRIVER_H_
24 #include <Protocol/ServiceBinding.h>
25 #include <Library/IpIoLib.h>
27 #define TCP4_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('T', 'C', 'P', '4')
29 #define TCP4_PORT_KNOWN 1024
30 #define TCP4_PORT_USER_RESERVED 65535
32 typedef struct _TCP4_HEARTBEAT_TIMER
{
35 } TCP4_HEARTBEAT_TIMER
;
37 typedef struct _TCP4_SERVICE_DATA
{
39 EFI_HANDLE ControllerHandle
;
40 IP_IO
*IpIo
; // IP Io consumed by TCP4
41 EFI_SERVICE_BINDING_PROTOCOL Tcp4ServiceBinding
;
42 EFI_HANDLE DriverBindingHandle
;
44 LIST_ENTRY SocketList
;
48 // Prototype for TCP4 driver Rcv callback function registered to IP_IO
53 IN ICMP_ERROR IcmpErr
,
54 IN EFI_NET_SESSION_DATA
*NetSession
,
56 IN VOID
*Context OPTIONAL
70 IN SOCK_REQUEST Request
,
71 IN VOID
*Data OPTIONAL
74 typedef struct _TCP4_PROTO_DATA
{
75 TCP4_SERVICE_DATA
*TcpService
;
79 #define TCP4_FROM_THIS(a) \
84 TCP4_DRIVER_SIGNATURE \
88 // Function prototype for the driver's entry point
92 Tcp4DriverEntryPoint (
93 IN EFI_HANDLE ImageHandle
,
94 IN EFI_SYSTEM_TABLE
*SystemTable
98 // Function prototypes for the Drivr Binding Protocol
102 Tcp4DriverBindingSupported (
103 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
104 IN EFI_HANDLE ControllerHandle
,
105 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
110 Tcp4DriverBindingStart (
111 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
112 IN EFI_HANDLE ControllerHandle
,
113 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
118 Tcp4DriverBindingStop (
119 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
120 IN EFI_HANDLE ControllerHandle
,
121 IN UINTN NumberOfChildren
,
122 IN EFI_HANDLE
*ChildHandleBuffer
126 Tcp4CreateSocketCallback (
132 Tcp4DestroySocketCallback (
138 // Function ptototypes for the ServiceBinding Prococol
142 Tcp4ServiceBindingCreateChild (
143 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
144 IN EFI_HANDLE
*ChildHandle
149 Tcp4ServiceBindingDestroyChild (
150 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
151 IN EFI_HANDLE ChildHandle