![]() |
RTEMS 6.1-rc7
|
This header file provides interfaces and functions used to implement the UDP network fake for tftpfs tests. More...
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | Tftp_Action |
struct | Tftp_Interaction |
struct | Tftp_Packet |
Macros | |
#define | _TFTPFS_UDP_NETWORK_FAKE_H |
#define | TFTP_STD_PORT 69 |
#define | TFTP_MAX_IP_ADDR_STRLEN (16 * 2 + 7 + 1) |
#define | TFTP_MAX_ERROR_STRLEN 20 |
#define | TFTP_MAX_OPTIONS_SIZE 40 |
#define | TFTP_KNOWN_IPV4_ADDR0_STR "127.0.0.1" |
IP address strings and server names resolved by network fake functions like inet_aton() and gethostbyname(). | |
#define | TFTP_KNOWN_IPV4_ADDR0_ARRAY 127, 0, 0, 1 |
#define | TFTP_KNOWN_SERVER0_NAME "server.tftp" |
#define | TFTP_KNOWN_SERVER0_IPV4 "10.7.0.2" |
#define | TFTP_KNOWN_SERVER0_ARRAY 10, 7, 0, 2 |
#define | TFTP_FIRST_FD 33333 |
The faked socket() function (i.e. socket interaction) must return a file descriptor equal or larger than TFTP_FIRST_FD or -1. | |
#define | TFTP_MODE_NETASCII "netascii" |
#define | TFTP_MODE_OCTET "octet" |
#define | TFTP_OPTION_BLKSIZE "blksize" |
#define | TFTP_OPTION_TIMEOUT "timeout" |
#define | TFTP_OPTION_TSIZE "tsize" |
#define | TFTP_OPTION_WINDOWSIZE "windowsize" |
#define | TFTP_WINDOW_SIZE_MIN 1 |
#define | TFTP_BLOCK_SIZE_MIN 8 |
#define | TFTP_BLOCK_SIZE_MAX 65464 |
Typedefs | |
typedef enum Tftp_Action_kind | Tftp_Action_kind |
typedef struct Tftp_Action | Tftp_Action |
typedef bool(* | Tftp_Interaction_fn) (Tftp_Action *act, void *data) |
Carry out interactions with TFTP client. | |
typedef struct Tftp_Interaction | Tftp_Interaction |
typedef enum Tftp_Opcode | Tftp_Opcode |
typedef enum Tftp_Error_code | Tftp_Error_code |
typedef struct Tftp_Packet | Tftp_Packet |
Functions | |
void | _Tftp_Reset (void) |
Initialize and free the singleton control object. | |
void * | _Tftp_Append_interaction (Tftp_Action_kind kind, Tftp_Interaction_fn fn, size_t size) |
Create an interaction and append it to the sequence of expected interactions. | |
bool | _Tftp_Has_no_more_interactions (void) |
Have all queued interactions been processed? | |
const char * | _Tftp_Get_error_str (uint16_t error_code) |
Provides a human readable description for an error code from an TFTP error packet. | |
This header file provides interfaces and functions used to implement the UDP network fake for tftpfs tests.
Definitions and declarations of data structures and functions.