[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xen vbd: better.



On Fri, Oct 22, 2004 at 08:08:18PM +0100, Keir Fraser wrote:

> > Plan 9 works just fine without packed structs, as do the many operating 
> > systems written by people using compilers that didn't do packed structs 
> > either, or even compilers that always packed structs (V6  C). All these 
> > systems twiddled bits just fine. 
> 
> I'm interested to know how. How do you define a network header layout,
> for example, and how do you access subfields? e.g., is there an
> explicit IDL with integration into the compiler?

Typically fixed-format data structures are done by simply accessing the data
as a char[] array instead of a struct.  This may not be as pretty, but it
compiles down into the same machine code and it's 100% portable.  (And you
can do it pretty decently with some preprocessor macros.)

Have fun,

Avery


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.