**********************************************************************
TITH                                              THIS ISN'T THAT HARD
**********************************************************************

Publication:  TTS‐0004
Revision:     1
Title:        Node Addresses
Author(s):    Stephen Hurd
Date:         2025‐11‐15
══════════════════════════════════════════════════════════════════════

Status of this document
───────────────────────

  This document is a TITH Technical Standard (TTS) — it specifies
  the current technical requirements and recommendations for TITH
  software developers, coordinators and sysops of the Fidonet network
  and other networks using FTN technology.

  This document is released to the public domain, and may be used,
  copied or modified for any purpose whatever.

Abstract
────────

  This document describes valid node addresses and how to represent a
  node address in text.

Contents
────────

  1.  Introduction
  2.  Components
  3.  Default Values
  4.  Encoding as Text
  5.  Trimmed Collections
  6.  Trimmed Lists
  7.  Wildcards

  A. References
  B. History

══════════════════════════════════════════════════════════════════════


1. Introduction
───────────────

  There have been many different ways to express a FidoNet address
  over the years.  All TITH protocols will use a single well defined
  text encoding.


2. Components
─────────────

  Every node address has five components, which all contain values
  specified in this document.  These five components are:

  Domain
  ──────
  The domain is a UTF‑8 string that does not contain C0 control
  code points (U+00 to U+31 and U+7F), the Number Sign (U+23), the
  Asterisk (U+2A), the Comma (U+2C), the Less-Than Sign (U+3C) or the
  Greater-Than Sign (U+3E).  The Domain MUST NOT begin or end with
  whitespace.  If compatibility with legacy FidoNet systems is a
  concern, it SHOULD start with a lower‐case ASCII alphabetical code
  points (U+61 to U+7A) followed by up to seven lower‐case ASCII
  alpha‐numeric code points (U+30 to U+39 and U+61 to U+7A).  Domain
  gateways MAY convert domains known to be processed or generated by
  other software to lower‐case, but this MUST be optional behaviour
  configured on a per‐domain basis.  The canonical domain name for
  FidoNet is "fidonet".  Note that the domain is often used by tools
  as part of a file or directory name, so codepoints that are not
  legal in filenames on any OS allowed on the network SHOULD be
  avoided. This generally includes U+3A (':'), U+22 ('"'), U+2F ('/'),
  U+5C ('\'), U+7C ('|'), and U+3F ('?').

  Example domains "fidonet", "БорМер"

  Zone
  ────
  The zone is a number that is either negative one, or a value from
  one to thirty‐two thousand, seven hundred and sixty‐seven
  inclusive (−1, 1–32,767).

  Net
  ───
  The net is a number that is either negative one, or a value from one
  to thirty‐two thousand, seven hundred and sixty‐seven inclusive
  (−1, 1–32,767).  If the Zone is negative one (−1), Net MUST also be
  negative one (−1).  If the Zone is not negative one (−1), the Net
  MUST NOT be negative one (−1).

  Node
  ────
  The node is a number in the range of negative one to thirty‐two
  thousand, seven hundred and sixty‐seven (−1–32,767).  If the Zone is
  negative one, the Node MUST also be negative one (−1).  If the Zone
  is not negative one (−1), the Node MUST NOT be negative one (−1).

  Point
  ─────
  The point is a number in the range of zero to sixty‐five thousand,
  five hundred and thirty-five (0–65,535).  If the Zone is negative
  one, the Point MUST be zero (0).


3. Default Values
─────────────────

  Domain and Zone do not have a default value, though software MAY
  allow a default to be specified when receiving messages from systems
  that do not support 5D addressing.  When this is done, the address
  MUST be converted to a 5D address for all internal processing.

  The Net and Node have a default value that depends on the value of
  the Zone.  If the Zone is negative one (−1), the default for the
  Net and Node is also negative one (−1).

  If the Zone is not negative one (−1), the default Net is the same
  value as the Zone, and the default Node is zero (0).

  The default Point is always zero (0).


4. Encoding as Text
───────────────────

  All text node addresses begin with the Domain and Zone seprated by
  a Number sign (U+23 '#').

  The rest of the components MUST NOT be included if they have the
  default value from section 3.

  If included, the Net, Node, and Point values each have a specific
  code point prefix introducing them.  The prefix for Net is U+3A
  (':'), the prefix for Node is U+2F ('/'), and the prefix for Point
  is U+2E ('.').

  Components other than Domain are represented as decimal values,
  either as the literal string "-1" (U+2D, U+31) if the value is
  negative one (−1) or with a code point from U+31 ('1') to U+39 ('9')
  followed by zero or more code points from U+31 ('0') to U+39 ('9').
  That is to say that leading zeros are not allowed, and negative one
  (−1) has a single legal encoding.  In the cases where zero (0) is a
  legal value, it is also the default, so will not be encoded.

  Examples:
  ─────────
  The broken‐down value of the address in these examples has the
  values separated by commas with a prefix of Z, N, O, and P for the
  Zone, Net, Node, and Point value respectively.

  "fidonet#1" would represent fidonet, Z1, N1, O0, P0 (AKA Z1C)
  "fidonet#1:10" would represent fidonet, Z1, N10, O0, P0 (AKA R10C)
  "fidonet#1/2" would represent fidonet, Z1, N1, O2, P0
  "fidonet#1.5" would represent fidonet, Z1, N1, O0, P5
  "fidonet#−1" would represent fidonet, Z−1, N−1, O−1, P0
  (Preferred by Policy 4 for applying for a new node number)


5. Trimmed Collections
──────────────────────

  Some components of FTN such as SEEN‑BY use "Trimmed Collections" of
  node addresses.  These lists are sorted and have redundant
  components eliminated to keep the overall size of the list as small
  as possible.  This section defines how such a list is constructed.

  The list is first sorted.  The sort order of Domains is based on a
  binary comparison of the unsigned value of each byte of the UTF‑8
  ncoding starting with the first byte.  The lower byte value is
  sorted first.  If a byte is not present in one of the two, the
  domain without the byte is sorted first (ie: "fido" is sorted before
  "fidonet").  The other fields are sorted by ascending numeric value
  (ie: 9 is sorted before 10, and −1 is sorted before 1).

  Next, for each address in the list, any component that is the same
  as the previous address is removed along with its prefix.

  Finally, each address is listed in order, separated by a single
  Comma (U+2C, ',').

  Example: fidonet#1,fidonet#1:2,fidonet#1:2/103,BBSDev#885:1/1,
  fidonet#1:2/103.1,BBSDev#885,BBSDev#885:1,BBSDev#885:1/1,
  BBSDev#885:1/2

  Would first be sorted to: BBSDev#885,BBSDev#885:1,BBSDev#885:1/1,
  BBSDev#885:1/2,fidonet#1,fidonet#1:2,fidonet#1:2/103,
  fidonet#1:2/103.1

  Then be trimmed to: BBSDev#885,:1,/1,/2,fidonet#1,:2,/103,.1


6. Trimmed Lists
────────────────

  Some components of FTN such as PATH use "Trimmed Lists" of node
  addresses.  These lists do not have their order changed, but
  redundant components are eliminated as in section 5 to reduce the
  size.

  Example: fidonet#1,fidonet#1:2,fidonet#1:2/103,BBSDev#885:1/1,
  fidonet#1:2/103.1,BBSDev#885,BBSDev#885:1,BBSDev#885:1/1,
  BBSDev#885:1/2

  Would be trimmed to: fidonet#1,:2,/103,BBSDev#885:1/1,
  fidonet#1:2/103,BBSDev#885,:1,/1


7. Wildcards
────────────

  A wildcard allows specifying multiple addresses with a single
  string.  Any Component may be replaced with a wildcard, but there
  is an additional restrictions on the Domain part, which may not
  specify a range.  If any components after a wildcard component are
  left off, they are assumed to be a single asterisk.

  The following wildcard components are supported:

  A single Asterisk (U+2A) which will match any value except -1 in the
  Component.

  A list, enclosed by a Less-Than Sign (U+3C) and a Greater-Than Sign
  (U+3E) containing a comma-separated list of values.  For numeric
  Components, a value may be an inclusive range with the start and end
  value separated by a single Hyphen-Minus (U+2D).

  Examples:
  ─────────
  * matches any node
  BBSDev#* matches any node in domain "BBSDev"
  BBSDev#*/0 Matches any node in domain "BBSDev" with a Node of 0
  *:1 Matches any node with a Net of one
  *#<885,1-6> Matches nodes with a Domain of 885, 1, 2, 3, 4, 5, or 6


A. References
─────────────

  [FTA‑1006] "Keywords to indicate requirement levels" FTSC,
  2000‑01‑17.

  [TTS‑5000] "The Distribution Nodelist", TITH, 2025‑11‑14


B. History
──────────

   Rev.1, 2025‑11‑15: Initial Release.

**********************************************************************
