summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2005-04-30 16:46:18 +0200
committerMichael Brown2005-04-30 16:46:18 +0200
commit5f45f14b5f685eab2dfd147d64e983b60b01811a (patch)
treed4e7f398e88753f2a4cc0715b0e8d7cee02c329d /src
parentProtocols get passed a pointer to the filename portion as well as just the (diff)
downloadipxe-5f45f14b5f685eab2dfd147d64e983b60b01811a.tar.gz
ipxe-5f45f14b5f685eab2dfd147d64e983b60b01811a.tar.xz
ipxe-5f45f14b5f685eab2dfd147d64e983b60b01811a.zip
tftp moved to separate file.
Diffstat (limited to 'src')
-rw-r--r--src/include/tftp.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/include/tftp.h b/src/include/tftp.h
index 14763d483..5f129ead9 100644
--- a/src/include/tftp.h
+++ b/src/include/tftp.h
@@ -1,5 +1,8 @@
-#ifndef _TFTP_H
-#define _TFTP_H
+#ifndef TFTP_H
+#define TFTP_H
+
+#include "in.h"
+#include "nic.h"
#define TFTP_PORT 69
#define TFTP_DEFAULTSIZE_PACKET 512
@@ -60,8 +63,8 @@ struct tftpreq_t {
} PACKED;
struct tftpreq_info_t {
+ struct sockaddr_in *server;
const char *name;
- unsigned short port;
unsigned short blksize;
} PACKED;
@@ -74,4 +77,17 @@ struct tftpblk_info_t {
#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4)
-#endif /* _TFTP_H */
+/*
+ * Functions in tftp.c. Needed for pxe_export.c
+ *
+ */
+extern int tftp_block ( struct tftpreq_info_t *request,
+ struct tftpblk_info_t *block );
+extern int tftp ( char *url,
+ struct sockaddr_in *server,
+ char *file,
+ int ( * process ) ( unsigned char *data,
+ unsigned int blocknum,
+ unsigned int len, int eof ) );
+
+#endif /* TFTP_H */