2007-02-16 21:53:36 +00:00
|
|
|
/* packet-pn.h
|
|
|
|
* Common functions for other PROFINET protocols like DCP, MRP, ...
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1999 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2007-02-16 21:53:36 +00:00
|
|
|
*/
|
|
|
|
|
2007-04-02 05:18:31 +00:00
|
|
|
#define FRAME_ID_DCP_HELLO 0xfefc
|
|
|
|
#define FRAME_ID_DCP_GETORSET 0xfefd
|
|
|
|
#define FRAME_ID_DCP_IDENT_REQ 0xfefe
|
|
|
|
#define FRAME_ID_DCP_IDENT_RES 0xfeff
|
2007-02-16 21:53:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
extern void init_pn(int proto);
|
|
|
|
|
|
|
|
extern int dissect_pn_uint8(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, guint8 *pdata);
|
|
|
|
|
2014-01-13 22:36:52 +00:00
|
|
|
extern int dissect_pn_uint16_ret_item(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
|
|
|
|
proto_tree *tree, int hfindex, guint16 *pdata, proto_item ** new_item);
|
2007-02-16 21:53:36 +00:00
|
|
|
extern int dissect_pn_uint16(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, guint16 *pdata);
|
|
|
|
|
|
|
|
extern int dissect_pn_uint32(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, guint32 *pdata);
|
|
|
|
|
|
|
|
extern int dissect_pn_int16(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, gint16 *pdata);
|
|
|
|
|
2007-07-31 18:57:51 +00:00
|
|
|
extern int dissect_pn_int32(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, gint32 *pdata);
|
|
|
|
|
2007-02-16 21:53:36 +00:00
|
|
|
extern int dissect_pn_oid(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, guint32 *pdata);
|
|
|
|
|
|
|
|
extern int dissect_pn_mac(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, guint8 *pdata);
|
|
|
|
|
|
|
|
extern int dissect_pn_ipv4(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int hfindex, guint32 *pdata);
|
|
|
|
|
|
|
|
extern int dissect_pn_uuid(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2015-03-03 10:47:53 +00:00
|
|
|
proto_tree *tree, int hfindex, e_guid_t *uuid);
|
2007-02-16 21:53:36 +00:00
|
|
|
|
|
|
|
extern int dissect_pn_undecoded(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint32 length);
|
|
|
|
|
|
|
|
extern int dissect_pn_user_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
|
|
|
proto_tree *tree, guint32 length, const char *text);
|
|
|
|
|
2012-12-12 18:47:59 +00:00
|
|
|
#define SUBST_DATA 1
|
|
|
|
#define FRAG_DATA 2
|
|
|
|
|
2011-07-29 05:36:57 +00:00
|
|
|
extern int dissect_pn_user_data_bytes(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
|
2012-12-12 18:47:59 +00:00
|
|
|
proto_tree *tree, guint32 length, int iSelect);
|
|
|
|
|
2007-02-16 21:53:36 +00:00
|
|
|
extern int dissect_pn_malformed(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint32 length);
|
|
|
|
|
|
|
|
extern int dissect_pn_padding(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, int length);
|
|
|
|
|
|
|
|
extern int dissect_pn_align4(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
|
|
|
|
|
|
|
|
extern void pn_append_info(packet_info *pinfo, proto_item *dcp_item, const char *text);
|
2011-12-01 05:58:55 +00:00
|
|
|
|
2012-09-10 21:40:21 +00:00
|
|
|
extern gboolean dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
|