[put the list on CC again]

Jorge Almeida wrote:
> For my application i need the RAW socket catching all the messages in the 
> network, and then they are treated in the rest of the application.
> 
> But i have a smaller application, a watchdog, that have a UDP socket for 
> remote control of the first application. 
> And one of the principles is that they must stay independent from each other, 
> i mean without communication.
> 
> And not very often i yould like to connect to the machine using a ssh client 
> for log collector or maybe a maintenance operation for example.

SSH would either be tunnelled (when using a closed, RTmac-managed
network) or be forwarded to the rtnetproxy (when installed). But do you
need those packets on the ETH_P_ALL socket as well?

> 
> For that to work i think the A solution is not enough (!!!????)

Do you need ANY incoming packet delivered to more than one socket? If
yes, A is a no-go. :(

> 
> But maybe the B 1 solution, with copy, is enough.

Ok, let's go for this and optimise later (shared rtskbs).

> 
> But i stuck in the rtskb copy, because i dont know all the architectur and 
> concept of the rtskb.
> If anyone could help me with the rtskb_copy function.
> 
> I've started with this:
> alloc a rtskb from the rtskb_queue (this is the queue from the socket that 
> gonna red the message after) so this rtskb will be release shortly.
> But now i dont know if a can make a simple memcpy copying the all structure 
> at once or i need to make some more complicated kind of copy.
> After the copy the result rtskb will be inserted in the head of the driver 
> receiving queue and willbe acquired by the socket function to the socket 
> queue as normaly, 
> with this the same function is used for ETH_P_ALL or any other protocol.
> 
> // int rtskb_copy(struct rtskb *rtskb_1,struct rtskb *rtskb_2,struct 
> rtskb_queue *pool)
> // {
> // 
> //     rtskb_1 = alloc_rtskb(rtskb_2->len,pool);
> //     if(rtskb_1 = NULL)
> //         return -ENOMEM;
> //     
> //     
> // 
> // 
> // }
> 

memcpy the data, but not the control structure. I would suggest to
carefully step through the short life of an rtskb from its allocation in
the driver's rx handler up to the point where you want to clone it (BTW,
"clone" is the better term for the future, copy is just the current way
to achieve this). What fields are touched? What do they express?
=>Translate. If you stumble of some fields of an rtskb that you don't
understand, come back and ask here.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
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-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to