TianoCore EDK2 master
|
#include <Uefi.h>
#include <Protocol/Udp4.h>
#include <Protocol/Mtftp4.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UdpIoLib.h>
#include <Library/PrintLib.h>
#include "Mtftp4Driver.h"
#include "Mtftp4Option.h"
#include "Mtftp4Support.h"
Go to the source code of this file.
Data Structures | |
struct | _MTFTP4_SERVICE |
struct | MTFTP4_GETINFO_STATE |
struct | _MTFTP4_PROTOCOL |
struct | MTFTP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT |
Macros | |
#define | MTFTP4_SERVICE_SIGNATURE SIGNATURE_32 ('T', 'F', 'T', 'P') |
#define | MTFTP4_PROTOCOL_SIGNATURE SIGNATURE_32 ('t', 'f', 't', 'p') |
#define | MTFTP4_DEFAULT_SERVER_PORT 69 |
#define | MTFTP4_DEFAULT_TIMEOUT 3 |
#define | MTFTP4_DEFAULT_RETRY 5 |
#define | MTFTP4_DEFAULT_BLKSIZE 512 |
#define | MTFTP4_DEFAULT_WINDOWSIZE 1 |
#define | MTFTP4_TIME_TO_GETMAP 5 |
#define | MTFTP4_STATE_UNCONFIGED 0 |
#define | MTFTP4_STATE_CONFIGED 1 |
#define | MTFTP4_STATE_DESTROY 2 |
#define | MTFTP4_SERVICE_FROM_THIS(a) CR (a, MTFTP4_SERVICE, ServiceBinding, MTFTP4_SERVICE_SIGNATURE) |
#define | MTFTP4_PROTOCOL_FROM_THIS(a) CR (a, MTFTP4_PROTOCOL, Mtftp4, MTFTP4_PROTOCOL_SIGNATURE) |
Typedefs | |
typedef struct _MTFTP4_SERVICE | MTFTP4_SERVICE |
typedef struct _MTFTP4_PROTOCOL | MTFTP4_PROTOCOL |
Functions | |
VOID | Mtftp4CleanOperation (IN OUT MTFTP4_PROTOCOL *Instance, IN EFI_STATUS Result) |
EFI_STATUS | Mtftp4WrqStart (IN MTFTP4_PROTOCOL *Instance, IN UINT16 Operation) |
EFI_STATUS | Mtftp4RrqStart (IN MTFTP4_PROTOCOL *Instance, IN UINT16 Operation) |
Variables | |
EFI_MTFTP4_PROTOCOL | gMtftp4ProtocolTemplate |
Mtftp4 Implementation.
Mtftp4 Implementation, it supports the following RFCs: RFC1350 - THE TFTP PROTOCOL (REVISION 2) RFC2090 - TFTP Multicast Option RFC2347 - TFTP Option Extension RFC2348 - TFTP Blocksize Option RFC2349 - TFTP Timeout Interval and Transfer Size Options RFC7440 - TFTP Windowsize Option
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp4Impl.h.
#define MTFTP4_DEFAULT_BLKSIZE 512 |
Definition at line 51 of file Mtftp4Impl.h.
#define MTFTP4_DEFAULT_RETRY 5 |
Definition at line 50 of file Mtftp4Impl.h.
#define MTFTP4_DEFAULT_SERVER_PORT 69 |
Definition at line 48 of file Mtftp4Impl.h.
#define MTFTP4_DEFAULT_TIMEOUT 3 |
Definition at line 49 of file Mtftp4Impl.h.
#define MTFTP4_DEFAULT_WINDOWSIZE 1 |
Definition at line 52 of file Mtftp4Impl.h.
#define MTFTP4_PROTOCOL_FROM_THIS | ( | a | ) | CR (a, MTFTP4_PROTOCOL, Mtftp4, MTFTP4_PROTOCOL_SIGNATURE) |
Definition at line 220 of file Mtftp4Impl.h.
#define MTFTP4_PROTOCOL_SIGNATURE SIGNATURE_32 ('t', 'f', 't', 'p') |
Definition at line 46 of file Mtftp4Impl.h.
#define MTFTP4_SERVICE_FROM_THIS | ( | a | ) | CR (a, MTFTP4_SERVICE, ServiceBinding, MTFTP4_SERVICE_SIGNATURE) |
Definition at line 217 of file Mtftp4Impl.h.
#define MTFTP4_SERVICE_SIGNATURE SIGNATURE_32 ('T', 'F', 'T', 'P') |
Some constant value of Mtftp service.
Definition at line 45 of file Mtftp4Impl.h.
#define MTFTP4_STATE_CONFIGED 1 |
Definition at line 56 of file Mtftp4Impl.h.
#define MTFTP4_STATE_DESTROY 2 |
Definition at line 57 of file Mtftp4Impl.h.
#define MTFTP4_STATE_UNCONFIGED 0 |
Definition at line 55 of file Mtftp4Impl.h.
#define MTFTP4_TIME_TO_GETMAP 5 |
Definition at line 53 of file Mtftp4Impl.h.
typedef struct _MTFTP4_PROTOCOL MTFTP4_PROTOCOL |
Definition at line 36 of file Mtftp4Impl.h.
typedef struct _MTFTP4_SERVICE MTFTP4_SERVICE |
Definition at line 35 of file Mtftp4Impl.h.
VOID Mtftp4CleanOperation | ( | IN OUT MTFTP4_PROTOCOL * | Instance, |
IN EFI_STATUS | Result | ||
) |
Clean up the MTFTP session to get ready for new operation.
Instance | The MTFTP session to clean up |
Result | The result to return to the caller who initiated the operation. |
Definition at line 20 of file Mtftp4Impl.c.
EFI_STATUS Mtftp4RrqStart | ( | IN MTFTP4_PROTOCOL * | Instance, |
IN UINT16 | Operation | ||
) |
Start the MTFTP session to download.
It will first initialize some of the internal states then build and send a RRQ request packet, at last, it will start receive for the downloading.
Instance | The Mtftp session |
Operation | The MTFTP opcode, it may be a EFI_MTFTP4_OPCODE_RRQ or EFI_MTFTP4_OPCODE_DIR. |
EFI_SUCCESS | The mtftp download session is started. |
Others | Failed to start downloading. |
Definition at line 45 of file Mtftp4Rrq.c.
EFI_STATUS Mtftp4WrqStart | ( | IN MTFTP4_PROTOCOL * | Instance, |
IN UINT16 | Operation | ||
) |
Start the MTFTP session for upload.
It will first init some states, then send the WRQ request packet, and start receiving the packet.
Instance | The MTFTP session |
Operation | Redundant parameter, which is always EFI_MTFTP4_OPCODE_WRQ here. |
EFI_SUCCESS | The upload process has been started. |
Others | Failed to start the upload. |
Definition at line 491 of file Mtftp4Wrq.c.
|
extern |
Definition at line 1093 of file Mtftp4Impl.c.