xref: /freebsd/contrib/libpcap/TODO (revision 0a94d38f0590468c79627c0140ef494c66616ae6)
1dc2c7305SBill Fenner TODO list for libpcap
2dc2c7305SBill Fenner=======================
3dc2c7305SBill Fenner
4dc2c7305SBill FennerImportant stuff (to be done before the next release)
5dc2c7305SBill Fenner---------------
6dc2c7305SBill Fenner
7dc2c7305SBill FennerGeneral
8dc2c7305SBill Fenner
9dc2c7305SBill Fenner- configure should not be in the CVS. Most open source projects have an
10dc2c7305SBill Fenner  autogen.sh script to run autoconf etc. after checkout. I think we
11dc2c7305SBill Fenner  should stick to the standard.
12dc2c7305SBill Fenner
13dc2c7305SBill Fenner- The source files should be better documented. There is no official
140a94d38fSBill Fenner  design guideline for what is done where. There should be a common coding
150a94d38fSBill Fenner  style (okay, you can guess that by looking at the code) and a guide for
16dc2c7305SBill Fenner  what needs to be documented.
17dc2c7305SBill Fenner
18dc2c7305SBill FennerLinux kernel interface
19dc2c7305SBill Fenner
20dc2c7305SBill Fenner- Currently there is a race condition in that a socket is activated at the
210a94d38fSBill Fenner  same time it is opened - before applying a filter. This has to
22dc2c7305SBill Fenner  be corrected so that capture starts when pcap_read is called for the
23dc2c7305SBill Fenner  first time.
24dc2c7305SBill Fenner
25dc2c7305SBill FennerLess urgent items
26dc2c7305SBill Fenner-----------------
27dc2c7305SBill Fenner
28dc2c7305SBill Fenner- Better documentation and cleanup of the interface. I am seeing a few
29dc2c7305SBill Fenner  problems at the first glance which needs fixing:
30dc2c7305SBill Fenner  + pcap_lookupnet makes little to no sense with protocols != IPv4
310a94d38fSBill Fenner  + not very well suited for interactive programs (think ethereal). There
320a94d38fSBill Fenner    should be a way for the application to get a file descriptor which it
330a94d38fSBill Fenner    has to monitor and a callback in pcap which has to be called on
340a94d38fSBill Fenner    activity (XXX - "pcap_fileno()" handles the first part, although
350a94d38fSBill Fenner    "select()" and "poll()" don't work on BPF devices on most BSDs, and
360a94d38fSBill Fenner    you can call "pcap_dispatch()" as the dispatch routine after putting
370a94d38fSBill Fenner    the descriptor into non-blocking mode)
38dc2c7305SBill Fenner  + too many functions. There are a lot of functions for everything which
39dc2c7305SBill Fenner    violates the KISS principle. Why do we need pcap_strerror, pcap_perror
40dc2c7305SBill Fenner    and pcap_geterr?
41dc2c7305SBill Fenner  + the manpage has a brief description of each function but where is the
42dc2c7305SBill Fenner    big picture? Seems like you need to buy UNP for that...
43