Re: [RTnet-developers] Monitoring Link Beat
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@we...> - 2006-11-23 16:02:53
|
Jorge Almeida wrote: >=20 > Hello Jan, >=20 > I'm trying to implement an easy way of monitoring the link beat of one = board. >=20 > What i want is to pass the index of the board, and internaly call the=20 > "do_ioctl" function that should be initialialized in the rtnet_device s= truct=20 > for each device. >=20 > My question is, How do i call the do_ioctl function using the file desc= riptor=20 > of one socket that is open passing the number of the if_index (or the=20 > interface name)? And how rtnet knows wath device to call? IOCTLs on RTDM sockets come in over the related protocol handler, see e.g. this one for packet sockets: http://www.rts.uni-hannover.de/rtnet/lxr/source/stack/packet/af_packet.c#= L240 =46rom there on you can easily go down the chain. As the IOCTLs are per-socket and not per-device, you have to provide the information about the address device within the request packet. Do you have some Linux data structure you can reuse for it? Something like for SIOCGIFINDEX? Jan |