From Mark C. Brown:
[metze/wireshark/wip.git] / wiretap / nettl.h
1 /* nettl.h
2  *
3  * $Id$
4  *
5  * Wiretap Library
6  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
7  *
8  * Enhancements by Mark C. Brown <mbrown@hp.com>
9  * Copyright (C) 2003, 2005 Hewlett-Packard Development Company, L.P.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24  */
25
26 #ifndef __NETTL_H__
27 #define __NETTL_H__
28
29 /* nettl subsystems are defined in /etc/nettlgen.conf */
30
31 #define NETTL_SUBSYS_NS_LS_LOGGING      0
32 #define NETTL_SUBSYS_NS_LS_NFT          1
33 #define NETTL_SUBSYS_NS_LS_LOOPBACK     2
34 #define NETTL_SUBSYS_NS_LS_NI           3
35 #define NETTL_SUBSYS_NS_LS_IPC          4
36 #define NETTL_SUBSYS_NS_LS_SOCKREGD     5
37 #define NETTL_SUBSYS_NS_LS_TCP          6
38 #define NETTL_SUBSYS_NS_LS_PXP          7
39 #define NETTL_SUBSYS_NS_LS_UDP          8
40 #define NETTL_SUBSYS_NS_LS_IP           9
41 #define NETTL_SUBSYS_NS_LS_PROBE        10
42 #define NETTL_SUBSYS_NS_LS_DRIVER       11
43 #define NETTL_SUBSYS_NS_LS_RLBD         12
44 #define NETTL_SUBSYS_NS_LS_BUFS         13
45 #define NETTL_SUBSYS_NS_LS_CASE21       14
46 #define NETTL_SUBSYS_NS_LS_ROUTER21     15
47 #define NETTL_SUBSYS_NS_LS_NFS          16
48 #define NETTL_SUBSYS_NS_LS_NETISR       17
49 #define NETTL_SUBSYS_NS_LS_NSE          18
50 #define NETTL_SUBSYS_NS_LS_STRLOG       19
51 #define NETTL_SUBSYS_NS_LS_TIRDWR       21
52 #define NETTL_SUBSYS_NS_LS_TIMOD        22
53 #define NETTL_SUBSYS_NS_LS_ICMP         23
54 #define NETTL_SUBSYS_FILTER             26
55 #define NETTL_SUBSYS_NAME               27
56 #define NETTL_SUBSYS_IGMP               29
57 #define NETTL_SUBSYS_SX25L2             34
58 #define NETTL_SUBSYS_SX25L3             35
59 #define NETTL_SUBSYS_FTAM_INIT          64
60 #define NETTL_SUBSYS_FTAM_RESP          65
61 #define NETTL_SUBSYS_FTAM_VFS           70
62 #define NETTL_SUBSYS_FTAM_USER          72
63 #define NETTL_SUBSYS_OTS                90
64 #define NETTL_SUBSYS_NETWORK            91
65 #define NETTL_SUBSYS_TRANSPORT          92
66 #define NETTL_SUBSYS_SESSION            93
67 #define NETTL_SUBSYS_ACSE_PRES          94
68 #define NETTL_SUBSYS_SHM                116
69 #define NETTL_SUBSYS_ACSE_US            119
70 #define NETTL_SUBSYS_HPS                121
71 #define NETTL_SUBSYS_CM                 122
72 #define NETTL_SUBSYS_ULA_UTILS          123
73 #define NETTL_SUBSYS_EM                 124
74 #define NETTL_SUBSYS_HP_APAPORT         189
75 #define NETTL_SUBSYS_HP_APALACP         190
76 #define NETTL_SUBSYS_NS_LS_IPV6         244
77 #define NETTL_SUBSYS_NS_LS_ICMPV6       245
78 #define NETTL_SUBSYS_NS_LS_TELNET       267
79 #define NETTL_SUBSYS_NS_LS_SCTP         268
80
81 /* Ethernet cards */
82 #define NETTL_SUBSYS_100VG              37
83 #define NETTL_SUBSYS_LAN100             164
84 #define NETTL_SUBSYS_EISA100BT          172
85 #define NETTL_SUBSYS_BASE100            173
86 #define NETTL_SUBSYS_GSC100BT           178
87 #define NETTL_SUBSYS_PCI100BT           179
88 #define NETTL_SUBSYS_SPP100BT           180
89 #define NETTL_SUBSYS_GELAN              185
90 #define NETTL_SUBSYS_BTLAN              210
91 #define NETTL_SUBSYS_INTL100            233
92 #define NETTL_SUBSYS_IGELAN             252
93 #define NETTL_SUBSYS_IETHER             253
94 #define NETTL_SUBSYS_IXGBE              265
95 #define NETTL_SUBSYS_ICXGBE             271
96 #define NETTL_SUBSYS_IEXGBE             275
97
98 /* FDDI cards */
99 #define NETTL_SUBSYS_HPPB_FDDI          95
100 #define NETTL_SUBSYS_EISA_FDDI          174
101 #define NETTL_SUBSYS_PCI_FDDI           176
102 #define NETTL_SUBSYS_HSC_FDDI           177
103
104 /* Token Ring cards */
105 #define NETTL_SUBSYS_TOKEN              31
106 #define NETTL_SUBSYS_PCI_TR             187
107
108 /* Accelerated Virtual I/O (AVIO) drivers */
109 #define NETTL_SUBSYS_HSSN               269
110 #define NETTL_SUBSYS_IGSSN              270
111
112 /* from /usr/include/sys/subsys_id.h */
113
114 #define NETTL_HDR_HDRIN                 0x80000000
115 #define NETTL_HDR_HDROUT                0x40000000
116 #define NETTL_HDR_PDUIN                 0x20000000
117 #define NETTL_HDR_PDUOUT                0x10000000
118 #define NETTL_HDR_PROCEDURE_TRACE       0x08000000
119 #define NETTL_HDR_STATE_TRACE           0x04000000
120 #define NETTL_HDR_ERROR_TRACE           0x02000000
121 #define NETTL_HDR_LOG_TRACE             0x01000000
122 #define NETTL_HDR_LOOPBACK              0x00800000
123 #define NETTL_HDR_PTOP                  0x00400000
124 #define NETTL_HDR_SUBSYSTEM_BITS_MASK   0x000fffff
125
126 #define NETTL_HDR_PDU_MASK              0x30000000
127
128 int nettl_open(wtap *wth, int *err, gchar **err_info);
129 gboolean nettl_dump_open(wtap_dumper *wdh, gboolean cant_seek _U_, int *err);
130 int nettl_dump_can_write_encap(int encap);
131
132 #endif