All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@nit.ca>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: "Ronald G. Minnich" <rminnich@lanl.gov>, xen-devel@lists.sourceforge.net
Subject: Re: xen vbd: better.
Date: Fri, 22 Oct 2004 15:22:41 -0400	[thread overview]
Message-ID: <20041022192241.GD8711@worldvisions.ca> (raw)
In-Reply-To: <E1CL4lv-0006wL-00@mta1.cl.cam.ac.uk>

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

      parent reply	other threads:[~2004-10-22 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22  5:53 xen vbd: better Ronald G. Minnich
2004-10-22  7:49 ` Keir Fraser
2004-10-22 15:28   ` Ronald G. Minnich
2004-10-22 18:50   ` Ronald G. Minnich
2004-10-22 19:08     ` Keir Fraser
2004-10-22 19:15       ` Ronald G. Minnich
2004-10-22 19:22       ` Avery Pennarun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041022192241.GD8711@worldvisions.ca \
    --to=apenwarr@nit.ca \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=rminnich@lanl.gov \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.