TianoCore EDK2 master
Loading...
Searching...
No Matches
Mtftp6.h
Go to the documentation of this file.
1
16#ifndef __EFI_MTFTP6_PROTOCOL_H__
17#define __EFI_MTFTP6_PROTOCOL_H__
18
19#define EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID \
20 { \
21 0xd9760ff3, 0x3cca, 0x4267, {0x80, 0xf9, 0x75, 0x27, 0xfa, 0xfa, 0x42, 0x23 } \
22 }
23
24#define EFI_MTFTP6_PROTOCOL_GUID \
25 { \
26 0xbf0a78ba, 0xec29, 0x49cf, {0xa1, 0xc9, 0x7a, 0xe5, 0x4e, 0xab, 0x6a, 0x51 } \
27 }
28
31
35#define EFI_MTFTP6_OPCODE_RRQ 1
36#define EFI_MTFTP6_OPCODE_WRQ 2
37#define EFI_MTFTP6_OPCODE_DATA 3
38#define EFI_MTFTP6_OPCODE_ACK 4
39#define EFI_MTFTP6_OPCODE_ERROR 5
40#define EFI_MTFTP6_OPCODE_OACK 6
41#define EFI_MTFTP6_OPCODE_DIR 7
42#define EFI_MTFTP6_OPCODE_DATA8 8
43#define EFI_MTFTP6_OPCODE_ACK8 9
45
52#define EFI_MTFTP6_ERRORCODE_NOT_DEFINED 0
56#define EFI_MTFTP6_ERRORCODE_FILE_NOT_FOUND 1
60#define EFI_MTFTP6_ERRORCODE_ACCESS_VIOLATION 2
64#define EFI_MTFTP6_ERRORCODE_DISK_FULL 3
68#define EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION 4
72#define EFI_MTFTP6_ERRORCODE_UNKNOWN_TRANSFER_ID 5
76#define EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS 6
80#define EFI_MTFTP6_ERRORCODE_NO_SUCH_USER 7
84#define EFI_MTFTP6_ERRORCODE_REQUEST_DENIED 8
86
87#pragma pack(1)
88
92typedef struct {
97 UINT16 OpCode;
101 UINT8 Filename[1];
103
107typedef struct {
111 UINT16 OpCode;
115 UINT8 Data[1];
117
121typedef struct {
125 UINT16 OpCode;
129 UINT16 Block;
133 UINT8 Data[1];
135
139typedef struct {
143 UINT16 OpCode;
147 UINT16 Block[1];
149
153typedef struct {
157 UINT16 OpCode;
161 UINT64 Block;
165 UINT8 Data[1];
167
171typedef struct {
175 UINT16 OpCode;
179 UINT64 Block[1];
181
185typedef struct {
189 UINT16 OpCode;
193 UINT16 ErrorCode;
197 UINT8 ErrorMessage[1];
199
203typedef union {
204 UINT16 OpCode;
214
215#pragma pack()
216
220typedef struct {
230 UINT16 LocalPort;
243 UINT16 TryCount;
249
253typedef struct {
269
273typedef struct {
289 UINT16 TryCount;
297
301typedef struct {
302 UINT8 *OptionStr;
303 UINT8 *ValueStr;
305
325typedef
329 IN EFI_MTFTP6_TOKEN *Token,
330 IN UINT16 PacketLen,
331 IN EFI_MTFTP6_PACKET *Packet
332 );
333
352typedef
356 IN EFI_MTFTP6_TOKEN *Token
357 );
358
379typedef
383 IN EFI_MTFTP6_TOKEN *Token,
384 IN OUT UINT16 *Length,
385 OUT VOID **Buffer
386 );
387
409 UINT8 *Filename;
413 UINT8 *ModeStr;
436 VOID *Buffer;
441 VOID *Context;
456};
457
473typedef
477 OUT EFI_MTFTP6_MODE_DATA *ModeData
478 );
479
513typedef
515(EFIAPI *EFI_MTFTP6_CONFIGURE)(
517 IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL
518 );
519
568typedef
570(EFIAPI *EFI_MTFTP6_GET_INFO)(
573 IN UINT8 *Filename,
574 IN UINT8 *ModeStr OPTIONAL,
575 IN UINT8 OptionCount,
576 IN EFI_MTFTP6_OPTION *OptionList OPTIONAL,
577 OUT UINT32 *PacketLength,
579 );
580
611typedef
615 IN UINT32 PacketLen,
616 IN EFI_MTFTP6_PACKET *Packet,
617 OUT UINT32 *OptionCount,
618 OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL
619 );
620
656typedef
658(EFIAPI *EFI_MTFTP6_READ_FILE)(
660 IN EFI_MTFTP6_TOKEN *Token
661 );
662
708typedef
710(EFIAPI *EFI_MTFTP6_WRITE_FILE)(
712 IN EFI_MTFTP6_TOKEN *Token
713 );
714
766typedef
770 IN EFI_MTFTP6_TOKEN *Token
771 );
772
793typedef
795(EFIAPI *EFI_MTFTP6_POLL)(
797 );
798
805 EFI_MTFTP6_GET_MODE_DATA GetModeData;
806 EFI_MTFTP6_CONFIGURE Configure;
807 EFI_MTFTP6_GET_INFO GetInfo;
808 EFI_MTFTP6_PARSE_OPTIONS ParseOptions;
809 EFI_MTFTP6_READ_FILE ReadFile;
810 EFI_MTFTP6_WRITE_FILE WriteFile;
811 EFI_MTFTP6_READ_DIRECTORY ReadDirectory;
812 EFI_MTFTP6_POLL Poll;
813};
814
815extern EFI_GUID gEfiMtftp6ServiceBindingProtocolGuid;
816extern EFI_GUID gEfiMtftp6ProtocolGuid;
817
818#endif
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS(EFIAPI * EFI_MTFTP6_READ_DIRECTORY)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
Definition: Mtftp6.h:768
EFI_STATUS(EFIAPI * EFI_MTFTP6_PARSE_OPTIONS)(IN EFI_MTFTP6_PROTOCOL *This, IN UINT32 PacketLen, IN EFI_MTFTP6_PACKET *Packet, OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL)
Definition: Mtftp6.h:613
EFI_STATUS(EFIAPI * EFI_MTFTP6_CHECK_PACKET)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN UINT16 PacketLen, IN EFI_MTFTP6_PACKET *Packet)
Definition: Mtftp6.h:327
EFI_STATUS(EFIAPI * EFI_MTFTP6_WRITE_FILE)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
Definition: Mtftp6.h:710
EFI_STATUS(EFIAPI * EFI_MTFTP6_GET_MODE_DATA)(IN EFI_MTFTP6_PROTOCOL *This, OUT EFI_MTFTP6_MODE_DATA *ModeData)
Definition: Mtftp6.h:475
EFI_STATUS(EFIAPI * EFI_MTFTP6_PACKET_NEEDED)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN OUT UINT16 *Length, OUT VOID **Buffer)
Definition: Mtftp6.h:381
EFI_STATUS(EFIAPI * EFI_MTFTP6_POLL)(IN EFI_MTFTP6_PROTOCOL *This)
Definition: Mtftp6.h:795
EFI_STATUS(EFIAPI * EFI_MTFTP6_CONFIGURE)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL)
Definition: Mtftp6.h:515
EFI_STATUS(EFIAPI * EFI_MTFTP6_TIMEOUT_CALLBACK)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
Definition: Mtftp6.h:354
EFI_STATUS(EFIAPI * EFI_MTFTP6_READ_FILE)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
Definition: Mtftp6.h:658
EFI_STATUS(EFIAPI * EFI_MTFTP6_GET_INFO)(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_OVERRIDE_DATA *OverrideData OPTIONAL, IN UINT8 *Filename, IN UINT8 *ModeStr OPTIONAL, IN UINT8 OptionCount, IN EFI_MTFTP6_OPTION *OptionList OPTIONAL, OUT UINT32 *PacketLength, OUT EFI_MTFTP6_PACKET **Packet OPTIONAL)
Definition: Mtftp6.h:570
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
UINT8 * ModeStr
Definition: Mtftp6.h:413
UINT64 BufferSize
Definition: Mtftp6.h:430
EFI_MTFTP6_PACKET_NEEDED PacketNeeded
Definition: Mtftp6.h:455
VOID * Context
Definition: Mtftp6.h:441
EFI_MTFTP6_TIMEOUT_CALLBACK TimeoutCallback
Definition: Mtftp6.h:450
EFI_MTFTP6_OPTION * OptionList
Definition: Mtftp6.h:425
EFI_MTFTP6_OVERRIDE_DATA * OverrideData
Definition: Mtftp6.h:405
VOID * Buffer
Definition: Mtftp6.h:436
UINT8 * Filename
Definition: Mtftp6.h:409
EFI_MTFTP6_CHECK_PACKET CheckPacket
Definition: Mtftp6.h:446
EFI_STATUS Status
Definition: Mtftp6.h:394
EFI_EVENT Event
Definition: Mtftp6.h:400
UINT32 OptionCount
Definition: Mtftp6.h:417
UINT16 InitialServerPort
Definition: Mtftp6.h:239
EFI_IPv6_ADDRESS StationIp
Definition: Mtftp6.h:226
EFI_IPv6_ADDRESS ServerIp
Definition: Mtftp6.h:234
UINT8 SupportedOptionCount
Definition: Mtftp6.h:261
UINT8 ** SupportedOptions
Definition: Mtftp6.h:267
EFI_MTFTP6_CONFIG_DATA ConfigData
Definition: Mtftp6.h:257
UINT8 * ValueStr
Pointer to the null-terminated ASCII MTFTPv6 value string.
Definition: Mtftp6.h:303
UINT8 * OptionStr
Pointer to the null-terminated ASCII MTFTPv6 option string.
Definition: Mtftp6.h:302
EFI_IPv6_ADDRESS ServerIp
Definition: Mtftp6.h:278
Definition: Base.h:213
EFI_MTFTP6_REQ_HEADER Wrq
write request packet header.
Definition: Mtftp6.h:206
EFI_MTFTP6_REQ_HEADER Rrq
Read request packet header.
Definition: Mtftp6.h:205
EFI_MTFTP6_DATA_HEADER Data
Data packet header.
Definition: Mtftp6.h:208
EFI_MTFTP6_ACK8_HEADER Ack8
Acknowledgement header with big block number.
Definition: Mtftp6.h:211
EFI_MTFTP6_ERROR_HEADER Error
Error packet header.
Definition: Mtftp6.h:212
EFI_MTFTP6_ACK_HEADER Ack
Acknowledgement packet header.
Definition: Mtftp6.h:209
EFI_MTFTP6_OACK_HEADER Oack
Option acknowledge packet header.
Definition: Mtftp6.h:207
UINT16 OpCode
Type of packets as defined by the MTFTPv6 packet opcodes.
Definition: Mtftp6.h:204
EFI_MTFTP6_DATA8_HEADER Data8
Data packet header with big block number.
Definition: Mtftp6.h:210