]> The Tcpdump Group git mirrors - libpcap/commitdiff
prev_pkt is in the pcap_md structure, not the pcap_t structure itself.
authorGuy Harris <[email protected]>
Wed, 25 Mar 2009 15:53:58 +0000 (08:53 -0700)
committerGuy Harris <[email protected]>
Wed, 25 Mar 2009 15:53:58 +0000 (08:53 -0700)
pcap-linux.c

index b9809b0b8e165bd5774fbbf2deaa8585c2a52171..ce914aa8a3a2cedbdb97814a5c47d143c3b01cad 100644 (file)
@@ -2213,18 +2213,18 @@ pcap_get_ring_frame(pcap_t *handle, int status)
 static inline void
 pcap_release_previous_ring_frame(pcap_t *handle)
 {
 static inline void
 pcap_release_previous_ring_frame(pcap_t *handle)
 {
-       if (handle->prev_pkt.raw != NULL) {
+       if (handle->md.prev_pkt.raw != NULL) {
                switch (handle->md.tp_version) {
                case TPACKET_V1:
                switch (handle->md.tp_version) {
                case TPACKET_V1:
-                       handle->prev_pkt.h1->tp_status = TP_STATUS_KERNEL;
+                       handle->md.prev_pkt.h1->tp_status = TP_STATUS_KERNEL;
                        break;
 #ifdef HAVE_TPACKET2
                case TPACKET_V2:
                        break;
 #ifdef HAVE_TPACKET2
                case TPACKET_V2:
-                       handle->prev_pkt.h2->tp_status = TP_STATUS_KERNEL;
+                       handle->md.prev_pkt.h2->tp_status = TP_STATUS_KERNEL;
                        break;
 #endif
                }
                        break;
 #endif
                }
-               handle->prev_pkt.raw = NULL;
+               handle->md.prev_pkt.raw = NULL;
        }
 }
 
        }
 }
 
@@ -2470,7 +2470,7 @@ skip:
                 * as pcap_next() and pcap_next_ex() - expect the packet
                 * to be available until the next pcap_dispatch() call.
                 */
                 * as pcap_next() and pcap_next_ex() - expect the packet
                 * to be available until the next pcap_dispatch() call.
                 */
-               handle->prev_pkt = h;
+               handle->md.prev_pkt = h;
                if (++handle->offset >= handle->cc)
                        handle->offset = 0;
 
                if (++handle->offset >= handle->cc)
                        handle->offset = 0;