Hello again, 
I am trying to trace the root-cause of a failure to execute
"callback_func(rt_socket_context(sock), callback_arg);"
source file: af_packet.c 
RTNET v0.7

Through the use of my solution/tool I am working on, and some debug
messages, I have reached the conclusion that this only happens when
"ifindex != 0" and as a result the socketbuffer memory is de-allocated
(kfree_rtskb(skb)). 

callback_func fails to execute because ifindex seems not to have been
initialized and prints a random value. 
Now this means that in ifindex=sock->prot.packet.ifindex,
sock->prot.packet.ifindex is not initialized either, maybe due to the
uncommon (hardcore would be more precise) way of typecasting
"rtpacket_type pt" and initializing "sock"...here take a look:

struct rtsocket *sock = (struct rtsocket *)(((u8 *)pt) - 
((u8 *)&(struct rtsocket *)0)->prot.socket));

and it all comes down to "pt"...what goes so wrong with "pt" to
(indirectly)contain a non-initialized pointer to ifindex???

Thank you even reading through this mumbo-jumbo!



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to