Commit Graph

13 Commits

Author SHA1 Message Date
Stephen Hemminger
4b3385f6c5 Cleanup ll_map
In preparation for adding name hash:
  * add const
  * use same types in cache as ifinfomsg
  * rename idxmap to ll_cache
2010-12-10 11:58:09 -08:00
Octavian Purdila
3056423728 iproute2: initialize the ll_map only once
Avoid initializing the LL map (which involves a costly RTNL dump)
multiple times. This can happen when running in batch mode.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
2010-12-10 11:37:57 -08:00
Stephen Hemminger
1e21ea71a7 Increase size of ifindex hash heads
The default of 16 is too small for users with 10,000 interfaces.
2010-12-10 09:46:24 -08:00
Florian Westphal
24abb62ee7 iproute2: fix addrlabel interface names handling
ip addrlabel outputs if%d names due to missing init call:
$ ip addrlabel s
prefix a::42/128 dev if4 label 1000

Also, ip did not accept "if%d" interfaces on input.

Signed-off-by: Florian Westphal <fw@strlen.de>
2010-05-13 09:23:46 -07:00
David Ward
ee7ba9875d iproute2: Add ll_index_to_addr function
After calling ll_init_map, all of the information stored in the link-layer map
can be retrieved by function calls (ll_index_to_*), except for the link-layer
address. This patch fills the gap by adding a ll_index_to_addr function.
Changes welcome.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2009-12-01 15:54:16 -08:00
David Ward
e03dcc040d iproute2: Support 20-byte link layer address in idxmap
Extend the link-layer address field from 8 to 20 bytes to support InfiniBand.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
2009-12-01 15:41:39 -08:00
Thomas Graf
dcb283c300 iproute2: Support IFF_LOWER_UP and IFF_DORMANT
In order to support these new flags add current
linux/if.h into the directory with the local copies.
This caused troubles with outdated redefinitions from net/if.h
so I've removed the dependency on it.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-06-19 16:40:40 -07:00
Stephen Hemminger
ae665a522b Remove trailing whitespace
Go through source files and remove all trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-12-05 10:10:22 -08:00
shemminger
99f830de2f Device indices are unsigned and use if_nametoindex as fallback 2005-06-07 22:15:48 +00:00
osdl.net!shemminger
50772dc51a Add ip rule flush capabilty and fix all the prototype changes
because of that code rewrites the nlmsghdr.

(Logical change 1.106)
2004-12-07 21:48:29 +00:00
osdl.net!shemminger
6dc9f01634 make all filtering handles take const args.
(Logical change 1.77)
2004-08-31 17:45:21 +00:00
osdl.org!shemminger
aba5acdfdb (Logical change 1.3) 2004-04-15 20:56:59 +00:00
osdl.org!shemminger
86fdf0e47b Initial revision 2004-04-15 20:56:59 +00:00