Skip to content

Commit

Permalink
Consistently use "link-layer header type".
Browse files Browse the repository at this point in the history
Use "link-layer header type" as the term for DLT_ values; it doesn't
necessarily correspond to the actual data link type of the device
(802.11 devices, for example, can supply Ethernet headers).
  • Loading branch information
guyharris committed Aug 22, 2010
1 parent b9546dd commit 0ba94d1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pcap_datalink.3pcap.in
Expand Up @@ -19,7 +19,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\" .\"
.TH PCAP_DATALINK 3PCAP "5 April 2008" .TH PCAP_DATALINK 3PCAP "22 August 2010"
.SH NAME .SH NAME
pcap_datalink \- get the link-layer header type pcap_datalink \- get the link-layer header type
.SH SYNOPSIS .SH SYNOPSIS
Expand All @@ -34,7 +34,7 @@ int pcap_datalink(pcap_t *p);
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.B pcap_datalink() .B pcap_datalink()
returns the link layer type for the live capture or ``savefile'' returns the link-layer header type for the live capture or ``savefile''
specified by specified by
.IR p . .IR p .
.SH SEE ALSO .SH SEE ALSO
Expand Down
8 changes: 4 additions & 4 deletions pcap_datalink_name_to_val.3pcap
Expand Up @@ -19,7 +19,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\" .\"
.TH PCAP_DATALINK_NAME_TO_VAL 3PCAP "5 April 2008" .TH PCAP_DATALINK_NAME_TO_VAL 3PCAP "22 August 2010"
.SH NAME .SH NAME
pcap_datalink_name_to_val \- get the link-layer header type value pcap_datalink_name_to_val \- get the link-layer header type value
corresponding to a header type name corresponding to a header type name
Expand All @@ -35,12 +35,12 @@ int pcap_datalink_name_to_val(const char *name);
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.B pcap_datalink_name_to_val() .B pcap_datalink_name_to_val()
translates a data link type name, which is a translates a link-layer header type name, which is a
.B DLT_ .B DLT_
name with the name with the
.B DLT_ .B DLT_
removed, to the corresponding data link type value. The translation removed, to the corresponding link-layer header type value. The
is case-insensitive. translation is case-insensitive.
.SH RETURN VALUE .SH RETURN VALUE
.B pcap_datalink_name_to_val() .B pcap_datalink_name_to_val()
returns 0 on success and \-1 on failure. returns 0 on success and \-1 on failure.
Expand Down
10 changes: 5 additions & 5 deletions pcap_datalink_val_to_name.3pcap
Expand Up @@ -19,7 +19,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\" .\"
.TH PCAP_DATALINK_VAL_TO_NAME 3PCAP "24 December 2008" .TH PCAP_DATALINK_VAL_TO_NAME 3PCAP "22 August 2010"
.SH NAME .SH NAME
pcap_datalink_val_to_name, pcap_datalink_val_to_description \- get a pcap_datalink_val_to_name, pcap_datalink_val_to_description \- get a
name or description for a link-layer header type value name or description for a link-layer header type value
Expand All @@ -36,9 +36,9 @@ const char *pcap_datalink_val_to_description(int dlt);
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.B pcap_datalink_val_to_name() .B pcap_datalink_val_to_name()
translates a data link type value to the corresponding data link type translates a link-layer header type value to the corresponding
name. NULL is returned on failure. link-layer header type name. NULL is returned on failure.
.PP .PP
.B pcap_datalink_val_to_description() .B pcap_datalink_val_to_description()
translates a data link type value to a short description of that data translates a link-layer header type value to a short description of that
link type. NULL is returned on failure. link-layer header type. NULL is returned on failure.
10 changes: 5 additions & 5 deletions pcap_list_datalinks.3pcap.in
Expand Up @@ -36,21 +36,21 @@ void pcap_free_datalinks(int *dlt_list);
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.B pcap_list_datalinks() .B pcap_list_datalinks()
is used to get a list of the supported data link types of the interface is used to get a list of the supported link-layer header types of the
associated with the pcap descriptor. interface associated with the pcap descriptor.
.B pcap_list_datalinks() .B pcap_list_datalinks()
allocates an array to hold the list and sets allocates an array to hold the list and sets
.IR *dlt_buf .IR *dlt_buf
to point to that array. to point to that array.
.LP .LP
The caller is responsible for freeing the array with The caller is responsible for freeing the array with
.BR pcap_free_datalinks() , .BR pcap_free_datalinks() ,
which frees the list of data links pointed to by which frees the list of link-layer header types pointed to by
.IR dlt_list . .IR dlt_list .
.SH RETURN VALUE .SH RETURN VALUE
.B pcap_list_datalinks() .B pcap_list_datalinks()
returns the number of data link types in the array on success and \-1 returns the number of link-layer header types in the array on success
on failure. and \-1 on failure.
If \-1 is returned, If \-1 is returned,
.B pcap_geterr() .B pcap_geterr()
or or
Expand Down
2 changes: 1 addition & 1 deletion pcap_set_datalink.3pcap
Expand Up @@ -35,7 +35,7 @@ int pcap_set_datalink(pcap_t *p, int dlt);
.fi .fi
.SH DESCRIPTION .SH DESCRIPTION
.B pcap_set_datalink() .B pcap_set_datalink()
is used to set the current data link type of the pcap descriptor is used to set the current link-layer header type of the pcap descriptor
to the type specified by to the type specified by
.IR dlt . .IR dlt .
.SH RETURN VALUE .SH RETURN VALUE
Expand Down

0 comments on commit 0ba94d1

Please sign in to comment.