Skip to Content.
Sympa Menu

freetds - Re: Getting FreeTDS up under Solaris

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Kevin <root AT zazu.nol.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Getting FreeTDS up under Solaris
  • Date: Mon, 21 Dec 1998 18:56:15 +0000


Tom May wrote:
>
> Kevin <root AT zazu.nol.org> writes:
> ^^^^^^^^^^^^^^^^^ Kevin, mail to this address bounces.
Sorry...kevin AT nol.org is the correct one...still can't get sendmail
configured right on my Linux box yet. :(

> I just need a little more context for what you're trying to do because
> I haven't actually downloaded any freetds source (I'm just keeping an
> eye on the list). Here are the two versions you've posted:
>
> # if defined(HW_LITTLE_ENDIAN)
> lobyte = tds_get_byte(tds);
> hibyte = tds_get_byte(tds);
> #elif defined(HW_BIG_ENDIAN)
> hibyte = tds_get_byte(tds);
> lobyte = tds_get_byte(tds);
> #else
> #error Endianess not defined!
> #endif
>
> Then what happens to lobyte and hibyte?
return (TDS_SMALLINT)lobyte+(hibyte*256)

> So, what is the byte order on the wire? And does it depend on
> information the two machines know about each other's endianness?
Byte order is translated by the MSSQL server to the client's byte
order
as near as I've been able to tell...here's some results from a few tests
I did, doing a dump from the
socket's buffer right after the read on a short value:
Linux (little-endian) Solaris (big-endian)
Desired Value
--------------------- --------------------
-------------
buff[x] = 14 buff[x+1] = 0 buff[x] = 0 buff[x+1] = 14
14
buff[x] = 2a buff[x+1] = 0 buff[x] = 0 buff[x+1] = 2a
2a

So as near as I can tell, the MSSQL server is tranlating the byte
order
based on
the clients endianness...but as I've mentioned before, this is all
fairly new teritory for
me, so I may be missing something fairly obvious here....


> Tom.
>
> ---
> You are currently subscribed to freetds as: kevin AT nol.org
> To unsubscribe, forward this message to $subst('Email.Unsub')

--
-----------------------------------------------------------------------
Kevin M. Lyons Phone: (402)-471-7870 Email: kevin AT nol.org
No matter what happens, somebody will find a way to take it way too
seriously - Dave Barry
-----------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page