]> git.sur5r.net Git - ngadmin/blobdiff - cli/commands.c
Added support for creating and deleting a 802.1q VLAN.
[ngadmin] / cli / commands.c
index 552d18e03b4e9fd8430f9fd30148828e5239c50e..2d5e9cc643e8f58e3fb579d79503ede3be796ccf 100644 (file)
@@ -92,8 +92,10 @@ bool do_tree (int nb, const char **com, struct ngadmin *nga);
 
 
 // vlan
+bool do_vlan_8021q_del (int nb, const char **com, struct ngadmin *nga);
+bool do_vlan_8021q_set (int nb, const char **com, struct ngadmin *nga);
 bool do_vlan_8021q_show (int nb, const char **com, struct ngadmin *nga);
-bool do_vlan_8021q_vlan_del (int nb, const char **com, struct ngadmin *nga);
+bool do_vlan_mode_set (int nb, const char **com, struct ngadmin *nga);
 bool do_vlan_mode_show (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga);
 bool do_vlan_pvid_set (int nb, const char **com, struct ngadmin *nga);
 bool do_vlan_pvid_show (int nb, const char **com, struct ngadmin *nga);
@@ -178,22 +180,17 @@ COM_ROOT_START(coms)
  
  COM_START(vlan)
   COM_START(802.1q)
-   COM_START(port)
-    COM_TERM(add, NULL, true)
-    COM_TERM(del, NULL, true)
-   COM_END
+   COM_TERM(del, do_vlan_8021q_del, true)
+   COM_TERM(set, do_vlan_8021q_set, true)
    COM_TERM(show, do_vlan_8021q_show, true)
-   COM_START(vlan)
-    COM_TERM(add, NULL, true)
-    COM_TERM(del, do_vlan_8021q_vlan_del, true)
-    COM_TERM(flush, NULL, true)
-   COM_END
   COM_END
   COM_START(mode)
-   COM_TERM(set, NULL, true)
+   COM_TERM(set, do_vlan_mode_set, true)
    COM_TERM(show, do_vlan_mode_show, false)
   COM_END
   COM_START(port)
+   COM_TERM(set, NULL, true)
+   COM_TERM(show, NULL, false)
   COM_END
   COM_START(pvid)
    COM_TERM(set, do_vlan_pvid_set, true)