forked from osmocom/wireshark
From Daniel Krüger:
I attached a patch to this dissector, which includes some corrections, updates and SDO by UDP support. I will upload a sample capture of SDO by UDP to the wiki. The patch is fuzzy tested against the current SVN rev under Linux and it builds also under MSVC2005. svn path=/trunk/; revision=20937
This commit is contained in:
parent
ccf3253f35
commit
bcdcace17b
File diff suppressed because it is too large
Load Diff
|
@ -6,9 +6,9 @@
|
|||
* Institute of Embedded Systems (InES)
|
||||
* http://ines.zhwin.ch
|
||||
*
|
||||
* - Dominic B‚chaz <bdo@zhwin.ch>
|
||||
* - Dominic B'chaz <bdo@zhwin.ch>
|
||||
* - Damir Bursic <bum@zhwin.ch>
|
||||
* - David B<EFBFBD>chi <bhd@zhwin.ch>
|
||||
* - David B_chi <bhd@zhwin.ch>
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
|
@ -41,22 +41,22 @@ static gboolean dissect_epl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
void proto_register_epl(void);
|
||||
void proto_reg_handoff_epl(void);
|
||||
|
||||
gint dissect_epl_soc(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_preq(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_pres(proto_tree *epl_tree, tvbuff_t *tvb, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_soa(proto_tree *epl_tree, tvbuff_t *tvb, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_soc(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
gint dissect_epl_preq(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
gint dissect_epl_pres(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_soa(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
|
||||
|
||||
gint dissect_epl_asnd(proto_tree *tree, proto_tree *epl_tree, tvbuff_t *tvb, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_asnd_ires(proto_tree *epl_tree, tvbuff_t *tvb, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_asnd_sres(proto_tree *tree, proto_tree *epl_tree, tvbuff_t *tvb, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_asnd_nmtcmd(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_asnd_nmtreq(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_asnd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_asnd_ires(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_asnd_sres(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, guint8 epl_src, gint offset);
|
||||
gint dissect_epl_asnd_nmtcmd(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
gint dissect_epl_asnd_nmtreq(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
|
||||
gint dissect_epl_asnd_sdo(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_sdo_sequence(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, gint offset);
|
||||
gint dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, gint offset, gboolean segmented, gboolean response);
|
||||
gint dissect_epl_sdo_command_read_by_index(proto_tree *epl_tree, tvbuff_t *tvb, gint offset, gboolean response);
|
||||
gint dissect_epl_asnd_sdo(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
gint dissect_epl_sdo_sequence(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
gint dissect_epl_sdo_command(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
|
||||
gint dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response);
|
||||
gint dissect_epl_sdo_command_read_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response);
|
||||
|
||||
const gchar* decode_epl_address(guchar adr);
|
||||
const gchar* decode_epl_address_abbrev(guchar adr);
|
||||
|
@ -95,9 +95,12 @@ static const value_string addr_str_abbr_vals[] = {
|
|||
{EPL_BROADCAST_NODEID, " (bc)" },
|
||||
{0,NULL}
|
||||
};
|
||||
/*
|
||||
static const gchar* addr_str_abbr_cn = " (CN)";
|
||||
static const gchar* addr_str_abbr_res = " (res.)";
|
||||
*/
|
||||
|
||||
#define UDP_PORT_EPL 3819
|
||||
|
||||
/* Offsets of fields within an EPL packet. */
|
||||
#define EPL_MTYP_OFFSET 0 /* same offset for all message types*/
|
||||
|
@ -128,6 +131,10 @@ static const value_string mtyp_vals[] = {
|
|||
{0,NULL}
|
||||
};
|
||||
|
||||
#define EPL_SOC_MC_MASK 0x80
|
||||
#define EPL_SOC_PS_MASK 0x40
|
||||
#define EPL_PDO_RD_MASK 0x01
|
||||
|
||||
/* RequestedServiceID s for EPL message type "SoA" */
|
||||
#define EPL_SOA_NOSERVICE 0
|
||||
#define EPL_SOA_IDENTREQUEST 1
|
||||
|
@ -225,12 +232,18 @@ static const value_string asnd_cid_vals[] = {
|
|||
};
|
||||
|
||||
/* Priority values for EPL message type "ASnd", "", "", field PR */
|
||||
#define EPL_PR_GENERICREQUEST 0x00
|
||||
#define EPL_PR_GENERICREQUEST 0x03
|
||||
#define EPL_PR_NMTREQUEST 0x07
|
||||
|
||||
static const value_string epl_pr_vals[] = {
|
||||
{0, "lowest"},
|
||||
{1, "lower"},
|
||||
{2, "below generic"},
|
||||
{EPL_PR_GENERICREQUEST, "GenericRequest"},
|
||||
{EPL_PR_NMTREQUEST, "NMTRequest" },
|
||||
{4, "above generic"},
|
||||
{5, "higher"},
|
||||
{6, "below NMTRequest"},
|
||||
{EPL_PR_NMTREQUEST, "NMTRequest"},
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
|
@ -299,6 +312,7 @@ static const value_string epl_nmt_ms_vals[] = {
|
|||
#define EPL_ASND_SDO_SEQ_RECEIVE_CON_INITIALIZATION 0x01
|
||||
#define EPL_ASND_SDO_SEQ_RECEIVE_CON_CONNECTION_VALID 0x02
|
||||
#define EPL_ASND_SDO_SEQ_RECEIVE_CON_ERROR_RESPONSE 0x03
|
||||
#define EPL_ASND_SDO_SEQ_CON_MASK 0x03
|
||||
|
||||
static const value_string epl_sdo_receive_con_vals[] = {
|
||||
{EPL_ASND_SDO_SEQ_RECEIVE_CON_NO_CONNECTION, "No connection" },
|
||||
|
@ -323,7 +337,7 @@ static const value_string epl_sdo_send_con_vals[] = {
|
|||
|
||||
/* SDO EPL Command Layer Protocol */
|
||||
#define EPL_ASND_SDO_CMD_ABORT_FILTER 0x40
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_FILTER 0x10
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_FILTER 0x30
|
||||
#define EPL_ASND_SDO_CMD_RESPONSE_FILTER 0x80
|
||||
|
||||
|
||||
|
@ -382,13 +396,13 @@ static const value_string epl_sdo_asnd_cmd_abort[] = {
|
|||
};
|
||||
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_EPEDITED_TRANSFER 0
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_INITIALE_TRANSFER 1
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER 1
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_SEGMENT 2
|
||||
#define EPL_ASND_SDO_CMD_SEGMENTATION_TRANSFER_COMPLETE 3
|
||||
|
||||
static const value_string epl_sdo_asnd_cmd_segmentation[] = {
|
||||
{EPL_ASND_SDO_CMD_SEGMENTATION_EPEDITED_TRANSFER, "Expedited Transfer" },
|
||||
{EPL_ASND_SDO_CMD_SEGMENTATION_INITIALE_TRANSFER, "Initiate Transfer" },
|
||||
{EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER, "Initiate Transfer" },
|
||||
{EPL_ASND_SDO_CMD_SEGMENTATION_SEGMENT, "Segment" },
|
||||
{EPL_ASND_SDO_CMD_SEGMENTATION_TRANSFER_COMPLETE, "Transfer Complete" },
|
||||
{0,NULL}
|
||||
|
|
Loading…
Reference in New Issue