Qeltaras wrote:
I create the sochet with the functuin socket_rt
sock = socket_rt( PF_PACKET, SOCK_DGRAM, htons( ETH_P_CUST));
the system returne:
Socket error: -99
packet_if_rtai.o: init_module: Operation not permitted
Hint: insmod errors can be caused by incorrect module parameters,
including invalid IO, or IRQ parameters.
If I remouve the htons i don't have any problem...
You can tell me wath protcol are supported?
thanks
Nicol@
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
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