]> Git Repo - qemu.git/blame - slirp/tftp.h
ppc/mmu-hash64: Remove duplicated #include statement
[qemu.git] / slirp / tftp.h
CommitLineData
c7f74643 1/* tftp defines */
175de524 2
cb9c377f 3#ifndef SLIRP_TFTP_H
175de524 4#define SLIRP_TFTP_H
c7f74643 5
5f22b054 6#define TFTP_SESSIONS_MAX 20
c7f74643
FB
7
8#define TFTP_SERVER 69
9
10#define TFTP_RRQ 1
11#define TFTP_WRQ 2
12#define TFTP_DATA 3
13#define TFTP_ACK 4
14#define TFTP_ERROR 5
1f697db9 15#define TFTP_OACK 6
c7f74643
FB
16
17#define TFTP_FILENAME_MAX 512
18
19struct tftp_t {
c7f74643 20 struct udphdr udp;
b6dce92e 21 uint16_t tp_op;
c7f74643 22 union {
5fafdf24 23 struct {
b6dce92e
SW
24 uint16_t tp_block_nr;
25 uint8_t tp_buf[512];
c7f74643 26 } tp_data;
5fafdf24 27 struct {
b6dce92e
SW
28 uint16_t tp_error_code;
29 uint8_t tp_msg[512];
c7f74643 30 } tp_error;
89d2d3af 31 char tp_buf[512 + 2];
c7f74643 32 } x;
fad7fb9c 33} __attribute__((packed));
c7f74643 34
460fec67
JK
35struct tftp_session {
36 Slirp *slirp;
37 char *filename;
78be0566 38 int fd;
460fec67 39
fad7fb9c 40 struct sockaddr_storage client_addr;
b6dce92e 41 uint16_t client_port;
4aa401f3 42 uint32_t block_nr;
460fec67
JK
43
44 int timestamp;
45};
46
fad7fb9c 47void tftp_input(struct sockaddr_storage *srcsas, struct mbuf *m);
cb9c377f
PB
48
49#endif
This page took 0.892538 seconds and 4 git commands to generate.