Hi,
>>> I would like to hear from you for suggestions on how libpcap can be
>>> updated to libdlpi. I have a couple of possible approaches to make 
>>> this addition but they may not necessarily be the best approach:
>>>
>>> 1) Introduce a new pcap-libdlpi-solaris.c file which will handle all the
>>> versions of Solaris with libdlpi. The existing pcap-dlpi.c will continue
>>> working for pre-libdlpi versions of Solaris.
>>>
>>> 2) Continue with the use of ifdef #HAVE_SOLARIS approach in the existing
>>> pcap-dlpi.c file to call libdlpi functions for releases that support
>>> libdlpi.
>>>
>>> 3) Instead of using libdlpi, add support to open different 
>>> directories, i.e /dev/net, /dev/ipnet, and add other Solaris-specific 
>>> ioctls to the existing pcap-dlpi.c file under #ifdef protection.

I have developed a prototype with the option 1 proposed. I would like to 
hear from you if you have any comments or feedback.
The changes made to the libpcap library can be seen at the link below:

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

I will be adding a readme file with these changes when providing the 
patch later. I've compiled and ran this version of libpcap with tcpdump 
and wireshark on a system with and without clearview-UV.

As mentioned before once the UV component of Project Clearview 
(http://opensolaris.org/os/project/clearview/uv/) integrates into 
Solaris, libpcap will allow you to capture packets at non IP-layers as 
well. The present libpcap library enumerates available network devices 
on Solaris with find_alldevs() using SIOCCLGIFCONF  flag. Therefore, 
only network devices which have been plumbed by IP are listed.  In this 
version of libpcap, find_alldevs() calls pcap_platform_finddevs() to 
find the rest unplumbed network devices. Since pcap_platform_finddevs() 
is implemented using of dlpi_walk(), which will be provided with libdlpi 
when UV integrates, the  latest version of SXDE/SXCE will not be able to 
support this feature.

Thank you for reviewing,

Sagun




Reply via email to