In article <3D6EBE50.email@example.com> you wrote:
> What does it use? And btw, I'd hash get-by-name too.
to get a list of interfaces it first tries to read with SIOCGIFCONF a list
of all interfaces in a single read into a buffer which has room for 30
entries (and increases the buffer *= 2 in case it was too small).
It also linearly reads proc/net/dev and merges the info from there into the
list of interfaces from above. Then it does a whole lot of ioctls on the
name of that interface to get protocol family dependend info. I think this
is the slowest thing.
the SIOCGIFCONF used to take a lot of time, cause the buffer was increasing
more slowly. Someone could try to use even more aggresive algo. or just use
a bigger start value. I havent benchmarked it, but I guess it it the getting
of all the protocol params which slows it.
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:01 EST