1: /*
   2:  * Copyright (c) 1983 Regents of the University of California.
   3:  * All rights reserved.
   4:  *
   5:  * Redistribution and use in source and binary forms are permitted
   6:  * provided that the above copyright notice and this paragraph are
   7:  * duplicated in all such forms and that any documentation,
   8:  * advertising materials, and other materials related to such
   9:  * distribution and use acknowledge that the software was developed
  10:  * by the University of California, Berkeley.  The name of the
  11:  * University may not be used to endorse or promote products derived
  12:  * from this software without specific prior written permission.
  13:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  14:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  15:  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  16:  *
  17:  *	@(#)tftp.h	5.2 (Berkeley) 6/27/88
  18:  */
  19: 
  20: /*
  21:  * Trivial File Transfer Protocol (IEN-133)
  22:  */
  23: #define SEGSIZE     512     /* data segment size */
  24: 
  25: /*
  26:  * Packet types.
  27:  */
  28: #define RRQ 01          /* read request */
  29: #define WRQ 02          /* write request */
  30: #define DATA    03          /* data packet */
  31: #define ACK 04          /* acknowledgement */
  32: #define ERROR   05          /* error code */
  33: 
  34: struct  tftphdr {
  35:     short   th_opcode;      /* packet type */
  36:     union {
  37:         short   tu_block;   /* block # */
  38:         short   tu_code;    /* error code */
  39:         char    tu_stuff[1];    /* request packet stuff */
  40:     } th_u;
  41:     char    th_data[1];     /* data or error string */
  42: };
  43: 
  44: #define th_block    th_u.tu_block
  45: #define th_code     th_u.tu_code
  46: #define th_stuff    th_u.tu_stuff
  47: #define th_msg      th_data
  48: 
  49: /*
  50:  * Error codes.
  51:  */
  52: #define EUNDEF      0       /* not defined */
  53: #define ENOTFOUND   1       /* file not found */
  54: #define EACCESS     2       /* access violation */
  55: #define ENOSPACE    3       /* disk full or allocation exceeded */
  56: #define EBADOP      4       /* illegal TFTP operation */
  57: #define EBADID      5       /* unknown transfer ID */
  58: #define EEXISTS     6       /* file already exists */
  59: #define ENOUSER     7       /* no such user */

Defined struct's

tftphdr defined in line 34; never used

Defined macros

ACK defined in line 31; never used
DATA defined in line 30; never used
EACCESS defined in line 54; never used
EBADID defined in line 57; never used
EBADOP defined in line 56; never used
EEXISTS defined in line 58; never used
ENOSPACE defined in line 55; never used
ENOTFOUND defined in line 53; never used
ENOUSER defined in line 59; never used
ERROR defined in line 32; never used
EUNDEF defined in line 52; never used
RRQ defined in line 28; never used
SEGSIZE defined in line 23; never used
WRQ defined in line 29; never used
th_block defined in line 44; never used
th_code defined in line 45; never used
th_msg defined in line 47; never used
th_stuff defined in line 46; never used
Last modified: 1988-09-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1698
Valid CSS Valid XHTML 1.0 Strict