Blame SOURCES/wireshark-1.10.14-drop-count.patch

affdba
diff -up wireshark-1.10.14/wiretap/pcapng.c.drop_count wireshark-1.10.14/wiretap/pcapng.c
affdba
--- wireshark-1.10.14/wiretap/pcapng.c.drop_count	2017-06-13 10:08:24.297419620 +0200
affdba
+++ wireshark-1.10.14/wiretap/pcapng.c	2017-06-13 11:33:46.264786204 +0200
affdba
@@ -3242,6 +3242,10 @@ pcapng_write_enhanced_packet_block(wtap_
affdba
                 have_options = TRUE;
affdba
                 options_total_length = options_total_length + 8;
affdba
         }
affdba
+        if (phdr->presence_flags & WTAP_HAS_DROP_COUNT) {
affdba
+                have_options = TRUE;
affdba
+                options_total_length = options_total_length + 12;
affdba
+        }
affdba
         if (have_options) {
affdba
                 /* End-of optios tag */
affdba
                 options_total_length += 4;
affdba
@@ -3364,6 +3368,17 @@ pcapng_write_enhanced_packet_block(wtap_
affdba
                 wdh->bytes_dumped += 4;
affdba
                 pcapng_debug1("pcapng_write_enhanced_packet_block: Wrote Options packet flags: %x", phdr->pack_flags);
affdba
         }
affdba
+        if (phdr->presence_flags & WTAP_HAS_DROP_COUNT) {
affdba
+                option_hdr.type         = OPT_EPB_DROPCOUNT;
affdba
+                option_hdr.value_length = 8;
affdba
+                if (!wtap_dump_file_write(wdh, &option_hdr, 4, err))
affdba
+                        return FALSE;
affdba
+                wdh->bytes_dumped += 4;
affdba
+                if (!wtap_dump_file_write(wdh, &phdr->drop_count, 8, err))
affdba
+                        return FALSE;
affdba
+                wdh->bytes_dumped += 8;
affdba
+                pcapng_debug1("pcapng_write_enhanced_packet_block: Wrote Options drop count: %" G_GINT64_MODIFIER "u", phdr->drop_count);
affdba
+        }
affdba
         /* Write end of options if we have otions */
affdba
         if (have_options) {
affdba
                 if (!wtap_dump_file_write(wdh, &zero_pad, 4, err))