Skip to Content.
Sympa Menu

freetds - Re: Endian of Protocol...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Mark Schaal <mark AT champ.tstonramp.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: Endian of Protocol...
  • Date: Tue, 27 Jun 2000 16:38:23 -0700 (PDT)


>
> I'm kind of curious where TDS specifies the endian of the protocol. I
> notice that the packet size if Network byte order... but what about
> other stuff? Only the tds_get_smallint function seems to care about
> endian and instead of it dealing with client side endian it only deals
> with byte order in protocol.

The magic numbers sent in the login packet in login.c tells the server
what endianness to use for the actual data. The code mostly works on
both my intels and sparcs (microsparc & maybe a supersparc) here. I
believe there are open issues with MS SQLServer 7.0 date data.

> Also, as a side note... there are a lot of assumptions that
> sizeof(short) == 2 and sizeof(long) == 4... that should really get
> asserted somewhere if it is going to be assumed.

True, true.

>
> Anyways, someone please respond... I'll fix the code to work on little
> and big endian machines... I just need the answer. I have to get this
> working on an UltraSparc immediately.
>
> Brian Macy

Hope that helps,

Mark
--
Mark J. Schaal Phone: (909) 620-7724
TST On Ramp Fax: (909) 620-8174
System Administrator E-Mail: mark AT tstonramp.com




Archive powered by MHonArc 2.6.24.

Top of Page