diff options
author | Michael Brown | 2005-06-01 13:01:59 +0200 |
---|---|---|
committer | Michael Brown | 2005-06-01 13:01:59 +0200 |
commit | 0b048e9cfb741e5f2c9a4b12ef79502d63cef93f (patch) | |
tree | 205e5718cee8585b8b7dbb96f99f481134860ab4 /src/include/tftpcore.h | |
parent | Add tftp_ack() and tftp_error() (diff) | |
download | ipxe-0b048e9cfb741e5f2c9a4b12ef79502d63cef93f.tar.gz ipxe-0b048e9cfb741e5f2c9a4b12ef79502d63cef93f.tar.xz ipxe-0b048e9cfb741e5f2c9a4b12ef79502d63cef93f.zip |
Now have enough functions to implement a standard TFTP client in around 50
lines of code.
Diffstat (limited to 'src/include/tftpcore.h')
-rw-r--r-- | src/include/tftpcore.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/include/tftpcore.h b/src/include/tftpcore.h new file mode 100644 index 00000000..cbe86bdc --- /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 */ |