241 |
|
|
242 |
struct formats; |
struct formats; |
243 |
int validate_access __P((char **, int)); |
int validate_access __P((char **, int)); |
244 |
void sendfile __P((struct formats *)); |
void send_file __P((struct formats *)); |
245 |
void recvfile __P((struct formats *)); |
void recvfile __P((struct formats *)); |
246 |
|
|
247 |
struct formats { |
struct formats { |
251 |
void (*f_recv) __P((struct formats *)); |
void (*f_recv) __P((struct formats *)); |
252 |
int f_convert; |
int f_convert; |
253 |
} formats[] = { |
} formats[] = { |
254 |
{ "netascii", validate_access, sendfile, recvfile, 1 }, |
{ "netascii", validate_access, send_file, recvfile, 1 }, |
255 |
{ "octet", validate_access, sendfile, recvfile, 0 }, |
{ "octet", validate_access, send_file, recvfile, 0 }, |
256 |
#ifdef notdef |
#ifdef notdef |
257 |
{ "mail", validate_user, sendmail, recvmail, 1 }, |
{ "mail", validate_user, sendmail, recvmail, 1 }, |
258 |
#endif |
#endif |
441 |
* Send the requested file. |
* Send the requested file. |
442 |
*/ |
*/ |
443 |
void |
void |
444 |
sendfile(struct formats *pf) |
send_file(struct formats *pf) |
445 |
{ |
{ |
446 |
struct tftphdr *dp, *r_init(); |
struct tftphdr *dp, *r_init(); |
447 |
register struct tftphdr *ap; /* ack packet */ |
register struct tftphdr *ap; /* ack packet */ |