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

Defined macros

ACK defined in line 20; used 6 times
DATA defined in line 19; used 5 times
EACCESS defined in line 43; used 6 times
EBADID defined in line 46; used 2 times
EBADOP defined in line 45; used 4 times
EEXISTS defined in line 47; used 2 times
ENOSPACE defined in line 44; used 3 times
ENOTFOUND defined in line 42; used 3 times
ENOUSER defined in line 48; used 2 times
ERROR defined in line 21; used 7 times
EUNDEF defined in line 41; used 4 times
RRQ defined in line 17; used 6 times
SEGSIZE defined in line 12; used 9 times
WRQ defined in line 18; used 3 times
th_block defined in line 33; used 25 times
th_code defined in line 34; used 7 times
th_msg defined in line 36; used 6 times
th_stuff defined in line 35; used 3 times

Usage of this include

Last modified: 1985-06-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1415
Valid CSS Valid XHTML 1.0 Strict