XRTRACE(9)              XROUTER REFERENCE MANUAL            28/12/2025

NAME
        XRTRACE -- Program(s) for Tracing Packets.

SYNOPSIS
        xrtrace [xr_port_number [xr_ip_address]] [options]

DESCRIPTION
        XRTRACE is a generic name for a small terminal-based program
        which allows packet tracing (AKA "monitoring") of XRouter
        PORTs, from the same computer or a different one.

        The program is currently distributed as 3 variants, named
        according to the type of operating system it is to run on.
        XrTracePi is for Raspberry Pi and other ARM processors.
        XrTraceLin is for X86 Linux, and XrTraceWin is for Microsoft
        Windows.

        Some variants may have sub-variants according to the bit-width
        of the operating system. e.g. XrTracePi32 is for 32-bit ARM
        systems, and XrTracePi64 is for 64 bit ARM. 

        Any variant of XrTrace can be used with any variant of
        XRouter.  For example, XrTraceWin32 could be used to monitor a
        remote XrPi64, or XrTraceLin64 could monitor a remote XrWin32.

        Once the correct version has been downloaded, the program may
        be renamed "XrTrace", "xrt" or whatever, for convenience. The
        program doesn't care where it is located.

        Remember to make a newly-downloaded and/or renamed program
        executable, using "chmod +x xrtrace" (adjust to suit filename).

REQUIREMENTS
        Requires XRouter v504r or later.

