#include <string.h> and/or #include <stdio.h> not needed.
[obnox/wireshark/wip.git] / epan / dissectors / packet-ipmi-bridge.c
1 /* packet-ipmi-bridge.c
2  * Sub-dissectors for IPMI messages (netFn=Bridge)
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 /* Bridge commands are not implemented (yet) */
39
40
41 static ipmi_cmd_t cmd_bridge[] = {
42   /* Bridge management commands (ICMB) */
43   { 0x00, IPMI_TBD,   NULL, NULL, "[ICMB] Get Bridge State", 0 },
44   { 0x01, IPMI_TBD,   NULL, NULL, "[ICMB] Set Bridge State", 0 },
45   { 0x02, IPMI_TBD,   NULL, NULL, "[ICMB] Get ICMB Address", 0 },
46   { 0x03, IPMI_TBD,   NULL, NULL, "[ICMB] Set ICMB Address", 0 },
47   { 0x04, IPMI_TBD,   NULL, NULL, "[ICMB] Set Bridge Proxy Address", 0 },
48   { 0x05, IPMI_TBD,   NULL, NULL, "[ICMB] Get Bridge Statistics", 0 },
49   { 0x06, IPMI_TBD,   NULL, NULL, "[ICMB] Get ICMB Capabilities", 0 },
50   { 0x08, IPMI_TBD,   NULL, NULL, "[ICMB] Clear Bridge Statistics", 0 },
51   { 0x09, IPMI_TBD,   NULL, NULL, "[ICMB] Get Bridge Proxy Address", 0 },
52   { 0x0a, IPMI_TBD,   NULL, NULL, "[ICMB] Get ICMB Connector Info", 0 },
53   { 0x0b, IPMI_TBD,   NULL, NULL, "[ICMB] Get ICMB Connection ID", 0 },
54   { 0x0c, IPMI_TBD,   NULL, NULL, "[ICMB] Send ICMB Connection ID", 0 },
55
56   /* Discovery Commands (ICMB) */
57   { 0x10, IPMI_TBD,   NULL, NULL, "[ICMB] Prepare For Discovery", 0 },
58   { 0x11, IPMI_TBD,   NULL, NULL, "[ICMB] Get Addresses", 0 },
59   { 0x12, IPMI_TBD,   NULL, NULL, "[ICMB] Set Discovered", 0 },
60   { 0x13, IPMI_TBD,   NULL, NULL, "[ICMB] Get Chassis Device ID", 0 },
61   { 0x14, IPMI_TBD,   NULL, NULL, "[ICMB] Set Chassis Device ID", 0 },
62
63   /* Bridging Commands (ICMB) */
64   { 0x20, IPMI_TBD,   NULL, NULL, "[ICMB] Bridge Request", 0 },
65   { 0x21, IPMI_TBD,   NULL, NULL, "[ICMB] Bridge Message", 0 },
66
67   /* Event Commands (ICMB) */
68   { 0x30, IPMI_TBD,   NULL, NULL, "[ICMB] Get Event Count", 0 },
69   { 0x31, IPMI_TBD,   NULL, NULL, "[ICMB] Set Event Destination", 0 },
70   { 0x32, IPMI_TBD,   NULL, NULL, "[ICMB] Set Event Reception State", 0 },
71   { 0x33, IPMI_TBD,   NULL, NULL, "[ICMB] Send ICMB Event Message", 0 },
72   { 0x34, IPMI_TBD,   NULL, NULL, "[ICMB] Get Event Destination", 0 },
73   { 0x35, IPMI_TBD,   NULL, NULL, "[ICMB] Get Event Reception State", 0 },
74
75   /* OEM Commands for Bridge NetFn */
76   { 0xc0, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
77   { 0xc1, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
78   { 0xc2, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
79   { 0xc3, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
80   { 0xc4, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
81   { 0xc5, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
82   { 0xc6, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
83   { 0xc7, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
84   { 0xc8, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
85   { 0xc9, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
86   { 0xca, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
87   { 0xcb, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
88   { 0xcc, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
89   { 0xcd, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
90   { 0xce, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
91   { 0xcf, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
92   { 0xd0, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
93   { 0xd1, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
94   { 0xd2, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
95   { 0xd3, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
96   { 0xd4, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
97   { 0xd5, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
98   { 0xd6, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
99   { 0xd7, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
100   { 0xd8, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
101   { 0xd9, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
102   { 0xda, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
103   { 0xdb, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
104   { 0xdc, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
105   { 0xdd, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
106   { 0xde, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
107   { 0xdf, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
108   { 0xe0, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
109   { 0xe1, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
110   { 0xe2, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
111   { 0xe3, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
112   { 0xe4, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
113   { 0xe5, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
114   { 0xe6, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
115   { 0xe7, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
116   { 0xe8, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
117   { 0xe9, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
118   { 0xea, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
119   { 0xeb, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
120   { 0xec, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
121   { 0xed, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
122   { 0xee, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
123   { 0xef, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
124   { 0xf0, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
125   { 0xf1, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
126   { 0xf2, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
127   { 0xf3, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
128   { 0xf4, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
129   { 0xf5, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
130   { 0xf6, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
131   { 0xf7, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
132   { 0xf8, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
133   { 0xf9, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
134   { 0xfa, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
135   { 0xfb, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
136   { 0xfc, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
137   { 0xfd, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
138   { 0xfe, IPMI_TBD,   NULL, NULL, "[ICMB] OEM Command", 0 },
139
140   /* Other Bridge Commands */
141   { 0xff, IPMI_TBD,   NULL, NULL, "[ICMB] Error Report", 0 },
142 };
143
144 void
145 ipmi_register_bridge(gint proto_ipmi _U_)
146 {
147         ipmi_register_netfn_cmdtab(IPMI_BRIDGE_REQ, IPMI_OEM_NONE, NULL, 0, NULL,
148                         cmd_bridge, array_length(cmd_bridge));
149 }