#include "server_setup.h"
#include "tftp.h"
#include <setjmp.h>
#include "curlx.h"
#include "getpart.h"
#include "util.h"
#include "server_sockaddr.h"
#include "memdebug.h"
Go to the source code of this file.
|
static int | do_tftp (struct testcase *test, struct tftphdr *tp, ssize_t size) |
|
static RETSIGTYPE | exit_signal_handler (int signum) |
|
static void | install_signal_handlers (void) |
|
int | main (int argc, char **argv) |
|
static void | nak (int error) |
|
static int | parse_servercmd (struct testcase *req) |
|
static struct tftphdr * | r_init (void) |
|
static void | read_ahead (struct testcase *test, int convert) |
|
static int | readit (struct testcase *test, struct tftphdr **dpp, int convert) |
|
static void | recvtftp (struct testcase *test, struct formats *pf) |
|
static void | restore_signal_handlers (void) |
|
static struct tftphdr * | rw_init (int) |
|
static void | sendtftp (struct testcase *test, struct formats *pf) |
|
static int | synchnet (curl_socket_t) |
|
static int | validate_access (struct testcase *test, const char *fname, int mode) |
|
static struct tftphdr * | w_init (void) |
|
static ssize_t | write_behind (struct testcase *test, int convert) |
|
static int | writeit (struct testcase *test, struct tftphdr *volatile *dpp, int ct, int convert) |
|
#define BF_ALLOC -3 /* alloc'd but not yet filled */ |
#define BF_FREE -2 /* free */ |
#define DEFAULT_PORT 8999 /* UDP */ |
#define ENABLE_CURLX_PRINTF |
#define MIN |
( |
|
x, |
|
|
|
y |
|
) |
| ((x)<(y)?(x):(y)) |
#define REQUEST_DUMP "log/server.input" |
#define siginterrupt |
( |
|
x, |
|
|
|
y |
|
) |
| do {} while(0) |
static RETSIGTYPE exit_signal_handler |
( |
int |
signum | ) |
|
|
static |
static void install_signal_handlers |
( |
void |
| ) |
|
|
static |
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
static void nak |
( |
int |
error | ) |
|
|
static |
static int parse_servercmd |
( |
struct testcase * |
req | ) |
|
|
static |
static struct tftphdr * r_init |
( |
void |
| ) |
|
|
static |
static void read_ahead |
( |
struct testcase * |
test, |
|
|
int |
convert |
|
) |
| |
|
static |
static int readit |
( |
struct testcase * |
test, |
|
|
struct tftphdr ** |
dpp, |
|
|
int |
convert |
|
) |
| |
|
static |
static void restore_signal_handlers |
( |
void |
| ) |
|
|
static |
static struct tftphdr * rw_init |
( |
int |
x | ) |
|
|
static |
static int validate_access |
( |
struct testcase * |
test, |
|
|
const char * |
fname, |
|
|
int |
mode |
|
) |
| |
|
static |
static struct tftphdr * w_init |
( |
void |
| ) |
|
|
static |
static int writeit |
( |
struct testcase * |
test, |
|
|
struct tftphdr *volatile * |
dpp, |
|
|
int |
ct, |
|
|
int |
convert |
|
) |
| |
|
static |
Initial value:= {
{
EUNDEF,
"Undefined error code" },
{
ENOSPACE,
"Disk full or allocation exceeded" },
{
EBADOP,
"Illegal TFTP operation" },
{
EBADID,
"Unknown transfer ID" },
{
EEXISTS,
"File already exists" },
{ -1, 0 }
}
Definition at line 167 of file tftpd.c.
volatile int exit_signal = 0 |
|
static |
Initial value:= {
{ "netascii", 1 },
{ "octet", 0 },
{ NULL, 0 }
}
Definition at line 179 of file tftpd.c.
const char* ipv_inuse = "IPv4" |
|
static |
unsigned int maxtimeout = 5 * TIMEOUT |
|
static |
const char* pidname = ".tftpd.pid" |
|
static |