Enable Lua tcp tap userdata.
[obnox/wireshark/wip.git] / epan / dissectors / packet-ipmi-transport.c
1 /* packet-ipmi-transport.c
2  * Sub-dissectors for IPMI messages (netFn=Transport)
3  * Copyright 2007-2008, Alexey Neyman, Pigeon Point Systems <avn@pigeonpoint.com>
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
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 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29
30 #ifdef HAVE_SYS_TYPES_H
31 #include <sys/types.h>
32 #endif
33
34 #include <epan/packet.h>
35
36 #include "packet-ipmi.h"
37
38 static gint ett_ipmi_trn_lan00_byte1 = -1;
39 static gint ett_ipmi_trn_lan01_byte1 = -1;
40 static gint ett_ipmi_trn_lan02_byte1 = -1;
41 static gint ett_ipmi_trn_lan02_byte2 = -1;
42 static gint ett_ipmi_trn_lan02_byte3 = -1;
43 static gint ett_ipmi_trn_lan02_byte4 = -1;
44 static gint ett_ipmi_trn_lan02_byte5 = -1;
45 static gint ett_ipmi_trn_lan04_byte1 = -1;
46 static gint ett_ipmi_trn_lan07_byte2 = -1;
47 static gint ett_ipmi_trn_lan07_byte3 = -1;
48 static gint ett_ipmi_trn_lan10_byte1 = -1;
49 static gint ett_ipmi_trn_lan17_byte1 = -1;
50 static gint ett_ipmi_trn_lan18_byte1 = -1;
51 static gint ett_ipmi_trn_lan18_byte2 = -1;
52 static gint ett_ipmi_trn_lan18_byte4 = -1;
53 static gint ett_ipmi_trn_lan19_byte1 = -1;
54 static gint ett_ipmi_trn_lan19_byte2 = -1;
55 static gint ett_ipmi_trn_lan19_byte3 = -1;
56 static gint ett_ipmi_trn_lan20_byte12 = -1;
57 static gint ett_ipmi_trn_lan21_byte1 = -1;
58 static gint ett_ipmi_trn_lan22_byte1 = -1;
59 static gint ett_ipmi_trn_lan24_byte1 = -1;
60 static gint ett_ipmi_trn_lan24_byte2 = -1;
61 static gint ett_ipmi_trn_lan24_byte3 = -1;
62 static gint ett_ipmi_trn_lan24_byte4 = -1;
63 static gint ett_ipmi_trn_lan24_byte5 = -1;
64 static gint ett_ipmi_trn_lan24_byte6 = -1;
65 static gint ett_ipmi_trn_lan24_byte7 = -1;
66 static gint ett_ipmi_trn_lan24_byte8 = -1;
67 static gint ett_ipmi_trn_lan25_byte1 = -1;
68 static gint ett_ipmi_trn_lan25_byte2 = -1;
69 static gint ett_ipmi_trn_lan25_byte34 = -1;
70 static gint ett_ipmi_trn_serial03_byte1 = -1;
71 static gint ett_ipmi_trn_serial04_byte1 = -1;
72 static gint ett_ipmi_trn_serial05_byte1 = -1;
73 static gint ett_ipmi_trn_serial05_byte2 = -1;
74 static gint ett_ipmi_trn_serial06_byte1 = -1;
75 static gint ett_ipmi_trn_serial07_byte1 = -1;
76 static gint ett_ipmi_trn_serial07_byte2 = -1;
77 static gint ett_ipmi_trn_serial08_byte1 = -1;
78 static gint ett_ipmi_trn_serial08_byte2 = -1;
79 static gint ett_ipmi_trn_serial09_byte1 = -1;
80 static gint ett_ipmi_trn_serial09_byte2 = -1;
81 static gint ett_ipmi_trn_serial16_byte1 = -1;
82 static gint ett_ipmi_trn_serial17_byte1 = -1;
83 static gint ett_ipmi_trn_serial17_byte2 = -1;
84 static gint ett_ipmi_trn_serial17_byte4 = -1;
85 static gint ett_ipmi_trn_serial17_byte5 = -1;
86 static gint ett_ipmi_trn_serial19_byte1 = -1;
87 static gint ett_ipmi_trn_serial19_byte2 = -1;
88 static gint ett_ipmi_trn_serial19_byte3 = -1;
89 static gint ett_ipmi_trn_serial20_byte1 = -1;
90 static gint ett_ipmi_trn_serial21_byte1 = -1;
91 static gint ett_ipmi_trn_serial22_byte1 = -1;
92 static gint ett_ipmi_trn_serial23_byte1 = -1;
93 static gint ett_ipmi_trn_serial24_byte1 = -1;
94 static gint ett_ipmi_trn_serial25_byte2 = -1;
95 static gint ett_ipmi_trn_serial28_byte1 = -1;
96 static gint ett_ipmi_trn_serial28_byte2 = -1;
97 static gint ett_ipmi_trn_serial28_byte10 = -1;
98 static gint ett_ipmi_trn_serial28_byte11 = -1;
99 static gint ett_ipmi_trn_serial28_byte12 = -1;
100 static gint ett_ipmi_trn_serial28_byte13 = -1;
101 static gint ett_ipmi_trn_serial28_byte14 = -1;
102 static gint ett_ipmi_trn_serial29_byte1 = -1;
103 static gint ett_ipmi_trn_serial29_byte2 = -1;
104 static gint ett_ipmi_trn_serial30_byte1 = -1;
105 static gint ett_ipmi_trn_serial30_byte2 = -1;
106 static gint ett_ipmi_trn_serial30_byte3 = -1;
107 static gint ett_ipmi_trn_serial33_byte1 = -1;
108 static gint ett_ipmi_trn_serial37_byte1 = -1;
109 static gint ett_ipmi_trn_serial43_byte1 = -1;
110 static gint ett_ipmi_trn_serial50_byte1 = -1;
111 static gint ett_ipmi_trn_serial51_byte2 = -1;
112 static gint ett_ipmi_trn_serial51_byte3 = -1;
113 static gint ett_ipmi_trn_01_byte1 = -1;
114 static gint ett_ipmi_trn_02_byte1 = -1;
115 static gint ett_ipmi_trn_02_rev = -1;
116 static gint ett_ipmi_trn_03_rq_byte1 = -1;
117 static gint ett_ipmi_trn_03_rq_byte2 = -1;
118 static gint ett_ipmi_trn_03_rs_byte1 = -1;
119 static gint ett_ipmi_trn_04_byte1 = -1;
120 static gint ett_ipmi_trn_04_byte2 = -1;
121 static gint ett_ipmi_trn_10_byte1 = -1;
122 static gint ett_ipmi_trn_11_byte1 = -1;
123 static gint ett_ipmi_trn_11_rev = -1;
124 static gint ett_ipmi_trn_12_rq_byte1 = -1;
125 static gint ett_ipmi_trn_12_rq_byte2 = -1;
126 static gint ett_ipmi_trn_12_rs_byte1 = -1;
127 static gint ett_ipmi_trn_13_byte1 = -1;
128 static gint ett_ipmi_trn_14_byte1 = -1;
129 static gint ett_ipmi_trn_15_byte1 = -1;
130 static gint ett_ipmi_trn_16_byte1 = -1;
131 static gint ett_ipmi_trn_17_byte1 = -1;
132 static gint ett_ipmi_trn_17_byte2 = -1;
133 static gint ett_ipmi_trn_18_byte1 = -1;
134 static gint ett_ipmi_trn_19_byte1 = -1;
135 static gint ett_ipmi_trn_19_byte2 = -1;
136 static gint ett_ipmi_trn_XX_usercap = -1;
137 static gint ett_ipmi_trn_XX_cbcp = -1;
138 static gint ett_ipmi_trn_1a_byte1 = -1;
139 static gint ett_ipmi_trn_1a_byte2 = -1;
140 static gint ett_ipmi_trn_1b_byte1 = -1;
141 static gint ett_ipmi_trn_1b_byte2 = -1;
142
143 static gint hf_ipmi_trn_lan00_sip = -1;
144
145 static gint hf_ipmi_trn_lanXX_oem = -1;
146 static gint hf_ipmi_trn_lanXX_passwd = -1;
147 static gint hf_ipmi_trn_lanXX_md5 = -1;
148 static gint hf_ipmi_trn_lanXX_md2 = -1;
149 static gint hf_ipmi_trn_lanXX_none = -1;
150
151 static gint hf_ipmi_trn_lan03_ip = -1;
152
153 static gint hf_ipmi_trn_lan04_ipsrc = -1;
154
155 static gint hf_ipmi_trn_lan05_ether = -1;
156
157 static gint hf_ipmi_trn_lan06_subnet = -1;
158
159 static gint hf_ipmi_trn_lan07_ttl = -1;
160 static gint hf_ipmi_trn_lan07_flags = -1;
161 static gint hf_ipmi_trn_lan07_precedence = -1;
162 static gint hf_ipmi_trn_lan07_tos = -1;
163
164 static gint hf_ipmi_trn_lan08_rmcp_port = -1;
165
166 static gint hf_ipmi_trn_lan09_rmcp_port = -1;
167
168 static gint hf_ipmi_trn_lan10_responses = -1;
169 static gint hf_ipmi_trn_lan10_gratuitous = -1;
170
171 static gint hf_ipmi_trn_lan11_arp_interval = -1;
172
173 static gint hf_ipmi_trn_lan12_def_gw_ip = -1;
174
175 static gint hf_ipmi_trn_lan13_def_gw_mac = -1;
176
177 static gint hf_ipmi_trn_lan14_bkp_gw_ip = -1;
178
179 static gint hf_ipmi_trn_lan15_bkp_gw_mac = -1;
180
181 static gint hf_ipmi_trn_lan16_comm_string = -1;
182
183 static gint hf_ipmi_trn_lan17_num_dst = -1;
184
185 static gint hf_ipmi_trn_lan18_dst_selector = -1;
186 static gint hf_ipmi_trn_lan18_ack = -1;
187 static gint hf_ipmi_trn_lan18_dst_type = -1;
188 static gint hf_ipmi_trn_lan18_tout = -1;
189 static gint hf_ipmi_trn_lan18_retries = -1;
190
191 static gint hf_ipmi_trn_lan19_dst_selector = -1;
192 static gint hf_ipmi_trn_lan19_addr_format = -1;
193 static gint hf_ipmi_trn_lan19_address = -1;
194 static gint hf_ipmi_trn_lan19_gw_sel = -1;
195 static gint hf_ipmi_trn_lan19_ip = -1;
196 static gint hf_ipmi_trn_lan19_mac = -1;
197
198 static gint hf_ipmi_trn_lan20_vlan_id_enable = -1;
199 static gint hf_ipmi_trn_lan20_vlan_id = -1;
200
201 static gint hf_ipmi_trn_lan21_vlan_prio = -1;
202
203 static gint hf_ipmi_trn_lan22_num_cs_entries = -1;
204
205 static gint hf_ipmi_trn_lan23_cs_entry = -1;
206
207 static gint hf_ipmi_trn_lan24_priv = -1;
208
209 static gint hf_ipmi_trn_lan25_dst_selector = -1;
210 static gint hf_ipmi_trn_lan25_addr_format = -1;
211 static gint hf_ipmi_trn_lan25_address = -1;
212 static gint hf_ipmi_trn_lan25_uprio = -1;
213 static gint hf_ipmi_trn_lan25_cfi = -1;
214 static gint hf_ipmi_trn_lan25_vlan_id = -1;
215
216 static gint hf_ipmi_trn_serial03_connmode = -1;
217 static gint hf_ipmi_trn_serial03_terminal = -1;
218 static gint hf_ipmi_trn_serial03_ppp = -1;
219 static gint hf_ipmi_trn_serial03_basic = -1;
220
221 static gint hf_ipmi_trn_serial04_timeout = -1;
222
223 static gint hf_ipmi_trn_serial05_cbcp_callback = -1;
224 static gint hf_ipmi_trn_serial05_ipmi_callback = -1;
225 static gint hf_ipmi_trn_serial05_cb_list = -1;
226 static gint hf_ipmi_trn_serial05_cb_user = -1;
227 static gint hf_ipmi_trn_serial05_cb_prespec = -1;
228 static gint hf_ipmi_trn_serial05_no_cb = -1;
229 static gint hf_ipmi_trn_serial05_cb_dest1 = -1;
230 static gint hf_ipmi_trn_serial05_cb_dest2 = -1;
231 static gint hf_ipmi_trn_serial05_cb_dest3 = -1;
232
233 static gint hf_ipmi_trn_serial06_inactivity = -1;
234 static gint hf_ipmi_trn_serial06_dcd = -1;
235
236 static gint hf_ipmi_trn_serial07_flowctl = -1;
237 static gint hf_ipmi_trn_serial07_dtrhangup = -1;
238 static gint hf_ipmi_trn_serial07_bitrate = -1;
239
240 static gint hf_ipmi_trn_serial08_esc_powerup = -1;
241 static gint hf_ipmi_trn_serial08_esc_reset = -1;
242 static gint hf_ipmi_trn_serial08_switch_authcap = -1;
243 static gint hf_ipmi_trn_serial08_switch_rmcp = -1;
244 static gint hf_ipmi_trn_serial08_esc_switch1 = -1;
245 static gint hf_ipmi_trn_serial08_esc_switch2 = -1;
246 static gint hf_ipmi_trn_serial08_switch_dcdloss = -1;
247 static gint hf_ipmi_trn_serial08_sharing = -1;
248 static gint hf_ipmi_trn_serial08_ping_callback = -1;
249 static gint hf_ipmi_trn_serial08_ping_direct = -1;
250 static gint hf_ipmi_trn_serial08_ping_retry = -1;
251
252 static gint hf_ipmi_trn_serial09_ring_duration = -1;
253 static gint hf_ipmi_trn_serial09_ring_dead = -1;
254
255 static gint hf_ipmi_trn_serial10_set_sel = -1;
256 static gint hf_ipmi_trn_serial10_init_str = -1;
257 static gint hf_ipmi_trn_serial11_esc_seq = -1;
258 static gint hf_ipmi_trn_serial12_hangup_seq = -1;
259 static gint hf_ipmi_trn_serial13_dial_cmd = -1;
260 static gint hf_ipmi_trn_serial14_page_blackout = -1;
261 static gint hf_ipmi_trn_serial15_comm_string = -1;
262
263 static gint hf_ipmi_trn_serial16_ndest = -1;
264
265 static gint hf_ipmi_trn_serial17_dest_sel = -1;
266 static gint hf_ipmi_trn_serial17_ack = -1;
267 static gint hf_ipmi_trn_serial17_dest_type = -1;
268 static gint hf_ipmi_trn_serial17_ack_timeout = -1;
269 static gint hf_ipmi_trn_serial17_alert_retries = -1;
270 static gint hf_ipmi_trn_serial17_call_retries = -1;
271 static gint hf_ipmi_trn_serial17_alert_ack_timeout = -1;
272 static gint hf_ipmi_trn_serial17_dialstr_sel = -1;
273 static gint hf_ipmi_trn_serial17_tap_sel = -1;
274 static gint hf_ipmi_trn_serial17_ipaddr_sel = -1;
275 static gint hf_ipmi_trn_serial17_ppp_sel = -1;
276 static gint hf_ipmi_trn_serial17_unknown = -1;
277
278 static gint hf_ipmi_trn_serial18_call_retry = -1;
279
280 static gint hf_ipmi_trn_serial19_destsel = -1;
281 static gint hf_ipmi_trn_serial19_flowctl = -1;
282 static gint hf_ipmi_trn_serial19_dtrhangup = -1;
283 static gint hf_ipmi_trn_serial19_stopbits = -1;
284 static gint hf_ipmi_trn_serial19_charsize = -1;
285 static gint hf_ipmi_trn_serial19_parity = -1;
286 static gint hf_ipmi_trn_serial19_bitrate = -1;
287
288 static gint hf_ipmi_trn_serial20_num_dial_strings = -1;
289 static gint hf_ipmi_trn_serial21_dialsel = -1;
290 static gint hf_ipmi_trn_serial21_blockno = -1;
291 static gint hf_ipmi_trn_serial21_dialstr = -1;
292 static gint hf_ipmi_trn_serial22_num_ipaddrs = -1;
293 static gint hf_ipmi_trn_serial23_destsel = -1;
294 static gint hf_ipmi_trn_serial23_ipaddr = -1;
295 static gint hf_ipmi_trn_serial24_num_tap_accounts = -1;
296 static gint hf_ipmi_trn_serial25_tap_acct = -1;
297 static gint hf_ipmi_trn_serial25_dialstr_sel = -1;
298 static gint hf_ipmi_trn_serial25_tapsrv_sel = -1;
299 static gint hf_ipmi_trn_serial26_tap_acct = -1;
300 static gint hf_ipmi_trn_serial26_tap_passwd = -1;
301 static gint hf_ipmi_trn_serial27_tap_acct = -1;
302 static gint hf_ipmi_trn_serial27_tap_pager_id = -1;
303
304 static gint hf_ipmi_trn_serial28_tapsrv_sel = -1;
305 static gint hf_ipmi_trn_serial28_confirm = -1;
306 static gint hf_ipmi_trn_serial28_srvtype = -1;
307 static gint hf_ipmi_trn_serial28_ctrl_esc = -1;
308 static gint hf_ipmi_trn_serial28_t2 = -1;
309 static gint hf_ipmi_trn_serial28_t1 = -1;
310 static gint hf_ipmi_trn_serial28_t4 = -1;
311 static gint hf_ipmi_trn_serial28_t3 = -1;
312 static gint hf_ipmi_trn_serial28_t6 = -1;
313 static gint hf_ipmi_trn_serial28_t5 = -1;
314 static gint hf_ipmi_trn_serial28_n2 = -1;
315 static gint hf_ipmi_trn_serial28_n1 = -1;
316 static gint hf_ipmi_trn_serial28_n4 = -1;
317 static gint hf_ipmi_trn_serial28_n3 = -1;
318
319 static gint hf_ipmi_trn_serial29_op = -1;
320 static gint hf_ipmi_trn_serial29_lineedit = -1;
321 static gint hf_ipmi_trn_serial29_deletectl = -1;
322 static gint hf_ipmi_trn_serial29_echo = -1;
323 static gint hf_ipmi_trn_serial29_handshake = -1;
324 static gint hf_ipmi_trn_serial29_o_newline = -1;
325 static gint hf_ipmi_trn_serial29_i_newline = -1;
326 static gint hf_ipmi_trn_serial30_snooping = -1;
327 static gint hf_ipmi_trn_serial30_snoopctl = -1;
328 static gint hf_ipmi_trn_serial30_negot_ctl = -1;
329 static gint hf_ipmi_trn_serial30_use_xmit_accm = -1;
330 static gint hf_ipmi_trn_serial30_xmit_addr_comp = -1;
331 static gint hf_ipmi_trn_serial30_xmit_proto_comp = -1;
332 static gint hf_ipmi_trn_serial30_ipaddr = -1;
333 static gint hf_ipmi_trn_serial30_accm = -1;
334 static gint hf_ipmi_trn_serial30_addr_comp = -1;
335 static gint hf_ipmi_trn_serial30_proto_comp = -1;
336 static gint hf_ipmi_trn_serial31_port = -1;
337 static gint hf_ipmi_trn_serial32_port = -1;
338 static gint hf_ipmi_trn_serial33_auth_proto = -1;
339 static gint hf_ipmi_trn_serial34_chap_name = -1;
340
341 static gint hf_ipmi_trn_serial35_recv_accm = -1;
342 static gint hf_ipmi_trn_serial35_xmit_accm = -1;
343 static gint hf_ipmi_trn_serial36_snoop_accm = -1;
344 static gint hf_ipmi_trn_serial37_num_ppp = -1;
345 static gint hf_ipmi_trn_serial38_acct_sel = -1;
346 static gint hf_ipmi_trn_serial38_dialstr_sel = -1;
347 static gint hf_ipmi_trn_serial39_acct_sel = -1;
348 static gint hf_ipmi_trn_serial39_ipaddr = -1;
349 static gint hf_ipmi_trn_serial40_acct_sel = -1;
350 static gint hf_ipmi_trn_serial40_username = -1;
351 static gint hf_ipmi_trn_serial41_acct_sel = -1;
352 static gint hf_ipmi_trn_serial41_userdomain = -1;
353 static gint hf_ipmi_trn_serial42_acct_sel = -1;
354 static gint hf_ipmi_trn_serial42_userpass = -1;
355 static gint hf_ipmi_trn_serial43_acct_sel = -1;
356 static gint hf_ipmi_trn_serial43_auth_proto = -1;
357 static gint hf_ipmi_trn_serial44_acct_sel = -1;
358 static gint hf_ipmi_trn_serial44_hold_time = -1;
359
360 static gint hf_ipmi_trn_serial45_src_ipaddr = -1;
361 static gint hf_ipmi_trn_serial45_dst_ipaddr = -1;
362 static gint hf_ipmi_trn_serial46_tx_bufsize = -1;
363 static gint hf_ipmi_trn_serial47_rx_bufsize = -1;
364 static gint hf_ipmi_trn_serial48_ipaddr = -1;
365 static gint hf_ipmi_trn_serial49_blockno = -1;
366 static gint hf_ipmi_trn_serial49_dialstr = -1;
367 static gint hf_ipmi_trn_serial50_115200 = -1;
368 static gint hf_ipmi_trn_serial50_57600 = -1;
369 static gint hf_ipmi_trn_serial50_38400 = -1;
370 static gint hf_ipmi_trn_serial50_19200 = -1;
371 static gint hf_ipmi_trn_serial50_9600 = -1;
372
373 static gint hf_ipmi_trn_serial51_port_assoc_sel = -1;
374 static gint hf_ipmi_trn_serial51_ipmi_channel = -1;
375 static gint hf_ipmi_trn_serial51_conn_num = -1;
376 static gint hf_ipmi_trn_serial51_ipmi_sharing = -1;
377 static gint hf_ipmi_trn_serial51_ipmi_sol = -1;
378 static gint hf_ipmi_trn_serial51_chan_num = -1;
379 static gint hf_ipmi_trn_serial52_port_assoc_sel = -1;
380 static gint hf_ipmi_trn_serial52_conn_name = -1;
381 static gint hf_ipmi_trn_serial53_port_assoc_sel = -1;
382 static gint hf_ipmi_trn_serial53_chan_name = -1;
383
384 static gint hf_ipmi_trn_01_chan = -1;
385 static gint hf_ipmi_trn_01_param = -1;
386 static gint hf_ipmi_trn_01_param_data = -1;
387
388 static gint hf_ipmi_trn_02_getrev = -1;
389 static gint hf_ipmi_trn_02_chan = -1;
390 static gint hf_ipmi_trn_02_param = -1;
391 static gint hf_ipmi_trn_02_set = -1;
392 static gint hf_ipmi_trn_02_block = -1;
393 static gint hf_ipmi_trn_02_rev_present = -1;
394 static gint hf_ipmi_trn_02_rev_compat = -1;
395 static gint hf_ipmi_trn_02_param_data = -1;
396
397 static gint hf_ipmi_trn_03_chan = -1;
398 static gint hf_ipmi_trn_03_arp_resp = -1;
399 static gint hf_ipmi_trn_03_gratuitous_arp = -1;
400 static gint hf_ipmi_trn_03_status_arp_resp = -1;
401 static gint hf_ipmi_trn_03_status_gratuitous_arp = -1;
402
403 static gint hf_ipmi_trn_04_chan = -1;
404 static gint hf_ipmi_trn_04_clear = -1;
405 static gint hf_ipmi_trn_04_rx_ippkts = -1;
406 static gint hf_ipmi_trn_04_rx_iphdr_err = -1;
407 static gint hf_ipmi_trn_04_rx_ipaddr_err = -1;
408 static gint hf_ipmi_trn_04_rx_ippkts_frag = -1;
409 static gint hf_ipmi_trn_04_tx_ippkts = -1;
410 static gint hf_ipmi_trn_04_rx_udppkts = -1;
411 static gint hf_ipmi_trn_04_rx_validrmcp = -1;
412 static gint hf_ipmi_trn_04_rx_udpproxy = -1;
413 static gint hf_ipmi_trn_04_dr_udpproxy = -1;
414
415 static gint hf_ipmi_trn_10_chan = -1;
416 static gint hf_ipmi_trn_10_param = -1;
417 static gint hf_ipmi_trn_10_param_data = -1;
418
419 static gint hf_ipmi_trn_11_getrev = -1;
420 static gint hf_ipmi_trn_11_chan = -1;
421 static gint hf_ipmi_trn_11_param = -1;
422 static gint hf_ipmi_trn_11_set = -1;
423 static gint hf_ipmi_trn_11_block = -1;
424 static gint hf_ipmi_trn_11_rev_present = -1;
425 static gint hf_ipmi_trn_11_rev_compat = -1;
426 static gint hf_ipmi_trn_11_param_data = -1;
427
428 static gint hf_ipmi_trn_12_chan = -1;
429 static gint hf_ipmi_trn_12_mux_setting = -1;
430 static gint hf_ipmi_trn_12_sw_to_sys = -1;
431 static gint hf_ipmi_trn_12_sw_to_bmc = -1;
432 static gint hf_ipmi_trn_12_alert = -1;
433 static gint hf_ipmi_trn_12_msg = -1;
434 static gint hf_ipmi_trn_12_req = -1;
435 static gint hf_ipmi_trn_12_mux_state = -1;
436
437 static gint hf_ipmi_trn_13_chan = -1;
438 static gint hf_ipmi_trn_13_code1 = -1;
439 static gint hf_ipmi_trn_13_code2 = -1;
440 static gint hf_ipmi_trn_13_code3 = -1;
441 static gint hf_ipmi_trn_13_code4 = -1;
442 static gint hf_ipmi_trn_13_code5 = -1;
443
444 static gint hf_ipmi_trn_14_chan = -1;
445 static gint hf_ipmi_trn_14_block = -1;
446 static gint hf_ipmi_trn_14_data = -1;
447
448 static gint hf_ipmi_trn_15_chan = -1;
449 static gint hf_ipmi_trn_15_block = -1;
450 static gint hf_ipmi_trn_15_data = -1;
451
452 static gint hf_ipmi_trn_16_chan = -1;
453 static gint hf_ipmi_trn_16_src_port = -1;
454 static gint hf_ipmi_trn_16_dst_port = -1;
455 static gint hf_ipmi_trn_16_src_addr = -1;
456 static gint hf_ipmi_trn_16_dst_addr = -1;
457 static gint hf_ipmi_trn_16_bytes = -1;
458
459 static gint hf_ipmi_trn_17_chan = -1;
460 static gint hf_ipmi_trn_17_clear = -1;
461 static gint hf_ipmi_trn_17_block_num = -1;
462 static gint hf_ipmi_trn_17_size = -1;
463 static gint hf_ipmi_trn_17_data = -1;
464
465 static gint hf_ipmi_trn_18_state = -1;
466 static gint hf_ipmi_trn_18_ipmi_ver = -1;
467
468 static gint hf_ipmi_trn_19_chan = -1;
469 static gint hf_ipmi_trn_19_dest_sel = -1;
470
471 static gint hf_ipmi_trn_XX_cap_cbcp = -1;
472 static gint hf_ipmi_trn_XX_cap_ipmi = -1;
473 static gint hf_ipmi_trn_XX_cbcp_from_list = -1;
474 static gint hf_ipmi_trn_XX_cbcp_user = -1;
475 static gint hf_ipmi_trn_XX_cbcp_prespec = -1;
476 static gint hf_ipmi_trn_XX_cbcp_nocb = -1;
477 static gint hf_ipmi_trn_XX_dst1 = -1;
478 static gint hf_ipmi_trn_XX_dst2 = -1;
479 static gint hf_ipmi_trn_XX_dst3 = -1;
480
481 static gint hf_ipmi_trn_1a_user = -1;
482 static gint hf_ipmi_trn_1a_chan = -1;
483
484 static gint hf_ipmi_trn_1b_user = -1;
485 static gint hf_ipmi_trn_1b_chan = -1;
486
487 static const value_string lan00_sip_vals[] = {
488         { 0x00, "Set complete" },
489         { 0x01, "Set in progress" },
490         { 0x02, "Commit write" },
491         { 0x03, "Reserved" },
492         { 0, NULL }
493 };
494
495 static const value_string lan04_ipsrc_vals[] = {
496         { 0x00, "Unspecified" },
497         { 0x01, "Static address (manually configured)" },
498         { 0x02, "Address obtained by BMC running DHCP" },
499         { 0x03, "Address loaded by BIOS or system software" },
500         { 0x04, "Address obtained by BMC running other address assignment protocol" },
501         { 0, NULL }
502 };
503
504 static const struct true_false_string lan18_ack_tfs = {
505         "Acknowledged", "Unacknowledged"
506 };
507
508 static const value_string lan18_dst_type_vals[] = {
509         { 0x00, "PET Trap destination" },
510         { 0x06, "OEM 1" },
511         { 0x07, "OEM 2" },
512         { 0, NULL }
513 };
514
515 static const value_string lan19_af_vals[] = {
516         { 0x00, "IPv4 Address followed by Ethernet/802.3 MAC Address" },
517         { 0, NULL }
518 };
519
520 static const struct true_false_string lan19_gw_sel_tfs = {
521         "Use backup gateway", "Use default gateway"
522 };
523
524 static const struct true_false_string lan20_enable_tfs = {
525         "Enabled", "Disabled"
526 };
527
528 static const value_string lan24_priv_vals[] = {
529         { 0x00, "Unspecified" },
530         { 0x01, "Callback" },
531         { 0x02, "User" },
532         { 0x03, "Operator" },
533         { 0x04, "Administrator" },
534         { 0x05, "OEM" },
535         { 0, NULL }
536 };
537
538 static const value_string lan25_af_vals[] = {
539         { 0x00, "VLAN ID not used" },
540         { 0x01, "802.1q VLAN TAG" },
541         { 0, NULL }
542 };
543
544 static const value_string serialXX_flowctl_vals[] = {
545         { 0x00, "No flow control" },
546         { 0x01, "RTS/CTS flow control" },
547         { 0x02, "XON/XOFF flow control" },
548         { 0x03, "Reserved" },
549         { 0, NULL }
550 };
551
552 static const value_string serialXX_bitrate_vals[] = {
553         { 0x06, "9600 bps" },
554         { 0x07, "19.2 kbps" },
555         { 0x08, "38.4 kbps" },
556         { 0x09, "57.6 kbps" },
557         { 0x0A, "115.2 kbps" },
558         { 0, NULL }
559 };
560
561 static const struct true_false_string serial03_connmode_tfs = {
562         "Direct Connect", "Modem Connect"
563 };
564
565 static const value_string serial17_dest_type_vals[] = {
566         { 0x00, "Dial Page" },
567         { 0x01, "TAP Page" },
568         { 0x02, "PPP Alert" },
569         { 0x03, "Basic Mode Callback" },
570         { 0x04, "PPP Mode Callback" },
571         { 0x0e, "OEM 1" },
572         { 0x0f, "OEM 2" },
573         { 0, NULL }
574 };
575
576 static const struct true_false_string serial19_stopbits_tfs = {
577         "2 stop bits", "1 stop bit"
578 };
579
580 static const struct true_false_string serial19_charsize_tfs = {
581         "7-bit", "8-bit"
582 };
583
584 static const value_string serial19_parity_vals[] = {
585         { 0x00, "No" },
586         { 0x01, "Odd" },
587         { 0x02, "Even" },
588         { 0, NULL }
589 };
590
591 static const value_string serial28_confirm_vals[] = {
592         { 0x00, "ACK received after end-of-transaction only" },
593         { 0x01, "Code 211 and ACK received after ETX" },
594         { 0x02, "Code 211 or 213, and ACK received after ETX" },
595         { 0, NULL }
596 };
597
598 static const value_string serial29_op_vals[] = {
599         { 0x00, "Set volatile settings" },
600         { 0x01, "Set non-volatile settings" },
601         { 0x02, "Restore default" },
602         { 0, NULL }
603 };
604
605 static const value_string serial29_delete_vals[] = {
606         { 0x00, "<del>" },
607         { 0x01, "<bksp><sp><bksp>" },
608         { 0, NULL }
609 };
610
611 static const value_string serial29_o_nl_vals[] = {
612         { 0x00, "None" },
613         { 0x01, "<CR><LF>" },
614         { 0x02, "<NUL>" },
615         { 0x03, "<CR>" },
616         { 0x04, "<LF><CR>" },
617         { 0x05, "<LF>" },
618         { 0, NULL }
619 };
620
621 static const value_string serial29_i_nl_vals[] = {
622         { 0x01, "<CR>" },
623         { 0x02, "<NUL>" },
624         { 0, NULL }
625 };
626
627 static const value_string serial30_snoopctl_vals[] = {
628         { 0x00, "BMC uses Transmit ACCM" },
629         { 0x01, "BMC uses Snoop ACCM" },
630         { 0, NULL }
631 };
632
633 static const value_string serial30_negoctl_vals[] = { 
634         { 0x00, "On initial connection and mux switch" },
635         { 0x01, "On initial connection" },
636         { 0x02, "Never" },
637         { 0, NULL }
638 };
639
640 static const struct true_false_string serial30_filter_tfs = {
641         "Using Transmit ACCM", "Assuming all control chars escaped"
642 };
643
644 static const value_string serial30_ipaddr_val[] = {
645         { 0x00, "Request IP Address" },
646         { 0x01, "Request Fixed IP Address" },
647         { 0x02, "No Negotiation" },
648         { 0, NULL }
649 };
650
651 static const value_string serialXX_proto_vals[] = {
652         { 0x00, "None" },
653         { 0x01, "CHAP" },
654         { 0x02, "PAP" },
655         { 0x03, "MS-CHAP v1, Windows NT" },
656         { 0x04, "MS-CHAP v1, Lan Manager" },
657         { 0x05, "MS-CHAP v2" },
658         { 0, NULL }
659 };
660
661 static const struct true_false_string tfs_03_suspend = {
662         "Suspend", "Do not suspend"
663 };
664
665 static const struct true_false_string tfs_03_arp_status = {
666         "Occurring", "Suspended"
667 };
668
669 static const struct true_false_string tfs_04_clear = {
670         "Clear", "Do not clear"
671 };
672
673 static const value_string vals_12_mux[] = {
674         { 0x00, "Get present status" },
675         { 0x01, "Request switch to system" },
676         { 0x02, "Request switch to BMC" },
677         { 0x03, "Force switch to system" },
678         { 0x04, "Force switch to BMC" },
679         { 0x05, "Block requests to switch to system" },
680         { 0x06, "Allow requests to switch to system" },
681         { 0x07, "Block requests to switch to BMC" },
682         { 0x08, "Allow requests to switch to BMC" },
683         { 0, NULL }
684 };
685
686 static const struct true_false_string tfs_12_blocked = {
687         "blocked", "allowed"
688 };
689
690 static const struct true_false_string tfs_12_req = {
691         "accepted/forced", "rejected"
692 };
693
694 static const struct true_false_string tfs_12_mux_state = {
695         "BMC", "system"
696 };
697
698 static const value_string vals_18_state[] = {
699         { 0x00, "No session active" },
700         { 0x01, "Session active (mux switched to BMC)" },
701         { 0x02, "Switching mux to system" },
702         { 0, NULL }
703 };
704
705 static const int *lanXX_authtypes_byte[] = { &hf_ipmi_trn_lanXX_oem, &hf_ipmi_trn_lanXX_passwd, &hf_ipmi_trn_lanXX_md5,
706                 &hf_ipmi_trn_lanXX_md2, &hf_ipmi_trn_lanXX_none, NULL };
707
708 static void
709 lan_serial_00(tvbuff_t *tvb, proto_tree *tree)
710 {
711         static const int *byte1[] = { &hf_ipmi_trn_lan00_sip, NULL };
712
713         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan00_byte1,
714                         byte1, TRUE, 0);
715 }
716
717 static void
718 lan_serial_01(tvbuff_t *tvb, proto_tree *tree)
719 {
720         proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Authentication types supported: ",
721                         "No authentication types supported for this channel", ett_ipmi_trn_lan01_byte1,
722                         lanXX_authtypes_byte, TRUE, 0);
723 }
724
725 static void
726 lan_serial_02(tvbuff_t *tvb, proto_tree *tree)
727 {
728         proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Authentication types for Callback level: ",
729                         "No authentication types enabled", ett_ipmi_trn_lan02_byte1,
730                         lanXX_authtypes_byte, TRUE, 0);
731         proto_tree_add_bitmask_text(tree, tvb, 1, 1, "Authentication types for User level: ",
732                         "No authentication types enabled", ett_ipmi_trn_lan02_byte2,
733                         lanXX_authtypes_byte, TRUE, 0);
734         proto_tree_add_bitmask_text(tree, tvb, 2, 1, "Authentication types for Operator level: ",
735                         "No authentication types enabled", ett_ipmi_trn_lan02_byte3,
736                         lanXX_authtypes_byte, TRUE, 0);
737         proto_tree_add_bitmask_text(tree, tvb, 3, 1, "Authentication types for Administrator level: ",
738                         "No authentication types enabled", ett_ipmi_trn_lan02_byte4,
739                         lanXX_authtypes_byte, TRUE, 0);
740         proto_tree_add_bitmask_text(tree, tvb, 4, 1, "Authentication types for OEM level: ",
741                         "No authentication types enabled", ett_ipmi_trn_lan02_byte5,
742                         lanXX_authtypes_byte, TRUE, 0);
743 }
744
745 static void
746 lan_03(tvbuff_t *tvb, proto_tree *tree)
747 {
748         proto_tree_add_item(tree, hf_ipmi_trn_lan03_ip, tvb, 0, 4, FALSE);
749 }
750
751 static void
752 lan_04(tvbuff_t *tvb, proto_tree *tree)
753 {
754         static const int *byte1[] = { &hf_ipmi_trn_lan04_ipsrc, NULL };
755
756         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan04_byte1,
757                         byte1, TRUE, 0);
758 }
759
760 static void
761 lan_05(tvbuff_t *tvb, proto_tree *tree)
762 {
763         proto_tree_add_item(tree, hf_ipmi_trn_lan05_ether, tvb, 0, 6, FALSE);
764 }
765
766 static void
767 lan_06(tvbuff_t *tvb, proto_tree *tree)
768 {
769         proto_tree_add_item(tree, hf_ipmi_trn_lan06_subnet, tvb, 0, 4, FALSE);
770 }
771
772 static void
773 lan_07(tvbuff_t *tvb, proto_tree *tree)
774 {
775         static const int *byte2[] = { &hf_ipmi_trn_lan07_flags, NULL };
776         static const int *byte3[] = { &hf_ipmi_trn_lan07_precedence, &hf_ipmi_trn_lan07_tos, NULL };
777
778         proto_tree_add_item(tree, hf_ipmi_trn_lan07_ttl, tvb, 0, 1, TRUE);
779         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_trn_lan07_byte2, byte2, TRUE, 0);
780         proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL, ett_ipmi_trn_lan07_byte3, byte3, TRUE, 0);
781 }
782
783 static void
784 lan_08(tvbuff_t *tvb, proto_tree *tree)
785 {
786         proto_tree_add_item(tree, hf_ipmi_trn_lan08_rmcp_port, tvb, 0, 2, TRUE);
787 }
788
789 static void
790 lan_09(tvbuff_t *tvb, proto_tree *tree)
791 {
792         proto_tree_add_item(tree, hf_ipmi_trn_lan09_rmcp_port, tvb, 0, 2, TRUE);
793 }
794
795 static void
796 lan_10(tvbuff_t *tvb, proto_tree *tree)
797 {
798         static const int *byte1[] = { &hf_ipmi_trn_lan10_responses, &hf_ipmi_trn_lan10_gratuitous, NULL };
799
800         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan10_byte1, byte1, TRUE, 0);
801 }
802
803 static void
804 lan_11(tvbuff_t *tvb, proto_tree *tree)
805 {
806         proto_tree_add_item(tree, hf_ipmi_trn_lan11_arp_interval, tvb, 0, 1, TRUE);
807 }
808
809 static void
810 lan_12(tvbuff_t *tvb, proto_tree *tree)
811 {
812         proto_tree_add_item(tree, hf_ipmi_trn_lan12_def_gw_ip, tvb, 0, 4, FALSE);
813 }
814
815 static void
816 lan_13(tvbuff_t *tvb, proto_tree *tree)
817 {
818         proto_tree_add_item(tree, hf_ipmi_trn_lan13_def_gw_mac, tvb, 0, 6, FALSE);
819 }
820
821 static void
822 lan_14(tvbuff_t *tvb, proto_tree *tree)
823 {
824         proto_tree_add_item(tree, hf_ipmi_trn_lan14_bkp_gw_ip, tvb, 0, 4, FALSE);
825 }
826
827 static void
828 lan_15(tvbuff_t *tvb, proto_tree *tree)
829 {
830         proto_tree_add_item(tree, hf_ipmi_trn_lan15_bkp_gw_mac, tvb, 0, 6, FALSE);
831 }
832
833 static void
834 lan_16(tvbuff_t *tvb, proto_tree *tree)
835 {
836         proto_tree_add_item(tree, hf_ipmi_trn_lan16_comm_string, tvb, 0, 18, TRUE);
837 }
838
839 static void
840 lan_17(tvbuff_t *tvb, proto_tree *tree)
841 {
842         static const int *byte1[] = { &hf_ipmi_trn_lan17_num_dst, NULL };
843
844         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan17_byte1, byte1, TRUE, 0);
845 }
846
847 static void
848 lan_18(tvbuff_t *tvb, proto_tree *tree)
849 {
850         static const int *byte1[] = { &hf_ipmi_trn_lan18_dst_selector, NULL };
851         static const int *byte2[] = { &hf_ipmi_trn_lan18_ack, &hf_ipmi_trn_lan18_dst_type, NULL };
852         static const int *byte4[] = { &hf_ipmi_trn_lan18_retries, NULL };
853
854         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan18_byte1, byte1, TRUE, 0);
855         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_trn_lan18_byte2, byte2, TRUE, 0);
856         proto_tree_add_item(tree, hf_ipmi_trn_lan18_tout, tvb, 2, 1, TRUE);
857         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_trn_lan18_byte4, byte4, TRUE, 0);
858 }
859
860 static void
861 lan_19(tvbuff_t *tvb, proto_tree *tree)
862 {
863         static const int *byte1[] = { &hf_ipmi_trn_lan19_dst_selector, NULL };
864         static const int *byte2[] = { &hf_ipmi_trn_lan19_addr_format, NULL };
865         static const int *byte3[] = { &hf_ipmi_trn_lan19_gw_sel, NULL };
866         guint8 v;
867
868         v = tvb_get_guint8(tvb, 1) >> 4;
869         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan19_byte1, byte1, TRUE, 0);
870         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_trn_lan19_byte2, byte2, TRUE, 0);
871
872         if (v == 0) {
873                 proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL, ett_ipmi_trn_lan19_byte3, byte3, TRUE, 0);
874                 proto_tree_add_item(tree, hf_ipmi_trn_lan19_ip, tvb, 3, 4, FALSE);
875                 proto_tree_add_item(tree, hf_ipmi_trn_lan19_mac, tvb, 7, 6, FALSE);
876                 return;
877         }
878
879         proto_tree_add_item(tree, hf_ipmi_trn_lan19_address, tvb, 2, tvb_length(tvb) - 2, TRUE);
880 }
881
882 static void
883 lan_20(tvbuff_t *tvb, proto_tree *tree)
884 {
885         static const int *byte12[] = { &hf_ipmi_trn_lan20_vlan_id_enable, &hf_ipmi_trn_lan20_vlan_id, NULL };
886
887         proto_tree_add_bitmask_text(tree, tvb, 0, 2, NULL, NULL, ett_ipmi_trn_lan20_byte12, byte12, TRUE, 0);
888 }
889
890 static void
891 lan_21(tvbuff_t *tvb, proto_tree *tree)
892 {
893         static const int *byte1[] = { &hf_ipmi_trn_lan21_vlan_prio, NULL };
894
895         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan21_byte1, byte1, TRUE, 0);
896 }
897
898 static void
899 lan_22(tvbuff_t *tvb, proto_tree *tree)
900 {
901         static const int *byte1[] = { &hf_ipmi_trn_lan22_num_cs_entries, NULL };
902
903         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan22_byte1, byte1, TRUE, 0);
904 }
905
906 static void
907 lan_23(tvbuff_t *tvb, proto_tree *tree)
908 {
909         guint i;
910         guint8 v;
911
912         for (i = 0; i < 16; i++) {
913                 v = tvb_get_guint8(tvb, i + 1);
914                 proto_tree_add_uint_format(tree, hf_ipmi_trn_lan23_cs_entry, tvb, i + 1, 1,
915                                 v, "Cipher Suite ID entry %c: %u", 'A' + i, v);
916         }
917 }
918
919 static void
920 lan_24(tvbuff_t *tvb, proto_tree *tree)
921 {
922         static const int *ett[] = { &ett_ipmi_trn_lan24_byte1, &ett_ipmi_trn_lan24_byte2, &ett_ipmi_trn_lan24_byte3,
923                 &ett_ipmi_trn_lan24_byte4, &ett_ipmi_trn_lan24_byte5, &ett_ipmi_trn_lan24_byte6, &ett_ipmi_trn_lan24_byte7,
924                 &ett_ipmi_trn_lan24_byte8 };
925         proto_tree *s_tree;
926         proto_item *ti;
927         guint i;
928         guint8 v, v1, v2;
929
930         for (i = 0; i < 8; i++) {
931                 v = tvb_get_guint8(tvb, i + 1);
932                 v1 = v & 0x0f;
933                 v2 = v >> 4;
934                 ti = proto_tree_add_text(tree, tvb, i + 1, 1,
935                                 "Cipher Suite #%d: %s (0x%02x), Cipher Suite #%d: %s (0x%02x)",
936                                 i * 2 + 1, val_to_str(v1, lan24_priv_vals, "Reserved"), v1,
937                                 i * 2 + 2, val_to_str(v2, lan24_priv_vals, "Reserved"), v2);
938                 s_tree = proto_item_add_subtree(ti, *ett[i]);
939                 proto_tree_add_uint_format(s_tree, hf_ipmi_trn_lan24_priv, tvb, i + 1, 1,
940                                 v2 << 4, "%sMaximum Privilege Level for Cipher Suite #%d: %s (0x%02x)",
941                                 ipmi_dcd8(v, 0xf0), i * 2 + 2, val_to_str(v2, lan24_priv_vals, "Reserved"), v2);
942                 proto_tree_add_uint_format(s_tree, hf_ipmi_trn_lan24_priv, tvb, i + 1, 1,
943                                 v1, "%sMaximum Privilege Level for Cipher Suite #%d: %s (0x%02x)",
944                                 ipmi_dcd8(v, 0x0f), i * 2 + 1, val_to_str(v1, lan24_priv_vals, "Reserved"), v1);
945         }
946 }
947
948 static void
949 lan_25(tvbuff_t *tvb, proto_tree *tree)
950 {
951         static const int *byte1[] = { &hf_ipmi_trn_lan25_dst_selector, NULL };
952         static const int *byte2[] = { &hf_ipmi_trn_lan25_addr_format, NULL };
953         static const int *byte34[] = { &hf_ipmi_trn_lan25_uprio, &hf_ipmi_trn_lan25_cfi, &hf_ipmi_trn_lan25_vlan_id, NULL };
954         guint8 v;
955
956         v = tvb_get_guint8(tvb, 1) >> 4;
957         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_lan25_byte1, byte1, TRUE, 0);
958         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_trn_lan25_byte2, byte2, TRUE, 0);
959         switch (v) {
960                 case 0:
961                         break;
962                 case 1:
963                         proto_tree_add_bitmask_text(tree, tvb, 2, 2, NULL, NULL, ett_ipmi_trn_lan25_byte34,
964                                         byte34, TRUE, 0);
965                         break;
966                 default:
967                         proto_tree_add_item(tree, hf_ipmi_trn_lan25_address, tvb, 2, tvb_length(tvb) - 2, TRUE);
968                         break;
969         }
970 }
971
972 static struct {
973         void (*intrp)(tvbuff_t *tvb, proto_tree *tree);
974         const char *name;
975 } lan_options[] = {
976         { lan_serial_00, "Set In Progress" },
977         { lan_serial_01, "Authentication Type Support" },
978         { lan_serial_02, "Authentication Type Enables" },
979         { lan_03, "IP Address" },
980         { lan_04, "IP Address Source" },
981         { lan_05, "MAC Address" },
982         { lan_06, "Subnet Mask" },
983         { lan_07, "IPv4 Header Parameters" },
984         { lan_08, "Primary RMCP Port Number" },
985         { lan_09, "Secondary RMCP Port Number" },
986         { lan_10, "BMC-generated ARP Control" },
987         { lan_11, "Gratuitous ARP Interval" },
988         { lan_12, "Default Gateway Address" },
989         { lan_13, "Default Gateway MAC Address" },
990         { lan_14, "Backup Gateway Address" },
991         { lan_15, "Backup Gateway MAC Address" },
992         { lan_16, "Community String" },
993         { lan_17, "Number of Destinations" },
994         { lan_18, "Destination Type" },
995         { lan_19, "Destination Addresses" },
996         { lan_20, "VLAN ID (802.1q)" },
997         { lan_21, "VLAN Priority (802.1q)" },
998         { lan_22, "Cipher Suite Entry Support (RMCP+)" },
999         { lan_23, "Cipher Suite Entries (RMCP+)" },
1000         { lan_24, "Cipher Suite Privilege Levels (RMCP+)" },
1001         { lan_25, "Destination Address VLAN TAGs" },
1002 };
1003
1004 /* Set LAN Configuration Parameters
1005  */
1006 static void
1007 rq01(tvbuff_t *tvb, proto_tree *tree)
1008 {
1009         static const int *byte1[] = { &hf_ipmi_trn_01_chan, NULL };
1010         tvbuff_t *next;
1011         const char *desc;
1012         guint8 pno;
1013
1014         pno = tvb_get_guint8(tvb, 1);
1015         if (pno < array_length(lan_options)) {
1016                 desc = lan_options[pno].name;
1017         } else if (pno >= 0xC0) {
1018                 desc = "OEM";
1019         } else {
1020                 desc = "Reserved";
1021         }
1022
1023         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_01_byte1,
1024                         byte1, TRUE, 0);
1025         proto_tree_add_uint_format_value(tree, hf_ipmi_trn_01_param, tvb, 1, 1,
1026                         pno, "%s (0x%02x)", desc, pno);
1027         if (pno < array_length(lan_options)) {
1028                 next = tvb_new_subset(tvb, 2, tvb_length(tvb) - 2, tvb_length(tvb) - 2);
1029                 lan_options[pno].intrp(next, tree);
1030         } else {
1031                 proto_tree_add_item(tree, hf_ipmi_trn_01_param_data, tvb, 2,
1032                                 tvb_length(tvb) - 2, TRUE);
1033         }
1034 }
1035
1036 static const value_string cc01[] = {
1037         { 0x80, "Parameter not supported" },
1038         { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
1039         { 0x82, "Attempt to write read-only parameter" },
1040         { 0x83, "Attempt to read write-only parameter" },
1041         { 0, NULL }
1042 };
1043
1044 /* Get LAN Configuration Parameters
1045  */
1046 static void
1047 rq02(tvbuff_t *tvb, proto_tree *tree)
1048 {
1049         static const int *byte1[] = { &hf_ipmi_trn_02_getrev, &hf_ipmi_trn_02_chan, NULL };
1050         const char *desc;
1051         guint8 pno;
1052
1053         pno = tvb_get_guint8(tvb, 1);
1054
1055         if (!tree) {
1056                 ipmi_setsaveddata(0, pno);
1057                 ipmi_setsaveddata(1, tvb_get_guint8(tvb, 0) & 0x80);
1058                 return;
1059         }
1060
1061         if (pno < array_length(lan_options)) {
1062                 desc = lan_options[pno].name;
1063         } else if (pno >= 0xC0) {
1064                 desc = "OEM";
1065         } else {
1066                 desc = "Reserved";
1067         }
1068
1069         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1070                         ett_ipmi_trn_02_byte1, byte1, TRUE, 0);
1071         proto_tree_add_uint_format_value(tree, hf_ipmi_trn_02_param, tvb, 1, 1,
1072                         pno, "%s (0x%02x)", desc, pno);
1073         proto_tree_add_item(tree, hf_ipmi_trn_02_set, tvb, 2, 1, TRUE);
1074         proto_tree_add_item(tree, hf_ipmi_trn_02_block, tvb, 2, 1, TRUE);
1075 }
1076
1077 static void
1078 rs02(tvbuff_t *tvb, proto_tree *tree)
1079 {
1080         static const int *byte1[] = { &hf_ipmi_trn_02_rev_present, &hf_ipmi_trn_02_rev_compat, NULL };
1081         proto_item *ti;
1082         tvbuff_t *next;
1083         const char *desc;
1084         guint32 pno, req;
1085
1086         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1087                         ett_ipmi_trn_02_rev, byte1, TRUE, 0);
1088
1089         if (!ipmi_getsaveddata(0, &pno) || !ipmi_getsaveddata(1, &req)) {
1090                 /* No request found - cannot parse further */
1091                 if (tvb_length(tvb) > 1) {
1092                         proto_tree_add_item(tree, hf_ipmi_trn_02_param_data, tvb, 1, tvb_length(tvb) - 1, TRUE);
1093                 };
1094                 return;
1095         }
1096
1097         if ((req & 0x80) && tvb_length(tvb) > 1) {
1098                 ti = proto_tree_add_text(tree, tvb, 0, 0, "Requested parameter revision; parameter data returned");
1099                 PROTO_ITEM_SET_GENERATED(ti);
1100         } else if (!(req & 0x80) && tvb_length(tvb) == 1) {
1101                 ti = proto_tree_add_text(tree, tvb, 0, 0, "Requested parameter data; only parameter version returned");
1102                 PROTO_ITEM_SET_GENERATED(ti);
1103         }
1104
1105         if (pno < array_length(lan_options)) {
1106                 desc = lan_options[pno].name;
1107         } else if (pno >= 0xC0) {
1108                 desc = "OEM";
1109         } else {
1110                 desc = "Reserved";
1111         }
1112
1113         ti = proto_tree_add_text(tree, tvb, 0, 0, "Parameter: %s", desc);
1114         PROTO_ITEM_SET_GENERATED(ti);
1115
1116         if (tvb_length(tvb) > 1) {
1117                 if (pno < array_length(lan_options)) {
1118                         next = tvb_new_subset(tvb, 1, tvb_length(tvb) - 1, tvb_length(tvb) - 1);
1119                         lan_options[pno].intrp(next, tree);
1120                 } else {
1121                         proto_tree_add_item(tree, hf_ipmi_trn_02_param_data, tvb, 1,
1122                                         tvb_length(tvb) - 1, TRUE);
1123                 }
1124         }
1125 }
1126
1127 static const value_string cc02[] = {
1128         { 0x80, "Parameter not supported" },
1129         { 0, NULL }
1130 };
1131
1132 static void
1133 rq03(tvbuff_t *tvb, proto_tree *tree)
1134 {
1135         static const int *byte1[] = { &hf_ipmi_trn_03_chan, NULL };
1136         static const int *byte2[] = { &hf_ipmi_trn_03_arp_resp, &hf_ipmi_trn_03_gratuitous_arp, NULL };
1137
1138         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1139                         ett_ipmi_trn_03_rq_byte1, byte1, TRUE, 0);
1140         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1141                         ett_ipmi_trn_03_rq_byte2, byte2, TRUE, 0);
1142 }
1143
1144 static void
1145 rs03(tvbuff_t *tvb, proto_tree *tree)
1146 {
1147         static const int *byte1[] = { &hf_ipmi_trn_03_status_arp_resp,
1148                 &hf_ipmi_trn_03_status_gratuitous_arp, NULL };
1149
1150         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1151                         ett_ipmi_trn_03_rs_byte1, byte1, TRUE, 0);
1152 }
1153
1154 static void
1155 rq04(tvbuff_t *tvb, proto_tree *tree)
1156 {
1157         static const int *byte1[] = { &hf_ipmi_trn_04_chan, NULL };
1158         static const int *byte2[] = { &hf_ipmi_trn_04_clear, NULL };
1159
1160         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1161                         ett_ipmi_trn_04_byte1, byte1, TRUE, 0);
1162         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1163                         ett_ipmi_trn_04_byte2, byte2, TRUE, 0);
1164 }
1165
1166 static void
1167 rs04(tvbuff_t *tvb, proto_tree *tree)
1168 {
1169         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_ippkts, tvb, 0, 2, TRUE);
1170         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_iphdr_err, tvb, 2, 2, TRUE);
1171         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_ipaddr_err, tvb, 4, 2, TRUE);
1172         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_ippkts_frag, tvb, 6, 2, TRUE);
1173         proto_tree_add_item(tree, hf_ipmi_trn_04_tx_ippkts, tvb, 8, 2, TRUE);
1174         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_udppkts, tvb, 10, 2, TRUE);
1175         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_validrmcp, tvb, 12, 2, TRUE);
1176         proto_tree_add_item(tree, hf_ipmi_trn_04_rx_udpproxy, tvb, 14, 2, TRUE);
1177         proto_tree_add_item(tree, hf_ipmi_trn_04_dr_udpproxy, tvb, 16, 2, TRUE);
1178 }
1179
1180 static void
1181 serial_03(tvbuff_t *tvb, proto_tree *tree)
1182 {
1183         static const int *byte1[] = { &hf_ipmi_trn_serial03_connmode, &hf_ipmi_trn_serial03_terminal,
1184                 &hf_ipmi_trn_serial03_ppp, &hf_ipmi_trn_serial03_basic, NULL };
1185
1186         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1187                         ett_ipmi_trn_serial03_byte1, byte1, TRUE, 0);
1188 }
1189
1190 static void
1191 serial04_timeout_fmt(gchar *s, guint32 v)
1192 {
1193         if (v) {
1194                 g_snprintf(s, ITEM_LABEL_LENGTH, "%d sec", 30 * v);
1195         }
1196         else {
1197                 g_snprintf(s, ITEM_LABEL_LENGTH, "Does not timeout");
1198         }
1199 }
1200
1201 static void
1202 serial_04(tvbuff_t *tvb, proto_tree *tree)
1203 {
1204         static const gint *byte1[] = { &hf_ipmi_trn_serial04_timeout, NULL };
1205
1206         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1207                         ett_ipmi_trn_serial04_byte1, byte1, TRUE, 0);
1208 }
1209
1210 static void
1211 serial_05(tvbuff_t *tvb, proto_tree *tree)
1212 {
1213         static const int *byte1[] = { &hf_ipmi_trn_serial05_cbcp_callback,
1214                 &hf_ipmi_trn_serial05_ipmi_callback, NULL };
1215         static const int *byte2[] = { &hf_ipmi_trn_serial05_cb_list, &hf_ipmi_trn_serial05_cb_user,
1216                 &hf_ipmi_trn_serial05_cb_prespec, &hf_ipmi_trn_serial05_no_cb, NULL };
1217
1218         proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Callback capabilities: ", "None",
1219                         ett_ipmi_trn_serial05_byte1, byte1, TRUE, BMT_NO_TFS);
1220         proto_tree_add_bitmask_text(tree, tvb, 1, 1, "CBCP negotiation options: ", "None",
1221                         ett_ipmi_trn_serial05_byte2, byte2, TRUE, BMT_NO_TFS);
1222         proto_tree_add_item(tree, hf_ipmi_trn_serial05_cb_dest1, tvb, 2, 1, TRUE);
1223         proto_tree_add_item(tree, hf_ipmi_trn_serial05_cb_dest2, tvb, 3, 1, TRUE);
1224         proto_tree_add_item(tree, hf_ipmi_trn_serial05_cb_dest3, tvb, 4, 1, TRUE);
1225 }
1226
1227 static void
1228 serial_06(tvbuff_t *tvb, proto_tree *tree)
1229 {
1230         static const gint *byte1[] = { &hf_ipmi_trn_serial06_inactivity,
1231                 &hf_ipmi_trn_serial06_dcd, NULL };
1232
1233         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1234                         ett_ipmi_trn_serial06_byte1, byte1, TRUE, 0);
1235 }
1236
1237 static void
1238 serial_07(tvbuff_t *tvb, proto_tree *tree)
1239 {
1240         static const gint *byte1[] = { &hf_ipmi_trn_serial07_flowctl, &hf_ipmi_trn_serial07_dtrhangup, NULL };
1241         static const gint *byte2[] = { &hf_ipmi_trn_serial07_bitrate, NULL };
1242
1243         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1244                         ett_ipmi_trn_serial07_byte1, byte1, TRUE, 0);
1245         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1246                         ett_ipmi_trn_serial07_byte2, byte2, TRUE, 0);
1247 }
1248
1249 static void
1250 serial_08(tvbuff_t *tvb, proto_tree *tree)
1251 {
1252         static const gint *byte1[] = { &hf_ipmi_trn_serial08_esc_powerup,
1253                 &hf_ipmi_trn_serial08_esc_reset, &hf_ipmi_trn_serial08_switch_authcap,
1254                 &hf_ipmi_trn_serial08_switch_rmcp, &hf_ipmi_trn_serial08_esc_switch1,
1255                 &hf_ipmi_trn_serial08_esc_switch2, &hf_ipmi_trn_serial08_switch_dcdloss, NULL };
1256         static const gint *byte2[] = { &hf_ipmi_trn_serial08_sharing,
1257                 &hf_ipmi_trn_serial08_ping_callback, &hf_ipmi_trn_serial08_ping_direct,
1258                 &hf_ipmi_trn_serial08_ping_retry, NULL };
1259
1260         proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Switch/escape settings", NULL,
1261                         ett_ipmi_trn_serial08_byte1, byte1, TRUE, BMT_NO_APPEND);
1262         proto_tree_add_bitmask_text(tree, tvb, 1, 1, "Sharing/ping settings", NULL,
1263                         ett_ipmi_trn_serial08_byte2, byte2, TRUE, BMT_NO_APPEND);
1264 }
1265
1266 static void
1267 serial_09(tvbuff_t *tvb, proto_tree *tree)
1268 {
1269         static const gint *byte1[] = { &hf_ipmi_trn_serial09_ring_duration, NULL };
1270         static const gint *byte2[] = { &hf_ipmi_trn_serial09_ring_dead, NULL };
1271
1272         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1273                         ett_ipmi_trn_serial09_byte1, byte1, TRUE, 0);
1274         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1275                         ett_ipmi_trn_serial09_byte2, byte2, TRUE, 0);
1276 }
1277
1278 static void
1279 serial_10(tvbuff_t *tvb, proto_tree *tree)
1280 {
1281         proto_tree_add_item(tree, hf_ipmi_trn_serial10_set_sel, tvb, 0, 1, TRUE);
1282         proto_tree_add_item(tree, hf_ipmi_trn_serial10_init_str, tvb, 1, tvb_length(tvb) - 1, TRUE);
1283 }
1284
1285 static void
1286 serial_11(tvbuff_t *tvb, proto_tree *tree)
1287 {
1288         proto_tree_add_item(tree, hf_ipmi_trn_serial11_esc_seq, tvb, 0, 5, TRUE); 
1289 }
1290
1291 static void
1292 serial_12(tvbuff_t *tvb, proto_tree *tree)
1293 {
1294         proto_tree_add_item(tree, hf_ipmi_trn_serial12_hangup_seq, tvb, 0, 8, TRUE);
1295 }
1296
1297 static void
1298 serial_13(tvbuff_t *tvb, proto_tree *tree)
1299 {
1300         proto_tree_add_item(tree, hf_ipmi_trn_serial13_dial_cmd, tvb, 0, 8, TRUE);
1301 }
1302
1303 static void
1304 serial_14(tvbuff_t *tvb, proto_tree *tree)
1305 {
1306         proto_tree_add_item(tree, hf_ipmi_trn_serial14_page_blackout, tvb, 0, 1, TRUE);
1307 }
1308
1309 static void
1310 serial_15(tvbuff_t *tvb, proto_tree *tree)
1311 {
1312         proto_tree_add_item(tree, hf_ipmi_trn_serial15_comm_string, tvb, 0, 18, TRUE);
1313 }
1314
1315 static void
1316 serial_16(tvbuff_t *tvb, proto_tree *tree)
1317 {
1318         static const gint *byte1[] = { &hf_ipmi_trn_serial16_ndest, NULL };
1319
1320         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1321                         ett_ipmi_trn_serial16_byte1, byte1, TRUE, 0);
1322 }
1323
1324 static void
1325 serial_17(tvbuff_t *tvb, proto_tree *tree)
1326 {
1327         static const gint *byte1[] = { &hf_ipmi_trn_serial17_dest_sel, NULL };
1328         static const gint *byte2[] = { &hf_ipmi_trn_serial17_ack, &hf_ipmi_trn_serial17_dest_type, NULL };
1329         static const gint *byte4[] = { &hf_ipmi_trn_serial17_alert_retries, &hf_ipmi_trn_serial17_call_retries, NULL };
1330         const gint *byte5[3] = { NULL, NULL, NULL };
1331         guint8 v;
1332
1333         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1334                         ett_ipmi_trn_serial17_byte1, byte1, TRUE, 0);
1335         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1336                         ett_ipmi_trn_serial17_byte2, byte2, TRUE, 0);
1337         proto_tree_add_item(tree, hf_ipmi_trn_serial17_alert_ack_timeout, tvb, 2, 1, TRUE);
1338         proto_tree_add_bitmask_text(tree, tvb, 3, 1, NULL, NULL,
1339                         ett_ipmi_trn_serial17_byte4, byte4, TRUE, 0);
1340
1341         v = tvb_get_guint8(tvb, 1) & 0x0f;
1342         switch (v) {
1343                 case 0: /* Dial Page */
1344                 case 3: /* Basic Mode Callback */
1345                         byte5[0] = &hf_ipmi_trn_serial17_dialstr_sel;
1346                         break;
1347                 case 1: /* TAP Page */
1348                         byte5[0] = &hf_ipmi_trn_serial17_tap_sel;
1349                         break;
1350                 case 2: /* PPP Alert */
1351                 case 4: /* PPP Callback */
1352                         byte5[0] = &hf_ipmi_trn_serial17_ipaddr_sel;
1353                         byte5[1] = &hf_ipmi_trn_serial17_ppp_sel;
1354                         break;
1355                 default:
1356                         proto_tree_add_item(tree, hf_ipmi_trn_serial17_unknown, tvb, 4, 1, TRUE);
1357                         return;
1358         }
1359         proto_tree_add_bitmask_text(tree, tvb, 4, 1, NULL, NULL,
1360                         ett_ipmi_trn_serial17_byte5, byte5, TRUE, 0);
1361 }
1362
1363 static void
1364 serial_18(tvbuff_t *tvb, proto_tree *tree)
1365 {
1366         proto_tree_add_item(tree, hf_ipmi_trn_serial18_call_retry, tvb, 0, 1, TRUE);
1367 }
1368
1369 static void
1370 serial_19(tvbuff_t *tvb, proto_tree *tree)
1371 {
1372         static const gint *byte1[] = { &hf_ipmi_trn_serial19_destsel, NULL };
1373         static const gint *byte2[] = { &hf_ipmi_trn_serial19_flowctl, &hf_ipmi_trn_serial19_dtrhangup,
1374                 &hf_ipmi_trn_serial19_stopbits, &hf_ipmi_trn_serial19_charsize, &hf_ipmi_trn_serial19_parity, NULL };
1375         static const gint *byte3[] = { &hf_ipmi_trn_serial19_bitrate, NULL };
1376
1377         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1378                         ett_ipmi_trn_serial19_byte1, byte1, TRUE, 0);
1379         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1380                         ett_ipmi_trn_serial19_byte2, byte2, TRUE, 0);
1381         proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL,
1382                         ett_ipmi_trn_serial19_byte3, byte3, TRUE, 0);
1383 }
1384
1385 static void
1386 serial_20(tvbuff_t *tvb, proto_tree *tree)
1387 {
1388         static const gint *byte1[] = { &hf_ipmi_trn_serial20_num_dial_strings, NULL };
1389
1390         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1391                         ett_ipmi_trn_serial20_byte1, byte1, TRUE, 0);
1392 }
1393
1394 static void
1395 serial_21(tvbuff_t *tvb, proto_tree *tree)
1396 {
1397         static const gint *byte1[] = { &hf_ipmi_trn_serial21_dialsel, NULL };
1398
1399         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1400                         ett_ipmi_trn_serial21_byte1, byte1, TRUE, 0);
1401         proto_tree_add_item(tree, hf_ipmi_trn_serial21_blockno, tvb, 1, 1, TRUE);
1402         proto_tree_add_item(tree, hf_ipmi_trn_serial21_dialstr, tvb, 2, 1, TRUE);
1403 }
1404
1405 static void
1406 serial_22(tvbuff_t *tvb, proto_tree *tree)
1407 {
1408         static const gint *byte1[] = { &hf_ipmi_trn_serial22_num_ipaddrs, NULL };
1409
1410         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1411                         ett_ipmi_trn_serial22_byte1, byte1, TRUE, 0);
1412 }
1413
1414 static void
1415 serial_23(tvbuff_t *tvb, proto_tree *tree)
1416 {
1417         static const gint *byte1[] = { &hf_ipmi_trn_serial23_destsel, NULL };
1418
1419         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1420                         ett_ipmi_trn_serial23_byte1, byte1, TRUE, 0);
1421         proto_tree_add_item(tree, hf_ipmi_trn_serial23_ipaddr, tvb, 1, 4, FALSE);
1422 }
1423
1424 static void
1425 serial_24(tvbuff_t *tvb, proto_tree *tree)
1426 {
1427         static const gint *byte1[] = { &hf_ipmi_trn_serial24_num_tap_accounts, NULL };
1428
1429         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1430                         ett_ipmi_trn_serial24_byte1, byte1, TRUE, 0);
1431 }
1432
1433 static void
1434 serial_25(tvbuff_t *tvb, proto_tree *tree)
1435 {
1436         static const gint *byte2[] = { &hf_ipmi_trn_serial25_dialstr_sel, &hf_ipmi_trn_serial25_tapsrv_sel, NULL };
1437
1438         proto_tree_add_item(tree, hf_ipmi_trn_serial25_tap_acct, tvb, 0, 1, TRUE);
1439         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1440                         ett_ipmi_trn_serial25_byte2, byte2, TRUE, 0);
1441 }
1442
1443 static void
1444 serial_26(tvbuff_t *tvb, proto_tree *tree)
1445 {
1446         proto_tree_add_item(tree, hf_ipmi_trn_serial26_tap_acct, tvb, 0, 1, TRUE);
1447         proto_tree_add_item(tree, hf_ipmi_trn_serial26_tap_passwd, tvb, 1, 6, TRUE);
1448 }
1449
1450 static void
1451 serial_27(tvbuff_t *tvb, proto_tree *tree)
1452 {
1453         proto_tree_add_item(tree, hf_ipmi_trn_serial27_tap_acct, tvb, 0, 1, TRUE);
1454         proto_tree_add_item(tree, hf_ipmi_trn_serial27_tap_pager_id, tvb, 1, 16, TRUE);
1455 }
1456
1457 static void
1458 serial_28(tvbuff_t *tvb, proto_tree *tree)
1459 {
1460         static const gint *byte1[] = { &hf_ipmi_trn_serial28_tapsrv_sel, NULL };
1461         static const gint *byte2[] = { &hf_ipmi_trn_serial28_confirm, NULL };
1462         static const gint *byte10[] = { &hf_ipmi_trn_serial28_t2, &hf_ipmi_trn_serial28_t1, NULL };
1463         static const gint *byte11[] = { &hf_ipmi_trn_serial28_t4, &hf_ipmi_trn_serial28_t3, NULL };
1464         static const gint *byte12[] = { &hf_ipmi_trn_serial28_t6, &hf_ipmi_trn_serial28_t5, NULL };
1465         static const gint *byte13[] = { &hf_ipmi_trn_serial28_n2, &hf_ipmi_trn_serial28_n1, NULL };
1466         static const gint *byte14[] = { &hf_ipmi_trn_serial28_n4, &hf_ipmi_trn_serial28_n3, NULL };
1467
1468         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1469                         ett_ipmi_trn_serial28_byte1, byte1, TRUE, 0);
1470         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1471                         ett_ipmi_trn_serial28_byte2, byte2, TRUE, 0);
1472         proto_tree_add_item(tree, hf_ipmi_trn_serial28_srvtype, tvb, 2, 3, TRUE);
1473         proto_tree_add_item(tree, hf_ipmi_trn_serial28_ctrl_esc, tvb, 5, 4, TRUE);
1474         proto_tree_add_bitmask_text(tree, tvb, 9, 1, NULL, NULL,
1475                         ett_ipmi_trn_serial28_byte10, byte10, TRUE, 0);
1476         proto_tree_add_bitmask_text(tree, tvb, 10, 1, NULL, NULL,
1477                         ett_ipmi_trn_serial28_byte11, byte11, TRUE, 0);
1478         proto_tree_add_bitmask_text(tree, tvb, 11, 1, NULL, NULL,
1479                         ett_ipmi_trn_serial28_byte12, byte12, TRUE, 0);
1480         proto_tree_add_bitmask_text(tree, tvb, 12, 1, NULL, NULL,
1481                         ett_ipmi_trn_serial28_byte13, byte13, TRUE, 0);
1482         proto_tree_add_bitmask_text(tree, tvb, 13, 1, NULL, NULL,
1483                         ett_ipmi_trn_serial28_byte14, byte14, TRUE, 0);
1484 }
1485
1486 static void
1487 serial_29(tvbuff_t *tvb, proto_tree *tree)
1488 {
1489         static const gint *byte1[] = { &hf_ipmi_trn_serial29_op, &hf_ipmi_trn_serial29_lineedit,
1490                 &hf_ipmi_trn_serial29_deletectl, &hf_ipmi_trn_serial29_echo, &hf_ipmi_trn_serial29_handshake, NULL };
1491         static const gint *byte2[] = { &hf_ipmi_trn_serial29_o_newline, &hf_ipmi_trn_serial29_i_newline, NULL };
1492
1493         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1494                         ett_ipmi_trn_serial29_byte1, byte1, TRUE, 0);
1495         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1496                         ett_ipmi_trn_serial29_byte2, byte2, TRUE, 0);
1497 }
1498
1499 static void
1500 serial_30(tvbuff_t *tvb, proto_tree *tree)
1501 {
1502         static const gint *byte1[] = { &hf_ipmi_trn_serial30_snooping, &hf_ipmi_trn_serial30_snoopctl, NULL };
1503         static const gint *byte2[] = { &hf_ipmi_trn_serial30_negot_ctl, &hf_ipmi_trn_serial30_use_xmit_accm,
1504                 &hf_ipmi_trn_serial30_xmit_addr_comp, &hf_ipmi_trn_serial30_xmit_proto_comp, NULL };
1505         static const gint *byte3[] = { &hf_ipmi_trn_serial30_ipaddr, &hf_ipmi_trn_serial30_accm,
1506                 &hf_ipmi_trn_serial30_addr_comp, &hf_ipmi_trn_serial30_proto_comp, NULL };
1507
1508         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1509                         ett_ipmi_trn_serial30_byte1, byte1, TRUE, 0);
1510         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1511                         ett_ipmi_trn_serial30_byte2, byte2, TRUE, 0);
1512         proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL,
1513                         ett_ipmi_trn_serial30_byte3, byte3, TRUE, 0);
1514 }
1515
1516 static void
1517 serial_31(tvbuff_t *tvb, proto_tree *tree)
1518 {
1519         proto_tree_add_item(tree, hf_ipmi_trn_serial31_port, tvb, 0, 2, TRUE);
1520 }
1521
1522 static void
1523 serial_32(tvbuff_t *tvb, proto_tree *tree)
1524 {
1525         proto_tree_add_item(tree, hf_ipmi_trn_serial32_port, tvb, 0, 2, TRUE);
1526 }
1527
1528 static void
1529 serial_33(tvbuff_t *tvb, proto_tree *tree)
1530 {
1531         static const gint *byte1[] = { &hf_ipmi_trn_serial33_auth_proto, NULL };
1532
1533         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1534                         ett_ipmi_trn_serial33_byte1, byte1, TRUE, 0);
1535 }
1536
1537 static void
1538 serial_34(tvbuff_t *tvb, proto_tree *tree)
1539 {
1540         proto_tree_add_item(tree, hf_ipmi_trn_serial34_chap_name, tvb, 0, 16, TRUE);
1541 }
1542
1543 static void
1544 serial_35(tvbuff_t *tvb, proto_tree *tree)
1545 {
1546         proto_tree_add_item(tree, hf_ipmi_trn_serial35_recv_accm, tvb, 0, 4, FALSE);
1547         proto_tree_add_item(tree, hf_ipmi_trn_serial35_xmit_accm, tvb, 4, 4, FALSE);
1548 }
1549
1550 static void
1551 serial_36(tvbuff_t *tvb, proto_tree *tree)
1552 {
1553         proto_tree_add_item(tree, hf_ipmi_trn_serial36_snoop_accm, tvb, 0, 4, FALSE);
1554 }
1555
1556 static void
1557 serial_37(tvbuff_t *tvb, proto_tree *tree)
1558 {
1559         static const gint *byte1[] = { &hf_ipmi_trn_serial37_num_ppp, NULL };
1560
1561         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1562                         ett_ipmi_trn_serial37_byte1, byte1, TRUE, 0);
1563 }
1564
1565 static void
1566 serial_38(tvbuff_t *tvb, proto_tree *tree)
1567 {
1568         proto_tree_add_item(tree, hf_ipmi_trn_serial38_acct_sel, tvb, 0, 1, TRUE);
1569         proto_tree_add_item(tree, hf_ipmi_trn_serial38_dialstr_sel, tvb, 1, 1, TRUE);
1570 }
1571
1572 static void
1573 serial_39(tvbuff_t *tvb, proto_tree *tree)
1574 {
1575         proto_tree_add_item(tree, hf_ipmi_trn_serial39_acct_sel, tvb, 0, 1, TRUE);
1576         proto_tree_add_item(tree, hf_ipmi_trn_serial39_ipaddr, tvb, 1, 4, FALSE);
1577 }
1578
1579 static void
1580 serial_40(tvbuff_t *tvb, proto_tree *tree)
1581 {
1582         int slen;
1583
1584         proto_tree_add_item(tree, hf_ipmi_trn_serial40_acct_sel, tvb, 0, 1, TRUE);
1585         slen = tvb_length(tvb) - 1;
1586         if (slen > 16) {
1587                 slen = 16;
1588         }
1589         proto_tree_add_item(tree, hf_ipmi_trn_serial40_username, tvb, 1, slen, TRUE);
1590 }
1591
1592 static void
1593 serial_41(tvbuff_t *tvb, proto_tree *tree)
1594 {
1595         int slen;
1596
1597         proto_tree_add_item(tree, hf_ipmi_trn_serial41_acct_sel, tvb, 0, 1, TRUE);
1598         slen = tvb_length(tvb) - 1;
1599         if (slen > 16) {
1600                 slen = 16;
1601         }
1602         proto_tree_add_item(tree, hf_ipmi_trn_serial41_userdomain, tvb, 1, slen, TRUE);
1603 }
1604
1605 static void
1606 serial_42(tvbuff_t *tvb, proto_tree *tree)
1607 {
1608         int slen;
1609
1610         proto_tree_add_item(tree, hf_ipmi_trn_serial42_acct_sel, tvb, 0, 1, TRUE);
1611         slen = tvb_length(tvb) - 1;
1612         if (slen > 16) {
1613                 slen = 16;
1614         }
1615         proto_tree_add_item(tree, hf_ipmi_trn_serial42_userpass, tvb, 1, slen, TRUE);
1616 }
1617
1618 static void
1619 serial_43(tvbuff_t *tvb, proto_tree *tree)
1620 {
1621         static const gint *byte1[] = { &hf_ipmi_trn_serial43_auth_proto, NULL };
1622
1623         proto_tree_add_item(tree, hf_ipmi_trn_serial43_acct_sel, tvb, 0, 1, TRUE);
1624         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1625                         ett_ipmi_trn_serial43_byte1, byte1, TRUE, 0);
1626 }
1627
1628 static void
1629 serial_44(tvbuff_t *tvb, proto_tree *tree)
1630 {
1631         proto_tree_add_item(tree, hf_ipmi_trn_serial44_acct_sel, tvb, 0, 1, TRUE);
1632         proto_tree_add_item(tree, hf_ipmi_trn_serial44_hold_time, tvb, 1, 1, TRUE);
1633 }
1634
1635 static void
1636 serial_45(tvbuff_t *tvb, proto_tree *tree)
1637 {
1638         proto_tree_add_item(tree, hf_ipmi_trn_serial45_src_ipaddr, tvb, 0, 4, FALSE);
1639         proto_tree_add_item(tree, hf_ipmi_trn_serial45_dst_ipaddr, tvb, 4, 4, FALSE);
1640 }
1641
1642 static void
1643 serial_46(tvbuff_t *tvb, proto_tree *tree)
1644 {
1645         proto_tree_add_item(tree, hf_ipmi_trn_serial46_tx_bufsize, tvb, 0, 2, TRUE);
1646 }
1647
1648 static void
1649 serial_47(tvbuff_t *tvb, proto_tree *tree)
1650 {
1651         proto_tree_add_item(tree, hf_ipmi_trn_serial47_rx_bufsize, tvb, 0, 2, TRUE);
1652 }
1653
1654 static void
1655 serial_48(tvbuff_t *tvb, proto_tree *tree)
1656 {
1657         proto_tree_add_item(tree, hf_ipmi_trn_serial48_ipaddr, tvb, 0, 4, FALSE);
1658 }
1659
1660 static void
1661 serial_49(tvbuff_t *tvb, proto_tree *tree)
1662 {
1663         int slen;
1664
1665         proto_tree_add_item(tree, hf_ipmi_trn_serial49_blockno, tvb, 0, 1, TRUE);
1666         slen = tvb_length(tvb) - 1;
1667         if (slen > 16) {
1668                 slen = 16;
1669         }
1670         proto_tree_add_item(tree, hf_ipmi_trn_serial49_dialstr, tvb, 1, slen, TRUE);
1671 }
1672
1673 static void
1674 serial_50(tvbuff_t *tvb, proto_tree *tree)
1675 {
1676         static const gint *byte1[] = { &hf_ipmi_trn_serial50_115200, &hf_ipmi_trn_serial50_57600,
1677                 &hf_ipmi_trn_serial50_38400, &hf_ipmi_trn_serial50_19200, &hf_ipmi_trn_serial50_9600, NULL };
1678
1679         proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Bit rate support: ", "None",
1680                         ett_ipmi_trn_serial50_byte1, byte1, TRUE, 0);
1681 }
1682
1683 static void
1684 serial_51(tvbuff_t *tvb, proto_tree *tree)
1685 {
1686         static const gint *byte2[] = { &hf_ipmi_trn_serial51_ipmi_channel, &hf_ipmi_trn_serial51_conn_num, NULL };
1687         static const gint *byte3[] = { &hf_ipmi_trn_serial51_ipmi_sharing,
1688                 &hf_ipmi_trn_serial51_ipmi_sol, &hf_ipmi_trn_serial51_chan_num, NULL };
1689
1690         proto_tree_add_item(tree, hf_ipmi_trn_serial51_port_assoc_sel, tvb, 0, 1, TRUE);
1691         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1692                         ett_ipmi_trn_serial51_byte2, byte2, TRUE, 0);
1693         proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL,
1694                         ett_ipmi_trn_serial51_byte3, byte3, TRUE, 0);
1695 }
1696
1697 static void
1698 serial_52(tvbuff_t *tvb, proto_tree *tree)
1699 {
1700         proto_tree_add_item(tree, hf_ipmi_trn_serial52_port_assoc_sel, tvb, 0, 1, TRUE);
1701         proto_tree_add_item(tree, hf_ipmi_trn_serial52_conn_name, tvb, 1, 16, TRUE);
1702 }
1703
1704 static void
1705 serial_53(tvbuff_t *tvb, proto_tree *tree)
1706 {
1707         proto_tree_add_item(tree, hf_ipmi_trn_serial53_port_assoc_sel, tvb, 0, 1, TRUE);
1708         proto_tree_add_item(tree, hf_ipmi_trn_serial53_chan_name, tvb, 1, 16, TRUE);
1709 }
1710
1711 static struct {
1712         void (*intrp)(tvbuff_t *tvb, proto_tree *tree);
1713         const char *name;
1714 } serial_options[] = {
1715         { lan_serial_00, "Set In Progress" },
1716         { lan_serial_01, "Authentication Type Support" },
1717         { lan_serial_02, "Authentication Type Enables" },
1718         { serial_03, "Connection Mode" },
1719         { serial_04, "Session Inactivity Timeout" },
1720         { serial_05, "Channel Callback Control" },
1721         { serial_06, "Session Termination" },
1722         { serial_07, "IPMI Messaging Comm Settings" },
1723         { serial_08, "Mux Switch Control" },
1724         { serial_09, "Modem Ring Time" },
1725         { serial_10, "Modem Init String" },
1726         { serial_11, "Modem Escape Sequence" },
1727         { serial_12, "Modem Hang-up Sequence" },
1728         { serial_13, "Modem Dial Command" },
1729         { serial_14, "Page Blackout Interval" },
1730         { serial_15, "Community String" },
1731         { serial_16, "Number of Alert Destinations" },
1732         { serial_17, "Destination Info" },
1733         { serial_18, "Call Retry Interval" },
1734         { serial_19, "Destination Comm Settings" },
1735         { serial_20, "Number of Dial Strings" },
1736         { serial_21, "Destination Dial Strings" },
1737         { serial_22, "Number of Alert Destination IP Addresses" },
1738         { serial_23, "Destination IP Addresses" },
1739         { serial_24, "Number of TAP Accounts" },
1740         { serial_25, "TAP Account" },
1741         { serial_26, "TAP Passwords" },
1742         { serial_27, "TAP Pager ID Strings" },
1743         { serial_28, "TAP Service Settings" },
1744         { serial_29, "Terminal Mode Configuration" },
1745         { serial_30, "PPP Protocol Options" },
1746         { serial_31, "PPP Primary RMCP Port" },
1747         { serial_32, "PPP Secondary RMCP Port" },
1748         { serial_33, "PPP Link Authentication" },
1749         { serial_34, "CHAP Name" },
1750         { serial_35, "PPP ACCM" },
1751         { serial_36, "PPP Snoop ACCM" },
1752         { serial_37, "Number of PPP Accounts" },
1753         { serial_38, "PPP Account Dial String Selector" },
1754         { serial_39, "PPP Account IP Addresses" },
1755         { serial_40, "PPP Account User Names" },
1756         { serial_41, "PPP Account User Domains" },
1757         { serial_42, "PPP Account User Passwords" },
1758         { serial_43, "PPP Account Authentication Settings" },
1759         { serial_44, "PPP Account Connection Hold Times" },
1760         { serial_45, "PPP UDP Proxy IP Header" },
1761         { serial_46, "PPP UDP Proxy Transmit Buffer Size" },
1762         { serial_47, "PPP UDP Proxy Receive Buffer Size" },
1763         { serial_48, "PPP Remote Console IP Address" },
1764         { serial_49, "System Phone Number" },
1765         { serial_50, "Bitrate Support" },
1766         { serial_51, "System Serial Port Association" },
1767         { serial_52, "System Connector Names" },
1768         { serial_53, "System Serial Channel Names" }
1769 };
1770
1771 /* Set Serial/Modem Configuration Parameters
1772  */
1773 static void
1774 rq10(tvbuff_t *tvb, proto_tree *tree)
1775 {
1776         static const int *byte1[] = { &hf_ipmi_trn_10_chan, NULL };
1777         tvbuff_t *next;
1778         const char *desc;
1779         guint8 pno;
1780
1781         pno = tvb_get_guint8(tvb, 1);
1782         if (pno < array_length(serial_options)) {
1783                 desc = serial_options[pno].name;
1784         } else if (pno >= 0xC0) {
1785                 desc = "OEM";
1786         } else {
1787                 desc = "Reserved";
1788         }
1789
1790         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_trn_10_byte1,
1791                         byte1, TRUE, 0);
1792         proto_tree_add_uint_format_value(tree, hf_ipmi_trn_10_param, tvb, 1, 1,
1793                         pno, "%s (0x%02x)", desc, pno);
1794         if (pno < array_length(serial_options)) {
1795                 next = tvb_new_subset(tvb, 2, tvb_length(tvb) - 2, tvb_length(tvb) - 2);
1796                 serial_options[pno].intrp(next, tree);
1797         } else {
1798                 proto_tree_add_item(tree, hf_ipmi_trn_10_param_data, tvb, 2,
1799                                 tvb_length(tvb) - 2, TRUE);
1800         }
1801 }
1802
1803 static const value_string cc10[] = {
1804         { 0x80, "Parameter not supported" },
1805         { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
1806         { 0x82, "Attempt to write read-only parameter" },
1807         { 0x83, "Attempt to read write-only parameter" },
1808         { 0, NULL }
1809 };
1810
1811 /* Get LAN Configuration Parameters
1812  */
1813 static void
1814 rq11(tvbuff_t *tvb, proto_tree *tree)
1815 {
1816         static const int *byte1[] = { &hf_ipmi_trn_11_getrev, &hf_ipmi_trn_11_chan, NULL };
1817         const char *desc;
1818         guint8 pno;
1819
1820         pno = tvb_get_guint8(tvb, 1);
1821
1822         if (!tree) {
1823                 ipmi_setsaveddata(0, pno);
1824                 ipmi_setsaveddata(1, tvb_get_guint8(tvb, 0));
1825                 return;
1826         }
1827
1828         if (pno < array_length(serial_options)) {
1829                 desc = serial_options[pno].name;
1830         } else if (pno >= 0xC0) {
1831                 desc = "OEM";
1832         } else {
1833                 desc = "Reserved";
1834         }
1835
1836         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1837                         ett_ipmi_trn_11_byte1, byte1, TRUE, 0);
1838         proto_tree_add_uint_format_value(tree, hf_ipmi_trn_11_param, tvb, 1, 1,
1839                         pno, "%s (0x%02x)", desc, pno);
1840         proto_tree_add_item(tree, hf_ipmi_trn_11_set, tvb, 2, 1, TRUE);
1841         proto_tree_add_item(tree, hf_ipmi_trn_11_block, tvb, 2, 1, TRUE);
1842 }
1843
1844 static void
1845 rs11(tvbuff_t *tvb, proto_tree *tree)
1846 {
1847         static const int *byte1[] = { &hf_ipmi_trn_11_rev_present, &hf_ipmi_trn_11_rev_compat, NULL };
1848         proto_item *ti;
1849         tvbuff_t *next;
1850         const char *desc;
1851         guint32 pno, req;
1852
1853         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1854                         ett_ipmi_trn_11_rev, byte1, TRUE, 0);
1855
1856         if (!ipmi_getsaveddata(0, &pno) && !ipmi_getsaveddata(1, &req)) {
1857                 /* No request found - cannot parse further */
1858                 if (tvb_length(tvb) > 1) {
1859                         proto_tree_add_item(tree, hf_ipmi_trn_11_param_data, tvb, 1, tvb_length(tvb) - 1, TRUE);
1860                 };
1861                 return;
1862         }
1863
1864         if (pno < array_length(serial_options)) {
1865                 desc = serial_options[pno].name;
1866         } else if (pno >= 0xC0) {
1867                 desc = "OEM";
1868         } else {
1869                 desc = "Reserved";
1870         }
1871
1872         if ((req & 0x80) && tvb_length(tvb) > 1) {
1873                 ti = proto_tree_add_text(tree, tvb, 0, 0, "Requested parameter revision; parameter data returned");
1874                 PROTO_ITEM_SET_GENERATED(ti);
1875         } else if (!(req & 0x80) && tvb_length(tvb) == 1) {
1876                 ti = proto_tree_add_text(tree, tvb, 0, 0, "Requested parameter data; only parameter version returned");
1877                 PROTO_ITEM_SET_GENERATED(ti);
1878         }
1879
1880         ti = proto_tree_add_text(tree, tvb, 0, 0, "Parameter: %s", desc);
1881         PROTO_ITEM_SET_GENERATED(ti);
1882
1883         if (tvb_length(tvb) > 1) {
1884                 if (pno < array_length(serial_options)) {
1885                         next = tvb_new_subset(tvb, 1, tvb_length(tvb) - 1, tvb_length(tvb) - 1);
1886                         serial_options[pno].intrp(next, tree);
1887                 } else {
1888                         proto_tree_add_item(tree, hf_ipmi_trn_11_param_data, tvb, 1,
1889                                         tvb_length(tvb) - 1, TRUE);
1890                 }
1891         }
1892 }
1893
1894 static const value_string cc11[] = {
1895         { 0x80, "Parameter not supported" },
1896         { 0, NULL }
1897 };
1898
1899 /* Set Serial/Modem Mux
1900  */
1901 static void
1902 rq12(tvbuff_t *tvb, proto_tree *tree)
1903 {
1904         static const gint *byte1[] = { &hf_ipmi_trn_12_chan, NULL };
1905         static const gint *byte2[] = { &hf_ipmi_trn_12_mux_setting, NULL };
1906
1907         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1908                         ett_ipmi_trn_12_rq_byte1, byte1, TRUE, 0);
1909         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
1910                         ett_ipmi_trn_12_rq_byte2, byte2, TRUE, 0);
1911 }
1912
1913 static void
1914 rs12(tvbuff_t *tvb, proto_tree *tree)
1915 {
1916         static const gint *byte1[] = { &hf_ipmi_trn_12_sw_to_sys, &hf_ipmi_trn_12_sw_to_bmc,
1917                 &hf_ipmi_trn_12_alert, &hf_ipmi_trn_12_msg, &hf_ipmi_trn_12_req, &hf_ipmi_trn_12_mux_state, NULL };
1918
1919         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1920                         ett_ipmi_trn_12_rs_byte1, byte1, TRUE, 0);
1921 }
1922
1923 /* Get TAP Response Codes
1924  */
1925 static void
1926 rq13(tvbuff_t *tvb, proto_tree *tree)
1927 {
1928         static const gint *byte1[] = { &hf_ipmi_trn_13_chan, NULL };
1929
1930         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1931                         ett_ipmi_trn_13_byte1, byte1, TRUE, 0);
1932 }
1933
1934 static void
1935 rs13(tvbuff_t *tvb, proto_tree *tree)
1936 {
1937         proto_tree_add_item(tree, hf_ipmi_trn_13_code1, tvb, 0, 3, TRUE);
1938         proto_tree_add_item(tree, hf_ipmi_trn_13_code2, tvb, 3, 3, TRUE);
1939         proto_tree_add_item(tree, hf_ipmi_trn_13_code3, tvb, 6, 3, TRUE);
1940         proto_tree_add_item(tree, hf_ipmi_trn_13_code4, tvb, 9, 3, TRUE);
1941         proto_tree_add_item(tree, hf_ipmi_trn_13_code5, tvb, 12, 3, TRUE);
1942 }
1943
1944 /* Set PPP UDP Proxy Transmit Data
1945  */
1946 static void
1947 rq14(tvbuff_t *tvb, proto_tree *tree)
1948 {
1949         static const gint *byte1[] = { &hf_ipmi_trn_14_chan, NULL };
1950
1951         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1952                         ett_ipmi_trn_14_byte1, byte1, TRUE, 0);
1953         proto_tree_add_item(tree, hf_ipmi_trn_14_block, tvb, 1, 1, TRUE);
1954         proto_tree_add_item(tree, hf_ipmi_trn_14_data, tvb, 2, 16, TRUE);
1955 }
1956
1957 /* Get PPP UDP Proxy Transmit Data
1958  */
1959 static void
1960 rq15(tvbuff_t *tvb, proto_tree *tree)
1961 {
1962         static const gint *byte1[] = { &hf_ipmi_trn_15_chan, NULL };
1963
1964         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1965                         ett_ipmi_trn_15_byte1, byte1, TRUE, 0);
1966         proto_tree_add_item(tree, hf_ipmi_trn_15_block, tvb, 1, 1, TRUE);
1967 }
1968
1969 static void
1970 rs15(tvbuff_t *tvb, proto_tree *tree)
1971 {
1972         proto_tree_add_item(tree, hf_ipmi_trn_15_data, tvb, 0, 16, TRUE);
1973 }
1974
1975 /* Send PPP UDP Proxy Packet
1976  */
1977 static void
1978 rq16(tvbuff_t *tvb, proto_tree *tree)
1979 {
1980         static const gint *byte1[] = { &hf_ipmi_trn_16_chan, NULL };
1981
1982         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
1983                         ett_ipmi_trn_16_byte1, byte1, TRUE, 0);
1984         proto_tree_add_item(tree, hf_ipmi_trn_16_src_port, tvb, 1, 2, TRUE);
1985         proto_tree_add_item(tree, hf_ipmi_trn_16_dst_port, tvb, 3, 2, TRUE);
1986         proto_tree_add_item(tree, hf_ipmi_trn_16_src_addr, tvb, 5, 4, FALSE);
1987         proto_tree_add_item(tree, hf_ipmi_trn_16_dst_addr, tvb, 9, 4, FALSE);
1988         proto_tree_add_item(tree, hf_ipmi_trn_16_bytes, tvb, 13, 2, TRUE);
1989 }
1990
1991 static const value_string cc16[] = {
1992         { 0x80, "PPP link is not up" },
1993         { 0x81, "IP protocol is not up" },
1994         { 0, NULL }
1995 };
1996
1997 /* Get PPP UDP Proxy Receive Data
1998  */
1999 static void
2000 tr17_fmt_blockno(gchar *s, guint32 v)
2001 {
2002         g_snprintf(s, ITEM_LABEL_LENGTH, "%d%s",
2003                         v, v ? "" : " (get received data length)");
2004 }
2005
2006 static void
2007 rq17(tvbuff_t *tvb, proto_tree *tree)
2008 {
2009         static const gint *byte1[] = { &hf_ipmi_trn_17_chan, NULL };
2010         static const gint *byte2[] = { &hf_ipmi_trn_17_clear, &hf_ipmi_trn_17_block_num, NULL };
2011
2012         if (!tree) {
2013                 /* Save block number */
2014                 ipmi_setsaveddata(0, tvb_get_guint8(tvb, 1) & 0x7f);
2015                 return;
2016         }
2017
2018         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
2019                         ett_ipmi_trn_17_byte1, byte1, TRUE, 0);
2020         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
2021                         ett_ipmi_trn_17_byte2, byte2, TRUE, 0);
2022 }
2023
2024 static void
2025 rs17(tvbuff_t *tvb, proto_tree *tree)
2026 {
2027         guint32 bno;
2028
2029         if (ipmi_getsaveddata(0, &bno) && bno == 0) {
2030                 /* Request for length */
2031                 proto_tree_add_item(tree, hf_ipmi_trn_17_size, tvb, 0, 2, TRUE);
2032         } else {
2033                 proto_tree_add_item(tree, hf_ipmi_trn_17_data, tvb, 0,
2034                                 tvb_length(tvb) < 16 ? tvb_length(tvb) : 16, TRUE);
2035         }
2036 }
2037
2038 static const value_string cc17[] = {
2039         { 0x80, "No packet data available" },
2040         { 0, NULL }
2041 };
2042
2043 /* Serial/Modem Connection Active
2044  */
2045 static void
2046 rq18(tvbuff_t *tvb, proto_tree *tree)
2047 {
2048         static const gint *byte1[] = { &hf_ipmi_trn_18_state, NULL };
2049
2050         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
2051                         ett_ipmi_trn_18_byte1, byte1, TRUE, 0);
2052         proto_tree_add_item(tree, hf_ipmi_trn_18_ipmi_ver, tvb, 1, 1, TRUE);
2053 }
2054
2055 /* Callback
2056  */
2057 static void
2058 rq19(tvbuff_t *tvb, proto_tree *tree)
2059 {
2060         static const gint *byte1[] = { &hf_ipmi_trn_19_chan, NULL };
2061         static const gint *byte2[] = { &hf_ipmi_trn_19_dest_sel, NULL };
2062
2063         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
2064                         ett_ipmi_trn_19_byte1, byte1, TRUE, 0);
2065         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
2066                         ett_ipmi_trn_19_byte2, byte2, TRUE, 0);
2067 }
2068
2069 static const value_string cc19[] = {
2070         { 0x81, "Callback rejected, alert in progress on this channel" },
2071         { 0x82, "Callback rejected, IPMI messaging active on this channel" },
2072         { 0, NULL }
2073 };
2074
2075 /* Common for Set/Get User Callback Options
2076  */
2077 static void
2078 parse_callback_options(tvbuff_t *tvb, guint offs, proto_tree *tree)
2079 {
2080         static const gint *usercap[] = { &hf_ipmi_trn_XX_cap_cbcp, &hf_ipmi_trn_XX_cap_ipmi, NULL };
2081         static const gint *cbcp[] = { &hf_ipmi_trn_XX_cbcp_from_list, &hf_ipmi_trn_XX_cbcp_user,
2082                 &hf_ipmi_trn_XX_cbcp_prespec, &hf_ipmi_trn_XX_cbcp_nocb, NULL };
2083
2084         proto_tree_add_bitmask_text(tree, tvb, offs, 1,
2085                         "User callback capabilities: ", "None",
2086                         ett_ipmi_trn_XX_usercap, usercap, TRUE, BMT_NO_TFS);
2087         proto_tree_add_bitmask_text(tree, tvb, offs + 1, 1,
2088                         "CBCP negotiation options: ", "None",
2089                         ett_ipmi_trn_XX_cbcp, cbcp, TRUE, BMT_NO_TFS);
2090         proto_tree_add_item(tree, hf_ipmi_trn_XX_dst1, tvb, offs + 2, 1, TRUE);
2091         proto_tree_add_item(tree, hf_ipmi_trn_XX_dst2, tvb, offs + 3, 1, TRUE);
2092         proto_tree_add_item(tree, hf_ipmi_trn_XX_dst3, tvb, offs + 4, 1, TRUE);
2093 }
2094
2095 /* Set User Callback Options
2096  */
2097 static void
2098 rq1a(tvbuff_t *tvb, proto_tree *tree)
2099 {
2100         static const gint *byte1[] = { &hf_ipmi_trn_1a_user, NULL };
2101         static const gint *byte2[] = { &hf_ipmi_trn_1a_chan, NULL };
2102
2103         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
2104                         ett_ipmi_trn_1a_byte1, byte1, TRUE, 0);
2105         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
2106                         ett_ipmi_trn_1a_byte2, byte2, TRUE, 0);
2107         parse_callback_options(tvb, 2, tree);
2108 }
2109
2110 /* Get User Callback Options
2111  */
2112 static void
2113 rq1b(tvbuff_t *tvb, proto_tree *tree)
2114 {
2115         static const gint *byte1[] = { &hf_ipmi_trn_1b_user, NULL };
2116         static const gint *byte2[] = { &hf_ipmi_trn_1b_chan, NULL };
2117
2118         proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
2119                         ett_ipmi_trn_1b_byte1, byte1, TRUE, 0);
2120         proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
2121                         ett_ipmi_trn_1b_byte2, byte2, TRUE, 0);
2122 }
2123
2124 static void
2125 rs1b(tvbuff_t *tvb, proto_tree *tree)
2126 {
2127         parse_callback_options(tvb, 0, tree);
2128 }
2129
2130 static const value_string cc21[] = {
2131         { 0x80, "Parameter not supported" },
2132         { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
2133         { 0x82, "Attempt to write read-only parameter" },
2134         { 0x83, "Attempt to read write-only parameter" },
2135         { 0, NULL }
2136 };
2137
2138 static const value_string cc22[] = {
2139         { 0x80, "Parameter not supported" },
2140         { 0, NULL }
2141 };
2142
2143 static const value_string cc33[] = {
2144         { 0x80, "Target controller unavailable" },
2145         { 0, NULL }
2146 };
2147
2148 static ipmi_cmd_t cmd_transport[] = {
2149   /* LAN Device Commands */
2150   { 0x01, rq01, NULL, cc01, NULL, "Set LAN Configuration Parameters", 0 },
2151   { 0x02, rq02, rs02, cc02, NULL, "Get LAN Configuration Parameters", CMD_CALLRQ },
2152   { 0x03, rq03, rs03, NULL, NULL, "Suspend BMC ARPs", 0 },
2153   { 0x04, rq04, rs04, NULL, NULL, "Get IP/UDP/RMCP Statistics", 0 },
2154
2155   /* Serial/Modem Device Commands */
2156   { 0x10, rq10, NULL, cc10, NULL, "Set Serial/Modem Configuration", 0 },
2157   { 0x11, rq11, rs11, cc11, NULL, "Get Serial/Modem Configuration", CMD_CALLRQ },
2158   { 0x12, rq12, rs12, NULL, NULL, "Set Serial/Modem Mux", 0 },
2159   { 0x13, rq13, rs13, NULL, NULL, "Get TAP Response Codes", 0 },
2160   { 0x14, rq14, NULL, NULL, NULL, "Set PPP UDP Proxy Transmit Data", 0 },
2161   { 0x15, rq15, rs15, NULL, NULL, "Get PPP UDP Proxy Transmit Data", 0 },
2162   { 0x16, rq16, NULL, cc16, NULL, "Send PPP UDP Proxy Packet", 0 },
2163   { 0x17, rq17, rs17, cc17, NULL, "Get PPP UDP Proxy Receive Data", CMD_CALLRQ },
2164   { 0x18, rq18, NULL, NULL, NULL, "Serial/Modem Connection Active", 0 },
2165   { 0x19, rq19, NULL, cc19, NULL, "Callback", 0 },
2166   { 0x1a, rq1a, NULL, NULL, NULL, "Set User Callback Options", 0 },
2167   { 0x1b, rq1b, rs1b, NULL, NULL, "Get User Callback Options", 0 },
2168   { 0x1c, IPMI_TBD,   NULL, NULL, "Set Serial Routing Mux", 0 },
2169
2170   /* Serial-Over-LAN Commands */
2171   { 0x20, IPMI_TBD,   NULL, NULL, "SOL Activating", 0 },
2172   { 0x21, IPMI_TBD,   cc21, NULL, "Set SOL Configuration Parameters", 0 },
2173   { 0x22, IPMI_TBD,   cc22, NULL, "Get SOL Configuration Parameters", CMD_CALLRQ },
2174
2175   /* Command Forwarding Commands */
2176   { 0x30, IPMI_TBD,   NULL, NULL, "Forwarded Command", 0 },
2177   { 0x31, IPMI_TBD,   NULL, NULL, "Set Forwarded Commands", 0 },
2178   { 0x32, IPMI_TBD,   NULL, NULL, "Get Forwarded Commands", 0 },
2179   { 0x33, IPMI_TBD,   cc33, NULL, "Enable Forwarded Commands", 0 },
2180 };
2181
2182 void
2183 ipmi_register_transport(gint proto_ipmi)
2184 {
2185         static hf_register_info hf[] = {
2186                 { &hf_ipmi_trn_lan00_sip,
2187                         { "Set In Progress",
2188                                 "ipmi.lan00.sip", FT_UINT8, BASE_HEX, lan00_sip_vals, 0x03, "", HFILL }},
2189
2190                 { &hf_ipmi_trn_lanXX_oem,
2191                         { "OEM Proprietary",
2192                                 "ipmi.lanXX.oem", FT_BOOLEAN, 8, NULL, 0x20, "", HFILL }},
2193                 { &hf_ipmi_trn_lanXX_passwd,
2194                         { "Straight password/key",
2195                                 "ipmi.lanXX.passwd", FT_BOOLEAN, 8, NULL, 0x10, "", HFILL }},
2196                 { &hf_ipmi_trn_lanXX_md5,
2197                         { "MD5",
2198                                 "ipmi.lanXX.md5", FT_BOOLEAN, 8, NULL, 0x04, "", HFILL }},
2199                 { &hf_ipmi_trn_lanXX_md2,
2200                         { "MD2",
2201                                 "ipmi.lanXX.md2", FT_BOOLEAN, 8, NULL, 0x02, "", HFILL }},
2202                 { &hf_ipmi_trn_lanXX_none,
2203                         { "None",
2204                                 "ipmi.lanXX.none", FT_BOOLEAN, 8, NULL, 0x01, "", HFILL }},
2205
2206                 { &hf_ipmi_trn_lan03_ip,
2207                         { "IP Address",
2208                                 "ipmi.lan03.ip", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2209
2210                 { &hf_ipmi_trn_lan04_ipsrc,
2211                         { "IP Address Source",
2212                                 "ipmi.lan04.ipsrc", FT_UINT8, BASE_HEX, lan04_ipsrc_vals, 0x0f, "", HFILL }},
2213
2214                 { &hf_ipmi_trn_lan05_ether,
2215                         { "MAC Address",
2216                                 "ipmi.lan05.mac", FT_ETHER, BASE_NONE, NULL, 0, "", HFILL }},
2217
2218                 { &hf_ipmi_trn_lan06_subnet,
2219                         { "Subnet Mask",
2220                                 "ipmi.lan06.subnet", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2221
2222                 { &hf_ipmi_trn_lan07_ttl,
2223                         { "Time-to-live",
2224                                 "ipmi.lan07.ttl", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2225                 { &hf_ipmi_trn_lan07_flags,
2226                         { "Flags",
2227                                 "ipmi.lan07.flags", FT_UINT8, BASE_HEX, NULL, 0xe0, "", HFILL }},
2228                 { &hf_ipmi_trn_lan07_precedence,
2229                         { "Precedence",
2230                                 "ipmi.lan07.precedence", FT_UINT8, BASE_DEC, NULL, 0xe0, "", HFILL }},
2231                 { &hf_ipmi_trn_lan07_tos,
2232                         { "Type of service",
2233                                 "ipmi.lan07.tos", FT_UINT8, BASE_HEX, NULL, 0x1e, "", HFILL }},
2234
2235                 { &hf_ipmi_trn_lan08_rmcp_port,
2236                         { "Primary RMCP Port Number",
2237                                 "ipmi.lan08.rmcp_port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }},
2238
2239                 { &hf_ipmi_trn_lan09_rmcp_port,
2240                         { "Secondary RMCP Port Number",
2241                                 "ipmi.lan09.rmcp_port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }},
2242
2243                 { &hf_ipmi_trn_lan10_responses,
2244                         { "ARP responses",
2245                                 "ipmi.lan10.responses", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2246                 { &hf_ipmi_trn_lan10_gratuitous,
2247                         { "Gratuitous ARPs",
2248                                 "ipmi.lan10.gratuitous", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2249
2250                 { &hf_ipmi_trn_lan11_arp_interval,
2251                         { "Gratuitous ARP interval",
2252                                 "ipmi.lan10.arp_interval", FT_UINT8, BASE_CUSTOM, ipmi_fmt_500ms_0based, 0, "", HFILL }},
2253
2254                 { &hf_ipmi_trn_lan12_def_gw_ip,
2255                         { "Default Gateway Address",
2256                                 "ipmi.lan12.def_gw_ip", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2257
2258                 { &hf_ipmi_trn_lan13_def_gw_mac,
2259                         { "Default Gateway MAC Address",
2260                                 "ipmi.lan13.def_gw_mac", FT_ETHER, BASE_NONE, NULL, 0, "", HFILL }},
2261
2262                 { &hf_ipmi_trn_lan14_bkp_gw_ip,
2263                         { "Backup Gateway Address",
2264                                 "ipmi.lan14.bkp_gw_ip", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2265
2266                 { &hf_ipmi_trn_lan15_bkp_gw_mac,
2267                         { "Backup Gateway MAC Address",
2268                                 "ipmi.lan15.bkp_gw_mac", FT_ETHER, BASE_NONE, NULL, 0, "", HFILL }},
2269
2270                 { &hf_ipmi_trn_lan16_comm_string,
2271                         { "Community String",
2272                                 "ipmi.lan16.comm_string", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2273
2274                 { &hf_ipmi_trn_lan17_num_dst,
2275                         { "Number of Destinations",
2276                                 "ipmi.lan17.num_dst", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2277
2278                 { &hf_ipmi_trn_lan18_dst_selector,
2279                         { "Destination Selector",
2280                                 "ipmi.lan18.dst_selector", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2281                 { &hf_ipmi_trn_lan18_ack,
2282                         { "Alert Acknowledged",
2283                                 "ipmi.lan18.ack", FT_BOOLEAN, 8, TFS(&lan18_ack_tfs), 0x80, "", HFILL }},
2284                 { &hf_ipmi_trn_lan18_dst_type,
2285                         { "Destination Type",
2286                                 "ipmi.lan18.dst_type", FT_UINT8, BASE_HEX, lan18_dst_type_vals, 0x07, "", HFILL }},
2287                 { &hf_ipmi_trn_lan18_tout,
2288                         { "Timeout/Retry Interval",
2289                                 "ipmi.lan18.tout", FT_UINT8, BASE_CUSTOM, ipmi_fmt_1s_0based, 0, "", HFILL }},
2290                 { &hf_ipmi_trn_lan18_retries,
2291                         { "Retries",
2292                                 "ipmi.lan18.retries", FT_UINT8, BASE_DEC, NULL, 0x07, "", HFILL }},
2293
2294                 { &hf_ipmi_trn_lan19_dst_selector,
2295                         { "Destination Selector",
2296                                 "ipmi.lan19.dst_selector", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2297                 { &hf_ipmi_trn_lan19_addr_format,
2298                         { "Address Format",
2299                                 "ipmi.lan19.addr_format", FT_UINT8, BASE_HEX, lan19_af_vals, 0xf0, "", HFILL }},
2300                 { &hf_ipmi_trn_lan19_address,
2301                         { "Address (format unknown)",
2302                                 "ipmi.lan19.address", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2303                 { &hf_ipmi_trn_lan19_gw_sel,
2304                         { "Gateway selector",
2305                                 "ipmi.lan19.gw_sel", FT_BOOLEAN, 8, TFS(&lan19_gw_sel_tfs), 0x01, "", HFILL }},
2306                 { &hf_ipmi_trn_lan19_ip,
2307                         { "Alerting IP Address",
2308                                 "ipmi.lan19.ip", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2309                 { &hf_ipmi_trn_lan19_mac,
2310                         { "Alerting MAC Address",
2311                                 "ipmi.lan19.mac", FT_ETHER, BASE_NONE, NULL, 0, "", HFILL }},
2312
2313                 { &hf_ipmi_trn_lan20_vlan_id_enable,
2314                         { "VLAN ID Enable",
2315                                 "ipmi.lan20.vlan_id_enable", FT_BOOLEAN, 16, TFS(&lan20_enable_tfs), 0x8000, "", HFILL }},
2316                 { &hf_ipmi_trn_lan20_vlan_id,
2317                         { "VLAN ID",
2318                                 "ipmi.lan20.vlan_id", FT_UINT16, BASE_HEX, NULL, 0x0fff, "", HFILL }},
2319
2320                 { &hf_ipmi_trn_lan21_vlan_prio,
2321                         { "VLAN Priority",
2322                                 "ipmi.lan21.vlan_prio", FT_UINT8, BASE_DEC, NULL, 0x07, "", HFILL }},
2323
2324                 { &hf_ipmi_trn_lan22_num_cs_entries,
2325                         { "Number of Cipher Suite Entries",
2326                                 "ipmi.lan22.num_cs_entries", FT_UINT8, BASE_DEC, NULL, 0x1f, "", HFILL }},
2327
2328                 { &hf_ipmi_trn_lan23_cs_entry,
2329                         { "Cipher Suite ID",
2330                                 "ipmi.lan23.cs_entry", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2331
2332                 { &hf_ipmi_trn_lan24_priv,
2333                         { "Maximum Privilege Level",
2334                                 "ipmi.lan24.priv", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
2335
2336                 { &hf_ipmi_trn_lan25_dst_selector,
2337                         { "Destination Selector",
2338                                 "ipmi.lan25.dst_selector", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2339                 { &hf_ipmi_trn_lan25_addr_format,
2340                         { "Address Format",
2341                                 "ipmi.lan25.addr_format", FT_UINT8, BASE_HEX, lan25_af_vals, 0xf0, "", HFILL }},
2342                 { &hf_ipmi_trn_lan25_address,
2343                         { "Address (format unknown)",
2344                                 "ipmi.lan25.address", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
2345                 { &hf_ipmi_trn_lan25_uprio,
2346                         { "User priority",
2347                                 "ipmi.lan25.uprio", FT_UINT16, BASE_DEC, NULL, 0xe000, "", HFILL }},
2348                 { &hf_ipmi_trn_lan25_cfi,
2349                         { "CFI",
2350                                 "ipmi.lan25.cfi", FT_BOOLEAN, 16, NULL, 0x1000, "", HFILL }},
2351                 { &hf_ipmi_trn_lan25_vlan_id,
2352                         { "VLAN ID",
2353                                 "ipmi.lan25.vlan_id", FT_UINT16, BASE_HEX, NULL, 0x0fff, "", HFILL }},
2354
2355                 { &hf_ipmi_trn_serial03_connmode,
2356                         { "Connection Mode",
2357                                 "ipmi.serial03.connmode", FT_BOOLEAN, 8, TFS(&serial03_connmode_tfs), 0x80, "", HFILL }},
2358                 { &hf_ipmi_trn_serial03_terminal,
2359                         { "Terminal Mode",
2360                                 "ipmi.serial03.terminal", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }},
2361                 { &hf_ipmi_trn_serial03_ppp,
2362                         { "PPP Mode",
2363                                 "ipmi.serial03.ppp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2364                 { &hf_ipmi_trn_serial03_basic,
2365                         { "Basic Mode",
2366                                 "ipmi.serial03.basic", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2367                 { &hf_ipmi_trn_serial04_timeout,
2368                         { "Session Inactivity Timeout",
2369                                 "ipmi.serial04.timeout", FT_UINT8, BASE_CUSTOM, serial04_timeout_fmt, 0x0f, "", HFILL }},
2370                 { &hf_ipmi_trn_serial05_cbcp_callback,
2371                         { "CBCP Callback",
2372                                 "ipmi.serial05.cbcp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2373                 { &hf_ipmi_trn_serial05_ipmi_callback,
2374                         { "IPMI Callback",
2375                                 "ipmi.serial05.ipmi", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2376                 { &hf_ipmi_trn_serial05_cb_list,
2377                         { "Callback to list of possible numbers",
2378                                 "ipmi.serial05.cb_list", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }},
2379                 { &hf_ipmi_trn_serial05_cb_user,
2380                         { "Callback to user-specifiable number",
2381                                 "ipmi.serial05.cb_user", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }},
2382                 { &hf_ipmi_trn_serial05_cb_prespec,
2383                         { "Callback to pre-specified number",
2384                                 "ipmi.serial05.cb_prespec", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2385                 { &hf_ipmi_trn_serial05_no_cb,
2386                         { "No callback",
2387                                 "ipmi.serial05.no_cb", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2388                 { &hf_ipmi_trn_serial05_cb_dest1,
2389                         { "Callback destination 1",
2390                                 "ipmi.serial05.cb_dest1", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2391                 { &hf_ipmi_trn_serial05_cb_dest2,
2392                         { "Callback destination 2",
2393                                 "ipmi.serial05.cb_dest2", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2394                 { &hf_ipmi_trn_serial05_cb_dest3,
2395                         { "Callback destination 3",
2396                                 "ipmi.serial05.cb_dest3", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2397                 { &hf_ipmi_trn_serial06_inactivity,
2398                         { "Session Inactivity Timeout",
2399                                 "ipmi.serial06.inactivity", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2400                 { &hf_ipmi_trn_serial06_dcd,
2401                         { "Close on DCD Loss",
2402                                 "ipmi.serial06.dcd", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2403                 { &hf_ipmi_trn_serial07_flowctl,
2404                         { "Flow Control",
2405                                 "ipmi.serial07.flowctl", FT_UINT8, BASE_HEX, serialXX_flowctl_vals, 0xc0, "", HFILL }},
2406                 { &hf_ipmi_trn_serial07_dtrhangup,
2407                         { "DTR Hang-up",
2408                                 "ipmi.serial07.dtrhangup", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }},
2409                 { &hf_ipmi_trn_serial07_bitrate,
2410                         { "Bit rate",
2411                                 "ipmi.serial07.bitrate", FT_UINT8, BASE_HEX, serialXX_bitrate_vals, 0x0f, "", HFILL }},
2412                 { &hf_ipmi_trn_serial08_esc_powerup,
2413                         { "Power-up/wakeup via ESC-^",
2414                                 "ipmi.serial08.esc_powerup", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x40, "", HFILL }},
2415                 { &hf_ipmi_trn_serial08_esc_reset,
2416                         { "Hard reset via ESC-R-ESC-r-ESC-R",
2417                                 "ipmi.serial08.esc_reset", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }},
2418                 { &hf_ipmi_trn_serial08_switch_authcap,
2419                         { "Baseboard-to-BMC switch on Get Channel Auth Capabilities",
2420                                 "ipmi.serial08.switch_authcap", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10, "", HFILL }},
2421                 { &hf_ipmi_trn_serial08_switch_rmcp,
2422                         { "Switch to BMC on IPMI-RMCP pattern",
2423                                 "ipmi.serial08.switch_rmcp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }},
2424                 { &hf_ipmi_trn_serial08_esc_switch1,
2425                         { "BMC-to-Baseboard switch via ESC-Q",
2426                                 "ipmi.serial08.esc_switch1", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }},
2427                 { &hf_ipmi_trn_serial08_esc_switch2,
2428                         { "Baseboard-to-BMC switch via ESC-(",
2429                                 "ipmi.serial08.esc_switch2", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2430                 { &hf_ipmi_trn_serial08_switch_dcdloss,
2431                         { "Switch to BMC on DCD loss",
2432                                 "ipmi.serial08.switch_dcdloss", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2433                 { &hf_ipmi_trn_serial08_sharing,
2434                         { "Serial Port Sharing",
2435                                 "ipmi.serial08.sharing", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }},
2436                 { &hf_ipmi_trn_serial08_ping_callback,
2437                         { "Serial/Modem Connection Active during callback",
2438                                 "ipmi.serial08.ping_callback", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }},
2439                 { &hf_ipmi_trn_serial08_ping_direct,
2440                         { "Serial/Modem Connection Active during direct call",
2441                                 "ipmi.serial08.ping_direct", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2442                 { &hf_ipmi_trn_serial08_ping_retry,
2443                         { "Retry Serial/Modem Connection Active",
2444                                 "ipmi.serial08.ping_retry", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2445                 { &hf_ipmi_trn_serial09_ring_duration,
2446                         { "Ring Duration",
2447                                 "ipmi.serial09.ring_duration", FT_UINT8, BASE_CUSTOM, ipmi_fmt_500ms_1based, 0x3f, "", HFILL }},
2448                 { &hf_ipmi_trn_serial09_ring_dead,
2449                         { "Ring Dead Time",
2450                                 "ipmi.serial09.ring_dead", FT_UINT8, BASE_CUSTOM, ipmi_fmt_500ms_0based, 0x0f, "", HFILL }},
2451                 { &hf_ipmi_trn_serial10_set_sel,
2452                         { "Set selector (16-byte block #)",
2453                                 "ipmi.serial10.set_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2454                 { &hf_ipmi_trn_serial10_init_str,
2455                         { "Modem Init String",
2456                                 "ipmi.serial10.init_str", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2457                 { &hf_ipmi_trn_serial11_esc_seq,
2458                         { "Modem Escape Sequence",
2459                                 "ipmi.serial11.esc_seq", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2460                 { &hf_ipmi_trn_serial12_hangup_seq,
2461                         { "Modem Hang-up Sequence",
2462                                 "ipmi.serial12.hangup_seq", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2463                 { &hf_ipmi_trn_serial13_dial_cmd,
2464                         { "Modem Dial Command",
2465                                 "ipmi.serial13.dial_cmd", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2466                 { &hf_ipmi_trn_serial14_page_blackout,
2467                         { "Page Blackout Interval (minutes)",
2468                                 "ipmi.serial14.page_blackout", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2469                 { &hf_ipmi_trn_serial15_comm_string,
2470                         { "Community String",
2471                                 "ipmi.serial15.comm_string", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2472                 { &hf_ipmi_trn_serial16_ndest,
2473                         { "Number of non-volatile Alert Destinations",
2474                                 "ipmi.serial16.ndest", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2475                 { &hf_ipmi_trn_serial17_dest_sel,
2476                         { "Destination Selector",
2477                                 "ipmi.serial17.dest_sel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2478                 { &hf_ipmi_trn_serial17_ack,
2479                         { "Alert Acknowledge",
2480                                 "ipmi.serial17.ack", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }},
2481                 { &hf_ipmi_trn_serial17_dest_type,
2482                         { "Destination Type",
2483                                 "ipmi.serial17.dest_type", FT_UINT8, BASE_HEX, serial17_dest_type_vals, 0x0f, "", HFILL }},
2484                 { &hf_ipmi_trn_serial17_ack_timeout,
2485                         { "Alert Acknowledge Timeout",
2486                                 "ipmi.serial17.ack_timeout", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2487                 { &hf_ipmi_trn_serial17_alert_retries,
2488                         { "Alert retries",
2489                                 "ipmi.serial17.alert_retries", FT_UINT8, BASE_DEC, NULL, 0x70, "", HFILL }},
2490                 { &hf_ipmi_trn_serial17_call_retries,
2491                         { "Call retries",
2492                                 "ipmi.serial17.call_retries", FT_UINT8, BASE_DEC, NULL, 0x07, "", HFILL }},
2493                 { &hf_ipmi_trn_serial17_alert_ack_timeout,
2494                         { "Alert Acknowledge Timeout",
2495                                 "ipmi.serial17.alert_ack_timeout", FT_UINT8, BASE_CUSTOM, ipmi_fmt_1s_0based, 0, "", HFILL }},
2496                 { &hf_ipmi_trn_serial17_dialstr_sel,
2497                         { "Dial String Selector",
2498                                 "ipmi.serial17.dialstr_sel", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2499                 { &hf_ipmi_trn_serial17_tap_sel,
2500                         { "TAP Account Selector",
2501                                 "ipmi.serial17.tap_sel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2502                 { &hf_ipmi_trn_serial17_ipaddr_sel,
2503                         { "Destination IP Address Selector",
2504                                 "ipmi.serial17.ipaddr_sel", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2505                 { &hf_ipmi_trn_serial17_ppp_sel,
2506                         { "PPP Account Set Selector",
2507                                 "ipmi.serial17.ppp_sel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2508                 { &hf_ipmi_trn_serial17_unknown,
2509                         { "Destination-specific (format unknown)",
2510                                 "ipmi.serial17.unknown", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2511                 { &hf_ipmi_trn_serial18_call_retry,
2512                         { "Call Retry Interval",
2513                                 "ipmi.serial18.call_retry", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2514                 { &hf_ipmi_trn_serial19_destsel,
2515                         { "Destination selector",
2516                                 "ipmi.serial19.destsel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2517                 { &hf_ipmi_trn_serial19_flowctl,
2518                         { "Flow Control",
2519                                 "ipmi.serial19.flowctl", FT_UINT8, BASE_HEX, serialXX_flowctl_vals, 0xc0, "", HFILL }},
2520                 { &hf_ipmi_trn_serial19_dtrhangup,
2521                         { "DTR Hang-up",
2522                                 "ipmi.serial19.dtrhangup", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }},
2523                 { &hf_ipmi_trn_serial19_stopbits,
2524                         { "Stop bits",
2525                                 "ipmi.serial19.stopbits", FT_BOOLEAN, 8, TFS(&serial19_stopbits_tfs), 0x10, "", HFILL }},
2526                 { &hf_ipmi_trn_serial19_charsize,
2527                         { "Character size",
2528                                 "ipmi.serial19.charsize", FT_BOOLEAN, 8, TFS(&serial19_charsize_tfs), 0x08, "", HFILL }},
2529                 { &hf_ipmi_trn_serial19_parity,
2530                         { "Parity",
2531                                 "ipmi.serial19.parity", FT_UINT8, BASE_HEX, serial19_parity_vals, 0x07, "", HFILL }},
2532                 { &hf_ipmi_trn_serial19_bitrate,
2533                         { "Bit rate",
2534                                 "ipmi.serial19.bitrate", FT_UINT8, BASE_HEX, serialXX_bitrate_vals, 0x0f, "", HFILL }},
2535                 { &hf_ipmi_trn_serial20_num_dial_strings,
2536                         { "Number of Dial Strings",
2537                                 "ipmi.serial20.num_dial_strings", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2538                 { &hf_ipmi_trn_serial21_dialsel,
2539                         { "Dial String Selector",
2540                                 "ipmi.serial21.dialsel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2541                 { &hf_ipmi_trn_serial21_blockno,
2542                         { "Block number",
2543                                 "ipmi.serial21.blockno", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2544                 { &hf_ipmi_trn_serial21_dialstr,
2545                         { "Dial string",
2546                                 "ipmi.serial21.dialstr", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2547                 { &hf_ipmi_trn_serial22_num_ipaddrs,
2548                         { "Number of Alert Destination IP Addresses",
2549                                 "ipmi.serial22.num_ipaddrs", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2550                 { &hf_ipmi_trn_serial23_destsel,
2551                         { "Destination IP Address selector",
2552                                 "ipmi.serial23.destsel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2553                 { &hf_ipmi_trn_serial23_ipaddr,
2554                         { "Destination IP Address",
2555                                 "ipmi.serial23.ipaddr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2556                 { &hf_ipmi_trn_serial24_num_tap_accounts,
2557                         { "Number of TAP Accounts",
2558                                 "ipmi.serial24.num_tap_accounts", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2559                 { &hf_ipmi_trn_serial25_tap_acct,
2560                         { "TAP Account Selector",
2561                                 "ipmi.serial25.tap_acct", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2562                 { &hf_ipmi_trn_serial25_dialstr_sel,
2563                         { "Dial String Selector",
2564                                 "ipmi.serial25.dialstr_sel", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2565                 { &hf_ipmi_trn_serial25_tapsrv_sel,
2566                         { "TAP Service Settings Selector",
2567                                 "ipmi.serial25.tapsrv_sel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2568                 { &hf_ipmi_trn_serial26_tap_acct,
2569                         { "TAP Account Selector",
2570                                 "ipmi.serial26.tap_acct", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2571                 { &hf_ipmi_trn_serial26_tap_passwd,
2572                         { "TAP Password",
2573                                 "ipmi.serial26.tap_passwd", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2574                 { &hf_ipmi_trn_serial27_tap_acct,
2575                         { "TAP Account Selector",
2576                                 "ipmi.serial27.tap_acct", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2577                 { &hf_ipmi_trn_serial27_tap_pager_id,
2578                         { "TAP Pager ID String",
2579                                 "ipmi.serial27.tap_pager_id", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2580                 { &hf_ipmi_trn_serial28_tapsrv_sel,
2581                         { "TAP Service Settings Selector",
2582                                 "ipmi.serial28.tapsrv_sel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2583                 { &hf_ipmi_trn_serial28_confirm,
2584                         { "TAP Confirmation",
2585                                 "ipmi.serial28.confirm", FT_UINT8, BASE_HEX, serial28_confirm_vals, 0x03, "", HFILL }},
2586                 { &hf_ipmi_trn_serial28_srvtype,
2587                         { "TAP 'SST' Service Type",
2588                                 "ipmi.serial28.srvtype", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2589                 { &hf_ipmi_trn_serial28_ctrl_esc,
2590                         { "TAP Control-character escaping mask",
2591                                 "ipmi.serial28.ctrl_esc", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
2592                 { &hf_ipmi_trn_serial28_t2,
2593                         { "TAP T2",
2594                                 "ipmi.serial28.tap_t2", FT_UINT8, BASE_CUSTOM, ipmi_fmt_500ms_0based, 0xf0, "", HFILL }},
2595                 { &hf_ipmi_trn_serial28_t1,
2596                         { "TAP T1",
2597                                 "ipmi.serial28.tap_t1", FT_UINT8, BASE_CUSTOM, ipmi_fmt_1s_0based, 0x0f, "", HFILL }},
2598                 { &hf_ipmi_trn_serial28_t4,
2599                         { "TAP T4",
2600                                 "ipmi.serial28.tap_t4", FT_UINT8, BASE_CUSTOM, ipmi_fmt_1s_0based, 0xf0, "", HFILL }},
2601                 { &hf_ipmi_trn_serial28_t3,
2602                         { "TAP T3",
2603                                 "ipmi.serial28.tap_t3", FT_UINT8, BASE_CUSTOM, ipmi_fmt_2s_0based, 0x0f, "", HFILL }},
2604                 { &hf_ipmi_trn_serial28_t6,
2605                         { "IPMI T6",
2606                                 "ipmi.serial28.ipmi_t6", FT_UINT8, BASE_CUSTOM, ipmi_fmt_1s_0based, 0xf0, "", HFILL }},
2607                 { &hf_ipmi_trn_serial28_t5,
2608                         { "TAP T5",
2609                                 "ipmi.serial28.tap_t5", FT_UINT8, BASE_CUSTOM, ipmi_fmt_2s_0based, 0x0f, "", HFILL }},
2610                 { &hf_ipmi_trn_serial28_n2,
2611                         { "TAP N2",
2612                                 "ipmi.serial28.tap_n2", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2613                 { &hf_ipmi_trn_serial28_n1,
2614                         { "TAP N1",
2615                                 "ipmi.serial28.tap_n1", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2616                 { &hf_ipmi_trn_serial28_n4,
2617                         { "IPMI N4",
2618                                 "ipmi.serial28.ipmi_n4", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2619                 { &hf_ipmi_trn_serial28_n3,
2620                         { "TAP N3",
2621                                 "ipmi.serial28.tap_n3", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2622                 { &hf_ipmi_trn_serial29_op,
2623                         { "Parameter Operation",
2624                                 "ipmi.serial29.op", FT_UINT8, BASE_HEX, serial29_op_vals, 0xc0, "", HFILL }},
2625                 { &hf_ipmi_trn_serial29_lineedit,
2626                         { "Line Editing",
2627                                 "ipmi.serial29.lineedit", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20, "", HFILL }},
2628                 { &hf_ipmi_trn_serial29_deletectl,
2629                         { "Delete control",
2630                                 "ipmi.serial29.deletectl", FT_UINT8, BASE_HEX, serial29_delete_vals, 0x0c, "", HFILL }},
2631                 { &hf_ipmi_trn_serial29_echo,
2632                         { "Echo",
2633                                 "ipmi.serial29.echo", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2634                 { &hf_ipmi_trn_serial29_handshake,
2635                         { "Handshake",
2636                                 "ipmi.serial29.handshake", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2637                 { &hf_ipmi_trn_serial29_o_newline,
2638                         { "Output newline sequence",
2639                                 "ipmi.serial29.o_newline", FT_UINT8, BASE_HEX, serial29_o_nl_vals, 0xf0, "", HFILL }},
2640                 { &hf_ipmi_trn_serial29_i_newline,
2641                         { "Input newline sequence",
2642                                 "ipmi.serial29.i_newline", FT_UINT8, BASE_HEX, serial29_i_nl_vals, 0x0f, "", HFILL }},
2643                 { &hf_ipmi_trn_serial30_snooping,
2644                         { "System Negotiation Snooping",
2645                                 "ipmi.serial30.snooping", FT_BOOLEAN, 8, NULL, 0x04, "", HFILL }},
2646                 { &hf_ipmi_trn_serial30_snoopctl,
2647                         { "Snoop ACCM Control",
2648                                 "ipmi.serial30.snoopctl", FT_UINT8, BASE_HEX, serial30_snoopctl_vals, 0x03, "", HFILL }},
2649                 { &hf_ipmi_trn_serial30_negot_ctl,
2650                         { "BMC negotiates link parameters",
2651                                 "ipmi.serial30.negot_ctl", FT_UINT8, BASE_HEX, serial30_negoctl_vals, 0x30, "", HFILL }},
2652                 { &hf_ipmi_trn_serial30_use_xmit_accm,
2653                         { "Filtering incoming chars",
2654                                 "ipmi.serial30.filter", FT_BOOLEAN, 8, TFS(&serial30_filter_tfs), 0x04, "", HFILL }},
2655                 { &hf_ipmi_trn_serial30_xmit_addr_comp,
2656                         { "Transmit with Address and Ctl Field Compression",
2657                                 "ipmi.serial30.xmit_addr_comp", FT_BOOLEAN, 8, NULL, 0x02, "", HFILL }},
2658                 { &hf_ipmi_trn_serial30_xmit_proto_comp,
2659                         { "Transmit with Protocol Field Compression",
2660                                 "ipmi.serial30.xmit_proto_comp", FT_BOOLEAN, 8, NULL, 0x01, "", HFILL }},
2661                 { &hf_ipmi_trn_serial30_ipaddr,
2662                         { "IP Address negotiation",
2663                                 "ipmi.serial30.ipaddr", FT_UINT8, BASE_HEX, serial30_ipaddr_val, 0x18, "", HFILL }},
2664                 { &hf_ipmi_trn_serial30_accm,
2665                         { "ACCM Negotiation",
2666                                 "ipmi.serial30.accm", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }},
2667                 { &hf_ipmi_trn_serial30_addr_comp,
2668                         { "Address and Ctl Field Compression",
2669                                 "ipmi.serial30.addr_comp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
2670                 { &hf_ipmi_trn_serial30_proto_comp,
2671                         { "Protocol Field Compression",
2672                                 "ipmi.serial30.proto_comp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
2673                 { &hf_ipmi_trn_serial31_port,
2674                         { "Primary RMCP Port Number",
2675                                 "ipmi.serial31.port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }},
2676                 { &hf_ipmi_trn_serial32_port,
2677                         { "Secondary RMCP Port Number",
2678                                 "ipmi.serial32.port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }},
2679                 { &hf_ipmi_trn_serial33_auth_proto,
2680                         { "PPP Link Authentication Protocol",
2681                                 "ipmi.serial33.auth_proto", FT_UINT8, BASE_HEX, serialXX_proto_vals, 0x0f, "", HFILL }},
2682                 { &hf_ipmi_trn_serial34_chap_name,
2683                         { "CHAP Name",
2684                                 "ipmi.serial34.chap_name", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2685                 { &hf_ipmi_trn_serial35_recv_accm,
2686                         { "Receive ACCM",
2687                                 "ipmi.serial35.recv_accm", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
2688                 { &hf_ipmi_trn_serial35_xmit_accm,
2689                         { "Transmit ACCM",
2690                                 "ipmi.serial35.xmit_accm", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
2691                 { &hf_ipmi_trn_serial36_snoop_accm,
2692                         { "Snoop Receive ACCM",
2693                                 "ipmi.serial36.snoop_accm", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
2694                 { &hf_ipmi_trn_serial37_num_ppp,
2695                         { "Number of PPP Accounts",
2696                                 "ipmi.serial37.num_ppp", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2697                 { &hf_ipmi_trn_serial38_acct_sel,
2698                         { "PPP Account Selector",
2699                                 "ipmi.serial38.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2700                 { &hf_ipmi_trn_serial38_dialstr_sel,
2701                         { "Dial String Selector",
2702                                 "ipmi.serial38.dialstr_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2703                 { &hf_ipmi_trn_serial39_acct_sel,
2704                         { "PPP Account Selector",
2705                                 "ipmi.serial39.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2706                 { &hf_ipmi_trn_serial39_ipaddr,
2707                         { "IP Address",
2708                                 "ipmi.serial39.ipaddr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2709                 { &hf_ipmi_trn_serial40_acct_sel,
2710                         { "PPP Account Selector",
2711                                 "ipmi.serial40.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2712                 { &hf_ipmi_trn_serial40_username,
2713                         { "User Name",
2714                                 "ipmi.serial40.username", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2715                 { &hf_ipmi_trn_serial41_acct_sel,
2716                         { "PPP Account Selector",
2717                                 "ipmi.serial41.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2718                 { &hf_ipmi_trn_serial41_userdomain,
2719                         { "User Domain",
2720                                 "ipmi.serial41.userdomain", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2721                 { &hf_ipmi_trn_serial42_acct_sel,
2722                         { "PPP Account Selector",
2723                                 "ipmi.serial42.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2724                 { &hf_ipmi_trn_serial42_userpass,
2725                         { "User Password",
2726                                 "ipmi.serial42.userpass", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2727                 { &hf_ipmi_trn_serial43_acct_sel,
2728                         { "PPP Account Selector",
2729                                 "ipmi.serial43.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2730                 { &hf_ipmi_trn_serial43_auth_proto,
2731                         { "Link Auth Type",
2732                                 "ipmi.serial43.auth_proto", FT_UINT8, BASE_HEX, serialXX_proto_vals, 0x0f, "", HFILL }},
2733                 { &hf_ipmi_trn_serial44_acct_sel,
2734                         { "PPP Account Selector",
2735                                 "ipmi.serial44.acct_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2736                 { &hf_ipmi_trn_serial44_hold_time,
2737                         { "Connection Hold Time",
2738                                 "ipmi.serial44.hold_time", FT_UINT8, BASE_CUSTOM, ipmi_fmt_1s_1based, 0, "", HFILL }},
2739                 { &hf_ipmi_trn_serial45_src_ipaddr,
2740                         { "Source IP Address",
2741                                 "ipmi.serial45.src_ipaddr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2742                 { &hf_ipmi_trn_serial45_dst_ipaddr,
2743                         { "Destination IP Address",
2744                                 "ipmi.serial45.dst_ipaddr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2745                 { &hf_ipmi_trn_serial46_tx_bufsize,
2746                         { "Transmit Buffer Size",
2747                                 "ipmi.serial46.tx_size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2748                 { &hf_ipmi_trn_serial47_rx_bufsize,
2749                         { "Receive Buffer Size",
2750                                 "ipmi.serial47.rx_size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2751                 { &hf_ipmi_trn_serial48_ipaddr,
2752                         { "Remote Console IP Address",
2753                                 "ipmi.serial48.ipaddr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
2754                 { &hf_ipmi_trn_serial49_blockno,
2755                         { "Block number",
2756                                 "ipmi.serial49.blockno", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2757                 { &hf_ipmi_trn_serial49_dialstr,
2758                         { "Dial string",
2759                                 "ipmi.serial49.dialstr", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2760                 { &hf_ipmi_trn_serial50_115200,
2761                         { "115200",
2762                                 "ipmi.serial50.115200", FT_BOOLEAN, 8, NULL, 0x10, "", HFILL }},
2763                 { &hf_ipmi_trn_serial50_57600,
2764                         { "57600",
2765                                 "ipmi.serial50.57600", FT_BOOLEAN, 8, NULL, 0x08, "", HFILL }},
2766                 { &hf_ipmi_trn_serial50_38400,
2767                         { "38400",
2768                                 "ipmi.serial50.38400", FT_BOOLEAN, 8, NULL, 0x04, "", HFILL }},
2769                 { &hf_ipmi_trn_serial50_19200,
2770                         { "19200",
2771                                 "ipmi.serial50.19200", FT_BOOLEAN, 8, NULL, 0x02, "", HFILL }},
2772                 { &hf_ipmi_trn_serial50_9600,
2773                         { "9600",
2774                                 "ipmi.serial50.9600", FT_BOOLEAN, 8, NULL, 0x01, "", HFILL }},
2775                 { &hf_ipmi_trn_serial51_port_assoc_sel,
2776                         { "Serial Port Association Entry",
2777                                 "ipmi.serial51.port_assoc_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2778                 { &hf_ipmi_trn_serial51_ipmi_channel,
2779                         { "IPMI Channel",
2780                                 "ipmi.serial51.ipmi_channel", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0xf0, "", HFILL }},
2781                 { &hf_ipmi_trn_serial51_conn_num,
2782                         { "Connector number",
2783                                 "ipmi.serial51.conn_num", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2784                 { &hf_ipmi_trn_serial51_ipmi_sharing,
2785                         { "Used with IPMI Serial Port Sharing",
2786                                 "ipmi.serial51.ipmi_sharing", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }},
2787                 { &hf_ipmi_trn_serial51_ipmi_sol,
2788                         { "Used with IPMI Serial-over-LAN",
2789                                 "ipmi.serial51.ipmi_sol", FT_BOOLEAN, 8, NULL, 0x40, "", HFILL }},
2790                 { &hf_ipmi_trn_serial51_chan_num,
2791                         { "Serial controller channel number",
2792                                 "ipmi.serial51.chan_num", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2793                 { &hf_ipmi_trn_serial52_port_assoc_sel,
2794                         { "Serial Port Association Entry",
2795                                 "ipmi.serial52.port_assoc_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2796                 { &hf_ipmi_trn_serial52_conn_name,
2797                         { "Connector Name",
2798                                 "ipmi.serial52_conn_name", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2799                 { &hf_ipmi_trn_serial53_port_assoc_sel,
2800                         { "Serial Port Association Entry",
2801                                 "ipmi.serial53.port_assoc_sel", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2802                 { &hf_ipmi_trn_serial53_chan_name,
2803                         { "Channel Name",
2804                                 "ipmi.serial52_chan_name", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2805
2806                 { &hf_ipmi_trn_01_chan,
2807                         { "Channel",
2808                                 "ipmi.tr01.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2809                 { &hf_ipmi_trn_01_param,
2810                         { "Parameter Selector",
2811                                 "ipmi.tr01.param", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2812                 { &hf_ipmi_trn_01_param_data,
2813                         { "Parameter data",
2814                                 "ipmi.tr01.param_data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2815
2816                 { &hf_ipmi_trn_02_getrev,
2817                         { "Get parameter revision only",
2818                                 "ipmi.tr02.getrev", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }},
2819                 { &hf_ipmi_trn_02_chan,
2820                         { "Channel",
2821                                 "ipmi.tr02.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2822                 { &hf_ipmi_trn_02_param,
2823                         { "Parameter selector",
2824                                 "ipmi.tr02.param", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2825                 { &hf_ipmi_trn_02_set,
2826                         { "Set selector",
2827                                 "ipmi.tr02.set", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
2828                 { &hf_ipmi_trn_02_block,
2829                         { "Block selector",
2830                                 "ipmi.tr02.block", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
2831                 { &hf_ipmi_trn_02_rev_present,
2832                         { "Present parameter revision",
2833                                 "ipmi.tr02.rev.present", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2834                 { &hf_ipmi_trn_02_rev_compat,
2835                         { "Oldest forward-compatible",
2836                                 "ipmi.tr02.rev.compat", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2837                 { &hf_ipmi_trn_02_param_data,
2838                         { "Parameter data",
2839                                 "ipmi.tr02.param_data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2840
2841                 { &hf_ipmi_trn_03_chan,
2842                         { "Channel",
2843                                 "ipmi.tr03.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2844                 { &hf_ipmi_trn_03_arp_resp,
2845                         { "BMC-generated ARP responses",
2846                                 "ipmi.tr03.arp_resp", FT_BOOLEAN, 8, TFS(&tfs_03_suspend), 0x02, "", HFILL }},
2847                 { &hf_ipmi_trn_03_gratuitous_arp,
2848                         { "Gratuitous ARPs",
2849                                 "ipmi.tr03.gratuitous_arp", FT_BOOLEAN, 8, TFS(&tfs_03_suspend), 0x01, "", HFILL }},
2850                 { &hf_ipmi_trn_03_status_arp_resp,
2851                         { "ARP Response status",
2852                                 "ipmi.tr03.status_arp_resp", FT_BOOLEAN, 8, TFS(&tfs_03_arp_status), 0x02, "", HFILL }},
2853                 { &hf_ipmi_trn_03_status_gratuitous_arp,
2854                         { "Gratuitous ARP status",
2855                                 "ipmi.tr03.status_gratuitous_arp", FT_BOOLEAN, 8, TFS(&tfs_03_arp_status), 0x01, "", HFILL }},
2856
2857                 { &hf_ipmi_trn_04_chan,
2858                         { "Channel",
2859                                 "ipmi.tr04.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2860                 { &hf_ipmi_trn_04_clear,
2861                         { "Statistics",
2862                                 "ipmi.tr04.clear", FT_BOOLEAN, 8, TFS(&tfs_04_clear), 0x01, "", HFILL }},
2863                 { &hf_ipmi_trn_04_rx_ippkts,
2864                         { "Received IP Packets",
2865                                 "ipmi.tr04.rx_ippkts", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2866                 { &hf_ipmi_trn_04_rx_iphdr_err,
2867                         { "Received IP Header Errors",
2868                                 "ipmi.tr04.rx_iphdr_err", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2869                 { &hf_ipmi_trn_04_rx_ipaddr_err,
2870                         { "Received IP Address Errors",
2871                                 "ipmi.tr04.rx_ipaddr_err", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2872                 { &hf_ipmi_trn_04_rx_ippkts_frag,
2873                         { "Received Fragmented IP Packets",
2874                                 "ipmi.tr04.rx_ippkts_frag", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2875                 { &hf_ipmi_trn_04_tx_ippkts,
2876                         { "Transmitted IP Packets",
2877                                 "ipmi.tr04.tx_ippkts", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2878                 { &hf_ipmi_trn_04_rx_udppkts,
2879                         { "Received UDP Packets",
2880                                 "ipmi.tr04.rx_udppkts", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2881                 { &hf_ipmi_trn_04_rx_validrmcp,
2882                         { "Received Valid RMCP Packets",
2883                                 "ipmi.tr04.rx_validrmcp", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2884                 { &hf_ipmi_trn_04_rx_udpproxy,
2885                         { "Received UDP Proxy Packets",
2886                                 "ipmi.tr04.rx_udpproxy", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2887                 { &hf_ipmi_trn_04_dr_udpproxy,
2888                         { "Dropped UDP Proxy Packets",
2889                                 "ipmi.tr04.dr_udpproxy", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
2890
2891                 { &hf_ipmi_trn_10_chan,
2892                         { "Channel",
2893                                 "ipmi.tr10.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2894                 { &hf_ipmi_trn_10_param,
2895                         { "Parameter Selector",
2896                                 "ipmi.tr10.param", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2897                 { &hf_ipmi_trn_10_param_data,
2898                         { "Parameter data",
2899                                 "ipmi.tr10.param_data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2900
2901                 { &hf_ipmi_trn_11_getrev,
2902                         { "Get parameter revision only",
2903                                 "ipmi.tr11.getrev", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }},
2904                 { &hf_ipmi_trn_11_chan,
2905                         { "Channel",
2906                                 "ipmi.tr11.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2907                 { &hf_ipmi_trn_11_param,
2908                         { "Parameter selector",
2909                                 "ipmi.tr11.param", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2910                 { &hf_ipmi_trn_11_set,
2911                         { "Set selector",
2912                                 "ipmi.tr11.set", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
2913                 { &hf_ipmi_trn_11_block,
2914                         { "Block selector",
2915                                 "ipmi.tr11.block", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
2916                 { &hf_ipmi_trn_11_rev_present,
2917                         { "Present parameter revision",
2918                                 "ipmi.tr11.rev.present", FT_UINT8, BASE_DEC, NULL, 0xf0, "", HFILL }},
2919                 { &hf_ipmi_trn_11_rev_compat,
2920                         { "Oldest forward-compatible",
2921                                 "ipmi.tr11.rev.compat", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
2922                 { &hf_ipmi_trn_11_param_data,
2923                         { "Parameter data",
2924                                 "ipmi.tr11.param_data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2925
2926                 { &hf_ipmi_trn_12_chan,
2927                         { "Channel",
2928                                 "ipmi.tr12.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2929                 { &hf_ipmi_trn_12_mux_setting,
2930                         { "Mux Setting",
2931                                 "ipmi.tr12.mux_setting", FT_UINT8, BASE_HEX, vals_12_mux, 0x0f, "", HFILL }},
2932                 { &hf_ipmi_trn_12_sw_to_sys,
2933                         { "Requests to switch to system",
2934                                 "ipmi.tr12.sw_to_sys", FT_BOOLEAN, 8, TFS(&tfs_12_blocked), 0x80, "", HFILL }},
2935                 { &hf_ipmi_trn_12_sw_to_bmc,
2936                         { "Requests to switch to BMC",
2937                                 "ipmi.tr12.sw_to_bmc", FT_BOOLEAN, 8, TFS(&tfs_12_blocked), 0x40, "", HFILL }},
2938                 { &hf_ipmi_trn_12_alert,
2939                         { "Alert in progress",
2940                                 "ipmi.tr12.alert", FT_BOOLEAN, 8, NULL, 0x08, "", HFILL }},
2941                 { &hf_ipmi_trn_12_msg,
2942                         { "IPMI/OEM messaging active",
2943                                 "ipmi.tr12.msg", FT_BOOLEAN, 8, NULL, 0x04, "", HFILL }},
2944                 { &hf_ipmi_trn_12_req,
2945                         { "Request",
2946                                 "ipmi.tr12.req", FT_BOOLEAN, 8, TFS(&tfs_12_req), 0x02, "", HFILL }},
2947                 { &hf_ipmi_trn_12_mux_state,
2948                         { "Mux set to",
2949                                 "ipmi.tr12.mux_state", FT_BOOLEAN, 8, TFS(&tfs_12_mux_state), 0x01, "", HFILL }},
2950
2951                 { &hf_ipmi_trn_13_chan,
2952                         { "Channel",
2953                                 "ipmi.tr13.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2954                 { &hf_ipmi_trn_13_code1,
2955                         { "Last code",
2956                                 "ipmi.tr13.code1", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2957                 { &hf_ipmi_trn_13_code2,
2958                         { "2nd code",
2959                                 "ipmi.tr13.code2", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2960                 { &hf_ipmi_trn_13_code3,
2961                         { "3rd code",
2962                                 "ipmi.tr13.code3", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2963                 { &hf_ipmi_trn_13_code4,
2964                         { "4th code",
2965                                 "ipmi.tr13.code4", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2966                 { &hf_ipmi_trn_13_code5,
2967                         { "5th code",
2968                                 "ipmi.tr13.code5", FT_STRING, BASE_NONE, NULL, 0, "", HFILL }},
2969
2970                 { &hf_ipmi_trn_14_chan,
2971                         { "Channel",
2972                                 "ipmi.tr14.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2973                 { &hf_ipmi_trn_14_block,
2974                         { "Block number",
2975                                 "ipmi.tr14.block", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2976                 { &hf_ipmi_trn_14_data,
2977                         { "Block data",
2978                                 "ipmi.tr14.data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2979
2980                 { &hf_ipmi_trn_15_chan,
2981                         { "Channel",
2982                                 "ipmi.tr15.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2983                 { &hf_ipmi_trn_15_block,
2984                         { "Block number",
2985                                 "ipmi.tr15.block", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
2986                 { &hf_ipmi_trn_15_data,
2987                         { "Block data",
2988                                 "ipmi.tr15.data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
2989
2990                 { &hf_ipmi_trn_16_chan,
2991                         { "Channel",
2992                                 "ipmi.tr16.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
2993                 { &hf_ipmi_trn_16_src_port,
2994                         { "Source Port",
2995                                 "ipmi.tr16.src_port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }},
2996                 { &hf_ipmi_trn_16_dst_port,
2997                         { "Destination Port",
2998                                 "ipmi.tr16.dst_port", FT_UINT16, BASE_CUSTOM, ipmi_fmt_udpport, 0, "", HFILL }},
2999                 { &hf_ipmi_trn_16_src_addr,
3000                         { "Source IP Address",
3001                                 "ipmi.tr16.src_addr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
3002                 { &hf_ipmi_trn_16_dst_addr,
3003                         { "Destination IP Address",
3004                                 "ipmi.tr16.dst_addr", FT_IPv4, BASE_NONE, NULL, 0, "", HFILL }},
3005                 { &hf_ipmi_trn_16_bytes,
3006                         { "Bytes to send",
3007                                 "ipmi.tr16.bytes", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3008
3009                 { &hf_ipmi_trn_17_chan,
3010                         { "Channel",
3011                                 "ipmi.tr17.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
3012                 { &hf_ipmi_trn_17_clear,
3013                         { "Clear buffer",
3014                                 "ipmi.tr17.clear", FT_BOOLEAN, 8, NULL, 0x80, "", HFILL }},
3015                 { &hf_ipmi_trn_17_block_num,
3016                         { "Block number",
3017                                 "ipmi.tr17.block_num", FT_UINT8, BASE_CUSTOM, tr17_fmt_blockno, 0x7f, "", HFILL }},
3018                 { &hf_ipmi_trn_17_size,
3019                         { "Number of received bytes",
3020                                 "ipmi.tr17.size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3021                 { &hf_ipmi_trn_17_data,
3022                         { "Block Data",
3023                                 "ipmi.tr17.data", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
3024
3025                 { &hf_ipmi_trn_18_state,
3026                         { "Session state",
3027                                 "ipmi.tr18.state", FT_UINT8, BASE_HEX, vals_18_state, 0x0f, "", HFILL }},
3028                 { &hf_ipmi_trn_18_ipmi_ver,
3029                         { "IPMI Version",
3030                                 "ipmi.tr18.ipmi_ver", FT_UINT8, BASE_CUSTOM, ipmi_fmt_version, 0, "", HFILL }},
3031
3032                 { &hf_ipmi_trn_19_chan,
3033                         { "Channel",
3034                                 "ipmi.tr19.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
3035                 { &hf_ipmi_trn_19_dest_sel,
3036                         { "Destination selector",
3037                                 "ipmi.tr19.dest_sel", FT_UINT8, BASE_DEC, NULL, 0x0f, "", HFILL }},
3038
3039                 { &hf_ipmi_trn_XX_cap_cbcp,
3040                         { "CBCP callback",
3041                                 "ipmi.trXX.cap_cbcp", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
3042                 { &hf_ipmi_trn_XX_cap_ipmi,
3043                         { "IPMI callback",
3044                                 "ipmi.trXX.cap_ipmi", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
3045                 { &hf_ipmi_trn_XX_cbcp_from_list,
3046                         { "Callback to one from list of numbers",
3047                                 "ipmi.trXX.cbcp_from_list", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08, "", HFILL }},
3048                 { &hf_ipmi_trn_XX_cbcp_user,
3049                         { "Callback to user-specified number",
3050                                 "ipmi.trXX.cbcp_user", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04, "", HFILL }},
3051                 { &hf_ipmi_trn_XX_cbcp_prespec,
3052                         { "Callback to pre-specified number",
3053                                 "ipmi.trXX.cbcp_prespec", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, "", HFILL }},
3054                 { &hf_ipmi_trn_XX_cbcp_nocb,
3055                         { "No callback",
3056                                 "ipmi.trXX.cbcp_nocb", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01, "", HFILL }},
3057                 { &hf_ipmi_trn_XX_dst1,
3058                         { "Callback destination 1",
3059                                 "ipmi.trXX.dst1", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3060                 { &hf_ipmi_trn_XX_dst2,
3061                         { "Callback destination 2",
3062                                 "ipmi.trXX.dst2", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3063                 { &hf_ipmi_trn_XX_dst3,
3064                         { "Callback destination 3",
3065                                 "ipmi.trXX.dst3", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3066
3067                 { &hf_ipmi_trn_1a_user,
3068                         { "User ID",
3069                                 "ipmi.tr1a.user", FT_UINT8, BASE_DEC, NULL, 0x3f, "", HFILL }},
3070                 { &hf_ipmi_trn_1a_chan,
3071                         { "Channel",
3072                                 "ipmi.tr1a.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
3073
3074                 { &hf_ipmi_trn_1b_user,
3075                         { "User ID",
3076                                 "ipmi.tr1b.user", FT_UINT8, BASE_DEC, NULL, 0x3f, "", HFILL }},
3077                 { &hf_ipmi_trn_1b_chan,
3078                         { "Channel",
3079                                 "ipmi.tr1b.chan", FT_UINT8, BASE_CUSTOM, ipmi_fmt_channel, 0x0f, "", HFILL }},
3080
3081         };
3082         static gint *ett[] = {
3083                 &ett_ipmi_trn_lan00_byte1,
3084                 &ett_ipmi_trn_lan01_byte1,
3085                 &ett_ipmi_trn_lan02_byte1,
3086                 &ett_ipmi_trn_lan02_byte2,
3087                 &ett_ipmi_trn_lan02_byte3,
3088                 &ett_ipmi_trn_lan02_byte4,
3089                 &ett_ipmi_trn_lan02_byte5,
3090                 &ett_ipmi_trn_lan04_byte1,
3091                 &ett_ipmi_trn_lan07_byte2,
3092                 &ett_ipmi_trn_lan07_byte3,
3093                 &ett_ipmi_trn_lan10_byte1,
3094                 &ett_ipmi_trn_lan17_byte1,
3095                 &ett_ipmi_trn_lan18_byte1,
3096                 &ett_ipmi_trn_lan18_byte2,
3097                 &ett_ipmi_trn_lan18_byte4,
3098                 &ett_ipmi_trn_lan19_byte1,
3099                 &ett_ipmi_trn_lan19_byte2,
3100                 &ett_ipmi_trn_lan19_byte3,
3101                 &ett_ipmi_trn_lan20_byte12,
3102                 &ett_ipmi_trn_lan21_byte1,
3103                 &ett_ipmi_trn_lan22_byte1,
3104                 &ett_ipmi_trn_lan24_byte1,
3105                 &ett_ipmi_trn_lan24_byte2,
3106                 &ett_ipmi_trn_lan24_byte3,
3107                 &ett_ipmi_trn_lan24_byte4,
3108                 &ett_ipmi_trn_lan24_byte5,
3109                 &ett_ipmi_trn_lan24_byte6,
3110                 &ett_ipmi_trn_lan24_byte7,
3111                 &ett_ipmi_trn_lan24_byte8,
3112                 &ett_ipmi_trn_lan25_byte1,
3113                 &ett_ipmi_trn_lan25_byte2,
3114                 &ett_ipmi_trn_lan25_byte34,
3115                 &ett_ipmi_trn_serial03_byte1,
3116                 &ett_ipmi_trn_serial04_byte1,
3117                 &ett_ipmi_trn_serial05_byte1,
3118                 &ett_ipmi_trn_serial05_byte2,
3119                 &ett_ipmi_trn_serial06_byte1,
3120                 &ett_ipmi_trn_serial07_byte1,
3121                 &ett_ipmi_trn_serial07_byte2,
3122                 &ett_ipmi_trn_serial08_byte1,
3123                 &ett_ipmi_trn_serial08_byte2,
3124                 &ett_ipmi_trn_serial09_byte1,
3125                 &ett_ipmi_trn_serial09_byte2,
3126                 &ett_ipmi_trn_serial16_byte1,
3127                 &ett_ipmi_trn_serial17_byte1,
3128                 &ett_ipmi_trn_serial17_byte2,
3129                 &ett_ipmi_trn_serial17_byte4,
3130                 &ett_ipmi_trn_serial17_byte5,
3131                 &ett_ipmi_trn_serial19_byte1,
3132                 &ett_ipmi_trn_serial19_byte2,
3133                 &ett_ipmi_trn_serial19_byte3,
3134                 &ett_ipmi_trn_serial20_byte1,
3135                 &ett_ipmi_trn_serial21_byte1,
3136                 &ett_ipmi_trn_serial22_byte1,
3137                 &ett_ipmi_trn_serial23_byte1,
3138                 &ett_ipmi_trn_serial24_byte1,
3139                 &ett_ipmi_trn_serial25_byte2,
3140                 &ett_ipmi_trn_serial28_byte1,
3141                 &ett_ipmi_trn_serial28_byte2,
3142                 &ett_ipmi_trn_serial28_byte10,
3143                 &ett_ipmi_trn_serial28_byte11,
3144                 &ett_ipmi_trn_serial28_byte12,
3145                 &ett_ipmi_trn_serial28_byte13,
3146                 &ett_ipmi_trn_serial28_byte14,
3147                 &ett_ipmi_trn_serial29_byte1,
3148                 &ett_ipmi_trn_serial29_byte2,
3149                 &ett_ipmi_trn_serial30_byte1,
3150                 &ett_ipmi_trn_serial30_byte2,
3151                 &ett_ipmi_trn_serial30_byte3,
3152                 &ett_ipmi_trn_serial33_byte1,
3153                 &ett_ipmi_trn_serial37_byte1,
3154                 &ett_ipmi_trn_serial43_byte1,
3155                 &ett_ipmi_trn_serial50_byte1,
3156                 &ett_ipmi_trn_serial51_byte2,
3157                 &ett_ipmi_trn_serial51_byte3,
3158                 &ett_ipmi_trn_01_byte1,
3159                 &ett_ipmi_trn_02_byte1,
3160                 &ett_ipmi_trn_02_rev,
3161                 &ett_ipmi_trn_03_rq_byte1,
3162                 &ett_ipmi_trn_03_rq_byte2,
3163                 &ett_ipmi_trn_03_rs_byte1,
3164                 &ett_ipmi_trn_04_byte1,
3165                 &ett_ipmi_trn_04_byte2,
3166                 &ett_ipmi_trn_10_byte1,
3167                 &ett_ipmi_trn_11_byte1,
3168                 &ett_ipmi_trn_11_rev,
3169                 &ett_ipmi_trn_12_rq_byte1,
3170                 &ett_ipmi_trn_12_rq_byte2,
3171                 &ett_ipmi_trn_12_rs_byte1,
3172                 &ett_ipmi_trn_13_byte1,
3173                 &ett_ipmi_trn_14_byte1,
3174                 &ett_ipmi_trn_15_byte1,
3175                 &ett_ipmi_trn_16_byte1,
3176                 &ett_ipmi_trn_17_byte1,
3177                 &ett_ipmi_trn_17_byte2,
3178                 &ett_ipmi_trn_18_byte1,
3179                 &ett_ipmi_trn_19_byte1,
3180                 &ett_ipmi_trn_19_byte2,
3181                 &ett_ipmi_trn_XX_usercap,
3182                 &ett_ipmi_trn_XX_cbcp,
3183                 &ett_ipmi_trn_1a_byte1,
3184                 &ett_ipmi_trn_1a_byte2,
3185                 &ett_ipmi_trn_1b_byte1,
3186                 &ett_ipmi_trn_1b_byte2,
3187         };
3188
3189         proto_register_field_array(proto_ipmi, hf, array_length(hf));
3190         proto_register_subtree_array(ett, array_length(ett));
3191         ipmi_register_netfn_cmdtab(IPMI_TRANSPORT_REQ, IPMI_OEM_NONE, NULL, 0, NULL,
3192                         cmd_transport, array_length(cmd_transport));
3193 }