version 1.44, 2022/10/04 07:03:27 |
version 1.45, 2022/10/04 08:03:26 |
|
|
int opt_tout = 0; |
int opt_tout = 0; |
int opt_blksize = 0; |
int opt_blksize = 0; |
|
|
char vhelp[] = "toggle verbose mode"; |
|
char thelp[] = "toggle packet tracing"; |
|
char chelp[] = "connect to remote tftp"; |
|
char qhelp[] = "exit tftp"; |
|
char hhelp[] = "print help information"; |
|
char shelp[] = "send file"; |
|
char rhelp[] = "receive file"; |
|
char mhelp[] = "set file transfer mode"; |
|
char sthelp[] = "show current status"; |
|
char xhelp[] = "set per-packet retransmission timeout"; |
|
char ihelp[] = "set total retransmission timeout"; |
|
char ashelp[] = "set mode to netascii"; |
|
char bnhelp[] = "set mode to octet"; |
|
char oshelp[] = "toggle tsize option"; |
|
char othelp[] = "toggle timeout option"; |
|
char obhelp[] = "set alternative blksize option"; |
|
|
|
struct cmd { |
struct cmd { |
char *name; |
char *name; |
char *help; |
char *help; |
|
|
}; |
}; |
|
|
struct cmd cmdtab[] = { |
struct cmd cmdtab[] = { |
{ "connect", chelp, parsearg }, |
{ "?", "print help information", help }, |
{ "mode", mhelp, modecmd }, |
{ "ascii", "set mode to netascii", setascii }, |
{ "put", shelp, put }, |
{ "binary", "set mode to octet", setbinary }, |
{ "get", rhelp, get }, |
{ "blksize", "set alternative blksize option", setblksize }, |
{ "quit", qhelp, quit }, |
{ "connect", "connect to remote tftp", parsearg }, |
{ "verbose", vhelp, setverbose }, |
{ "get", "receive file", get }, |
{ "trace", thelp, settrace }, |
{ "help", "print help information", help }, |
{ "status", sthelp, status }, |
{ "mode", "set file transfer mode", modecmd }, |
{ "binary", bnhelp, setbinary }, |
{ "put", "send file", put }, |
{ "ascii", ashelp, setascii }, |
{ "quit", "exit tftp", quit }, |
{ "rexmt", xhelp, setrexmt }, |
{ "rexmt", "set per-packet retransmission timeout", setrexmt }, |
{ "timeout", ihelp, settimeout }, |
{ "status", "show current status", status }, |
{ "tsize", oshelp, settsize }, |
{ "timeout", "set total retransmission timeout", settimeout }, |
{ "tout", othelp, settout }, |
{ "tout", "toggle timeout option", settout }, |
{ "blksize", obhelp, setblksize }, |
{ "trace", "toggle packet tracing", settrace }, |
{ "help", hhelp, help }, |
{ "tsize", "toggle tsize option", settsize }, |
{ "?", hhelp, help }, |
{ "verbose", "toggle verbose mode", setverbose }, |
{ NULL, NULL, NULL } |
{ NULL, NULL, NULL } |
}; |
}; |
|
|