PERFORCE change 131480 for review

Robert Watson rwatson at FreeBSD.org
Sun Dec 23 09:55:40 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=131480

Change 131480 by rwatson at rwatson_cinnamon on 2007/12/23 17:55:33

	Add a comment before BPF buffers are either read or zero-copy
	rotated to explain what's going on.

Affected files ...

.. //depot/projects/zcopybpf/src/contrib/libpcap/pcap-bpf.c#12 edit

Differences ...

==== //depot/projects/zcopybpf/src/contrib/libpcap/pcap-bpf.c#12 (text+ko) ====

@@ -284,6 +284,14 @@
 	}
 	cc = p->cc;
 	if (p->cc == 0) {
+		/*
+		 * When reading without zero-copy from a file descriptor, we
+		 * use a single buffer and return a length of data in the
+		 * buffer.  With zero-copy, we update the p->buffer pointer
+		 * to point at whatever underlying buffer contains the next
+		 * data and update cc to reflect the data found in the
+		 * buffer.
+		 */
 #ifdef BIOCSETBUFMODE
 		if (p->zerocopy) {
 			if (p->buffer != NULL)


More information about the p4-projects mailing list