Classes |
struct | tftp_packet |
struct | tftp_state_data |
Defines |
#define | NEXT_BLOCKNUM(x) (((x)+1)&0xffff) |
#define | TFTP_BLKSIZE_DEFAULT 512 |
#define | TFTP_BLKSIZE_MAX 65464 |
#define | TFTP_BLKSIZE_MIN 8 |
#define | TFTP_OPTION_BLKSIZE "blksize" |
#define | TFTP_OPTION_INTERVAL "timeout" |
#define | TFTP_OPTION_TSIZE "tsize" |
Typedefs |
typedef struct tftp_packet | tftp_packet_t |
typedef struct tftp_state_data | tftp_state_data_t |
Enumerations |
enum | tftp_error_t {
TFTP_ERR_UNDEF = 0,
TFTP_ERR_NOTFOUND,
TFTP_ERR_PERM,
TFTP_ERR_DISKFULL,
TFTP_ERR_ILLEGAL,
TFTP_ERR_UNKNOWNID,
TFTP_ERR_EXISTS,
TFTP_ERR_NOSUCHUSER,
TFTP_ERR_NONE = -100,
TFTP_ERR_TIMEOUT,
TFTP_ERR_NORESPONSE
} |
enum | tftp_event_t {
TFTP_EVENT_NONE = -1,
TFTP_EVENT_INIT = 0,
TFTP_EVENT_RRQ = 1,
TFTP_EVENT_WRQ = 2,
TFTP_EVENT_DATA = 3,
TFTP_EVENT_ACK = 4,
TFTP_EVENT_ERROR = 5,
TFTP_EVENT_OACK = 6,
TFTP_EVENT_TIMEOUT
} |
enum | tftp_mode_t { TFTP_MODE_NETASCII = 0,
TFTP_MODE_OCTET
} |
enum | tftp_state_t { TFTP_STATE_START = 0,
TFTP_STATE_RX,
TFTP_STATE_TX,
TFTP_STATE_FIN
} |
Functions |
static size_t | Curl_strnlen (const char *string, size_t maxlen) |
static unsigned short | getrpacketblock (const tftp_packet_t *packet) |
static unsigned short | getrpacketevent (const tftp_packet_t *packet) |
static void | setpacketblock (tftp_packet_t *packet, unsigned short num) |
static void | setpacketevent (tftp_packet_t *packet, unsigned short num) |
static CURLcode | tftp_connect (struct connectdata *conn, bool *done) |
static CURLcode | tftp_connect_for_rx (tftp_state_data_t *state, tftp_event_t event) |
static CURLcode | tftp_connect_for_tx (tftp_state_data_t *state, tftp_event_t event) |
static CURLcode | tftp_disconnect (struct connectdata *conn, bool dead_connection) |
static CURLcode | tftp_do (struct connectdata *conn, bool *done) |
static CURLcode | tftp_doing (struct connectdata *conn, bool *dophase_done) |
static CURLcode | tftp_done (struct connectdata *conn, CURLcode, bool premature) |
static int | tftp_getsock (struct connectdata *conn, curl_socket_t *socks, int numsocks) |
static CURLcode | tftp_multi_statemach (struct connectdata *conn, bool *done) |
static size_t | tftp_option_add (tftp_state_data_t *state, size_t csize, char *buf, const char *option) |
static const char * | tftp_option_get (const char *buf, size_t len, const char **option, const char **value) |
static CURLcode | tftp_parse_option_ack (tftp_state_data_t *state, const char *ptr, int len) |
static CURLcode | tftp_perform (struct connectdata *conn, bool *dophase_done) |
static CURLcode | tftp_receive_packet (struct connectdata *conn) |
static CURLcode | tftp_rx (tftp_state_data_t *state, tftp_event_t event) |
static CURLcode | tftp_send_first (tftp_state_data_t *state, tftp_event_t event) |
static CURLcode | tftp_set_timeouts (tftp_state_data_t *state) |
static CURLcode | tftp_setup_connection (struct connectdata *conn) |
static CURLcode | tftp_state_machine (tftp_state_data_t *state, tftp_event_t event) |
static long | tftp_state_timeout (struct connectdata *conn, tftp_event_t *event) |
static CURLcode | tftp_translate_code (tftp_error_t error) |
static CURLcode | tftp_tx (tftp_state_data_t *state, tftp_event_t event) |
Variables |
struct Curl_handler | Curl_handler_tftp |