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; used 68 times

Defined macros

ACK defined in line 31; used 6 times
DATA defined in line 30; used 5 times
EACCESS defined in line 54; used 8 times
EBADID defined in line 57; used 2 times
EBADOP defined in line 56; used 4 times
EEXISTS defined in line 58; used 2 times
ENOSPACE defined in line 55; used 3 times
ENOTFOUND defined in line 53; used 3 times
ENOUSER defined in line 59; used 2 times
ERROR defined in line 32; used 7 times
EUNDEF defined in line 52; used 4 times
RRQ defined in line 28; used 6 times
WRQ defined in line 29; used 3 times
th_block defined in line 44; used 25 times
th_code defined in line 45; used 7 times
th_msg defined in line 47; used 6 times
th_stuff defined in line 46; used 3 times

Usage of this include

Last modified: 1988-09-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3794
Valid CSS Valid XHTML 1.0 Strict