Configuration

configuration options

These options are used to set sniffer behaviour during current session. They are read once at startup and cannot be changed during run-time. This might change in the future.

list of configuration options:

device (set device <string>)

<string> is the name of device to attach sniffer to (eth0 for example).

sniffer_priority (set sniffer_priority <integer>)

This variable specifies priority for the sniffer thread. It's value must be integer in range -20 to 20. Zero is normal priority, negative values represent higher and positive lower priority. When setting this variable, keep in mind that sniffer thread whould be called fairly oftenly in order not to miss any packet. Sniffer thread is very simple (it only receives packet from the device and stores it for the later processing). Event handler function on_receive_packet is called from the sniffer thread for every received packet, so it is wise practice to keep this function small and fast.

dumper_priority (set dumper_priority <integer>)

Story is pretty much the same as for the sniffer_priority variable, except that on_dump_packet handler doesn't have size and speed recommendations. You should be aware, though, that slower on_dump_packet function means slower emptying of the buffer and thus higher memory utilization.

log_file (set log_file <string>)

Use this variable to specify the file sniffer should use for logging messages. One special case is the value "syslog". If you set log_file to this value, then all logging messages will be sent to local syslog daemon instead of to the file.

dump_freq (set dump_freq <integer>)

The value of this variable is the number of seconds dumper thread should wait before starting to empty sniffer buffer. In other words, sniffer will dump buffered packets every <integer> seconds.

dump_buffer_size (set dump_buffer_size <integer>)

This variable has similar use to the previous variable. Sniffer will start dumping packets whenever buffer size reaches specified value (in kylobytes). This way you can effectively control sniffer memory consumption.

dump_packets (set dump_packets <integer>)

Yet another variable that controls how often are packets dumped from the buffer. This variable specifies number of packets that must be in the buffer before dumping is started.