1# fidoroute
2[![Build Status](https://travis-ci.org/huskyproject/fidoroute.svg?branch=master)](https://travis-ci.org/huskyproject/fidoroute)
3[![Build status](https://ci.appveyor.com/api/projects/status/nqakeew8dax0q4ps/branch/master?svg=true)](https://ci.appveyor.com/project/dukelsky/fidoroute/branch/master)
4[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a3c20b32b80442a7955f7563fb24981a)](https://www.codacy.com/app/huskyproject/fidoroute?utm_source=github.com&utm_medium=referral&utm_content=huskyproject/fidoroute&utm_campaign=Badge_Grade)
5
6**Fidoroute** is a Fidonet node route file generator
7
8## NAME
9
10**fidoroute** - fidonet node route file generator
11
12## SYNTAX
13       fidoroute [config.file]
14
15If   config.file   is   not  specified,  then  fidoroute  looks  for  a
16"fidoroute.conf" in the current directory.
17
18## DESCRIPTION
19Fidoroute uses a configuration file named **fidoroute.conf** . This configuration file will be looked for in the current directory  unless  specified at the command line.
20
21Configuration file contains statements in the form:
22
23       token value
24
25Empty lines are ignored. Lines  beginning  with '#' or ';' characters are also ignored (they are comment lines).
26
27## PARAMETERS
28
29**Address** \<FTN address of your node\>
30
31Each 'Address' line contains FTN address or AKA of your node in the 3D form. No 4D address (point AKA) should be specified here.
32
33Example:
34
35       Address 2:5020/204
36       Address 7:1130/204
37
38Examples of wrong syntax:
39
40       Address 2:5020/204.1
41       Address 7:1130/0@fidorus
42
43**Hubroute** \<nodelist file\> \<type of nodelist\> \<zone number\> \<net number\>
44
45where:
46
47- \<nodelist file\> - pathname of the world nodelist or nodelist segment file; it may use '?' and '\*' shell wildcard characters;
48
49- \<type of nodelist\> - 'z' for the zone/world nodelist, 'r' for  the regional segment, 'n' for the network segment;
50
51- \<zone number\> - zone number for the routing;
52
53- \<net number\> - net number for the routing.
54
55Every Hubroute line tells router to get hub- and host- routing information from nodelist or nodelist segment. If nodelist file name is wildcarded and there are several matching files, router will take the file with bigger suffix (i.e. bigger day number).
56
57Examples:
58
59       Hubroute /fido/nodelist/nodelist.* z 2 5020
60       Hubroute /fido/nodelist/z2-list.* z 2 5020
61       Hubroute /fido/nodelist/net5020.ndl n 2 5020
62
63
64**RouteFile** \<.ROU file\>
65
66where:
67
68- \<.ROU file\> - pathname of the .ROU file.
69
70A .ROU file has format:
71```
72next_hop destination \[destination ...\] next_hop "World"
73```
74Where *next_hop* is the node where netmail for destination nodes, networks and zones should be routed to. Wildcards like        '2:5020/545.\*' or '2:5020/545.All' are allowed in destinations. Special token "World" means "all other destinations" and  should              be the last in the list.
75
76Example:
77
78              2:5020/888  999 555 5030/444 3:All/All
79              2:5020/50   World
80
81**TrustFile** \<.TRU file\>
82
83where:
84
85- \<.TRU file\> - pathname of the .TRU file.
86
87A .TRU file has the same format as a .ROU file.
88
89**DefaultRoute** \<route_to\> \<destination\>
90
91This line gives you a possibility to override some route branches without creating additional .ROU file. Syntax is the             same as in a routefile. *DefaultRoute* is treated AFTER all other lines, so it have the highest priority.
92
93**WriteTo** \<route file pathname\>
94
95- \<route file pathname\> is the output file (the routing file for your tracker).
96
97**RouteType** \<type of route file\>
98
99- \<type of route file\> specifies routing file syntax. It should be one of: *husky* (for  hpt), *squish*,  *tmail* (for the T-mail version before v.2601),           *tmailn* (for the T-mail version v.2601 and above), *itrack*, *bpack*, *imbink*, *xmail*, *ifmail*, *unimail*, *bip*, *fidogate*, *qecho*, *ftrack*.
100
101**Minimize** \<switch\>
102
103- \<switch\> may be *on*, *yes* or *off*, *no*. Set it to *on* or *yes* for routing minimization.
104
105**RouteBegin** \<signature1\>
106
107**RouteEnd** \<signature2\>
108
109These *signature*s are used to specify the start and the end of rewritable area in the route file. It is recommended to enclose both *signature*s into double-quotes ("). Be careful! Everything between these two signatures will be deleted from the route file. Do not forget to add these strings to route file before running fidoroute.
110
111**Link** \<FTN address\> \<flavors\>
112
113where:
114
115- \<FTN address\> is the FTN address of the your (direct) link;
116
117- \<flavors\> may be one of the characters: 'C' (crash), 'D' (direct), 'N' (normal) or 'H' (hold) with combination of 'F' (route files) and 'A' (no arcmail),
118
119BNF:
120
121flavors := {'C'|'D'|'N'|'H'}\['F'\]\['A'\]
122
123Examples:
124
125              Link 2:5020/0  CFA
126              Link 2:5020/24 DF
127
128**DefaultFlavor** \<flavors\>
129
130This statement sets default flavor for links, which are not present in 'Link' lines, but must be routed via us. If the DefaultRoute is missing in config file, 'Hold' is assumed. See flavors description in the *Link* statement.
131
132**TempFile** \</path/file.tm\p>
133
134This statement defines temporary file for building WriteTo file. *TempFile* and *WriteTo* file are required to be placed on the same disk volume. Default value of *TempFile* is *WriteTo* with '$$$' suffix, and if you don't specify *Tempfile*, you should make directory for *WriteTo* file writable by the user running fidoroute.
135
136## Limitation and hints
137
138Maximum number of 'routing items' (i.e. nodes, nets, zones) is 5000. It can be increased at compile time, but I cannot imagine node which needs that.
139
140Maximum number of recursively linked branches - about 600 (it is not the maximum number of routing branches but the number of sequentaly linked branches, i.e. the number of hops to destination node). Enough, IMHO. :)
141
142Maximum number of direct links is 1000. If you have more - just increase and recompile.
143
144Maximum number of local addresses is 50.
145
146Maximum length of deadloop routing chain is unlimited.
147
148Maximum length of go-round routing chain is unlimited. If router detects such a chain, it will try to carefully mark unliked node as warned, of course. Usually router does this in a reasonable manner, but you should check it.
149
150When re-routing has occured, router prints messages. The last re-routing is used. Example:
151
152       2:5020/50 22
153       2:5020/52 22
154
155There will be a re-routing warning, mail for /22 will go via /52.
156
157Warning! In this case:
158
159       2:5020/24  469/All
160       2:5020/777 469/83
161
162there is no routing conflict. 469/83's mail will go to 5020/777,  other NET469's mail will be routed via 5020/24.
163