Statistics
| Branch: | Revision:

root / slirp / tftp.h @ 4c1b1bfe

History | View | Annotate | Download (566 Bytes)

1 c7f74643 bellard
/* tftp defines */
2 c7f74643 bellard
3 c7f74643 bellard
#define TFTP_SESSIONS_MAX 3
4 c7f74643 bellard
5 c7f74643 bellard
#define TFTP_SERVER        69
6 c7f74643 bellard
7 c7f74643 bellard
#define TFTP_RRQ    1
8 c7f74643 bellard
#define TFTP_WRQ    2
9 c7f74643 bellard
#define TFTP_DATA   3
10 c7f74643 bellard
#define TFTP_ACK    4
11 c7f74643 bellard
#define TFTP_ERROR  5
12 1f697db9 ths
#define TFTP_OACK   6
13 c7f74643 bellard
14 c7f74643 bellard
#define TFTP_FILENAME_MAX 512
15 c7f74643 bellard
16 c7f74643 bellard
struct tftp_t {
17 c7f74643 bellard
  struct ip ip;
18 c7f74643 bellard
  struct udphdr udp;
19 c7f74643 bellard
  u_int16_t tp_op;
20 c7f74643 bellard
  union {
21 5fafdf24 ths
    struct {
22 c7f74643 bellard
      u_int16_t tp_block_nr;
23 c7f74643 bellard
      u_int8_t tp_buf[512];
24 c7f74643 bellard
    } tp_data;
25 5fafdf24 ths
    struct {
26 c7f74643 bellard
      u_int16_t tp_error_code;
27 c7f74643 bellard
      u_int8_t tp_msg[512];
28 c7f74643 bellard
    } tp_error;
29 c7f74643 bellard
    u_int8_t tp_buf[512 + 2];
30 c7f74643 bellard
  } x;
31 c7f74643 bellard
};
32 c7f74643 bellard
33 c7f74643 bellard
void tftp_input(struct mbuf *m);