Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: What breaks? (was Re: 64 bit longs?)
Message-ID: <1991Jan22.180538.29009@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <1991Jan15.202123.14223@gjetor.geac.COM> <14890@smoke.brl.mil> <1991Jan18.044948.27943@zoo.toronto.edu> <14896@smoke.brl.mil> <1991Jan21.025706.7152@zoo.toronto.edu> <1991Jan21.113942.24379@watmath.waterloo.edu> <1991Jan21.190008.1291@zoo.toronto.edu> <1991Jan22.111903.28782@watmath.waterloo.edu>
Date: Tue, 22 Jan 1991 18:05:38 GMT

In article <1991Jan22.111903.28782@watmath.waterloo.edu> datangua@watmath.waterloo.edu (David Tanguay) writes:
>32 bits is the size of the transmitted info. Why does the C structure
>representing that header have to match it exactly? Only the routines
>that read and write the header should have to care about whether the
>C structure matches the transmitted packet bit for bit...

In an orthodox TCP/IP implementation, those "routines" are all of TCP.
One of the things the funny machines end up doing is putting kludge
routines in between the network representation and the internal
representation.  You still have to write those routines, however.
That can be hard; C bitfields can't span words in most implementations,
so you may end up doing shift-and-mask instead.
-- 
If the Space Shuttle was the answer,   | Henry Spencer at U of Toronto Zoology
what was the question?                 |  henry@zoo.toronto.edu   utzoo!henry
