TianoCore EDK2 master
Loading...
Searching...
No Matches
Mtftp6Option.h
Go to the documentation of this file.
1
10#ifndef __EFI_MTFTP6_OPTION_H__
11#define __EFI_MTFTP6_OPTION_H__
12
13#include <Uefi.h>
14
16
17#include <Library/NetLib.h>
18#include <Library/UdpIoLib.h>
22
23#define MTFTP6_SUPPORTED_OPTIONS_NUM 5
24#define MTFTP6_OPCODE_LEN 2
25#define MTFTP6_ERRCODE_LEN 2
26#define MTFTP6_BLKNO_LEN 2
27#define MTFTP6_DATA_HEAD_LEN 4
28
29//
30// The bit map definition for Mtftp6 extension options.
31//
32#define MTFTP6_OPT_BLKSIZE_BIT 0x01
33#define MTFTP6_OPT_TIMEOUT_BIT 0x02
34#define MTFTP6_OPT_TSIZE_BIT 0x04
35#define MTFTP6_OPT_MCAST_BIT 0x08
36#define MTFTP6_OPT_WINDOWSIZE_BIT 0X10
37
38extern CHAR8 *mMtftp6SupportedOptions[MTFTP6_SUPPORTED_OPTIONS_NUM];
39
40typedef struct {
41 UINT16 BlkSize;
42 UINT16 WindowSize;
43 UINT8 Timeout;
44 UINT32 Tsize;
45 EFI_IPv6_ADDRESS McastIp;
46 UINT16 McastPort;
47 BOOLEAN IsMaster;
48 UINT32 BitMap;
50
63 IN UINT8 *Str,
65 );
66
84 IN EFI_MTFTP6_OPTION *Options,
85 IN UINT32 Count,
86 IN BOOLEAN IsRequest,
87 IN UINT16 Operation,
89 );
90
110 IN EFI_MTFTP6_PACKET *Packet,
111 IN UINT32 PacketLen,
112 IN OUT UINT32 *Count,
113 IN EFI_MTFTP6_OPTION *Options OPTIONAL
114 );
115
137 IN EFI_MTFTP6_PACKET *Packet,
138 IN UINT32 PacketLen,
139 IN OUT UINT32 *OptionCount,
140 OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL
141 );
142
143#endif
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS Mtftp6ParsePacketOption(IN EFI_MTFTP6_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *Count, IN EFI_MTFTP6_OPTION *Options OPTIONAL)
Definition: Mtftp6Option.c:260
EFI_STATUS Mtftp6ParseMcastOption(IN UINT8 *Str, IN MTFTP6_EXT_OPTION_INFO *ExtInfo)
Definition: Mtftp6Option.c:33
EFI_STATUS Mtftp6ParseExtensionOption(IN EFI_MTFTP6_OPTION *Options, IN UINT32 Count, IN BOOLEAN IsRequest, IN UINT16 Operation, IN MTFTP6_EXT_OPTION_INFO *ExtInfo)
Definition: Mtftp6Option.c:147
EFI_STATUS Mtftp6ParseStart(IN EFI_MTFTP6_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL)
Definition: Mtftp6Option.c:340
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29