Commit Graph

25 Commits

Author SHA1 Message Date
Nicolas Dichtel
e34d3dcce2 ip: use rtnelink to manage mroute
mroute was using /proc/net/ip_mr_[vif|cache] to display mroute entries. Hence,
only RT_TABLE_DEFAULT was displayed and only IPv4.
With rtnetlink, it is possible to display all tables for IPv4 and IPv6. The output
format is kept. Also, like before the patch, statistics are displayed when user specify
the '-s' argument.

The patch also adds the support of 'ip monitor mroute', which is now possible.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-14 10:08:17 -08:00
Nicolas Dichtel
9d0efc1048 ip: add support of 'ip link type ip6tnl'
This patch allows to manage ip6 tunnels via the interface ip link.
The syntax for parameters is the same that 'ip -6 tunnel'.

It also allows to display tunnels parameters with 'ip -details link' or
'ip -details monitor link'.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
2012-12-12 09:09:23 -08:00
Julian Anastasov
ea63a69b6d iproute2: add support for tcp_metrics
ip tcp_metrics/tcpmetrics

	We support get/del for single entry and dump for
show/flush.

v3:
 - fix rtt/rttvar shifts as suggested by Eric Dumazet
 - show rtt/rttvar usecs as suggested by David Laight

Signed-off-by: Julian Anastasov <ja@ssi.bg>
2012-10-08 10:23:07 -07:00
Stephen Hemminger
ff24746cca Convert to use rta_getattr_ functions
User new functions (inspired by libmnl) to do type safe access
of routeing attributes
2012-04-10 08:47:55 -07:00
Stephen Hemminger
4f2fdd44b6 Add ability to set link state with ip
Exposes existing netlink operations to modify link state of devices.
2012-04-05 15:08:57 -07:00
Stephen Hemminger
38cd311ade l2tp: Add l2tp support
Based on earlier implementation by James Chapman. But instead of
dragging in all of libnl, use existing libnetlink infrastructure.
2011-12-29 09:35:37 -08:00
Eric W. Biederman
0dc34c7713 iproute2: Add processless network namespace support
The goal of this code change is to implement a mechanism such that it is
simple to work with a kernel that is using multiple network namespaces
at once.

This comes in handy for interacting with vpns where there may be rfc1918
address overlaps, and different policies default routes, name servers
and the like.

Configuration specific to a network namespace that would ordinarily be
stored under /etc/ is stored under /etc/netns/<name>.  For example if
the dns server configuration is different for your vpn you would create
a file /etc/netns/myvpn/resolv.conf.

File descriptors that can be used to manipulate a network namespace can
be created by opening /var/run/netns/<NAME>.

This adds the following commands to iproute.
ip netns add NAME
ip netns delete NAME
ip netns monitor
ip netns list
ip netns exec NAME cmd ....
ip link set DEV netns NAME

ip netns exec exists to cater the vast majority of programs that only
know how to operate in a single network namespace.  ip netns exec
changes the default network namespace, creates a new mount namespace,
remounts /sys and bind mounts netns specific configuration files to
their standard locations.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
2011-07-13 09:48:26 -07:00
Patrick McHardy
b6c8e808fc ip: add support for multicast rules
commit 44a5293c1c47b8c32d9bb0756660ea5d4802acf2
Author: Patrick McHardy <kaber@trash.net>
Date:   Tue Apr 13 17:03:47 2010 +0200

    ip: add support for multicast rules

    Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-06-09 08:49:24 -07:00
David Woodhouse
580fbd88f7 Add 'ip tuntap' support.
This patch provides support for 'ip tuntap', allowing creation and
deletion of persistent tun/tap devices.
2009-09-19 12:49:41 -07:00
Stephen Hemminger
5ef8215700 get rid of warning from misnamed prototype
Minor warning message from missing prototype, probably because of
function name change.
2008-02-18 10:59:22 -08:00
YOSHIFUJI Hideaki / 吉藤英明
4759758c05 Add addrlabel sub-command.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
2008-02-13 12:36:57 -08:00
Patrick McHardy
1d93483985 iplink: use netlink for link configuration
Add support for using netlink for link configuration. Kernel-support is
probed, when not available it falls back to using ioctls.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2007-08-22 10:49:01 -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
Masahide NAKAMURA
288384f22f TUNNEL: IPv6-over-IPv6 tunnel support.
Fix ip6tunnel.c to be fit with current ip command style.
Unlike other modules currently iptunnel (and ip6tunnel) is not
designed as protocol-independent because of unarranged structure
between IPv4 and IPv6.

Usage: ip -f inet6 tunnel { add | change | del | show } [ NAME ]
          [ remote ADDR local ADDR ] [ dev PHYS_DEV ]
          [ encaplimit ELIM ]
          [ hoplimit HLIM ] [ tc TC ] [ fl FL ]
          [ dscp inherit ]

Where: NAME := STRING
       ADDR := IPV6_ADDRESS
       ELIM := { none | 0..255 }(default=4)
       HLIM := 0..255 (default=64)
       TC   := { 0x0..0xff | inherit }
       FL   := { 0x0..0xfffff | inherit }

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-11-27 08:41:26 -08:00
Masahide NAKAMURA
141bb60640 ADDR: Define 0xFFFFFFFFU as INFINITY_LIFE_TIME regarding to the kernel.
Signed-off-by: TAKAMIYA Noriaki <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-11-27 08:41:07 -08:00
Thomas Graf
98bde989db Add rule notification support to ip monitor
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-11-10 09:40:30 -08:00
Patrick McHardy
34e9564753 Add support for larger number of routing tables
[IPROUTE]: Add support for larger number of routing tables

Support support for 2^32 routing tables by using the new RTA_TABLE
attribute for specifying tables > 255 and intepreting it if it is
sent by the kernel.

When tables > 255 are used on a kernel not supporting it an error will
occur because of the unknown netlink attribute.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-08-10 16:12:07 -07:00
shemminger
09954dc61a IP ntable support and header update. 2006-01-10 18:43:32 +00:00
shemminger
351efcde4e Update header files to 2.6.14
Integrate support for DCCP and tcp_diag into ss
Add -batch to ip command
2005-09-01 19:21:50 +00:00
net[shemminger]!shemminger
1cb54e5806 Import patch iproute2.118
(Logical change 1.120)
2005-01-17 23:30:18 +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
net[shemminger]!shemminger
c7699875be Import patch ipxfrm-20040707_2.diff
(Logical change 1.53)
2004-07-07 17:05:56 +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