tcpdump mailing list archives
New libpcap API
From: "Mark Bednarczyk" <voytechs () yahoo com>
Date: Fri, 15 Jan 2010 11:17:14 -0500
Hi, I'm the developer of a java libpcap wrapper jNetPcap. jNetPcap API currently provides comparible libpcap functions for almost everything prior to libpcap 0.9.8 version. I am planning out additional functions that I think need to be added to the API. Does anyone know which functions were introduced in 1.0.0 from the list below? I checked in changelogs but couldn't find references to most of these functions. Lastly, if anyone could fill in the few ??? marks for function description I couldn't find manpages for. pcap_create - allocates memory for the pcap handle (must be followed by a corresponding pcap_activate) pcap_set_snaplen - set the snapshot length for a not-yet-activated capture handle pcap_set_promisc - set promiscuous mode for a not-yet-activated capture handle pcap_can_set_rfmon - check whether monitor mode can be set for a not-yet-activated capture handle pcap_set_rfmon - set monitor mode for a not-yet-activated capture handle pcap_set_timeout - set the read timeout for a not-yet-activated capture handle pcap_set_buffer_size - set the buffer size for a not-yet-activated capture handle pcap_setdirection - set the direction for which packets will be captured pcap_activate - actives the pcap handle and most of the above functions may no longer be called on an active handle pcap_statustostr - convert a PCAP_ERROR_ or PCAP_WARNING_ value to a string pcap_strerror - convert an errno value to a string (how is this different from pcap_geterr?) pcap_offline_filter - check whether a filter matches a packet. BPF VM engine in user land pcap_datalink_ext - not sure ??? pcap_set_datalink - set the link-layer header type to be used by a capture device. pcap_list_datalinks - get a list of link-layer header types supported by a capture device pcap_free_datalinks - frees allocated memory in pcap_list_datalinks pcap_snapshot - get the snapshot length set with pcap_set_snaplen or pcap_open_live bpf_filter - ??? bpf_validate - ??? bpf_image - ??? bpf_dump - ??? Here is a list of of all the functions currently exported, which is almost everything else that is not in the list above with the exception of some very OS specific items such as file-handles which are meaningless in java: http://jnetpcap.com/docs/javadoc/jnetpcap-javadoc/org/jnetpcap/Pcap.html And here are the WinPcap extensions: http://jnetpcap.com/docs/javadoc/jnetpcap-javadoc/org/jnetpcap/winpcap/WinPc ap.html Is there anything I may be missing that is important in terms of API? I think the existing jNetPcap API, plus the functions above will cover everything that libpcap has exported. Cheers, mark.... http://jnetpcap.com "It is impossible to grasp the meaning of the idea of sound money if one does not realize that it was devised as an instrument for the protection of civil liberties against despotic inroads on the part of governments. Ideologically it belongs in the same class with political constitutions and bills of rights." Ludwig von Mises - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- New libpcap API Mark Bednarczyk (Jan 15)
- Re: New libpcap API Darren Reed (Jan 15)
- Re: New libpcap API Guy Harris (Jan 15)
- Re: New libpcap API Mark Bednarczyk (Jan 15)