]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/ipl2tp.c
iproute: Set ip/ip6 lwtunnel flags
[mirror_iproute2.git] / ip / ipl2tp.c
index 5e7f0390697e68545f3bbab2e8317c9b7351da64..f699b258a3f09b076c69254dc52fb042bb636200 100644 (file)
@@ -219,7 +219,7 @@ static void print_tunnel(const struct l2tp_data *data)
        print_string(PRINT_ANY, "encap", " encap %s",
                     p->encap == L2TP_ENCAPTYPE_UDP ? "UDP" :
                     p->encap == L2TP_ENCAPTYPE_IP ? "IP" : "??");
-       print_string(PRINT_FP, NULL, "%s", _SL_);
+       print_nl();
 
        print_string(PRINT_ANY, "local", "  From %s ",
                     inet_ntop(p->local_ip.family, p->local_ip.data,
@@ -227,11 +227,11 @@ static void print_tunnel(const struct l2tp_data *data)
        print_string(PRINT_ANY, "peer", "to %s",
                     inet_ntop(p->peer_ip.family, p->peer_ip.data,
                               buf, sizeof(buf)));
-       print_string(PRINT_FP, NULL, "%s", _SL_);
+       print_nl();
 
        print_uint(PRINT_ANY, "peer_tunnel", "  Peer tunnel %u",
                   p->peer_tunnel_id);
-       print_string(PRINT_FP, NULL, "%s", _SL_);
+       print_nl();
 
        if (p->encap == L2TP_ENCAPTYPE_UDP) {
                print_string(PRINT_FP, NULL,
@@ -241,7 +241,7 @@ static void print_tunnel(const struct l2tp_data *data)
                           p->local_udp_port);
                print_uint(PRINT_ANY, "peer_port", "/%hu",
                           p->peer_udp_port);
-               print_string(PRINT_FP, NULL, "%s", _SL_);
+               print_nl();
 
                switch (p->local_ip.family) {
                case AF_INET:
@@ -283,18 +283,18 @@ static void print_session(struct l2tp_data *data)
 
        print_uint(PRINT_ANY, "session_id", "Session %u", p->session_id);
        print_uint(PRINT_ANY, "tunnel_id",  " in tunnel %u", p->tunnel_id);
-       print_string(PRINT_FP, NULL, "%s", _SL_);
+       print_nl();
 
        print_uint(PRINT_ANY, "peer_session_id",
                     "  Peer session %u,", p->peer_session_id);
        print_uint(PRINT_ANY, "peer_tunnel_id",
                     " tunnel %u",  p->peer_tunnel_id);
-       print_string(PRINT_FP, NULL, "%s", _SL_);
+       print_nl();
 
        if (p->ifname != NULL) {
                print_color_string(PRINT_ANY, COLOR_IFNAME,
                                   "interface", "  interface name: %s" , p->ifname);
-               print_string(PRINT_FP, NULL, "%s", _SL_);
+               print_nl();
        }
 
        /* Show offsets only for plain console output (for legacy scripts) */
@@ -302,10 +302,11 @@ static void print_session(struct l2tp_data *data)
        print_uint(PRINT_FP, "peer_offset", " peer offset %u\n", 0);
 
        if (p->cookie_len > 0)
-               print_cookie("cookie", "cookie",
+               print_cookie("cookie", "  cookie %s",
                             p->cookie, p->cookie_len);
+
        if (p->peer_cookie_len > 0)
-               print_cookie("peer_cookie", "peer cookie",
+               print_cookie("peer_cookie", "  peer cookie %s",
                             p->peer_cookie, p->peer_cookie_len);
 
        if (p->reorder_timeout != 0)
@@ -437,8 +438,7 @@ static int get_response(struct nlmsghdr *n, void *arg)
        return 0;
 }
 
-static int session_nlmsg(const struct sockaddr_nl *who,
-                        struct nlmsghdr *n, void *arg)
+static int session_nlmsg(struct nlmsghdr *n, void *arg)
 {
        int ret = get_response(n, arg);
 
@@ -476,8 +476,7 @@ static int get_session(struct l2tp_data *p)
        return 0;
 }
 
-static int tunnel_nlmsg(const struct sockaddr_nl *who,
-                       struct nlmsghdr *n, void *arg)
+static int tunnel_nlmsg(struct nlmsghdr *n, void *arg)
 {
        int ret = get_response(n, arg);