[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 01383) question about netlink and getifaddrs
- To: <usagi-users@xxxxxxxxxxxxxx>
- Subject: (usagi-users 01383) question about netlink and getifaddrs
- From: "Jonathan Khoo" <jonath-k@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Apr 2002 18:05:46 +0900
- Importance: Normal
- In-reply-to: <E16xgjw-0000SE-00@stardust>
- Reply-to: usagi-users@xxxxxxxxxxxxxx
Hi guys,
I have in a program an opened NETLINK socket waiting for messages. When
I run getifaddr without closing that NETLINK socket, getifaddr will stop
at recvmsg. After tracing through both getifaddr and af_netlink, I think
the reason is because the recvmsg meant for getifaddr was sent to the
opened socket through netlink_unicast (since netlink send messages
through matching pid). I tried setting the dst_groups before the NETLINK
socket binding, but to no avail.
I overcome the problem by doing a fork() inside getifaddr so that it is
using another pid, but I don't think it's a good solution. Does anyone
knows how to get getifaddr working without closing the NETLINK socket?
thanks for any advices...
jon.