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; never used

Defined macros

ACK defined in line 20; never used
DATA defined in line 19; never used
EACCESS defined in line 43; never used
EBADID defined in line 46; never used
EBADOP defined in line 45; never used
EEXISTS defined in line 47; never used
ENOSPACE defined in line 44; never used
ENOTFOUND defined in line 42; never used
ENOUSER defined in line 48; never used
ERROR defined in line 21; never used
EUNDEF defined in line 41; never used
RRQ defined in line 17; never used
SEGSIZE defined in line 12; never used
WRQ defined in line 18; never used
th_block defined in line 33; never used
th_code defined in line 34; never used
th_msg defined in line 36; never used
th_stuff defined in line 35; never used
Last modified: 1985-05-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 611
Valid CSS Valid XHTML 1.0 Strict