Ethereal-dev: Re: [Ethereal-dev] LLDP Plug-in Submission

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Jim Young" <sysjhy@xxxxxxxxxxxxxxx>
Date: Tue, 13 Sep 2005 22:23:17 -0400
Hello Brian,

>>> brian_bogora@xxxxxxxxx 09/13/05 8:57 AM >>>
> Hi All,
> 
>     Our company (Mitel) has developed an LLDP-MED plug-in for Ethereal.  
> I have attached the source code for comments, suggestions and submission.

Question:  Why build it as a plugin?  I dropped your packet-lldp.c (and
temporarily the moduleinfo.h file) into the ./epans/dissectors directory,
made the appropriate addition to Makefile.common and successfully built 
a read-only tethereal.exe (under cygwin) with lldp support.

During the build process I had some compiler warnings (included below), 
but your lldp dissector appeared to successfully parse my lldp traces without 
any problems (see attached tethereal -V -x report).

I have uploaded two small lldp sample trace files to ethereal's sample capture 
page and have updated the wiki's LinkLayerDiscoveryPage to point to these 
samples.

FWIW:  Here's the warning's gcc spewed on my system:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./.. \
 -I/usr/local/include "-D_U_=__attribute__((unused))" -Wall \
 -W -g -O2 -I/usr/local/include -I/usr/include/glib-1.2 \
 -I/usr/lib/glib/include -MT packet-lldp.lo -MD -MP -MF .deps/packet-lldp.Tpo \
 -c packet-lldp.c -o packet-lldp.o
packet-lldp.c: In function `get_latitude_or_longitude':
packet-lldp.c:420: warning: integer constant is too large for "long" type
packet-lldp.c:430: warning: integer constant is too large for "long" type
packet-lldp.c:435: warning: unsigned int format, different type arg (arg 4)
packet-lldp.c: In function `dissect_media_tlv':
packet-lldp.c:1530: warning: cast to pointer from integer of different size
packet-lldp.c:1531: warning: integer constant is too large for "long" type
packet-lldp.c:1535: warning: unsigned int format, different type arg (arg 7)
packet-lldp.c:1547: warning: cast to pointer from integer of different size
packet-lldp.c:1548: warning: integer constant is too large for "long" type
packet-lldp.c:1552: warning: unsigned int format, pointer arg (arg 6)
packet-lldp.c:1552: warning: too many arguments for format
packet-lldp.c: At top level:
packet-lldp.c:798: warning: unused parameter 'pinfo'
packet-lldp.c:827: warning: unused parameter 'pinfo'
packet-lldp.c:862: warning: unused parameter 'pinfo'
packet-lldp.c:904: warning: unused parameter 'pinfo'
packet-lldp.c:1016: warning: unused parameter 'pinfo'
packet-lldp.c:1112: warning: unused parameter 'pinfo'
packet-lldp.c:1222: warning: unused parameter 'pinfo'
packet-lldp.c:1378: warning: unused parameter 'pinfo'
packet-lldp.c:1929: warning: unused parameter 'pinfo'
packet-lldp.c: In function `dissect_lldp_chassis_id':
packet-lldp.c:469: warning: 'mac_addr' might be used uninitialized in this function
packet-lldp.c: In function `dissect_lldp_port_id':
packet-lldp.c:658: warning: 'mac_addr' might be used uninitialized in this function

I hope you find this information useful.  (I'm anxiously awaiting inclusion of the
lldp dissector into ethereal!)

Best regards,

Jim Young


Attachment: lldp.detailed.pcap.rpt
Description: Binary data