This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RedBoot: __eth_install_handler?



> Attached is a patch that impliments __eth_install_handler()
> functionality.  It's currently hard-wired to allow up to 4
> handlers. The normal IP/ARP/RARP handlers are still handled
> seperately.

I should have added a warning:

The ethernet header data pointed to by pkt->eth_hdr is non-
persistent data.  It's an automatic variable in the function
calling the registered handler.  You should neither attempt to
free it nor expect it to be there after your handler returns to
the caller.

The pkt->pkt_bytes value passed to the registered handler
includes the 14 bytes in the Ethernet headers.  In hindsight, I
think __enet_poll should subtract 14 before calling the handler
so that pkt->pkt_bytes is the number of data bytes pointed to
by pkt->buf.

-- 
Grant Edwards
grante@visi.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]