[NETFILTER]: Move ip6_masked_addrcmp to include/net/ipv6.h
[linux-2.6/verdex.git] / drivers / char / rio / pkt.h
blob7011e52e82db51e2a005ece5c9f0363ab59f2b8c
1 /****************************************************************************
2 ******* *******
3 ******* P A C K E T H E A D E R F I L E
4 ******* *******
5 ****************************************************************************
7 Author : Ian Nandhra / Jeremy Rolls
8 Date :
11 * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
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.
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.
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.
27 Version : 0.01
30 Mods
31 ----------------------------------------------------------------------------
32 Date By Description
33 ----------------------------------------------------------------------------
35 ***************************************************************************/
37 #ifndef _pkt_h
38 #define _pkt_h 1
41 #ifdef SCCS_LABELS
42 #ifndef lint
43 /* static char *_rio_pkt_h_sccs = "@(#)pkt.h 1.8"; */
44 #endif
45 #endif
47 #define MAX_TTL 0xf
48 #define PKT_CMD_BIT ((ushort) 0x080)
49 #define PKT_CMD_DATA ((ushort) 0x080)
51 #define PKT_ACK ((ushort) 0x040)
53 #define PKT_TGL ((ushort) 0x020)
55 #define PKT_LEN_MASK ((ushort) 0x07f)
57 #define DATA_WNDW ((ushort) 0x10)
58 #define PKT_TTL_MASK ((ushort) 0x0f)
60 #define PKT_MAX_DATA_LEN 72
62 #define PKT_LENGTH sizeof(struct PKT)
63 #define SYNC_PKT_LENGTH (PKT_LENGTH + 4)
65 #define CONTROL_PKT_LEN_MASK PKT_LEN_MASK
66 #define CONTROL_PKT_CMD_BIT PKT_CMD_BIT
67 #define CONTROL_PKT_ACK (PKT_ACK << 8)
68 #define CONTROL_PKT_TGL (PKT_TGL << 8)
69 #define CONTROL_PKT_TTL_MASK (PKT_TTL_MASK << 8)
70 #define CONTROL_DATA_WNDW (DATA_WNDW << 8)
72 struct PKT {
73 BYTE dest_unit; /* Destination Unit Id */
74 BYTE dest_port; /* Destination POrt */
75 BYTE src_unit; /* Source Unit Id */
76 BYTE src_port; /* Source POrt */
77 BYTE len;
78 BYTE control;
79 BYTE data[PKT_MAX_DATA_LEN];
80 /* Actual data :-) */
81 WORD csum; /* C-SUM */
83 #endif
85 /*********** end of file ***********/