Command Syntax in Detail
-h
Purpose |
Shows command usage |
Example |
|
-e expr
Purpose |
Filters packets according to the given INSPECT expression (expr) |
Example |
|
Default |
If the -e option is not given, all packets are captured. This option is the same as running: Note: The -e option cannot be used with the -f option. See also the |
-f file
Purpose |
This option filters packets according to INSPECT expressions in a given file. To use pre-defined INSPECT macros, the given file must include the ' Note: The -f option cannot be used with the -e option. |
Example |
|
|
Inspect.dat contents:
|
-f
Purpose |
This option filters packets according to INSPECT expressions given in the standard input. To use pre-defined INSPECT macros, the input must include the directive:
To stop command input and start packet inspection based on the given input, enter Note: The |
Example |
|
Standard input contents:
|
-t
Purpose |
The If you want to define new macros with the same name as those defined in |
-l len
Purpose | Limits packet capture length to the given |
Example |
|
Default | If the -l option is not given, all packet data is captured |
Comment |
|
-m mask
Purpose | By default packetmon captures packets before and after firewall inspection. The
The mask can be a combination of the above. |
Example |
|
Default | Not specifying the |
-x offset [, len]
Purpose | The -x option lets you print a packet's raw data. The value is an offset from the beginning of the IP header. You can also use the Note: Using the |
Examples |
|
Default | Not specifying the |
-o file
Purpose | The -o option saves raw packet data to a file. The file format used is the same format used by tools like snoop (RFC 1761). This file format can be examined using Wireshark, Snoop, tcpdump, or tools similar to these. |
Example |
|
-ci count / -co count
Purpose | This option limit the number of packets being captured. This is useful when you need to troubleshoot a firewall handling large amounts of traffic.
|
Examples |
|
-I
Purpose | To avoid long interface names, this option prints the index of the interface on which the packet was received or sent. After the packet capture is stopped, a list of all interfaces (index and names) is printed. |
Example |
|
Default | If the option is not specified, the interface name is printed. |
-d
Purpose | This option shows packets dropped by the firewall. Use this option when you need to locate a packet missing from the output. |
Example |
|
Default | Without this option, packetmon shows packets before they pass through the FW engine (i/o) and packets accepted by the FW engine (I/O). Packet that are dropped are not shown. |
-r
Purpose | If a packet is dropped or accepted because of a rule, this option prints the name and the ID of the rule. |
Example |
|
-T
Purpose | This option prints the time stamp for each packet. |
Example | packetmon - T |
-i
Purpose | Use this option to make sure that captured data for each packet is written immediately to the standard output (screen or file). This is useful if you want to kill a running packetmon capture process or be sure that all data is written to a file. |
Example |
|