Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

IPMON Networking
Purpose: To monitor /dev/ipl for logged packets.
Format: IPMON [ -aDFhnpstvxX ] [ -N <device> ] [ -o [NSI] ] [ -O [NSI] ]
[ -P <pidfile> ] [ -S <device> ] [ -f <device>&nnbsp';] [ <filename> ]
Template: (none)
IPMON monitors /dev/ipl for logged packets. It opens /dev/ipl for reading and awaits data to be saved from the packet filter. The binary data read from the device is reprinted in human readable for, however, IP#'s are not mapped back to hostnames, nor are ports mapped back to service names. The output goes to standard output by default or a filename, if given on the command line. Should the -s option be used, output is instead sent to syslogd. Messages sent via syslog have the day, month and year removed from the message, but the time (including microseconds), as recorded in the log, is still included.

Messages generated by IPMON consist of whitespace separated fields. Fields common to all messages are:

  1. The date of packet receipt. This is suppressed when the message is sent to syslog.
  2. The time of packet receipt. This is in the form HH:MM:SS.F, for hours, minutes seconds, and fractions of a second (which can be several digits long).
  3. The name of the interface the packet was processed on, e.g., we1.
  4. The group and rule number of the rule, e.g., @0:17. These can be viewed with IPFSTAT -n.
  5. The action: p for passed or b for blocked.
  6. The addresses; actually three fields: the source address and port (separated by a comma), the -> symbol, and the destinationaddress and port. e.g.,,80 ->,1722.
  7. 'PR' followed by the protocol name or number, e.g., PR tcp.
  8. 'len' followed by the header length and total length of the packet, e.g., len 20 40.
If the packet is a TCP packet, there will be an additional field starting with a hyphen followed by letters corresponding to any flags that were set. If the packet is an ICMP packet, there will be two fields at the end, the first always being 'icmp', and the next being the ICMP message and submessage type, separated by a slash, e.g., icmp 3/3 for a port unreachable message.

In order for IPMON to properly work, the kernel option IPFILTER_LOG must be turned on in your kernel.

The following options are available:

-a Opens all of the device logfiles for reading log entries from. All entries are displayed to the same output 'device' (stderr or syslog).
-D Causes IPMON to turn itself into a daemon. Using subshells or backgrounding of IPMON is not required to turn it into an orphan so it can run indefinately.
-f <device> Specifies an alternative device/file from which to read the log information for normal IP Filter log records.
-F Flushes the current packet log buffer. The number of bytes flushed is displayed, even should the result be zero.
-n IP addresses and port numbers will be mapped, where possible, back into hostnames and service names.
-N <device> Sets the logfile to be opened for reading NAT log records from <device>.
-o NSI Specifies which log files to actually read data from.
  N - NAT logfile,
  S - State logfile,
  I - normal IP Filter logfile.
The -a option is equivalent to using -o NSI.
-O NSI Specifies which log files you do not wish to read from. This is most sensibly used with the -a option. Letters available as parameters to this are the same as for -o.
-p Causes the port number in log messages to always be printed as a number and never attempt to look it up as from /etc/services, etc.
-P <pidfile> Writes the pid of the ipmon process to a file. By default this is //etc/opt/ipf/ipmon.pid (Solaris), /var/run/ipmon.pid (44BSD or later) or /etc/ipmon.pid for all others.
-s Packet information read in will be sent through syslogd rather than saved to a file. The default facility when compiled and installed is local0. The following levels are used:
LOG_INFO - packets logged using the "log" keyword as the action rather than pass or block.
LOG_NOTICE - packets logged which are also passed.
LOG_WARNING - packets logged which are also blocked.
LOG_ERR - packets which have been logged and which can be considered "short".
-S <device> Sets the logfile to be opened for reading state log records from to <device>.
-t Reads the input file/device in a manner akin to 'tail', i.e. from the end of the file.
-v Shows tcp window, ack and sequence fields.
-x Shows the packet data in hex.
-X Shows the log header record data in hex.

Example 1:

3.OS4:> IPMON simply starts IPMON.

Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.

Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: February 9, 2006.