This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Lldp Dissector Column Info

0

Current Lldp Dissector column information just shows the "System Description" information.

In the Profinet applications, this information does not help too much. On the other hand Chassis Id and Port Id gives much more information.

In the source code (packet-lldp.c), it is very easy to comment followig line:

col_append_fstr(pinfo->cinfo, COL_INFO, "System Name = %s ", strPtr);

And instead of this line, adding following to dissect_lldp_chassis_id function:

col_append_fstr(pinfo->cinfo, COL_INFO, "Chassis ID = %s ", strPtr);

But this change will affect whole Lldp messages' column information. I want to ask if I have a right to change it in this manner or not before I begin to implementation.

asked 27 Oct '15, 00:05

BirolCapa's gravatar image

BirolCapa
309915
accept rate: 0%


2 Answers:

0

I want to ask if I have a right to change it in this manner or not before I begin to implementation.

Wireshark is an open source project licensed under the GPL. So, you have the all rights to change the source code based on what the GPL 'allows'. This translates to: yes, of course you can change that, as long as you adhere to the GPL.

If you want to submit your changes back to the Wireshark code base, it will most certainly depend on other criteria if the submission will be accepted (code quality, useful enhancements, etc.), than just that single modification to the Info column.

Regards
Kurt

answered 27 Oct '15, 01:27

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

Hello Kurt, thank you for your answer.

I understand you. But I just don't understand if there is a rule or standard that community obeys about column information: For example, why did community choose system name instead of another field? Is there a rule or standard etc. Or it was a just decision of the developer of the lldp dissector?

(27 Oct '15, 01:33) BirolCapa
1

As far as I know, there is no 'community' decison about these things. I'd say it's the decision of the developer.

(27 Oct '15, 02:16) Kurt Knochner ♦

0

As Kurt described, based on the GPL you have the right to make the changes and redistributed them, including (offering of) source code.

What I won't see happening is this change being accepted into the main repository. This will not happen because the statement you quoted is part op dissect_lldp_system_name(), which is specifically written to "/ Dissect System Name and description TLV /", so this is executed when those TLVs are dissected.

What you seem to be missing is that dissect_lldp_chassis_id() is not adding to the info column. If you were to propose such change that might have a chance.

answered 27 Oct '15, 05:01

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

Hello Jaap, thank you for your answer,

To show Chassis id and Port id, I will comment following (at dissect_lldp_system_name)

"col_append_fstr(pinfo->cinfo, COL_INFO, "System Name = %s ", strPtr);" "col_append_fstr(pinfo->cinfo, COL_INFO, "System Description = %s ", strPtr);"

So column info will not show the System Name and description anymore, and I will add dissect_lldp_chassis_id to this:

"col_append_fstr(pinfo->cinfo, COL_INFO, "Chassis ID = %s ", strPtr);"

and I will add dissect_lldp_port_id to this:

"col_append_fstr(pinfo->cinfo, COL_INFO, "Port ID = %s ", strPtr);"

So whole LLDP will show Chassis Id and Port Id instead of System Name and Description.

This change will be very useful for Profinet, on the other hand I am not sure if it is appropriate for other users. That's why I am asking if there is a community decision about column info.

(27 Oct '15, 05:12) BirolCapa

So there seems to be a difference in opinion about what is useful to represent in the INFO column when dissecting LLDP, either within profinet, or other contexts.

In that case a dissector preference would allow the user to choose what his/her preference is, whereby the default preference would match the current behaviour.

(27 Oct '15, 06:36) Jaap ♦