[Openl2tp-users] l2tpv3tun tool dev command

Ryan Whelan rcwhelan at gmail.com
Fri Oct 21 17:59:32 BST 2011


If its useful to anyone else I added 'dev' to the command line parsing.

I've never written anything more than 'hello world' in C so beware.


diff -Naur l2tpv3tun-0.2/main.c l2tpv3tun-src/main.c
--- l2tpv3tun-0.2/main.c    2010-12-10 08:55:03.000000000 -0500
+++ l2tpv3tun-src/main.c    2011-10-21 12:29:34.510698326 -0400
@@ -560,6 +560,7 @@
     fprintf(stderr, "          session_id ID peer_session_id ID\n");
     fprintf(stderr, "          [ cookie HEXSTR ] [ peer_cookie HEXSTR
]\n");
     fprintf(stderr, "          [ offset OFFSET ] [ peer_offset OFFSET
]\n");
+    fprintf(stderr, "          [ dev DEV ]\n");
     fprintf(stderr, "       %s del tunnel tunnel_id ID\n", L2TP_CMD_ROOT);
     fprintf(stderr, "       %s del session tunnel_id ID session_id ID\n",
L2TP_CMD_ROOT);
     fprintf(stderr, "       %s show tunnel [ tunnel_id ID ]\n",
L2TP_CMD_ROOT);
@@ -593,6 +594,9 @@
                 fprintf(stderr, "Unknown tunnel encapsulation.\n");
                 exit(-1);
             }
+                } else if (strcmp(*argv, "dev") == 0) {
+                        NEXT_ARG();
+                        p->ifname = *argv;
         } else if (strcmp(*argv, "remote") == 0) {
             NEXT_ARG();
             p->peer_ip.s_addr = get_addr32(*argv);


On Wed, Oct 19, 2011 at 2:49 PM, Ryan Whelan <rcwhelan at gmail.com> wrote:

> When using the l2tpv3tun tool to create manual v3 tunnels, is it possible
> to specify the device name to create when creating sessions?
>
> Looking at the example usage, it doesn't look like it- but I thought I
> might be missing something.
>
> thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openl2tp.org/pipermail/openl2tp-users/attachments/20111021/2617754a/attachment.html 
-------------- next part --------------
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning at Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
-------------- next part --------------
_______________________________________________
Openl2tp-users mailing list
Openl2tp-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openl2tp-users


More information about the Openl2tp-users mailing list