]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h
1. Sync the latest network stack. Add NetLibCreateIPv4DPathNode () in netlib library.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Support.h
CommitLineData
772db4bb 1/** @file
2
3Copyright (c) 2006, Intel Corporation
4All rights reserved. This program and the accompanying materials
5are licensed and made available under the terms and conditions of the BSD License
6which accompanies this distribution. The full text of the license may be found at
7http://opensource.org/licenses/bsd-license.php
8
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12Module Name:
13
14 Mtftp4Support.h
15
16Abstract:
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//
31typedef struct {
32 NET_LIST_ENTRY Link;
33 INTN Start;
34 INTN End;
35} MTFTP4_BLOCK_RANGE;
36
37
38EFI_STATUS
39Mtftp4InitBlockRange (
40 IN NET_LIST_ENTRY *Head,
41 IN UINT16 Start,
42 IN UINT16 End
43 );
44
45INTN
46Mtftp4GetNextBlockNum (
47 IN NET_LIST_ENTRY *Head
48 );
49
50VOID
51Mtftp4SetLastBlockNum (
52 IN NET_LIST_ENTRY *Head,
53 IN UINT16 Last
54 );
55
56EFI_STATUS
57Mtftp4RemoveBlockNum (
58 IN NET_LIST_ENTRY *Head,
59 IN UINT16 Num
60 );
61
62VOID
63Mtftp4SetTimeout (
64 IN MTFTP4_PROTOCOL *Instance
65 );
66
67EFI_STATUS
68Mtftp4SendPacket (
69 IN MTFTP4_PROTOCOL *Instance,
70 IN NET_BUF *Packet
71 );
72
73EFI_STATUS
74Mtftp4SendRequest (
75 IN MTFTP4_PROTOCOL *Instance
76 );
77
78EFI_STATUS
79Mtftp4SendError (
80 IN MTFTP4_PROTOCOL *Instance,
81 IN UINT16 ErrCode,
82 IN UINT8* ErrInfo
83 );
84
85EFI_STATUS
86Mtftp4Retransmit (
87 IN MTFTP4_PROTOCOL *Instance
88 );
89
90VOID
91EFIAPI
92Mtftp4OnTimerTick (
93 IN EFI_EVENT Event,
94 IN VOID *Context
95 );
96#endif