fc06600d: EtherCAT: General improvements
{ &hf_ecat_cmd,
{ "Command", "ecat.cmd",
- FT_UINT8, BASE_HEX, VALS(EcCmdShort), 0x0, NULL, HFILL }
+ FT_UINT8, BASE_HEX, VALS(EcCmdLong), 0x0, NULL, HFILL }
},
Field was changed to use the long value strings:
ecat.cmd == "Broadcast Read"
The sub cmd fields still use short name:
ecat.sub1.cmd == BRD still supported but ecat.sub1.cmd == "BRD" preferred.
packet-ethercat-datagram.c:
static const value_string EcCmdLong[] =
{
{ 0, "No operation" },
{ 1, "Auto Increment Physical Read" },
{ 2, "Auto Increment Physical Write" },
{ 3, "Auto Increment Physical ReadWrite" },
{ 4, "Configured address Physical Read" },
{ 5, "Configured address Physical Write" },
{ 6, "Configured address Physical ReadWrite" },
{ 7, "Broadcast Read" },
{ 8, "Broadcast Write" },
{ 9, "Broadcast ReadWrite" },
{ 10, "Logical Read" },
{ 11, "Logical Write" },
{ 12, "Logical ReadWrite" },
{ 13, "Auto Increment Physical Read Multiple Write" },
{ 14, "Configured Address Physical Read Multiple Write" },
{ 255, "EXT" },
{ 0, NULL }
};
Thanks, I tried your method and it works.
However, writing the full name is still quite troublesome.
And
sub*need to traverse to find each sub-datagrams.Agreed. Not sure why the field change.
Couple options:
You could make a Display filter macro that checks all the sub cmds.
How can I make display filter conditions to the same datagram?
You could use Lua to add another field that would support filtering on the short name but makes the packet details tree messy with an extra custom protocol to hold the field.
"ecat_cmd_1" ecat.sub1.cmd == $1 or ecat.sub2.cmd == $1 or ecat.sub3.cmd == $1 or ecat.sub4.cmd == $1 or ecat.sub5.cmd == $1 "ecat_cmd_2" ecat.sub6.cmd == $1 or ecat.sub7.cmd == $1 or ecat.sub8.cmd == $1 or ecat.sub9.cmd == $1 or ecat.sub10.cmd == $1 "ecat_cmd" ${ecat_cmd_1;$1} or ${ecat_cmd_2;$1}$ecat_cmd{"BRD"}Thanks, using macro is an almost perfect method.