home *** CD-ROM | disk | FTP | other *** search
- This directory contains some sample software to demonstrate the use
- of the packet filter. The "ntrace" program functions as a rudimentary
- "LAN tracer", reporting the source and destination of each packet on the
- network. It only deals with IP packets on Ethernets, and is not meant
- to be actually useful for anything.
-
- Since this depends on using promiscuous-mode access to the Ethernet,
- you'll have to do
- /etc/pfconfig +p pf0
- (as super-user) before you can get anything useful. Maybe you'll want
- to put this into /etc/rc.local?
-
- The main program is "ntrace", usage:
- ntrace pf0 [-debug] [-multicast] [-broadcast] [-w filename]
-
- INTR to get current stats, QUIT to get out
-
- With no options, it just sort of runs. With -debug, the packet header
- addresses are dumped on the terminal. With -w, info records are written
- to the specified file, which can then be read using the ptrace program.
-
- E.g.,
-
- ntrace pf0 -w foo
- (wait a while, type ^\)
- ptrace <foo
-
- The output format is
- (612569015.836210) UDP [128.45.1.115/513] -> [128.45.1.255/513]
- timestamp proto src address/port dest address/port
- seconds.usecs
-