summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcap_findalldevs.3pcap11
-rw-r--r--pcap_freecode.3pcap6
-rw-r--r--pcap_get_required_select_timeout.3pcap19
-rw-r--r--pcap_get_selectable_fd.3pcap23
-rw-r--r--pcap_inject.3pcap8
-rw-r--r--pcap_is_swapped.3pcap4
-rw-r--r--pcap_list_datalinks.3pcap.in10
-rw-r--r--pcap_list_tstamp_types.3pcap.in6
-rw-r--r--pcap_lookupdev.3pcap11
-rw-r--r--pcap_loop.3pcap13
-rw-r--r--pcap_next_ex.3pcap15
-rw-r--r--pcap_offline_filter.3pcap4
-rw-r--r--pcap_open_dead.3pcap.in11
-rw-r--r--pcap_set_datalink.3pcap7
14 files changed, 70 insertions, 78 deletions
diff --git a/pcap_findalldevs.3pcap b/pcap_findalldevs.3pcap
index 14825ad1..e2bd12bb 100644
--- a/pcap_findalldevs.3pcap
+++ b/pcap_findalldevs.3pcap
@@ -40,11 +40,11 @@ void pcap_freealldevs(pcap_if_t *alldevs);
.SH DESCRIPTION
.B pcap_findalldevs()
constructs a list of network devices that can be opened with
-.B pcap_create()
+.B pcap_create(3PCAP)
and
-.B pcap_activate()
+.B pcap_activate(3PCAP)
or with
-.BR pcap_open_live() .
+.BR pcap_open_live(3PCAP) .
(Note that there may be network devices that cannot be opened by the
process calling
.BR pcap_findalldevs() ,
@@ -194,7 +194,7 @@ for IPv6 addresses, it can be interpreted as if it pointed to a
.BR "struct sockaddr_in6".
.PP
The list of devices must be freed with
-.BR pcap_freealldevs() ,
+.BR pcap_freealldevs(3PCAP) ,
which frees the list pointed to by
.IR alldevs .
.SH RETURN VALUE
@@ -210,5 +210,4 @@ is assumed to be able to hold at least
.B PCAP_ERRBUF_SIZE
chars.
.SH SEE ALSO
-pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP),
-pcap_open_live(3PCAP)
+pcap(3PCAP)
diff --git a/pcap_freecode.3pcap b/pcap_freecode.3pcap
index fac4b3df..4e71efa4 100644
--- a/pcap_freecode.3pcap
+++ b/pcap_freecode.3pcap
@@ -35,9 +35,9 @@ void pcap_freecode(struct bpf_program *);
is used to free up allocated memory pointed to by a
.I bpf_program
struct generated by
-.B pcap_compile()
+.B pcap_compile(3PCAP)
when that BPF program is no longer needed, for example after it
has been made the filter program for a pcap structure by a call to
-.BR pcap_setfilter() .
+.BR pcap_setfilter(3PCAP) .
.SH SEE ALSO
-pcap(3PCAP), pcap_compile(3PCAP), pcap_setfilter(3PCAP)
+pcap(3PCAP)
diff --git a/pcap_get_required_select_timeout.3pcap b/pcap_get_required_select_timeout.3pcap
index bc33e5d3..ecae7a5c 100644
--- a/pcap_get_required_select_timeout.3pcap
+++ b/pcap_get_required_select_timeout.3pcap
@@ -36,24 +36,24 @@ struct timeval *pcap_get_required_select_timeout(pcap_t *p);
returns, on UNIX, a pointer to a
.B struct timeval
containing a value that must be used as the minimum timeout in
-.BR select() ,
-.BR poll() ,
-.BR epoll_wait() ,
+.BR select(2) ,
+.BR poll(2) ,
+.BR epoll_wait(2) ,
and
.B kevent()
calls if
-.B pcap_get_selectable_fd()
+.B pcap_get_selectable_fd(3PCAP)
returns \-1.
.PP
The timeout that should be used in those calls must be no larger than
the smallest of all timeouts returned by
-.B pcap_get_required_select_timeout()
+.B \%pcap_get_required_select_timeout()
for devices from which packets will be captured.
.PP
The device for which
.B pcap_get_selectable_fd()
returned \-1 must be put in non-blocking mode with
-.BR pcap_setnonblock() ,
+.BR pcap_setnonblock(3PCAP) ,
and an attempt must always be made to read packets from the device
when the
.BR select() ,
@@ -66,9 +66,9 @@ call returns.
Note that a device on which a read can be done without blocking may,
on some platforms, not have any packets to read if the packet buffer
timeout has expired. A call to
-.B pcap_dispatch()
+.B pcap_dispatch(3PCAP)
or
-.B pcap_next_ex()
+.B pcap_next_ex(3PCAP)
will return 0 in this case, but will not block.
.PP
.B pcap_get_required_select_timeout()
@@ -80,5 +80,4 @@ is returned if the timeout is required; otherwise
.B NULL
is returned.
.SH SEE ALSO
-pcap(3PCAP), pcap_get_selectable_fd(3PCAP), select(2), poll(2),
-epoll_wait(2), kqueue(2)
+pcap(3PCAP), kqueue(2)
diff --git a/pcap_get_selectable_fd.3pcap b/pcap_get_selectable_fd.3pcap
index f1ddfe2d..c7b31607 100644
--- a/pcap_get_selectable_fd.3pcap
+++ b/pcap_get_selectable_fd.3pcap
@@ -36,29 +36,29 @@ int pcap_get_selectable_fd(pcap_t *p);
returns, on UNIX, a file descriptor number for a file descriptor on
which one can
do a
-.BR select() ,
-.BR poll() ,
-.BR epoll_wait() ,
+.BR select(2) ,
+.BR poll(2) ,
+.BR epoll_wait(2) ,
.BR kevent() ,
or other such call
to wait for it to be possible to read packets without blocking, if such
a descriptor exists, or \-1, if no such descriptor exists.
.PP
Some network devices opened with
-.B pcap_create()
+.B pcap_create(3PCAP)
and
-.BR pcap_activate() ,
+.BR pcap_activate(3PCAP) ,
or with
-.BR pcap_open_live() ,
+.BR pcap_open_live(3PCAP) ,
do not support those calls (for example, regular network devices on
FreeBSD 4.3 and 4.4, and Endace DAG devices), so \-1 is returned for
those devices. In that case, those calls must be given a timeout less
than or equal to the timeout returned by
-.B pcap_get_required_select_timeout()
+.B pcap_get_required_select_timeout(3PCAP)
for the device for which
.B pcap_get_selectable_fd()
returned \-1, the device must be put in non-blocking mode with a call to
-.BR pcap_setnonblock() ,
+.BR pcap_setnonblock(3PCAP) ,
and an attempt must always be made to read packets from the device
when the call returns. If
.B pcap_get_required_select_timeout()
@@ -70,9 +70,9 @@ event loop.
Note that a device on which a read can be done without blocking may,
on some platforms, not have any packets to read if the packet buffer
timeout has expired. A call to
-.B pcap_dispatch()
+.B pcap_dispatch(3PCAP)
or
-.B pcap_next_ex()
+.B pcap_next_ex(3PCAP)
will return 0 in this case, but will not block.
.PP
Note that in:
@@ -141,5 +141,4 @@ is not available on Windows.
A selectable file descriptor is returned if one exists; otherwise, \-1
is returned.
.SH SEE ALSO
-pcap(3PCAP), pcap_get_required_select_timeout(3PCAP),
-pcap_setnonblock(3PCAP), select(2), poll(2), epoll_wait(2), kqueue(2)
+pcap(3PCAP), kqueue(2)
diff --git a/pcap_inject.3pcap b/pcap_inject.3pcap
index ff9792d2..821f4211 100644
--- a/pcap_inject.3pcap
+++ b/pcap_inject.3pcap
@@ -42,7 +42,7 @@ is the number of bytes in the packet.
Note that, even if you successfully open the network interface, you
might not have permission to send packets on it, or it might not support
sending packets; as
-.I pcap_open_live()
+.B pcap_open_live(3PCAP)
doesn't have a flag to indicate whether to open for capturing, sending,
or capturing and sending, you cannot request an open that supports
sending and be notified at open time whether sending will be possible.
@@ -78,11 +78,11 @@ returns the number of bytes written on success and \-1 on failure.
returns 0 on success and \-1 on failure.
.PP
If \-1 is returned,
-.B pcap_geterr()
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B pcap_perror(3PCAP)
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(3PCAP)
diff --git a/pcap_is_swapped.3pcap b/pcap_is_swapped.3pcap
index 36691d31..67f762fe 100644
--- a/pcap_is_swapped.3pcap
+++ b/pcap_is_swapped.3pcap
@@ -39,9 +39,9 @@ than the current system. For a live capture, it always returns false
(0).
.PP
It must not be called on a pcap descriptor created by
-.B pcap_create()
+.B \%pcap_create(3PCAP)
that has not yet been activated by
-.BR pcap_activate() .
+.BR \%pcap_activate(3PCAP) .
.SH RETURN VALUE
.B pcap_is_swapped()
returns true (1) or false (0) on success and
diff --git a/pcap_list_datalinks.3pcap.in b/pcap_list_datalinks.3pcap.in
index 9f52b63b..d0c5afd1 100644
--- a/pcap_list_datalinks.3pcap.in
+++ b/pcap_list_datalinks.3pcap.in
@@ -47,9 +47,9 @@ 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()
+.B \%pcap_create(3PCAP)
that has not yet been activated by
-.BR pcap_activate() .
+.BR \%pcap_activate(3PCAP) .
.SH RETURN VALUE
.B pcap_list_datalinks()
returns the number of link-layer header types in the array on success,
@@ -61,13 +61,13 @@ and
If
.B PCAP_ERROR
is returned,
-.B pcap_geterr()
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B \%pcap_perror(3PCAP)
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(3PCAP),
pcap_datalink_val_to_name(3PCAP),
pcap-linktype(@MAN_MISC_INFO@)
diff --git a/pcap_list_tstamp_types.3pcap.in b/pcap_list_tstamp_types.3pcap.in
index a139324f..fcbff132 100644
--- a/pcap_list_tstamp_types.3pcap.in
+++ b/pcap_list_tstamp_types.3pcap.in
@@ -59,12 +59,12 @@ you are limited to the capture device's default time stamp type.
If
.B PCAP_ERROR
is returned,
-.B pcap_geterr()
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B pcap_perror(3PCAP)
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_tstamp_type_val_to_name(3PCAP),
+pcap(3PCAP), pcap_tstamp_type_val_to_name(3PCAP),
pcap-tstamp(@MAN_MISC_INFO@)
diff --git a/pcap_lookupdev.3pcap b/pcap_lookupdev.3pcap
index eb493ba7..29f09e37 100644
--- a/pcap_lookupdev.3pcap
+++ b/pcap_lookupdev.3pcap
@@ -47,13 +47,13 @@ possible.)
.B pcap_lookupdev()
returns a pointer to a string giving the name of a network device
suitable for use with
-.B pcap_create()
+.B pcap_create(3PCAP)
and
-.BR pcap_activate() ,
+.BR \%pcap_activate(3PCAP) ,
or with
-.BR pcap_open_live() ,
+.BR pcap_open_live(3PCAP) ,
and with
-.BR pcap_lookupnet() .
+.BR pcap_lookupnet(3PCAP) .
If there is an error,
.B NULL
is returned and
@@ -64,8 +64,7 @@ is assumed to be able to hold at least
.B PCAP_ERRBUF_SIZE
chars.
.SH SEE ALSO
-pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP),
-pcap_open_live(3PCAP), pcap_lookupnet(3PCAP)
+pcap(3PCAP)
.SH BUGS
The pointer returned by
.B pcap_lookupdev()
diff --git a/pcap_loop.3pcap b/pcap_loop.3pcap
index 4679b46e..de140da1 100644
--- a/pcap_loop.3pcap
+++ b/pcap_loop.3pcap
@@ -47,7 +47,7 @@ processes packets from a live capture or ``savefile'' until
.I cnt
packets are processed, the end of the ``savefile'' is
reached when reading from a ``savefile'',
-.B pcap_breakloop()
+.B pcap_breakloop(3PCAP)
is called, or an error occurs.
It does
.B not
@@ -123,7 +123,7 @@ them.
.PP
The bytes of data from the packet begin with a link-layer header. The
format of the link-layer header is indicated by the return value of the
-.B pcap_datalink()
+.B pcap_datalink(3PCAP)
routine when handed the
.B pcap_t
value also passed to
@@ -136,7 +136,7 @@ lists the values
can return and describes the packet formats that
correspond to those values. The value it returns will be valid for all
packets received unless and until
-.B pcap_set_datalink()
+.B pcap_set_datalink(3PCAP)
is called; after a successful call to
.BR pcap_set_datalink() ,
all subsequent packets will have a link-layer header of the type
@@ -188,12 +188,11 @@ checking for a return value < 0.
.ft R
.PP
If \-1 is returned,
-.B pcap_geterr()
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B pcap_perror(3PCAP)
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_breakloop(3PCAP),
-pcap_datalink(3PCAP)
+pcap(3PCAP)
diff --git a/pcap_next_ex.3pcap b/pcap_next_ex.3pcap
index 88e83143..983d4100 100644
--- a/pcap_next_ex.3pcap
+++ b/pcap_next_ex.3pcap
@@ -49,9 +49,9 @@ and the packet data are not to be freed by the caller, and are not
guaranteed to be valid after the next call to
.BR pcap_next_ex() ,
.BR pcap_next() ,
-.BR pcap_loop() ,
+.BR pcap_loop(3PCAP) ,
or
-.BR pcap_dispatch() ;
+.BR pcap_dispatch(3PCAP) ;
if the code needs them to remain valid, it must make a copy of them.
.PP
.B pcap_next()
@@ -78,7 +78,7 @@ is filled in with the appropriate values for the packet.
.PP
The bytes of data from the packet begin with a link-layer header. The
format of the link-layer header is indicated by the return value of the
-.B pcap_datalink()
+.B pcap_datalink(PCAP)
routine when handed the
.B pcap_t
value also passed to
@@ -91,7 +91,7 @@ lists the values
can return and describes the packet formats that
correspond to those values. The value it returns will be valid for all
packets received unless and until
-.B pcap_set_datalink()
+.B pcap_set_datalink(3PCAP)
is called; after a successful call to
.BR pcap_set_datalink() ,
all subsequent packets will have a link-layer header of the type
@@ -117,9 +117,9 @@ being read from a live capture and the packet buffer timeout expired,
\-1 if an error occurred while reading the packet, and \-2 if packets
are being read from a ``savefile'' and there are no more packets to read
from the savefile. If \-1 is returned,
-.B pcap_geterr()
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B pcap_perror(3PCAP)
may be called with
.I p
as an argument to fetch or display the error text.
@@ -136,5 +136,4 @@ non-blocking mode and no packets were available to be read), or if no
more packets are available in a ``savefile.'' Unfortunately, there is no
way to determine whether an error occurred or not.
.SH SEE ALSO
-pcap(3PCAP), pcap_geterr(3PCAP), pcap_dispatch(3PCAP),
-pcap_datalink(3PCAP)
+pcap(3PCAP)
diff --git a/pcap_offline_filter.3pcap b/pcap_offline_filter.3pcap
index 08c0b66b..724f8366 100644
--- a/pcap_offline_filter.3pcap
+++ b/pcap_offline_filter.3pcap
@@ -39,7 +39,7 @@ checks whether a filter matches a packet.
is a pointer to a
.I bpf_program
struct, usually the result of a call to
-.BR pcap_compile() .
+.BR pcap_compile(3PCAP) .
.I h
points to the
.I pcap_pkthdr
@@ -52,4 +52,4 @@ returns the return value of the filter program. This will be zero if
the packet doesn't match the filter and non-zero if the packet matches
the filter.
.SH SEE ALSO
-pcap(3PCAP), pcap_compile(3PCAP)
+pcap(3PCAP)
diff --git a/pcap_open_dead.3pcap.in b/pcap_open_dead.3pcap.in
index 621e75b5..97a97f3a 100644
--- a/pcap_open_dead.3pcap.in
+++ b/pcap_open_dead.3pcap.in
@@ -43,10 +43,10 @@ are used for creating a
structure to use when calling the other functions in libpcap. It is
typically used when just using libpcap for compiling BPF code; it can
also be used if using
-.BR pcap_dump_open() ,
-.BR pcap_dump() ,
+.BR pcap_dump_open(3PCAP) ,
+.BR pcap_dump(3PCAP) ,
and
-.B pcap_dump_close()
+.B pcap_dump_close(3PCAP)
to write a savefile if there is no
.B pcap_t
that supplies the packets to be written.
@@ -73,7 +73,6 @@ seconds and microseconds, and
.B PCAP_TSTAMP_PRECISION_NANO
should be specified if the packets to be written have time stamps in
seconds and nanoseconds. Its value does not affect
-.BR pcap_compile() .
+.BR pcap_compile(3PCAP) .
.SH SEE ALSO
-pcap(3PCAP), pcap_compile(3PCAP), pcap_dump_open(3PCAP),
-\%pcap-linktype(@MAN_MISC_INFO@)
+pcap(3PCAP), \%pcap-linktype(@MAN_MISC_INFO@)
diff --git a/pcap_set_datalink.3pcap b/pcap_set_datalink.3pcap
index 24d57a54..7613a58a 100644
--- a/pcap_set_datalink.3pcap
+++ b/pcap_set_datalink.3pcap
@@ -40,12 +40,11 @@ to the type specified by
.B pcap_set_datalink()
returns 0 on success and \-1 on failure.
If \-1 is returned,
-.B pcap_geterr()
+.B pcap_geterr(3PCAP)
or
-.B pcap_perror()
+.B pcap_perror(3PCAP)
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_datalink_name_to_val(3PCAP)
+pcap(3PCAP), pcap_datalink_name_to_val(3PCAP)