diff options
author | fenner <fenner@FreeBSD.org> | 2003-01-26 01:16:33 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2003-01-26 01:16:33 +0000 |
commit | 34111fdf72727e35d5c81dc576ce3f5a87c9ef84 (patch) | |
tree | 48f10250dfd696b7848cb83c2db083a4d66ddcef /contrib/libpcap/pcap.3 | |
parent | 1e8ea467791f99f6068888787c27fd8b6b923d2c (diff) | |
download | FreeBSD-src-34111fdf72727e35d5c81dc576ce3f5a87c9ef84.zip FreeBSD-src-34111fdf72727e35d5c81dc576ce3f5a87c9ef84.tar.gz |
Commit tcpdump.org's multi-DLT support to vendor branch.
Diffstat (limited to 'contrib/libpcap/pcap.3')
-rw-r--r-- | contrib/libpcap/pcap.3 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/libpcap/pcap.3 b/contrib/libpcap/pcap.3 index 8aaeb4e..2ef8026 100644 --- a/contrib/libpcap/pcap.3 +++ b/contrib/libpcap/pcap.3 @@ -82,6 +82,8 @@ u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h) .LP .ft B int pcap_datalink(pcap_t *p) +int pcap_list_datalinks(pcap_t *p, int **dlt_buf); +int pcap_set_datalink(pcap_t *p, int dlt); int pcap_snapshot(pcap_t *p) int pcap_is_swapped(pcap_t *p) int pcap_major_version(pcap_t *p) @@ -663,6 +665,34 @@ header or 4 for frames beginning with an 802.2 LLC header. Apple LocalTalk; the packet begins with an AppleTalk LLAP header .RE .PP +.B pcap_list_datalinks() +is used to get a list of the supported data link types of the interface +associated with the pcap descriptor. +.B pcap_list_datalinks() +allocates an array to hold the list and sets +.IR *dlt_buf . +The caller is responsible for freeing the array. +.B \-1 +is returned on failure; +otherwise, the number of data link types in the array is returned. +.PP +.B pcap_set_datalink() +is used to set the current data link type of the pcap descriptor +to the type specified by +.IR dlt . +.B \-1 +is returned on failure. +.PP +.B pcap_datalink_name_to_val() +translates a data link type name, which is a +.B DLT_ +name with the +.B DLT_ +removed, to the corresponding data link type value. The translation +is case-insensitive. +is used to set the current data link type of the pcap descriptor +NULL is returned on failure. +.PP .B pcap_snapshot() returns the snapshot length specified when .B pcap_open_live |