Thread (6 messages) 6 messages, 3 authors, 2002-09-30

Re: netlink sockets and rtm_newlink messages

From: jamal <hidden>
Date: 2002-09-27 14:36:39


ifi_change is valid in RTM_NEWLINK messages;
You need to check IFF_RUNNING and IFF_UP to see if the
device went admin up or down.
Another reference point for you at: section 3.3.3.1 of
http://www.ietf.org/internet-drafts/draft-ietf-forces-netlink-03.txt
print out all the flags in the message headers that you receive.
[I just realized the draft also doesnt mention your issue, probably too
late o change it now that it is going into RFC status]

cheers,
jamal

On Fri, 27 Sep 2002, Patrick R. McManus wrote:
for the sake of google, I'll followup to my own query. Sanity checks
are appreciated too.

the messages weren't identical - ifi_change had IFF_RUNNING set in one
message and not the other. the man page says "ifi_change is reserved
for future use" so I didn't know what to make of it before digging
into the kernel src (2.4.19).

-Pat

[pat atducksong: Sep 26 18:38]
quoted
hello -

I've got a little userspace app that listens to a netlink socket and
filters for messages of type RTM_NEWLINK to check for interfaces going
up or down (checking ifi_flags to make that determination)..

the only stumbling point is that I each time I do something like
"ifconfig eth4 down" my app reads 2 identical RTM_NEWLINK messages
instead of one (same behavior on up case too.)

any thoughts on why? I didn't really know how to interpret sockaddr
nl.nl_groups.. 1 seems to give me the same duplicates as ~0.. 0 gives me nothing.


-Pat
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help