diff options
Diffstat (limited to 'contrib/libpcap/pcap_list_datalinks.3pcap')
-rw-r--r-- | contrib/libpcap/pcap_list_datalinks.3pcap | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/contrib/libpcap/pcap_list_datalinks.3pcap b/contrib/libpcap/pcap_list_datalinks.3pcap index f053a00..3c9a170 100644 --- a/contrib/libpcap/pcap_list_datalinks.3pcap +++ b/contrib/libpcap/pcap_list_datalinks.3pcap @@ -1,5 +1,3 @@ -.\" @(#) $Header: /tcpdump/master/libpcap/pcap_list_datalinks.3pcap.in,v 1.1 2008-10-21 07:33:02 guy Exp $ -.\" .\" Copyright (c) 1994, 1996, 1997 .\" The Regents of the University of California. All rights reserved. .\" @@ -19,7 +17,7 @@ .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.TH PCAP_LIST_DATALINKS 3PCAP "22 August 2010" +.TH PCAP_LIST_DATALINKS 3PCAP "17 September 2013" .SH NAME pcap_list_datalinks, pcap_free_datalinks \- get a list of link-layer header types supported by a capture device, and free that list @@ -47,11 +45,22 @@ The caller is responsible for freeing the array with .BR pcap_free_datalinks() , which frees the list of link-layer header types pointed to by .IR dlt_list . +.LP +It must not be called on a pcap descriptor created by +.B pcap_create() +that has not yet been activated by +.BR pcap_activate() . .SH RETURN VALUE .B pcap_list_datalinks() -returns the number of link-layer header types in the array on success -and \-1 on failure. -If \-1 is returned, +returns the number of link-layer header types in the array on success, +.B PCAP_ERROR_NOT_ACTIVATED +if called on a capture handle that has been created but not activated, +and +.B PCAP_ERROR +(\-1) on other errors. +If +.B PCAP_ERROR +is returned, .B pcap_geterr() or .B pcap_perror() |