Wouldn't an #ifndef DPORT statement solve that?
Hans
(And I'm an algol programmer, not very well versed in C magic ;-)
------Origineel bericht------
Van: Johnny Billquist
Afzender: owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden: hecnet at Update.UU.SE
Onderwerp: Re: [HECnet] New bridge.c feedback
Verzonden: 7 juni 2012 17:18
On 2012-06-07 16:32, Marc Chametzky wrote:
cc-1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Blech! Well, DPORT is by default set to 0. See the documentation of
the define in the sources... This one will stay.
I saw your second message about putting this in a conditional, but out
of curiosity, why wouldn't you want to fix it? You don't have an
assignment statement here, so if you do define DPORT, it won't take
effect the way you want with the code like this.
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able to
change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
which is pretty meaningless, and thus something to warn about. But how
should I change the code to avoid that? I could (of course) add a check
to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is a
pretty reasonable solution I think.
Johnny
1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
No, that's not what the compiler is seeing. Instead, it's seeing this:
if (port == 0) 1;
That's because you have "port == DPORT" (a conditional, not an assignment statement).
which is pretty meaningless, and thus something to warn about. But how should I change the code to avoid that? I could (of course) add a check to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is a pretty reasonable solution I think.
--Marc
On 2012-06-07 16:32, Marc Chametzky wrote:
cc-1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Blech! Well, DPORT is by default set to 0. See the documentation of
the define in the sources... This one will stay.
I saw your second message about putting this in a conditional, but out
of curiosity, why wouldn't you want to fix it? You don't have an
assignment statement here, so if you do define DPORT, it won't take
effect the way you want with the code like this.
Apart from putting in a conditional?
DPORT is a constant that I intended for users that compile to be able to change, if they want to.
By default is't zero, thus the compiler sees:
if (port == 0) port = 0;
which is pretty meaningless, and thus something to warn about. But how should I change the code to avoid that? I could (of course) add a check to the if, but that makes it look more complicated, and silly.
Oh well, checking if DPORT have been defined to something non-zero is a pretty reasonable solution I think.
Johnny
On 2012-06-07 16:15, Bob Armstrong wrote:
Johnny Billquist wrote:
Are you actually talking now about implementing a DECnet stack on a machine
in user mode?
That is definitely not doable.
Is that really true? I don't believe it. How about an Einstein style
"gedanken experiment" - put simh on a machine (which is an entirely user
mode program), load VMS on it. Bingo - a user mode implementation of a
DECnet stack.
I was meaning as in non-root. Sigh. I don't know how I managed to screw up terminology that way...
I don't mean this as a practical solution to DECnet on Linux, but it's
clearly possible to get all the Ethernet access you need to implement DECnet
in a user mode program.
N.B. "user mode" is not the same as "run as root". Promiscuous mode
requires root privilege, but that's still a user mode program.
Correct. For some reason I screwed up at that point.
Johnny
On 2012-06-07 15:55, Mark Benson wrote:
On 7 Jun 2012, at 13:44, Jordi Guillaumes i Pons
<jg at jordi.guillaumes.name> wrote:
If I've understood it correctly, the idea is to replace the (dying) kernel support for DECNet under linux by userland code, so it the current module dies definitely due to kernel ABI changes we could still use decnet in the Linux boxes.
As Johnny pointed out, some root access is required for a daemon to
play with the ethernet but with that in place the rest would be
userland, yes. The key is no kernel module or kernel support is
necessary because it's going away.
I guess it might be worth pointing out that running as root still means it's in user mode.
There is nothing that needs to be in the kernel itself. You can do all of it from userland. But you need parts to be running as root. That is potentially a security problem, yes. No helping that. But carefully written code is always a good idea.
I'd add as an additional benefit that moving decnet out of the kernel would make possible to port it to other unix flavours, like the BSDs and Mac OSX.
That was also part of my modus operandi. It would port to prettymuch
and OS that supports libpcap and MAC address spoofing (possibly
Windows?).
Actually an interesting point.
Johnny
The 20 VUPS rating listed for the -60 comes from my own website. It was measured with a homegrown vups tool and its accuracy is ummm, limited. One can argue that is true for all vups ratings ... (The M in MIPS stands for meaningless :-)
However I find a model 90A with 128MB memory a lot faster than any of my model 60's. It just shows that speed, like beauty only exists in the eye of the owner. I always considered a Vax 8550 faster than a 6410 or an 8650 . Perception eh.
Hans
-----Original Message-----
From: Mark Wickens <mark at wickensonline.co.uk>
Sender: owner-hecnet at Update.UU.SE
Date: Thu, 7 Jun 2012 15:08:24
To: hecnet at Update.UU.SE<hecnet at Update.UU.SE>
Reply-To: hecnet at Update.UU.SESubject: Re: [HECnet] Introducing myself... and my little network
Just consulted a few online VPUs comparisons and it looks like we're both slightly wrong, although I'm happy to be corrected:
VAXstation 4000 model 60: 12 VUPS
VAXstation 4000 model 90: 32 VUPS
VAXstation 4000 model 90A: 40 VUPS
VAXstation 4000 model 96: 45 VUPS
However as I've said apart from CPU intensive tasks the '60 doesn't 'feel' much slower than the '90.
Regards, Mark.
Sent from my iPad
On 7 Jun 2012, at 14:12, hvlems at zonnet.nl wrote:
The Vaxstation 4000 model 60 is rated at approx 20 VUPS, the 90A at 40 VUPS. I don"t own a model 90. The 90A's are very fast compared to other Vaxes I worked with. Two exceptions, the 4705A and the 4108 (4105?, the one that cames in a plastic PC style cabinet) were also quite fast. The Vaxstation 4000 model 96 is faster than the 90A (45 VUPS). I certainly would like one for my collection!
Hans
------Origineel bericht------
Van: Mark Benson
Afzender: owner-hecnet at Update.UU.SE
Aan: hecnet at Update.UU.SE
Beantwoorden: hecnet at Update.UU.SE
Onderwerp: Re: [HECnet] Introducing myself... and my little network
Verzonden: 7 juni 2012 13:41
On 7 Jun 2012, at 10:33, Jordi Guillaumes i Pons
<jg at jordi.guillaumes.name> wrote:
Hello list,
I've just joined HECnet under the area 7, and I wanted to introduce myself and my little puppies :)
Hello!
I am interested to know how you find the performance of the VAXstation
4000/60 compared to others.
Good to see someone with such great skills on old iron join us. I know
very little outside vasics and simple DECnet setup :)
--
Mark Benson
http://markbenson.org/bloghttp://twitter.com/MDBenson
--
Mark Benson
http://markbenson.org/bloghttp://twitter.com/MDBenson
On 7 Jun 2012, at 15:38, Chrissie Caulfield
<christine.caulfield at googlemail.com> wrote:
Depending on the OS, it's perfectly doable. I wrote LAT for Linux in this exact way - because I didn't want to mess around inside the kernel.
It's not ideal, and performance will probably be awful, but if you can get access to raw ethernet packets it's not not even especially hard :)
... and thus she didst spake (or something). :)That's what made me
think it must be possible.
--
Mark Benson
http://markbenson.org/bloghttp://twitter.com/MDBenson
On 7 Jun 2012, at 15:15, Bob Armstrong <bob at jfcl.com> wrote:
Johnny Billquist wrote:
Are you actually talking now about implementing a DECnet stack on a machine
in user mode?
That is definitely not doable.
Is that really true? I don't believe it. How about an Einstein style
"gedanken experiment" - put simh on a machine (which is an entirely user
mode program), load VMS on it. Bingo - a user mode implementation of a
DECnet stack.
I don't mean this as a practical solution to DECnet on Linux, but it's
clearly possible to get all the Ethernet access you need to implement DECnet
in a user mode program.
N.B. "user mode" is not the same as "run as root". Promiscuous mode
requires root privilege, but that's still a user mode program
That's what made me peopose that it may be possible. SimH already
implements the underlying ethernet wizardry to allow DECnet and other
ethernet-based protocols to operate inside the simulator.
--
Mark Benson
http://markbenson.org/bloghttp://twitter.com/MDBenson
On 07/06/12 13:32, Johnny Billquist wrote:
On 2012-06-07 14:22, Johnny Billquist wrote:
On 2012-06-07 12:37, Sampsa Laine wrote:
On 7 Jun 2012, at 11:29, Dave McGuire wrote:
Howabout starting it as a daemon (running as root) via the boot
scripts, and have non-root users's programs access it via a socket?
Cool idea - you could even have multiple hosts connect this way but
export one DECNET endpoint, i.e. run CTERM on Box A whilst FAL goes to
Box B, and MAIL to Box C :)
Are you trying to suggest something like NAT for DECnet?
I'm not sure how easy that would be to do in DECnet, as it works in some
different ways than IP that might cause problems doing this.
Reading through things a little more...
Are you actually talking now about implementing a DECnet stack on a
machine in user mode?
That is definitely not doable.
Depending on the OS, it's perfectly doable. I wrote LAT for Linux in this exact way - because I didn't want to mess around inside the kernel.
It's not ideal, and performance will probably be awful, but if you can get access to raw ethernet packets it's not not even especially hard :)
Chrissie
cc-1171 cc: WARNING File = bridge.c, Line = 684
The indicated expression has no effect.
if (port == 0) port == DPORT;
^
Blech! Well, DPORT is by default set to 0. See the documentation of the define in the sources... This one will stay.
I saw your second message about putting this in a conditional, but out of curiosity, why wouldn't you want to fix it? You don't have an assignment statement here, so if you do define DPORT, it won't take effect the way you want with the code like this.
--Marc