Well, for several years, I have had a nagging problem getting the udp mode
of ax25ipd to work at all. Yesterday I finally hacked my way through
it with use of strace and reference to various parts of the source,
and lots of trial and error. It turns out to be a documentation problem,
I didn't have to change any code, just the .conf file.
Just now, Ralf posted a request for improvements to ax25-howto, and this
may fit in with that also. Ralf, I can take the ax25ipd portion of ax25-howto
and edit it with this newer material if you like, but I guess I need to
know where the recent official copy of it lives. (I might even redo
the ax25ipd manpage, but I would have to figure out how to do the
manpage editing. I haven't done anything with manpages before except READ
them.)
Continuing with the matter of running udp transport with ax25ipd:
For various reasons, here centered around a simplistic DSL masquerading
modem/router, I have a need to actually make the udp mode work. The dsl box
allows me to masquerade a few tcp and/or udp ports through it to various
hosts on its lan, but it doesn't allow me to masquerade any other protocols,
such as axip # 93 for instance. The only other option is to demasquerade
the whole thing and expose the lan to the internet, which I am not
in a position to do with this particular lan. And I have a few other reasons
as well that amount to experimentation with other gadgets that I would like
to interconnect with ax25 and they also only have tcp and udp hooks, not ip.
So, with the existing documentation I have been able to find, namely
the ax25-howto, and the .conf file and some things that come with
the ax25ipd tarball, anytime I configured it for udp, absolutely
nothing happened. It just swallowed up the packets and never threw
any udp packets out onto the lan. What isn't mentioned in the docs is
that in addition to setting the udp option in the socket definition near
the top of the .conf file, one must ALSO specify a udp option on the
tail end of EACH routing line in the routing section near the end of
the .conf file. It didn't tell me that, and the source didn't really
help much, until I did a lot of trial and error with strace
running, and I satisfied myself where routing was getting lost, and then
after more trial and error, I eventually found what the config parsing
wanted to see to set the flags that the routing processing wanted.
When I added a udp option to the end of all of the route definitions,
it started working. It doesn't say this anyplace that I have found.
The code in the config parsing routines looks at first glance like some
flags (b and d) might not parse in combination with the udp option.
I didn't pursue or test that possibility any farther, although
I think it needs to be looked at. That's a TODO or FIXME item.
It also happens to be possible to listen on one udp port, and send
udp packets to the far end under some other port number, although that
would be a weird asymetrical routing situation that not very many
situations would ever need. It turns out that the default udp port number
of 10093 can be overridden by specifying some other port number just
after the udp option on the end of either the socket or the route definitions.
The socket definition sets the udp listen port, and also the source port
on outgoing packets, so the other end knows what the return address/port is.
The route definition sets the udp destination port for each route.
Leaving off the udp option on a route leaves the packets in no-mans-land
and they disappear entirely if udp socket has been defined. I think
that is actually a bug, but anyway that is what it does.
Of course, by specifying other ports on both socket and routes, some
other udp port number can be used if necessary, in case some combination
of firewalls and routers only allow some specific ports through.
It is quite flexible it looks like, if one finds out how to set it up.
Previously I also had to use some different param definitions to implement
a higher speed modem on a tnc that I was feeding with one end of ax25ipd,
and I have also documented how to specify the various params in the
.conf file. They follow straight from the kiss definition itself.
I also have encountered a situation a few times where the tnc gets
reset while ax25ipd is running unaffected, and at that time, the tnc
restarts with some default params of its own which may not be optimum,
particularly if some params are deliberately set up in the .conf file.
I then have to do things like stop and restart ax25ipd, or maybe
disconnect the serial port from the tnc and send it some params
from some other device, or maybe a kill -s SIGHUP to ax25ipd
would accomplish the same thing. I think I vaguely recall that others
have also observed that behavior. Maybe the workaround is to use
a cronjob to periodically send the SIGHUP, but the real fix is to code
up a periodic broadcast params patch in ax25ipd to refresh a tnc.
(Or has this been done