IaxDissect Source
Download the Xcode project archive [200Kb]
Hints that should help when reading the source
- A number of captures are supported.
- A capture is a container with a set of properties and a number of captured IAX frames.
- Amongst others, a capture defines the PCAP filter (tcpdump style) used to sniff packets.
This filter can be changed (offline). At capture start time, pcap will compile the filter and throw an error if it can't parse it.
- Once the capture starts, the packets are decoded and stored within the originating capture's IAX frames.
- UI is based on Cocoa bindings and "automagically" fills in data available in the model.
- There are two threads involved: the UI thread and the PCAP capture thread.
- The PCAP capture thread bases its loop exit condition on a variable stored in the IAXCapture model.
- Note that SDIaxCapture model updates are performed within the main thread via performSelectorOnMainThread. Don't change this as you'll run into multithreading issues. (The observers - ie bindings update the range in the object to be observed and perform concurrent modifications on the NSArray's storage. This results in nasty crashes.)