Documentation
¶
Overview ¶
Package blocklist implements pattern validation and matching for the digipeater's source-address deny list. The patterns mirror the igate filter's CALL / CALL-N / CALL-* convention but the matcher is scoped strictly to the digipeater engine — see docs/wiki/invariants.md for the no-sharing rule.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePattern ¶
ValidatePattern parses and canonicalizes a block-list pattern. On success it returns the trimmed, uppercase canonical form so the stored Pattern and the matcher input agree byte-for-byte.
Accepted forms:
CALL — bare callsign (1..6 alphanumerics), matches SSID 0 CALL-N — N in 0..15 CALL-* — any non-zero SSID
Rejected: empty/whitespace, "*", "-", "-*", missing call, oversized call, wildcard inside the callsign, SSID out of range, non-numeric SSID, any character AX.25 disallows in a callsign.
Types ¶
type Entry ¶
Entry is one decoded, canonical block-list pattern plus its operator- supplied reason. Pattern is the canonical form returned by ValidatePattern (uppercase, trimmed).
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a thread-safe collection of block-list entries. The matcher is a linear scan; block lists are tiny in practice (single-digit to low-double-digit entries) so an index would only add complexity.
func New ¶
New returns a List seeded with the given entries. Nil or empty means "no block list" — Matches always returns hit=false.