All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: k8 s <uint32@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: struct iphdr in include/linux/ip.h (probably bug in headerfile)
Date: Tue, 21 Jun 2005 13:48:37 +0200	[thread overview]
Message-ID: <je3brchqwa.fsf@sykes.suse.de> (raw)
In-Reply-To: <699a19ea05062100157c17c09c@mail.gmail.com> (uint32@gmail.com's message of "Tue, 21 Jun 2005 12:45:20 +0530")

k8 s <uint32@gmail.com> writes:

> Hello,
>
> The following definition in linux/include/ip.h is creating problems.
>
> How does Endianness affect BIT ORDER 
> IT affetc only  BYTE ORDER

Bit order and byte order are independent properties of the architecture.
That's why they are configured with different macros.

> ------------------------------------------------------------------------
> struct iphdr {
> #if defined(__LITTLE_ENDIAN_BITFIELD)
>         __u8    ihl:4,
>                 version:4;
> #elif defined (__BIG_ENDIAN_BITFIELD)
>         __u8    version:4,
>                 ihl:4;
> --------------------------------------------------------------------------
> Here I have a network device which works on both little endian and big
> endian machines.
> I found out that the driver of the device was saying unrecognizable
> packet when i assign

The you probably didn't define the right macro of the ones referenced
above.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2005-06-21 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-21  7:15 struct iphdr in include/linux/ip.h (probably bug in headerfile) k8 s
2005-06-21 11:48 ` Andreas Schwab [this message]
2005-06-21 12:27 ` Alan Cox

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=je3brchqwa.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uint32@gmail.com \
    /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.