handle the rest of the PDU. */
next_tvb = tvb_new_subset_remaining (tvb, offset);
- if (!dissector_try_port(ethercat_frame_dissector_table, hdr.v.protocol,
+ if (!dissector_try_uint(ethercat_frame_dissector_table, hdr.v.protocol,
next_tvb, pinfo, tree))
{
- if (check_col (pinfo->cinfo, COL_PROTOCOL))
- {
- col_add_fstr (pinfo->cinfo, COL_PROTOCOL, "0x%04x", hdr.v.protocol);
- }
+ col_add_fstr (pinfo->cinfo, COL_PROTOCOL, "0x%04x", hdr.v.protocol);
/* No sub dissector wanted to handle this payload, decode it as general
- data instead. */
+ data instead. */
call_dissector (ethercat_frame_data_handle, next_tvb, pinfo, tree);
}
}
{ &hf_ethercat_frame_reserved,
{ "Reserved", "ecatf.reserved",
- FT_UINT16, BASE_HEX, VALS(ðercat_frame_reserved_vals), 0x0800,
+ FT_UINT16, BASE_HEX, VALS(ethercat_frame_reserved_vals), 0x0800,
NULL, HFILL}
},
dissector_handle_t ethercat_frame_handle;
ethercat_frame_handle = find_dissector("ecatf");
- dissector_add("ethertype", ETHERTYPE_ECATF, ethercat_frame_handle);
- dissector_add("udp.port", ETHERTYPE_ECATF, ethercat_frame_handle);
- dissector_add("tcp.port", ETHERTYPE_ECATF, ethercat_frame_handle);
+ dissector_add_uint("ethertype", ETHERTYPE_ECATF, ethercat_frame_handle);
+ dissector_add_uint("udp.port", ETHERTYPE_ECATF, ethercat_frame_handle);
+ dissector_add_uint("tcp.port", ETHERTYPE_ECATF, ethercat_frame_handle);
ethercat_frame_data_handle = find_dissector("data");
}