blob: c983e05b6135806f891b7946096322868e43c719 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/*++
Copyright (c) 2007 Intel Corporation. All rights reserved
This software and associated documentation (if any) is furnished
under a license and may only be used or copied in accordance
with the terms of the license. Except as permitted by such
license, no part of this software or documentation may be
reproduced, stored in a retrieval system, or transmitted in any
form or by any means without the express written consent of
Intel Corporation.
Module Name:
IScsiTcp4Io.h
Abstract:
iSCSI Tcp4 IO related definitions.
--*/
#ifndef _ISCSI_TCP4_IO_H_
#define _ISCSI_TCP4_IO_H_
#include <Library/NetLib.h>
#include <protocol/Tcp4.h>
typedef struct _TCP4_IO_CONFIG_DATA {
EFI_IPv4_ADDRESS LocalIp;
EFI_IPv4_ADDRESS SubnetMask;
EFI_IPv4_ADDRESS Gateway;
EFI_IPv4_ADDRESS RemoteIp;
UINT16 RemotePort;
} TCP4_IO_CONFIG_DATA;
typedef struct _TCP4_IO {
EFI_HANDLE Image;
EFI_HANDLE Controller;
EFI_HANDLE Handle;
EFI_TCP4_PROTOCOL *Tcp4;
EFI_TCP4_CONNECTION_TOKEN ConnToken;
EFI_TCP4_IO_TOKEN TxToken;
EFI_TCP4_IO_TOKEN RxToken;
EFI_TCP4_CLOSE_TOKEN CloseToken;
BOOLEAN IsConnDone;
BOOLEAN IsTxDone;
BOOLEAN IsRxDone;
BOOLEAN IsCloseDone;
} TCP4_IO;
EFI_STATUS
Tcp4IoCreateSocket (
IN EFI_HANDLE Image,
IN EFI_HANDLE Controller,
IN TCP4_IO_CONFIG_DATA *ConfigData,
IN TCP4_IO *Tcp4Io
);
VOID
Tcp4IoDestroySocket (
IN TCP4_IO *Tcp4Io
);
EFI_STATUS
Tcp4IoConnect (
IN TCP4_IO *Tcp4Io,
IN EFI_EVENT Timeout
);
VOID
Tcp4IoReset (
IN TCP4_IO *Tcp4Io
);
EFI_STATUS
Tcp4IoTransmit (
IN TCP4_IO *Tcp4Io,
IN NET_BUF *Packet
);
EFI_STATUS
Tcp4IoReceive (
IN TCP4_IO *Tcp4Io,
IN NET_BUF *Packet,
IN BOOLEAN AsyncMode,
IN EFI_EVENT Timeout
);
#endif
|