1: /*
2: * Copyright (c) 1983 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)tftp.h 5.1 (Berkeley) 5/30/85
7: */
8:
9: /*
10: * Trivial File Transfer Protocol (IEN-133)
11: */
12: #define SEGSIZE 512 /* data segment size */
13:
14: /*
15: * Packet types.
16: */
17: #define RRQ 01 /* read request */
18: #define WRQ 02 /* write request */
19: #define DATA 03 /* data packet */
20: #define ACK 04 /* acknowledgement */
21: #define ERROR 05 /* error code */
22:
23: struct tftphdr {
24: short th_opcode; /* packet type */
25: union {
26: short tu_block; /* block # */
27: short tu_code; /* error code */
28: char tu_stuff[1]; /* request packet stuff */
29: } th_u;
30: char th_data[1]; /* data or error string */
31: };
32:
33: #define th_block th_u.tu_block
34: #define th_code th_u.tu_code
35: #define th_stuff th_u.tu_stuff
36: #define th_msg th_data
37:
38: /*
39: * Error codes.
40: */
41: #define EUNDEF 0 /* not defined */
42: #define ENOTFOUND 1 /* file not found */
43: #define EACCESS 2 /* access violation */
44: #define ENOSPACE 3 /* disk full or allocation exceeded */
45: #define EBADOP 4 /* illegal TFTP operation */
46: #define EBADID 5 /* unknown transfer ID */
47: #define EEXISTS 6 /* file already exists */
48: #define ENOUSER 7 /* no such user */
Defined struct's
tftphdr
defined in line
23; used 68 times
- in /usr/src/etc/tftpd/tftpd.c line
58(2),
141(2),
170(2),
273-279(6),
341-347(6),
434-439(4)
- in /usr/src/ucb/tftp/tftp.c line
63-64(4),
74(2),
164-165(4),
175(2),
265(2),
304-309(4),
329(2)
- in /usr/src/ucb/tftp/tftpsubs.c line
48-53(8),
63(2),
72(2),
84(2),
100(2),
107(2),
142(2),
150(2),
170(2),
178(2)
Defined macros
ACK
defined in line
20; used 6 times
DATA
defined in line
19; used 5 times
ERROR
defined in line
21; used 7 times
RRQ
defined in line
17; used 6 times
WRQ
defined in line
18; used 3 times
th_block
defined in line
33; used 25 times
- in /usr/src/etc/tftpd/tftpd.c line
287,
306(2),
312-317(2),
351,
369-378(4),
394,
403
- in /usr/src/ucb/tftp/tftp.c line
90,
120(2),
129,
140,
186,
219(2),
228,
238,
253,
353-357(2)
Usage of this include