|
@@ -1,5 +1,8 @@
|
1
|
|
-#ifndef _TFTP_H
|
2
|
|
-#define _TFTP_H
|
|
1
|
+#ifndef TFTP_H
|
|
2
|
+#define TFTP_H
|
|
3
|
+
|
|
4
|
+#include "in.h"
|
|
5
|
+#include "nic.h"
|
3
|
6
|
|
4
|
7
|
#define TFTP_PORT 69
|
5
|
8
|
#define TFTP_DEFAULTSIZE_PACKET 512
|
|
@@ -60,8 +63,8 @@ struct tftpreq_t {
|
60
|
63
|
} PACKED;
|
61
|
64
|
|
62
|
65
|
struct tftpreq_info_t {
|
|
66
|
+ struct sockaddr_in *server;
|
63
|
67
|
const char *name;
|
64
|
|
- unsigned short port;
|
65
|
68
|
unsigned short blksize;
|
66
|
69
|
} PACKED;
|
67
|
70
|
|
|
@@ -74,4 +77,17 @@ struct tftpblk_info_t {
|
74
|
77
|
|
75
|
78
|
#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4)
|
76
|
79
|
|
77
|
|
-#endif /* _TFTP_H */
|
|
80
|
+/*
|
|
81
|
+ * Functions in tftp.c. Needed for pxe_export.c
|
|
82
|
+ *
|
|
83
|
+ */
|
|
84
|
+extern int tftp_block ( struct tftpreq_info_t *request,
|
|
85
|
+ struct tftpblk_info_t *block );
|
|
86
|
+extern int tftp ( char *url,
|
|
87
|
+ struct sockaddr_in *server,
|
|
88
|
+ char *file,
|
|
89
|
+ int ( * process ) ( unsigned char *data,
|
|
90
|
+ unsigned int blocknum,
|
|
91
|
+ unsigned int len, int eof ) );
|
|
92
|
+
|
|
93
|
+#endif /* TFTP_H */
|