From Didier Gautheron:
[obnox/wireshark/wip.git] / epan / dissectors / packet-mstp.h
1 /* packet-mstp.h
2  * Routines for BACnet MS/TP datalink dissection
3  * Copyright 2008 Steve Karg <skarg@users.sourceforge.net> Alabama
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24  */
25
26 #ifndef __MSTP_H__
27 #define __MSTP_H__
28
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32
33 #include <glib.h>
34
35 #include <epan/packet.h>
36
37 #ifndef min
38 #define min(a,b) (((a)<(b))?(a):(b))
39 #endif
40
41 /**
42  * Returns a value string for the BACnet MS/TP Frame Type.
43  * @param val
44  * @return constant C String with MS/TP Frame Type
45  */
46 const gchar *
47 mstp_frame_type_text(guint32 val);
48
49 /**
50  * Dissects the BACnet MS/TP packet after the preamble,
51  * starting with the MS/TP Frame type octet.  Passes
52  * the PDU, if there is one, to the BACnet dissector.
53  * @param tvb
54  * @param pinfo
55  * @param tree
56  * @param subtree
57  * @param offset
58  * @return none
59  */
60 void
61 dissect_mstp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *subtree, gint offset);
62
63 #endif /* __MSTP_H__ */
64
65