public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: Donnat Eric <e.donnat@ri.silicomp.fr>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] RedBoot sending incorrect TCP window size
Date: Thu, 08 Feb 2001 12:54:00 -0000	[thread overview]
Message-ID: <20010208145836.A2740@visi.com> (raw)
In-Reply-To: <3A82FE61.7F6F2EE8@ri.silicomp.fr>

On Thu, Feb 08, 2001 at 09:15:29PM +0100, Donnat Eric wrote:

> > All occurrences of "sizeof (eth_header_t)" in net.h, tcp.c, udp.c
> > need to be replace by a hard coded constant.  I'll send a patch
> > later today...
> 
> You can always avoid the hard coded constant by computing the
> "real" limit of the struct as the offset to the last field +
> the size of this last field. This should always work if the
> last field is not a struct/bitfield ! (See stddef.h)

For some things that might be a better solution.  On a more
pragmatic note, the size of an Ethernet header is etched in
billions of pieces of silicon spread all over the world.  It's
14. Always. Everywhere. It's not going to change.

> To finnish with the "sizeof" story, you will see with following
> sample that the reported value of sizeof is compatible with the
> data representation and obviously with pointer arithmetic. Look
> at gernerated asm.

I agree that the sizeof value is consistent with the code
generated by the compiler.  It's just not consistent with the
size of an Ethernet header.  :)

-- 
Grant Edwards
grante@visi.com

  reply	other threads:[~2001-02-08 12:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-08  8:47 Grant Edwards
2001-02-08 11:42 ` Grant Edwards
2001-02-08 12:15 ` Donnat Eric
2001-02-08 12:54   ` Grant Edwards [this message]
2001-02-09  5:40     ` Bart Veer
2001-02-09  6:00       ` Jesper Skov

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=20010208145836.A2740@visi.com \
    --to=grante@visi.com \
    --cc=e.donnat@ri.silicomp.fr \
    --cc=ecos-discuss@sources.redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).