* RtNetlink in wireless.c and netlink_broadcast(uevent_sock,...) - newbie
@ 2006-04-30 19:14 Xu Nakajima
0 siblings, 0 replies; 2+ messages in thread
From: Xu Nakajima @ 2006-04-30 19:14 UTC (permalink / raw)
To: netdev
Hello,
I saw that in the wireless linux stack, there is usage
of sending messages to user space via the RtNetlink
event channel :
in net/core/wireless.c, wireless_send_event() method
calls rtmsg_iwinfo() which calls
netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK,
GFP_ATOMIC); (it fills a struct with
rtnetlink_fill_iwinfo before).
On the other hand, I see that for example, in the case
of
sending messeges to userspace udev socket, the
netlink_broadcast() call is with a different
mecahinsm;
In lib/kobject_uevent.c, there is the following call
netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL);
Is there something special about RtNetlink event
channel
which makes it needed fot wireless.c (for example)?
While udev can use some other mechanism ?
What is special about RtNetlink event channel
in comaprison to non RtNetlink channels?
Regards,
Xu
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RtNetlink in wireless.c and netlink_broadcast(uevent_sock,...) - newbie
@ 2006-05-01 17:50 Jean Tourrilhes
0 siblings, 0 replies; 2+ messages in thread
From: Jean Tourrilhes @ 2006-05-01 17:50 UTC (permalink / raw)
To: netdev
Xu Nakajima wrote :
>
> Hello,
>
> I saw that in the wireless linux stack, there is usage
>
> of sending messages to user space via the RtNetlink
> event channel :
> in net/core/wireless.c, wireless_send_event() method
> calls rtmsg_iwinfo() which calls
> netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK,
> GFP_ATOMIC); (it fills a struct with
> rtnetlink_fill_iwinfo before).
>
> On the other hand, I see that for example, in the case
> of
> sending messeges to userspace udev socket, the
> netlink_broadcast() call is with a different
> mecahinsm;
> In lib/kobject_uevent.c, there is the following call
> netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL);
>
> Is there something special about RtNetlink event
> channel
> which makes it needed fot wireless.c (for example)?
> While udev can use some other mechanism ?
> What is special about RtNetlink event channel
> in comaprison to non RtNetlink channels?
Netlink is a generic socket mechanism. On top of Netlink, you
can have multiple types of sockets, the same way that on top of TCP
sockets you can implement various protocols, such as HTTP, NFS, SSH...
RtNetlink was the first Netlink protocol implemented and is
the Netlink protocol used to configure network interfaces. In the file
net/core/rtnetlink.c, you will find that there are many actions that
generates RtNetlink events. Together with wireless events, they give
you a very detailed view of what's happening with network interfaces.
The udev-netlink protocol is quite recent and a completely
different Netlink ptotocol that uses a different packet format. As far
as exporting network information, it is very crude, because the goal
of udev is not managing network interfaces. Yes, udev does duplicate
some RtNetlink events, but the overlap is not so much, so that's ok.
Good luck...
Jean
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-01 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-30 19:14 RtNetlink in wireless.c and netlink_broadcast(uevent_sock,...) - newbie Xu Nakajima
-- strict thread matches above, loose matches on Subject: below --
2006-05-01 17:50 Jean Tourrilhes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox