Subject: Re: Dynamic registry of ehternet frame types
To: Jaromir Dolecek <jdolecek@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 11/12/2003 09:54:16
On Wed, Nov 12, 2003 at 09:47:31AM +0100, Jaromir Dolecek wrote:
> 	default:
> 		if (ether_me_harder && (*ether_me_harder)(etype, m))
> 			break;

Managing a list of

struct ethertype_input_handler {
	SLIST_ENTRY(ethertype_input_handler) next;
	void (*func)(struct mbuf *m, u_int16 ethertype)
	u_int16 ethertype;
};

is not that hard and it scales better.

Martin