Skip to content

Commit 42b5b44

Browse files
committed
man: Add a section to pcap_loop.3pcap. [skip ci]
As discussed on tcpdump-workers, move a paragraph to a new BACKWARD COMPATIBILITY section and tell a specific libpcap version, also make the formatting consistent.
1 parent 2b8e6b9 commit 42b5b44

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

pcap_loop.3pcap

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1818
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1919
.\"
20-
.TH PCAP_LOOP 3PCAP "25 July 2018"
20+
.TH PCAP_LOOP 3PCAP "22 August 2020"
2121
.SH NAME
2222
pcap_loop, pcap_dispatch \- process packets from a live capture or savefile
2323
.SH SYNOPSIS
@@ -92,21 +92,6 @@ will return 0, even when not in non-blocking mode, as there are no
9292
packets to process. Applications should be prepared for this to happen,
9393
but must not rely on it happening.
9494
.PP
95-
.ft B
96-
(In older versions of libpcap, the behavior when
97-
\fIcnt\fP
98-
was
99-
.B 0
100-
was undefined; different platforms and devices behaved
101-
differently, so code that must work with older versions of libpcap
102-
should use
103-
.BR \-1 ,
104-
not
105-
.BR 0 ,
106-
as the value of
107-
\fIcnt\fP.)
108-
.ft R
109-
.PP
11095
.I callback
11196
specifies a
11297
.I pcap_handler
@@ -220,5 +205,18 @@ or
220205
may be called with
221206
.I p
222207
as an argument to fetch or display the error text.
208+
.SH BACKWARD COMPATIBILITY
209+
.PP
210+
In libpcap versions before 1.5.0, the behavior when
211+
.I cnt
212+
was
213+
.B 0
214+
was undefined; different platforms and devices behaved differently,
215+
so code that must work with these versions of libpcap should use
216+
.BR \-1 ,
217+
not
218+
.BR 0 ,
219+
as the value of
220+
.IR cnt .
223221
.SH SEE ALSO
224222
.BR pcap (3PCAP)

0 commit comments

Comments
 (0)