From Javier Sturman@4:900/733 to All on Wed Apr 22 17:03:38 2026
Hello everybody!
Based on ndl2binkd I (99% Gemini) created an awk script to generate the same output. It takes a nodelist as argument and it produces binkd expected node values. For sure it can be pefected.
it assumes there are domains in binkd.conf named, fidonet, nixnet, fsxnet. Tested on FreeBSD.
# 5. Technical Flag Scanning (Case-Insensitive)
for (i = 7; i <= NF; i++) {
field_data = tolower($i);
if (field_data ~ /^(ina|ibn|ifc|itn):/) {
# Use original field $i for splitting to preserve Host casing
n_sub = split($i, parts, ":");
tag = tolower(parts[1]);
# Port Priority Logic
# According to FTSC, IBN is the primary BinkP mail port.
# ITN (Telnet) should not overwrite it.
current_tag_priority = (tag == "itn") ? 1 : 2;
# Check for port in sub-part 2 (e.g., IBN:24555 or ITN:60177)
if (n_sub >= 2 && parts[2] ~ /^[0-9]+$/) {
if (current_tag_priority >= p_priority) {
port = parts[2];
p_priority = current_tag_priority;
if (DEBUG) printf " [Debug] Port %s set by %s (Priority %d)\n", port, tag, p_priority > "/dev/stderr"
}
}
# Check for port in sub-part 3 (e.g., IBN:host:24555)
if (n_sub >= 3 && parts[3] ~ /^[0-9]+$/) {
if (current_tag_priority >= p_priority) {
port = parts[3];
p_priority = current_tag_priority;
if (DEBUG) printf " [Debug] Port %s set by %s (Priority %d)\n", port, tag, p_priority > "/dev/stderr"
}
}
}
}
# 6. Final Output Generation
if (host_ip != "") {
gsub(/_/, " ", sysop);
gsub(/_/, " ", sysname);