]> The Tcpdump Group git mirrors - libpcap/commitdiff
Refine references in some man pages, round 2.
authorDenis Ovsienko <[email protected]>
Tue, 17 Jul 2018 16:52:52 +0000 (16:52 +0000)
committerDenis Ovsienko <[email protected]>
Tue, 17 Jul 2018 16:52:52 +0000 (16:52 +0000)
[skip ci]

14 files changed:
pcap_findalldevs.3pcap
pcap_freecode.3pcap
pcap_get_required_select_timeout.3pcap
pcap_get_selectable_fd.3pcap
pcap_inject.3pcap
pcap_is_swapped.3pcap
pcap_list_datalinks.3pcap.in
pcap_list_tstamp_types.3pcap.in
pcap_lookupdev.3pcap
pcap_loop.3pcap
pcap_next_ex.3pcap
pcap_offline_filter.3pcap
pcap_open_dead.3pcap.in
pcap_set_datalink.3pcap

index 14825ad17dfa9b46184f91ebf2081da0f758fb68..e2bd12bb40a51be46060f963aad0e03ba7a9d40b 100644 (file)
@@ -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)
index fac4b3df2a6d7195678d75726659f227f281fe83..4e71efa49cf2f0730346cca6888666144e40e26e 100644 (file)
@@ -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)
index bc33e5d3a7916e325a95fde1b6153a28cf147d94..ecae7a5cc1f0f4a97cf2907845e45d61cf61f399 100644 (file)
@@ -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)
index f1ddfe2dc602fe99a779da82e1dbf927dba59f28..c7b3160741bdb6a978819ac4cacfa7c4c9f9370b 100644 (file)
@@ -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)
index ff9792d2096621f87b7fa48ab24fac38c462daa8..821f42112dbba7fca342d7f7a33cdb7b2f85c2c7 100644 (file)
@@ -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)
index 36691d3102afb637770ee5af9e3b15d1f006637a..67f762fedcfa6508ea93466c8748dc246aa5fe63 100644 (file)
@@ -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
index 9f52b63bb98cfa6192c0095cf24d3189ad73aba5..d0c5afd13c03f7dfcbad524956ae8529db44b993 100644 (file)
@@ -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@)
index a139324f31c3b5119b24dc4849cb6f6b53f834ae..fcbff132a93ae55ab3c07d8935056c23fcc95b2e 100644 (file)
@@ -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@)
index eb493ba7e3fc472da600e0151d51328b603a7cc4..29f09e3752977c0d0cbd6d3468ec39c2e58c4a7f 100644 (file)
@@ -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()
index 4679b46e093c653019060f0023c80c8fd6cf6394..de140da1624ab9c81031a8350edb99dfa4b985fb 100644 (file)
@@ -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)
index 88e831435ab36b36c1820a18121d9a589a0038ef..983d4100591160cd6f982e506f85dcec8d83a5ec 100644 (file)
@@ -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)
index 08c0b66b334963c62b068daee8922ad88b14e848..724f8366b496159b49bf2c89bc68f57cbd1ad369 100644 (file)
@@ -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)
index 621e75b5b58a1b1225936b725f5f865f47f02024..97a97f3ac8c0336ab6c531c06c0dd4a606b5dfa7 100644 (file)
@@ -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@)
index 24d57a541c83a5f7c82d507c6baa9a1ff9f40f62..7613a58add13e7b40f633c1b7217a535feb254ae 100644 (file)
@@ -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)