OPTIONS
        [xr_port]       is the XRouter PORT number to be traced. Use 0
                        to trace ALL ports. This argument is always
                        required, except for option '-h'.

        [ip_address]]   is the IP address of the computing device that
                        XRouter is running on (default 127.0.0.1).
                        This argument is only required if XrTrace is
                        running on a different machine to XRouter.

        [options]       Zero or more options beginning with a "minus"
                        character (-), which modify the behaviour of
                        the program as follows:

        Summary of Options:

        Option          Description
        --------------------------------------------------------------
        -2              Dont trace AX25 layer 2 or above
        -3              Don't trace NetRom layer 3 or above
        -4              Don't trace NetRom layer 4 or above
        -a <callsign>   Show ALL frames to or from <callsign>
        -b <callsign>   Show ALL frames to or from <callsign>
        -c              Don't colourise the traces
        -C              Include colour information in capture file
        -d              Show node up/down/status reports
        -f <callsign>   Show only frames addressed FROM <callsign>
        -h              Help: Show this message and exit
        -H              Show header on separate line to trace
        -i              Don't trace contents of INP3 routing unicasts
        -j              Show the raw JSON before each trace
        -k              Show lin[k] up/down/status reports
        -l              Don't show L3RTT info field
        -L              Suppress blank line between traces
        -m              Show circuit up/down/status reports
        -n              Don't trace contents of nodes broadcasts
        -N              Show Node status reports
        -o <file>       Output trace to <file>
        -p <portnum>    Show reports only from <portnum>
        -P <protocol>   Show only frames with this L3 protocol
        -q              No display when capturing to file (quiet)
        -r              Include callsign of reporting node
        -s              Suppress time stamps
        -S              Show sequence numbers of reports
        -t <callsign>   Show only frames addressed TO <callsign>
        -T <frametype>  Show only this AX25 frametype, e.g. "-T UI"
        -u              Don't display UI frames
        -w <width>      Display width (default 80 cols)
        -W              Enable warnings of missing/bad JSON fields
        -x              XRouter 'classic' trace format


        More than one option can be specified, but some combinations
        are pointless. For example, if -3 is specified -i and -n are
        redundant.
 
        Display Options In Detail:

        Option            Description
        --------------------------------------------------------------
        -c
            Don't colourise the traces.  By default, traces are
            coloured according to whether the link is RF or internet,
            and whether the direction is "sent" or "received". Traces
            originated from RF are displayed in pure red (transmit) or
            green (receive).  Internet-originated traces are displayed
            in pink (transmit) or turquoise (receive).  Older versions
            of Windows require this option to suppress the ANSI colour
            sequences because it displays them instead of actioning
            them.

        -C
            Include colour information in capture file.  This is off
            by default, and is ignored if the '-c' option is present.
            Including colour information in the file allows it to be
            played back in colour, but makes it harder to read with a
            text editor.

        -H
            Show header (metadata) on a separate line to trace.  This
            is off by default, as most people seem to prefer "one line
            per packet".  If enabled, the display is less cryptic and
            includes more information.

        -j
            Show the raw JSON prior to each trace.  This is off by
            default.  If enabled, the JSON data for each trace is
            displayed first, followed by the decoded trace.  Included
            mainly for debugging.

        -L
            Suppress the blank line between traces.  Off by default.
            Normally a blank line is output between each packet trace
            for clarity.  However some people like a more cluttered
            display, hence this option.

        -o <filename>
            Output the packet traces to <filename>.  If enabled,
            everything that is displayed on screen is echoed to a
            capture file, whose path/name is specified by this option.
            The file is opened in "overwrite" mode.  While capturing,
            the screen output can be suppressed using the '-q' (quiet)
            option below.

        -q
            Suppresses the display while capturing to file.

        -r
            Include the reporting node's callsign in the header. This
            option is intended for cases where there are multiple
            XrTrace windows watching multiple XRouters. 

        -s
            Suppress the packet time stamp.  Normally each packet
            trace is prefixed with a time stamp of the form HH:MM:SS.

        -w <width>
            Specify the display width (default 80 columns).  Most
            traces should fit within 80 columns, but INP3 traces which
            include several INP3 options might exceed this width.  By
            default, these are neatly line-wrapped to fit 80 columns.
            If you have a wider display window you can specify the
            width using this option.  The display will then line-wrap
            to fit the specified width.  This is intended for displays
            that are wider than 80 columns, not narrower.

        -W
            Enable warnings of missing or bad JSON fields.  This is
            mainly intended for debugging purposes.

        -x
            Display in XRouter "classic" trace format.  This is off by
            default.  If enabled, the trace looks similar to the
            normal XRouter console trace, but can be modified by other
            options.

        Filter Options In Detail:

        -3
            Don't trace NetRom layer 3 or above.  If this option is
            specified, packets containing NetRom layer 3/4
            information, including NODES broadcasts and INP3 data,
            will end with "NET/ROM" and won't be traced any further.
            You might use this if for example you are only interested
            in the layer 2 data.  See also "-i", "-n" and "-4".

        -4
            Don't trace NetRom layer 4 or above.  If this option is
            specified, NetRom layer 4 headers or protocol extensions
            are not traced.

        -a <callsign>
            Show ALL frames to or from <callsign>.  If this filter is
            specified, ONLY those frames which have AX25 source or
            destination callsigns matching <callsign> are displayed.
            This can be used to watch all traffic into or out of a
            specific station. May be used together with '-b'.

        -b <callsign>
            Show ALL frames to or from <callsign>.  Same functionality
            as '-a', but if these two filters are used together, the
            result is to trace the traffic BETWEEN two the callsigns.

        -f <callsign>
            Show only frames addressed FROM <callsign>.  If this
            filter is specified, ONLY those frames whose AX25 source
            callsign matches <callsign> are displayed.  This filter
            can be combined with other options for even tighter
            filtering.

        -i
            Don't trace contents of INP3 routing unicasts.  INP3
            unicasts can occupy a lot of space on screen. If you don't
            need to see what they contain, the '-i' option suppresses
            decoding, so all that is displayed is "NET/ROM INP3".

        -k
            Show lin[k] up/down/status reports.  These are sent by
            XRouter when a L2 link begins or ends, and at 5 minute
            intervals while the link is active.  They contain details
            such as link uptime, frame and queue counts etc.

        -l
            Don't show L3RTT info field.  The payload of an L3RTT
            frame can be up to 236 bytes, much of which is empty
            space.  This wraps untidily, so the '-k' option can be
            used to suppress it.

        -m
            Show circuit up/down/status reports.  These are sent by
            XRouter when a L4 circuit begins or ends, and at 5 minute
            intervals while the circuit is active.  They contain
            details such as the circuit uptime, frame and queue counts
            etc.

        -n
            Don't trace contents of NetRom 'NODES' broadcasts.  If
            this option is used, nodes broadcasts display only
            "NET/ROM NODES".

        -p <portnum>
            Show reports only from <portnum>.  This filter is
            intended for use in conjunction with the '-r', '-t', '-f'
            or '-a' filters.  For example, "r G8PZT -p 5" would show
            everything received or sent on G8PZT's port 5.  

        -P <protocol>
            Show only frames with the specified L3 protocol. For
            example "-P IP" shows only IP over AX25 frames.  The
            recognised protocols are as f0llows:

            Mnemonic    Meaning
            --------------------------------------------------------
            "SEG"       Intermediate segment of a fragmented packet
            "DATA"      No layer 3, i.e. payload contains normal data
            "NET/ROM"   Payload contains NetRom/INP3 information
            "IP"        Payload contains IP datagram or part thereof
            "ARP"       Payload contains ARP data
            "FLEXNET"   Payload contains Flexnet protocol
            "?"         Unknown layer 3 protocol

        -t <callsign>
            Show only frames addressed TO <callsign>.  If this filter
            is specified, ONLY those frames whose AX25 destination
            callsign matches <callsign> will be displayed.  Note that
            the same frame may be reported by more than one node.
     
        -T <frametype>
            Show only frames with the specified AX25 frametype.  For
            example "-T UI". The recognised frame types are as
            follows:

            Mnemonic  Meaning
            ---------------------------------------------------
            "SABME"   Set Asynchronous Balanced Mode Extended
            "C"       Non-extended connnect request (AKA SABM)
            "D"       Disconnect Request
            "DM"      Disconnected Mode / Busy
            "UA"      Unnumbered Acknowledgement
            "UI"      Unnumbered Information frame
            "I"       Numbered information frame
            "FRMR"    Frame Reject (serious error)
            "RR"      Receiver Ready
            "RNR"     Receiver Not Ready
            "REJ"     Reject (Frame not the expected one)
            "SREJ"    Selective Reject
            "TEST"    Test of data link
            "XID"     Exchange Identification
            "?"       Unknown type

        -u
            Don't display UI frames.  This option may be useful if you
            don't want to see beacons, APRS data, or nodes broadcasts.


        On windows, the program is run simply by typing the program
        name, providing the program is in the current directory or
        PATH environment variable.

        On Linux, if the program is placed in the /bin directory it
        can be run by typing the program name.  If situated in any
        other directory, the pathname must be preceded by "./", e.g.
        "./xrtrace 3".

EXAMPLES
        xrtrace 1               -- Trace port 1, XRouter on same PC,
                                   O/S = Windows, or in /bin directory
                                   on Linux.

        ./xrtrace 0             -- Trace all ports, XRouter on same
                                   Linux PC

        ./xrtrace 8 192.168.0.3 -- Trace port 8, Xrouter on 192.168.0.1

        ./xrtrace 0 -x          -- Use XRouter classic trace format.

SEE ALSO
    XRMON(9) -- Program(s) for Monitoring XRouter Windows.

XRTRACE(9)                   END OF DOCUMENT

