• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  *******                                                              *******
3  *******            P A C K E T   H E A D E R   F I L E
4  *******                                                              *******
5  ****************************************************************************
6 
7  Author  : Ian Nandhra / Jeremy Rolls
8  Date    :
9 
10  *
11  *  (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
12  *
13  *      This program is free software; you can redistribute it and/or modify
14  *      it under the terms of the GNU General Public License as published by
15  *      the Free Software Foundation; either version 2 of the License, or
16  *      (at your option) any later version.
17  *
18  *      This program is distributed in the hope that it will be useful,
19  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
20  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  *      GNU General Public License for more details.
22  *
23  *      You should have received a copy of the GNU General Public License
24  *      along with this program; if not, write to the Free Software
25  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 
27  Version : 0.01
28 
29 
30                             Mods
31  ----------------------------------------------------------------------------
32   Date     By                Description
33  ----------------------------------------------------------------------------
34 
35  ***************************************************************************/
36 
37 #ifndef _pkt_h
38 #define _pkt_h 1
39 
40 #define PKT_CMD_BIT     ((ushort) 0x080)
41 #define PKT_CMD_DATA    ((ushort) 0x080)
42 
43 #define PKT_ACK         ((ushort) 0x040)
44 
45 #define PKT_TGL         ((ushort) 0x020)
46 
47 #define PKT_LEN_MASK    ((ushort) 0x07f)
48 
49 #define DATA_WNDW       ((ushort) 0x10)
50 #define PKT_TTL_MASK    ((ushort) 0x0f)
51 
52 #define PKT_MAX_DATA_LEN   72
53 
54 #define PKT_LENGTH         sizeof(struct PKT)
55 #define SYNC_PKT_LENGTH    (PKT_LENGTH + 4)
56 
57 #define CONTROL_PKT_LEN_MASK PKT_LEN_MASK
58 #define CONTROL_PKT_CMD_BIT  PKT_CMD_BIT
59 #define CONTROL_PKT_ACK (PKT_ACK << 8)
60 #define CONTROL_PKT_TGL (PKT_TGL << 8)
61 #define CONTROL_PKT_TTL_MASK (PKT_TTL_MASK << 8)
62 #define CONTROL_DATA_WNDW  (DATA_WNDW << 8)
63 
64 struct PKT {
65 	u8 dest_unit;		/* Destination Unit Id */
66 	u8 dest_port;		/* Destination POrt */
67 	u8 src_unit;		/* Source Unit Id */
68 	u8 src_port;		/* Source POrt */
69 	u8 len;
70 	u8 control;
71 	u8 data[PKT_MAX_DATA_LEN];
72 	/* Actual data :-) */
73 	u16 csum;		/* C-SUM */
74 };
75 #endif
76 
77 /*********** end of file ***********/
78