WiFi provides a simple TCP/IP interface that allows you to process
packets captured by CommView for WiFi
using your own
application in real time. Starting with version 5.0, you may also
use this interface for sending packets (similar to the Packet
Generator function in CommView).
How It Works
WiFi should be launched with a
special command-line argument, "MIRROR", that tells the program to
mirror captured packets to an IP address and TCP port of your
mirror:127.0.0.1:5555 // mirrors packets to the loopback
address, TCP port 5555
mirror:126.96.36.199:10200 // mirrors packets to 188.8.131.52,
TCP port 10200
CommView for WiFi
with a switch like this, it tries to establish a TCP session by
connecting to the specified IP address and port number. It means
that you should already have your application running and listening
on the specified port. If CommView for WiFi
establish a connection, it will keep on trying to connect every 15
seconds. The same happens if the connection is broken:
CommView for WiFi
will try to
re-establish it every 15 seconds. If the connection is successfully
established, CommView for WiFi
packets it captures to the specified IP address as they arrive, in
The data is
transmitted in NCF format. Please refer to the
CommView Log Files
Format chapter for the format
Packets may not only be received by your application but also sent
as if you were using Packet Generator. Data can be sent to CommView
for WiFi using the same TCP connection over which you are receiving
the data. The data format is simple: You should send the packet
length (a two-byte unsigned integer in the standard little-endian
byte order) followed by the data rate index (a two-byte unsigned
integer in the standard little-endian byte order) followed by the
packet itself. Packet length should not include the four bytes that
precede the packet body. Data rate index is zero-based; it should
contain the index of the rate as shown in
the Packet Generator.
Consider the following example:
String to be sent in hex: D4 00 00 00 80 1F 02 66 C2
The length of this string is 10 bytes.
Rate to be used: 5.5 Mbps. This is the third item in the "802.11
data rate" drop-down list in the Packet Generator.
Resulting buffer to be sent: 0A 00 02 00 D4 00 00 00 80
1F 02 66 C2 8E.
If the adapter is not opened or it does not support packet
injection, the packet is silently discarded.
demo applications that listen for inbound connections, extract
packets from the stream, and display raw data are available.
data to a remote computer, make sure that the link between CommView
and the computer to which the data is being mirrored is fast enough
to transfer all the data being captured. If CommView captures 500
Kbytes/sec, and your link can handle only 50 Kbytes/sec, you'd
inevitably have "traffic jams," which might result in various
problems (e.g., Winsock may just stop sending data under some