bug fixes for talk

Keith Muller muller at sdcc3.UUCP
Sun Dec 16 17:54:28 AEST 1984


> AARRGH!
> 
> *Why* must 90% of the people who "fix" talk use Vax byte order?  Talk
> uses UDP; UDP is an *Internet* protocol; there is a *STANDARD* for this
> kind of stuff!  Try using ntohl/htonl and ntohs/htons to use *standard
> network* byte order.  Then your program will work on *any* new 4.2 Unix
> machines, no matter what their internal integer formats are.
> 
> (Of course it's not really the fault of people "fixing" talk, it's
> the fault of whoever wrote talk wrong in the first place....)
> -- 
> (This line accidently left nonblank.)
> 
> In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (301) 454-7690
> UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
> CSNet:	chris at umcp-cs		ARPA:	chris at maryland


If you look at the posted fix, it clearly stated that it allows unaltered
machines to "talk" to altered machines. A lot of places have machines on
a common ethernet which for adminstrative reasons (you might not have the
source or control over all the machines on your network) cannot be fixed.
Changing some of the machines to network order would break the functionality
of talk.  His fix *DOES NOT* convert to vax order, but detects what order
the packet is in when recieved and converts it if necessary for local
machine usage.

Since the author works for me, I know when he stated:

>	There are two ways of fixing the problem. One of them is to include
>	the changes shown below to all the machines on your network. 
>			:
>			:
>
>	The other one, not shown here, is to make all pyramids and
>	suns transmit the packets in vax order, i.e. swap the bytes before the
>	packets go out. If you want to implement it all you need to do is
>	use the swap routine in this fix and apply it to the packet
>	before a "sendto" is called. Make sure that if the sendto is within
>			:
>			:

That he made a typo on the line: "transmit in vax order" he really meant
to say "transmit in network order ". The current version he has does use
network order.

	Keith Muller
	UCSD Academic Computer Center



More information about the Comp.unix.wizards mailing list