repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
aio: avoid livelock behavior for Win32
[qemu/ar7.git]
/
slirp
/
tftp.h
blob
51704e48747caa3b2007c955a0c7bf8659bb96b8
1
/* tftp defines */
2
3
#define TFTP_SESSIONS_MAX 3
4
5
#define TFTP_SERVER 69
6
7
#define TFTP_RRQ 1
8
#define TFTP_WRQ 2
9
#define TFTP_DATA 3
10
#define TFTP_ACK 4
11
#define TFTP_ERROR 5
12
#define TFTP_OACK 6
13
14
#define TFTP_FILENAME_MAX 512
15
16
struct
tftp_t
{
17
struct
ip ip
;
18
struct
udphdr udp
;
19
uint16_t
tp_op
;
20
union
{
21
struct
{
22
uint16_t
tp_block_nr
;
23
uint8_t
tp_buf
[
512
];
24
}
tp_data
;
25
struct
{
26
uint16_t
tp_error_code
;
27
uint8_t
tp_msg
[
512
];
28
}
tp_error
;
29
char
tp_buf
[
512
+
2
];
30
}
x
;
31
};
32
33
struct
tftp_session
{
34
Slirp
*
slirp
;
35
char
*
filename
;
36
int
fd
;
37
38
struct
in_addr client_ip
;
39
uint16_t
client_port
;
40
uint32_t
block_nr
;
41
42
int
timestamp
;
43
};
44
45
void
tftp_input
(
struct
mbuf
*
m
);