Well, I've added a switch to specify an alternate directory for the config file.
Just to check I compiled the original source which resulted in a binch of errors. It'
a freshly installed linux system and libpcap isn't installed. I think ;-)
Hans
-----Original Message-----
From: "Rob Jarratt" <robert.jarratt at ntlworld.com>
Sender: owner-hecnet at Update.UU.SE
Date: Sun, 20 Nov 2011 17:43:29
To: <hecnet at Update.UU.SE>
Reply-To: hecnet at Update.UU.SESubject: RE: [HECnet] The Bridge
For the DNS lookups it would be my intention to make it configurable in any
case, with a time interval, including one that never re-reads the config. In
my experience though, DNS lookups are pretty quick most of the time.
There are other potentially more complex methods that might not interrupt
the bridge, especially if they could be done asynchronously. But this has
the potential to affect the simplicity of the code, which may not be
desirable.
Regards
Rob
-----Original Message-----
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE]
On Behalf Of hvlems at zonnet.nl
Sent: 20 November 2011 14:03
To: hecnet at Update.UU.SE
Subject: Re: [HECnet] The Bridge
Adding a commandline switch is not difficult. Provided you're a programmer
of course. It won't affect the runtime performance.
Iwhich is why I'm against built-in DNS functionality. It will affect
performance
adversele for reason Johnny already mentioned. The program is now small,
well designed and performs accordingly. Improvements tend to deteriorate
performance.
Hans
-----Original Message-----
From: Mark Benson <md.benson at gmail.com>
Sender: owner-hecnet at Update.UU.SE
Date: Sun, 20 Nov 2011 13:22:01
To: <hecnet at Update.UU.SE>
Reply-To: hecnet at Update.UU.SESubject: Re: [HECnet] The Bridge
On 20 Nov 2011, at 13:02, Johnny Billquist wrote:
While we are talking about improvements, would it be possible to make
it
search a few default locations on Linux/BSD for a config file? Currently
you
have to start it by cd-ing to the directory the binary is in as it looks
at the
current directory for the config file - if you start it from another place
if fails.
Perhaps looking in /etc/hecnet or another place you can specify at
compile time would be better?
That is easy. Just change the source before compiling, and there you
have it.
Definitely a compile time thingy, and extremely easy to "fix".
If you could make it a compile-time switch for make it would be very-much
nicer :) just something like 'CONFIG_FILE=/etc/hecnet' or something with a
commonly usable default value in case you forget to specify it or don't
want to
change it.
Also would it be difficult or counter-productive to roll the Port
configuration into the config file instead of having to specify it at
runtime?
If you don't want it on the command line, you can just assign it in the
code as
a constant. Very easy. :-)
That's easy for you to say, you're a coder. I don't code C at all and
wouldn't
know where to start, so if anyone else fancies na 'easy' challenge then
make it
so :)
I wouldn't want the port number hardcoded as it's configurable for a
reason
(it's a good thing), so it would be nice to have it read from the config
file
instead of having to remember it on the command-line.
Lastly does anyone know how to roll a init.d script for it to set it as
a service
in Debian/Ubuntu (10.04)?
Not sure which variant of init debian uses offhand, but in general you
just
write a small shellscript that don't do much more than just run the
command
line the same way you do by hand. Grab some other simple service and copy
the startup, and then change the command line.
It's ridiculously simple.
That I might be able to do. I'll look into it while I'm working out how to
make
one for SimH. Again though it's something I've not played with so some
helping hands along thew way would be nice ;)
I am going to have to try and write up tutorials for building the VAX and
PDP-
11 machines I have running as there isn't an up-to-date and comprehensive
tutorial for either, aside from Phil Werry's which is dated a little and
very hard
to read as it's very long and not broken up at all.
--
Mark Benson
http://DECtec.info
Twitter: @DECtecInfo
HECnet: STAR69::MARK
Online Resource & Mailing List for DEC Enthusiasts.