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
;
47 // Prototype for TCP4 driver Rcv callback function registered to IP_IO
52 IN ICMP_ERROR IcmpErr
,
53 IN EFI_NET_SESSION_DATA
*NetSession
,
55 IN VOID
*Context OPTIONAL
69 IN SOCK_REQUEST Request
,
70 IN VOID
*Data OPTIONAL
73 typedef struct _TCP4_PROTO_DATA
{
74 TCP4_SERVICE_DATA
*TcpService
;
78 #define TCP4_FROM_THIS(a) \
83 TCP4_DRIVER_SIGNATURE \
87 // Function prototype for the driver's entry point
91 Tcp4DriverEntryPoint (
92 IN EFI_HANDLE ImageHandle
,
93 IN EFI_SYSTEM_TABLE
*SystemTable
97 // Function prototypes for the Drivr Binding Protocol
101 Tcp4DriverBindingSupported (
102 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
103 IN EFI_HANDLE ControllerHandle
,
104 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
109 Tcp4DriverBindingStart (
110 IN EFI_DRIVER_BINDING_PROTOCOL
* This
,
111 IN EFI_HANDLE ControllerHandle
,
112 IN EFI_DEVICE_PATH_PROTOCOL
* RemainingDevicePath OPTIONAL
117 Tcp4DriverBindingStop (
118 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
119 IN EFI_HANDLE ControllerHandle
,
120 IN UINTN NumberOfChildren
,
121 IN EFI_HANDLE
*ChildHandleBuffer
125 // Function ptototypes for the ServiceBinding Prococol
129 Tcp4ServiceBindingCreateChild (
130 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
131 IN EFI_HANDLE
*ChildHandle
136 Tcp4ServiceBindingDestroyChild (
137 IN EFI_SERVICE_BINDING_PROTOCOL
*This
,
138 IN EFI_HANDLE ChildHandle