This program parses quote messages from a Kospi market data feed broadcasted via UDP and captured in pcap file. Sample data can be downloaded from http://www.tsurucapital.com/en/code-sample.html.
Compile:
stack build
Use:
./pcapKospi200 /path/to/file.pcap
to reorder by packet accept time:
./pcapKospi200 -r /path/to/file.pcap
to run infinite test cycling over file data:
./pcapKospi200 -t /path/to/file.pcap
- pcap format description
- UDP description
- Reading pcap
- https://serverfault.com/questions/38626/how-can-i-read-pcap-files-in-a-friendly-format
tcpdump -qns 0 -X -r file.pcap | less
- Wireshark-gtk
- Dealing with Binary in Haskell