From 0b048e9cfb741e5f2c9a4b12ef79502d63cef93f Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 1 Jun 2005 11:01:59 +0000 Subject: Now have enough functions to implement a standard TFTP client in around 50 lines of code. --- src/include/tftpcore.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/include/tftpcore.h (limited to 'src/include') diff --git a/src/include/tftpcore.h b/src/include/tftpcore.h new file mode 100644 index 000000000..cbe86bdc0 --- /dev/null +++ b/src/include/tftpcore.h @@ -0,0 +1,25 @@ +#ifndef TFTPCORE_H +#define TFTPCORE_H + +#include "tftp.h" + +extern int await_tftp ( int ival, void *ptr, unsigned short ptype, + struct iphdr *ip, struct udphdr *udp, + struct tcphdr *tcp ); + +extern int tftp_open ( struct tftp_state *state, const char *filename, + union tftp_any **reply ); + +extern int tftp_process_opts ( struct tftp_state *state, + struct tftp_oack *oack ); + +extern int tftp_ack_nowait ( struct tftp_state *state ); + +extern int tftp_ack ( struct tftp_state *state, union tftp_any **reply ); + +extern int tftp_error ( struct tftp_state *state, int errcode, + const char *errmsg ); + +extern void tftp_set_errno ( struct tftp_error *error ); + +#endif /* TFTPCORE_H */ -- cgit v1.2.3-55-g7522