Subject: RE: [SIP] a tiny binary sip proxy protocol

From: "Brian Stucker" <[email-masked]>
Date: Wed, 3 Jan 2001 14:26:35 -0600

Hmm... Some machines use big-endian formats for their bytes, and others
little-endian. So you still have the problem of which bit of a byte is
considered most significant.

Intel uses little-endian, in which the leftmost bit is the least
significant. Other manufacturers use big-endian in which the rightmost bit
is the least significant.

So just copying bits off of a NIC into a struct of some sort, without regard
to the formatting of those bits, even within a single byte, can be
problematic.

Brian

-----Original Message-----
From: Ashhar Farhan [mailto:[email-masked]]
Sent: Tuesday, January 02, 2001 11:40 PM
Subject: RE: [SIP] a tiny binary sip proxy protocol

eric wrote -
The idea of a "SIP Lite" sounds interesting.  However, what benefit do you
see by having the protocol binary?  With shorts and ints, you run into
network byte-order problems.

keeping the protocol binary eliminates the need for a parser completely. you
can directly copy the incoming udp packet into a sip lite structure and that
is it. this is exceedingly important for making sip lite easy to understand.

the network byte-order will only be a problem for the command and the
version fields. the ip addresses, ports and session ids dont need to
arithematically manipulate their bits, so the network byte ordering is not a
problem.

- [email-masked]

_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: David Frascone <[email-masked]>
Date: Wed, 3 Jan 2001 15:13:27 -0600

And, don't forget about byte alignment across architectures.  Try to view a
short on a 16 byte boundry on a 64 bit processor that wasn't made by INTEL.

---

From: David Frascone <[email-masked]>
Date: Wed, 3 Jan 2001 15:14:34 -0600

Err "16 byte" -> "16 bit". -- Sorry

---

From: "Henning G. Schulzrinne" <[email-masked]>
Date: Wed, 03 Jan 2001 16:07:22 -0500

Thanks for solving a non-problem (parsing expense). Can we move on to
other, more pressing concerns?
-- 
Henning Schulzrinne   http://www.cs.columbia.edu/~hgs