Re: [RTnet-developers] multicast support
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <ki...@rt...> - 2005-06-03 16:34:48
|
Amine El hedadi wrote: > Hi > > It is possible to get rtnet_device pointer form rtsocket pointer. > for example struct rtnet_device *rtdev= xxxxx(struct rtsocket sk); > I can't find any way to do that There is no static relation between a socket and some network device. A socket can be used to transmit or receive packets from different devices. You can change this situation for UDP/IP by binding a socket to a local IP (i.e. device) or by connecting with some remote IP (i.e. preselecting the output device). But as IPs and routes may change, there is no fixed pointer stored in the socket structure even in this cases. Intead, packets are analysed on reception if the took the right path. And the route is still calculated right before packet transmission. > Other things : > what mean the rtdm_device fileds : > " device_name" That field is only used for named devices, like serial drivers or any special devices like the TDMA discipline interface. It has no meaning for protocol drivers like RTnet's UDP/IP and packet socket implementations. > "peripheral_name" > "driver_name" > Pure informational stuff, only used for browsing RTDM devices via /proc so far. > Can'I use any on eof them with the function get_dev_by_name . > Nope, get_dev_by_name resolves names like "rteth0" or "rtlo". What are you actually planning? Likely there is a different way to achieve it. Jan |