]>
Commit | Line | Data |
---|---|---|
1 | /** @file | |
2 | ||
3 | Copyright (c) 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 | |
8 | ||
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. | |
11 | ||
12 | Module Name: | |
13 | ||
14 | Mtftp4Support.h | |
15 | ||
16 | Abstract: | |
17 | ||
18 | Support routines for MTFTP | |
19 | ||
20 | ||
21 | **/ | |
22 | ||
23 | #ifndef __EFI_MTFTP4_SUPPORT_H__ | |
24 | #define __EFI_MTFTP4_SUPPORT_H__ | |
25 | ||
26 | // | |
27 | // The structure representing a range of block numbers, [Start, End]. | |
28 | // It is used to remember the holes in the MTFTP block space. If all | |
29 | // the holes are filled in, then the download or upload has completed. | |
30 | // | |
31 | typedef struct { | |
32 | NET_LIST_ENTRY Link; | |
33 | INTN Start; | |
34 | INTN End; | |
35 | } MTFTP4_BLOCK_RANGE; | |
36 | ||
37 | ||
38 | EFI_STATUS | |
39 | Mtftp4InitBlockRange ( | |
40 | IN NET_LIST_ENTRY *Head, | |
41 | IN UINT16 Start, | |
42 | IN UINT16 End | |
43 | ); | |
44 | ||
45 | INTN | |
46 | Mtftp4GetNextBlockNum ( | |
47 | IN NET_LIST_ENTRY *Head | |
48 | ); | |
49 | ||
50 | VOID | |
51 | Mtftp4SetLastBlockNum ( | |
52 | IN NET_LIST_ENTRY *Head, | |
53 | IN UINT16 Last | |
54 | ); | |
55 | ||
56 | EFI_STATUS | |
57 | Mtftp4RemoveBlockNum ( | |
58 | IN NET_LIST_ENTRY *Head, | |
59 | IN UINT16 Num | |
60 | ); | |
61 | ||
62 | VOID | |
63 | Mtftp4SetTimeout ( | |
64 | IN MTFTP4_PROTOCOL *Instance | |
65 | ); | |
66 | ||
67 | EFI_STATUS | |
68 | Mtftp4SendPacket ( | |
69 | IN MTFTP4_PROTOCOL *Instance, | |
70 | IN NET_BUF *Packet | |
71 | ); | |
72 | ||
73 | EFI_STATUS | |
74 | Mtftp4SendRequest ( | |
75 | IN MTFTP4_PROTOCOL *Instance | |
76 | ); | |
77 | ||
78 | EFI_STATUS | |
79 | Mtftp4SendError ( | |
80 | IN MTFTP4_PROTOCOL *Instance, | |
81 | IN UINT16 ErrCode, | |
82 | IN UINT8* ErrInfo | |
83 | ); | |
84 | ||
85 | EFI_STATUS | |
86 | Mtftp4Retransmit ( | |
87 | IN MTFTP4_PROTOCOL *Instance | |
88 | ); | |
89 | ||
90 | VOID | |
91 | EFIAPI | |
92 | Mtftp4OnTimerTick ( | |
93 | IN EFI_EVENT Event, | |
94 | IN VOID *Context | |
95 | ); | |
96 | #endif |