From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] RedBoot: __eth_install_handler? Date: Mon, 22 Jan 2001 15:56:00 -0000 Message-id: <20010122180112.A27342@visi.com> References: <20010122135829.A24681@visi.com> <20010122165603.A27112@visi.com> X-SW-Source: 2001-01/msg00381.html > 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