mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-17 15:03:29 +08:00
288384f22f
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>
51 lines
1.8 KiB
C
51 lines
1.8 KiB
C
extern int print_linkinfo(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n,
|
|
void *arg);
|
|
extern int print_addrinfo(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n,
|
|
void *arg);
|
|
extern int print_neigh(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n, void *arg);
|
|
extern int print_ntable(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n, void *arg);
|
|
extern int ipaddr_list(int argc, char **argv);
|
|
extern int ipaddr_list_link(int argc, char **argv);
|
|
extern int iproute_monitor(int argc, char **argv);
|
|
extern void iplink_usage(void) __attribute__((noreturn));
|
|
extern void iproute_reset_filter(void);
|
|
extern void ipaddr_reset_filter(int);
|
|
extern void ipneigh_reset_filter(void);
|
|
extern void ipntable_reset_filter(void);
|
|
extern int print_route(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n, void *arg);
|
|
extern int print_prefix(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n, void *arg);
|
|
extern int print_rule(const struct sockaddr_nl *who,
|
|
struct nlmsghdr *n, void *arg);
|
|
extern int do_ipaddr(int argc, char **argv);
|
|
extern int do_iproute(int argc, char **argv);
|
|
extern int do_iprule(int argc, char **argv);
|
|
extern int do_ipneigh(int argc, char **argv);
|
|
extern int do_ipntable(int argc, char **argv);
|
|
extern int do_iptunnel(int argc, char **argv);
|
|
extern int do_ip6tunnel(int argc, char **argv);
|
|
extern int do_iplink(int argc, char **argv);
|
|
extern int do_ipmonitor(int argc, char **argv);
|
|
extern int do_multiaddr(int argc, char **argv);
|
|
extern int do_multiroute(int argc, char **argv);
|
|
extern int do_xfrm(int argc, char **argv);
|
|
|
|
static inline int rtm_get_table(struct rtmsg *r, struct rtattr **tb)
|
|
{
|
|
__u32 table = r->rtm_table;
|
|
if (tb[RTA_TABLE])
|
|
table = *(__u32*) RTA_DATA(tb[RTA_TABLE]);
|
|
return table;
|
|
}
|
|
|
|
extern struct rtnl_handle rth;
|
|
|
|
#ifndef INFINITY_LIFE_TIME
|
|
#define INFINITY_LIFE_TIME 0xFFFFFFFFU
|
|
#endif
|