This is our old Q&A Site. Please post any new questions and answers at

Hi All,

I am using FIX Dissector to decode FIX Protocol, and I got following message.

SendingTime (52): 20120927-19:28:04.909

I am sure there should be 6 digits for milliseconds and microseconds, for instance, 19:28:04.909XXX. Can I show the all 6 digits by changing some settings?


asked 28 Sep '12, 07:49

ylin's gravatar image

accept rate: 0%

This is great. Could you let me know how you are doing it, as I am not able to dissect it yet, I tried this program but its not working.


from scapy.all import *

def ExtractFIX(pcap): """A generator that iterates over the packets in a scapy pcap iterable and extracts the FIX messages. In the case where there are multiple FIX messages in one packet, yield each FIX message individually.""" for packet in pcap: if packet.haslayer('Raw'): # Only consider TCP packets which contain raw data. load = packet.getlayer('Raw').load

        # Ignore raw data that doesn't contain FIX.
        if not 'FIX' in load:

        # Replace \x01 with '|'.
        load = re.sub(r'\x01', '|', load)

        # Split out each individual FIX message in the packet by putting a 
        # ';' between them and then using split(';').
        for subMessage in re.sub(r'\|8=FIX', '|;8=FIX', load).split(';'):
            # Yield each sub message. More often than not, there will only be one.
            assert subMessage[-1:] == '|'
            yield subMessage

pcap = rdpcap('dump.pcap') for fixMessage in ExtractFIX(pcap): print fixMessage


And giving this error

pcap = rdpcap('dump.pcap') NameError: name 'rdpcap' is not defined process finished with exit code 1

permanent link

answered 09 Feb '16, 22:02

fixmessenger's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 28 Sep '12, 07:49

question was seen: 2,640 times

last updated: 09 Feb '16, 22:02

p​o​w​e​r​e​d by O​S​Q​A