Qeltaras wrote:
You likely ran into a hash key collision with your ETH_P_CUST protocol.
RTnet uses a rather simple hash mechanism to demultiplex incoming
Ethernet frames to the corresponding protocol handlers: the last n bits
of the protocol ID select the slot, where n is currently 6 (there are up
to 64 protocol slots available, see MAX_RT_PROTOCOLS define). And there
can only be one listener registered per slot.
You have two simple options (there are always more complex ones...):
* select a slightly different value for ETH_P_CUST
* increase MAX_RT_PROTOCOLS, and thus the hash key space
the ETH_P_CUST is 0x6006
Oh, I see, ETH_P_CUST is not just some custom protocol, it's officially
defined by DEC. So you depend on this value, don't you?
in 16bit is 1632.
if I increse the MAX_RT_PROTOCOLS I define if 1632?
Oky, but for Implementing the ETH_P_CUST can I do?
Well, ETH_P_CUST collides with ETH_P_ARP (0x0806). Increasing
MAX_RT_PROTOCOLS will not help you until you select 12 bits, i.e. 4096
protocols - that's likely too large.
Take a look at stack/stack_mgr.c to see how hashing currently works in
RTnet. You may either patch the hashing to your needs (select some
high-nibble bits as additional key component) or extend the protocol
management with a list of handlers that can be registered on the same
hash key.
So far, this was not necessary for RTnet applications because they are
typically used in closed networks with self-defined protocols where you
can avoid collisions. Patches are always welcome!
Jan
-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users