This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: RedBoot: __eth_install_handler?
- To: Grant Edwards <grante at visi dot com>
- Subject: RE: [ECOS] RedBoot: __eth_install_handler?
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Mon, 22 Jan 2001 13:03:52 -0700 (MST)
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat, Inc.
On 22-Jan-2001 Grant Edwards wrote:
>
> In RedBoot's net.h file, there's a declaration for
> __eth_install_handler(), which would seem from the declaration to
> do exactly what I want to do: set a call-back to handle packets
> with Ethernet protocol type <whatever>.
>
> That functionality hasn't been implemented, so I'm about to
> implement it.
>
> Were I doing this just for myself, I would probably just use
> CYG_HAL_TABLE_xxxx to set up handlers at compile/link time and
> not bother with run-time handler set up. It's a bit simpler,
> and you don't to guess ahead of time how many different handler
> need to be allowed. [I really like the HAL_TABLE mechanism:
> it's quite clever, and it's something that I've needed on a
> number of occasions.]
>
> However, if people think run-time handler set-up is useful,
> I'll go ahead and implement the existing API instead of using
> the HAL_TABLE method.
Setting up the handler at runtime is much better IMHO. This allows
for differing handlers depending on the situation, etc. In fact,
I just added similar functionality for ICMP packets.