NSImpl.mesa
Copyright
© 1986 by Xerox Corporation. All rights reserved.
Demers, January 25, 1986 0:11:27 am PST
Hal Murray, February 10, 1986 3:51:57 pm PST
DIRECTORY
Basics
USING [
BITAND],
NS
USING [Host],
ProcessorFace
USING [ProcessorID, processorID];
NSImpl:
CEDAR
PROGRAM
IMPORTS Basics, ProcessorFace
EXPORTS NS
~ {
Host Number Manipulations
GetThisHost:
PUBLIC PROC
RETURNS [
NS.Host] ~ {
BEWARE. Is this byte-order dependent? Not if ProcessorFace.ProcessorID guaranteed to be stored in the same format as an
NS.Host on the wire, but who knows ...
TRUSTED {
RETURN[
LOOPHOLE[ProcessorFace.processorID]]; };
};
IsMulticastHost:
PUBLIC PROC[host:
NS.Host]
RETURNS[
BOOL] ~ {
RETURN [ Basics.
BITAND[host.a, 1] # 0 ] };
}.