WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] xen vbd: better.
From: Avery Pennarun <apenwarr@xxxxxx>
Date: Fri, 22 Oct 2004 15:22:41 -0400
Cc: "Ronald G. Minnich" <rminnich@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 22 Oct 2004 20:28:21 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: <E1CL4lv-0006wL-00@xxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <Pine.LNX.4.58.0410221131090.15945@xxxxxxxxxx> <E1CL4lv-0006wL-00@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.3.28i
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

<Prev in Thread] Current Thread [Next in Thread>