aboutsummaryrefslogtreecommitdiff
path: root/pcap_list_datalinks.3pcap.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-08-22 14:54:10 -0700
committerGuy Harris <guy@alum.mit.edu>2010-08-22 14:54:10 -0700
commit57935bef89bfd8638d58e5167abbbcb6317fb018 (patch)
tree38fdea55f036d0f56a8c3b795a6d194f6cf0187e /pcap_list_datalinks.3pcap.in
parentbc8209b71e928870b0f172d43b174ab27ba24394 (diff)
Combine documentation for allocate and free routines.
Pull the documentation for pcap_freealldevs() into the pcap_findalldevs() man page, and pull the documentation for pcap_free_datalinks() into the pcap_list_datalinks() man page.
Diffstat (limited to 'pcap_list_datalinks.3pcap.in')
-rw-r--r--pcap_list_datalinks.3pcap.in16
1 files changed, 10 insertions, 6 deletions
diff --git a/pcap_list_datalinks.3pcap.in b/pcap_list_datalinks.3pcap.in
index 490e8dde..909bcf65 100644
--- a/pcap_list_datalinks.3pcap.in
+++ b/pcap_list_datalinks.3pcap.in
@@ -21,8 +21,8 @@
.\"
.TH PCAP_LIST_DATALINKS 3PCAP "5 April 2008"
.SH NAME
-pcap_list_datalinks \- get a list of link-layer header types supported
-by a capture device
+pcap_list_datalinks, pcap_free_datalinks \- get a list of link-layer header
+types supported by a capture device, and free that list
.SH SYNOPSIS
.nf
.ft B
@@ -31,6 +31,7 @@ by a capture device
.LP
.ft B
int pcap_list_datalinks(pcap_t *p, int **dlt_buf);
+void pcap_free_datalinks(int *dlt_list);
.ft
.fi
.SH DESCRIPTION
@@ -39,9 +40,13 @@ 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 .
+.IR *dlt_buf
+to point to that array.
+.LP
The caller is responsible for freeing the array with
-.BR pcap_free_datalinks (3PCAP).
+.BR pcap_free_datalinks() ,
+which frees the list of data links pointed to by
+.IR dlt_list .
.SH RETURN VALUE
.B pcap_list_datalinks()
returns the number of data link types in the array on success and \-1
@@ -54,5 +59,4 @@ may be called with
.I p
as an argument to fetch or display the error text.
.SH SEE ALSO
-pcap(3PCAP), pcap_geterr(3PCAP), pcap_free_datalinks(3PCAP),
-pcap-linktype(@MAN_MISC_INFO@)
+pcap(3PCAP), pcap_geterr(3PCAP), pcap-linktype(@MAN_MISC_INFO@)