ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 6718] Wiretap API needs to handle pcap-NG ISB blocks

Date: Fri, 9 Mar 2012 03:28:10 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6718

Jose Pedro Oliveira <jpo@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #7985|                            |review_for_checkin?
              Flags|                            |

--- Comment #17 from Jose Pedro Oliveira <jpo@xxxxxxxxxxxx> 2012-03-09 03:28:09 PST ---
Created attachment 7985
  --> https://bugs.wireshark.org/bugzilla/attachment.cgi?id=7985
pcapio.c: write IDB options in numeric order and corrects the IDB
block_total_length

Problems tackled by the attached patch:

 1) <pedantic>
    makes dumpcap write the IDB options in numeric order
    (IDB option 9 was being written after options 11 and 12)
    </pedantic>

 2) makes the IDB block_total_length value multiple of 4 (32-bit alignment)
    (the filter value length was not a multiple of 4)

    ...
    block_total_length += sizeof(struct option) +
-                          (guint16)(ADD_PADDING(strlen(filter) + 1)+1);
+                          (guint16)(ADD_PADDING(strlen(filter) + 1 + 1));
    ...

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.