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