network interface state

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ulrich Drepper
Date: Wednesday, November 14, 2007 - 1:59 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just FYI, with the current getaddrinfo code it is even more critical to
get to a point where I can cache network interface information and query
the kernel whether it changed.  We now have to read the RTM_GETADDR
tables for every lookup.  It was more limited with the old, incomplete
implementation.

Even if it's something as simple as a RTM_SEQUENCE request which returns
a number that is bumped at every interface change.

Related: I need to know about the device type (the ARPHRD_* values) to
determine whether a device is for a native transport or a tunnel.  What
I currently do is:

- - at the beginning I get information about all interfaces using
RTM_GETADDR

- - them later I have to find the device type by

  + reading the RTM_GETLINK data to get to the device name

  + then using the name and ioctl(SIOCGIFHWADDR) I get the device type


It would be so much nicer if the device type would be part of the
RTM_GETADDR data, or at least the RTM_GETLINK data.


Any help on any of these issues?

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHO2HI2ijCOnn/RHQRAtQQAJ0QV6j/BKFmN5nWugrQ/zXf0cCu9wCffRYT
+aXv6y5S1m5iwR7gVfOhp9A=
=Uf3i
-----END PGP SIGNATURE-----
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
network interface state, Ulrich Drepper, (Wed Nov 14, 1:59 pm)
Re: network interface state, David Miller, (Wed Nov 14, 4:31 pm)
Re: network interface state, Ulrich Drepper, (Wed Nov 14, 5:12 pm)
Re: network interface state, David Miller, (Wed Nov 14, 5:22 pm)
Re: network interface state, Herbert Xu, (Wed Nov 14, 7:11 pm)
Re: network interface state, David Miller, (Wed Nov 14, 8:39 pm)
Re: network interface state, jamal, (Thu Nov 15, 6:58 am)