Wireshark-dev: Re: [Wireshark-dev] Unused dissector headers
From: Roland Knall <rknall@xxxxxxxxx>
Date: Sat, 22 Sep 2018 11:49:56 +0200
Hi Gerald

Specifically the open safety ones are being used by an external tool. And I could imagine, some others are affected by that as well.

kind regards
Roland

Am Sa., 22. Sep. 2018 um 11:35 Uhr schrieb Peter Wu <peter@xxxxxxxxxxxxx>:
On Fri, Sep 21, 2018 at 08:21:56PM +0200, Pascal Quantin wrote:
> Hi Gerald,
>
> Le ven. 21 sept. 2018 à 20:13, Gerald Combs <gerald@xxxxxxxxxxxxx> a écrit :
>
> > We have a bunch of header files in epan/dissectors that are only used
> > once. Is there any reason we shouldn't move the contents of most of them to
> > their corresponding .c files?
> >
> > file-file.h 20 lines
> > packet-dcc.h 390 lines
> > packet-dcerpc-browser.h 28 lines
> > packet-dcerpc-dcom.h 68 lines
> > packet-dcerpc-frsapi.h 28 lines
> > packet-dcerpc-pnp.h 93 lines
> > packet-dcerpc-rras.h 64 lines
> > packet-dcerpc-spoolss.h 560 lines
> > packet-dcerpc-svcctl.h 60 lines
> > packet-dcerpc-tapi.h 19 lines
> > packet-edonkey.h 403 lines
> > packet-epmd.h 12 lines
> > packet-f5ethtrailer.h 215 lines
> > packet-fcbls.h 63 lines
> > packet-fcfcs.h 242 lines
> > packet-fcfzs.h 107 lines
> > packet-fcp.h 18 lines
> > packet-fcsb3.h 60 lines
> > packet-ff.h 720 lines
> > packet-gnutella.h 72 lines
> > packet-h223.h 18 lines
> > packet-ipsec.h 25 lines
> > packet-klm.h 20 lines
> > packet-mac-nr.h 122 lines
> >
>
> This one will be used by the catapult DCT2000 dissector at some point. It
> also provide defines for the UDP framing protocol.
>
> > packet-mbim.h 54 lines
>
> This one is used by plugins to register hooks for proprietary MBIM
> extensions.
>
> > packet-mount.h 27 lines
> > packet-mpeg-pmt.h 17 lines
> > packet-ndps.h 1839 lines
> > packet-nisplus.h 50 lines
> > packet-nlm.h 46 lines
> > packet-opensafety.h 504 lines
> > packet-pcnfsd.h 17 lines
> > packet-pktc.h 17 lines
> > packet-portmap.h 48 lines
> > packet-protobuf.h 47 lines
> > packet-ptpip.h 499 lines
> > packet-reload.h 18 lines
> > packet-rmi.h 55 lines
> > packet-rquota.h 22 lines
> > packet-spice.h 1206 lines

packet-spice.h is automatically generated, it would be easier to update
if it remains separate.

> > packet-stat-notify.h 20 lines
> > packet-stat.h 24 lines
> > packet-tacacs.h 430 lines
> > packet-tftp.h 21 lines
> > packet-thrift.h 75 lines
> > packet-ua.h 18 lines
> > packet-wtls.h 26 lines
> > packet-wtp.h 49 lines
> > packet-x11-keysymdef.h 2049 lines

This looks like an adaption of /usr/include/X11/keysymdef.h. Again, to
make updating easier I would keep this separate.

> > packet-ypbind.h 20 lines
> > packet-yppasswd.h 18 lines
> > packet-ypserv.h 29 lines
> > packet-ypxfr.h 19 lines

For files with just a few declarations and macros that were manually
written, I think it is fine to merge it into the corresponding .c file.
The larger files should probably remain separate. Many .c files are
already quite large, if any we should try to shrink them and not
increase it further.
--
Kind regards,
Peter Wu
https://lekensteyn.nl
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe