tcpdump mailing list archives

Re: [clearview-discuss] libdlpi with libpcap


From: Guy Harris <guy () alum mit edu>
Date: Wed, 30 Jan 2008 12:13:29 -0800

sagun shakya wrote:

I mostly fixed the comment changes, thinking they were trivial and left other Sun cstyle error alone. I can see how it is distracting while reviewing the actual changes. I've undone such changes and posted a new webrev at:

http://cr.opensolaris.org/~sagun/libpcap/

pcap-streams.c isn't purely STREAMS-related, and most of the pcap-XXX.c files have implementations of the libpcap APIs; you might want to call it, for example, "dlpisubs.c", as it's subroutines for both the "raw DLPI" and libdlpi-mediated DLPI implementations.

pcap_read_pkt() might be better named pcap_read_pkts(), or pcap_process_pkts() - it processes more than one packet.

pcap_set_linktype() doesn't set the link-layer type in the sense that pcap_set_datalink() does - i.e., it doesn't change what the link-layer type of the packets supplied by the device is. pcap_process_mactype() might be a better name.

pcap_conf_bufmod() also flushes the read side of the stream; you might want to do that outside that routine, as that's not related to setting up bufmod. Then pcap_conf_bufmod() wouldn't exist on platforms without bufmod.

You might also want to have pcap_open_live() in pcap-dlpi.c set passive mode if available, so that libpcap-based applications can coexist with link aggregation even in pre-Solaris 11 versions.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: