Ethernet sniffing utility (QNX)
netsniff [options]...
The netsniff utility is an Ethernet network sniffing utility. It has been shipped as a debugging utility should you run into problems using Ethernet.
Figuring out which options to use to specify your src_nid/dst_nid filter looks a bit confusing, but really isn't. Proof by example follows:
If you want to look only at packets transmitted by node 0000c0129e40:
netsniff -s 0000c0129e40
If you want to look only at packets received by node 0000c0109e40:
netsniff -d 0000c0109e40
If you want to look only at packets transmitted by node 0000c0129e40 and received by node 0000c0109e40:
netsniff -s 0000c0129e40 -d 0000c0109e40
If you want to look only at packets transmitted or received by node 0000c0129e40 (this is a popular mode):
netsniff -a 0000c0129e40
To do anything really useful with netsniff on Ethernet, be sure to run your Net.ether* driver with the -P option to tell it to buffer all packets (16-bit cards are best for this). Otherwise, you will see only broadcasted packets with netsniff, which is usually pretty boring. |
The netsniff utility sees only packets that aren't grabbed by some other process attaching to the raw side of things. So, QNX packets addressed to your node aren't seen, nor are TCP/IP packets if you're running Sock[l]et.
To see these packets, put a second ethernet card in the machine, plug it into the same LAN, but make sure nobody has netmap entries for it. As described above, run the Net.ether* driver with the -P option so it gets all packets, then run netsniff on this card. You should see everything without interfering with normal QNX networking (except that the transfer of twice the normal load could slow down the machine somewhat if the bus gets busy).