I did an analysis of the top-level source files, to see the groupings.

*Small Programs*
capinfos.c - for capinfos
dftest..c - for dftest
editcap.c - for editcap
mergecap.c - for mergecap
randpkt.c - for randpkt
rawshark.c - for rawshark
text2pcap.c & text2pcap-scanner.c (generated) - for text2pcap
tshark.c - for tshark


*Not mentioned anywhere!*
mkcap.c
nio-ie5.c (but the obj is cleaned in Makefile.nmake)
trigcap.c
update.c (but the obj is cleaned in Makefile.nmake)

*wireshark_SOURCES only*
airpcap_loader.c
capture.c
capture_info.c
color_filters.c
file.c
fileset.c
filters.c
g711.c
proto_hier_stats.c
recent.c
summary.c
u3.c

*SHARK_COMMON_CAPTURE_SRC only (meant for wireshark and tshark, but not
rawshark)*
capture_ifinfo.c
capture_sync.c
capture_ui_utils.c

*wireshark_SOURCES + tshark_SOURCES + dumpcap_SOURCES*
capture_opts.c
tempfile.c

*dumpcap_SOURCES + WIRESHARK_COMMON_SRC*
capture-pcap-util.c
capture-pcap-util-unix.c
capture-wpcap.c
capture_wpcap_packet.c
clopts_common.c
sync_pip_write.c

*dumpcap_SOURCES only*
capture_stop_conditions.c
conditions.c
dumpcap.c
pcapio.c
ringbuffer.c
version_info.c

*WIRESHARK_COMMON_SRC only (meant for wireshark, tshark, and rawshark)*
cfile.c
disabled_protos.c
frame_data_sequence.c
packet-range.c
print.c
ps.c (generated source file)
tap-megaco-common.c
tap-rtp-common.c
timestats.c

*wireshark_SOURCES + mergecap_SOURCES*
merge.c


So, we could go so far as:

1) creating a directory for all the sources that are meant only for
wireshark only (i.e, a GUI analyzer); perhaps some of those files belong in
epan, but not all.

2) create a "capture" directory to create libcapture.a for all the files
shared by any combination of wireshark, tshark, rawshark, and dumpcap

3) create a directory for all the sources meant only for dumpcap; there's a
good amount of them

4) We could keep the "small program" sources at the top-level for now

5) The 4 .c files that aren't mentioned in a makefile... we need to see if
those are needed any more.

Gilbert


On Thu, Mar 8, 2012 at 12:26 AM, Guy Harris <g...@alum.mit.edu> wrote:

>
> On Mar 7, 2012, at 9:07 PM, Gilbert Ramirez wrote:
>
> > With this in mind, and by analyzing the groupings in Makefile.common,
> I'd like to recommend the following movements:
> >
> > Create new directory called shark, to contain files common, or almost
> common, to the analyzer applications (wireshark, tshark, and rawshark):
> >
> > airpcap_loader.c
>
> That one might belong in a "capture" subdirectory, in which a static
> library is built, unless it's also used by dumpcap.
>
> > alert_box.c
>
> Oops, that one belongs in the ui subdirectory, as it's only used by
> Wireshark, not TShark or rawshark; I'll work on moving it there.
>
> > capinfos.c
>
> That's a command by itself.
>
> > capture.c
> > capture_ifinfo.c
> > capture_info.c
> > capture_opts.c
> > capture-pcap-util.c
> > capture-pcap-util-unix.c
> > capture_stop_conditions.c
> > capture_sync.c
> > capture_ui_utils.c
> > capture-wpcap.c
> > capture_wpcap_packet.c
>
> Any of those not used by dumpcap arguably belongs in the aforementioned
> "capture" subdirectory.
>
> Any of those used only by dumpcap may belong, along with dumpcap, in a
> subdirectory for dumpcap.
>
> (Or maybe we can have both dumpcap and the programs that run it link with
> the "capture" library, in case there's anything used by dumpcap and those
> programs.)
>
> > I also feel that the directories that distribute data files (radius,
> dtds, idl), should all be moved under another new directory, perhaps
> "definitions", but I know less about those files.
>
> One advantage of having them in the top-level directory is that the
> top-level directory then looks a bit more like the installation directory,
> so the "run this from the build directory" mechanism has to do less work.
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
>
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to