]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: add "tagged" keyword to "configure med policy"
authorVincent Bernat <vincent@bernat.im>
Mon, 12 Jan 2015 19:31:47 +0000 (20:31 +0100)
committerVincent Bernat <vincent@bernat.im>
Mon, 12 Jan 2015 19:37:32 +0000 (20:37 +0100)
This allows a user to set the tagged flag for a network policy for a
given application.

Fix: #88

src/client/conf-med.c
src/client/lldpcli.8.in

index 43149968545a43f2017979c6ef5af1a67882e574..0a8cfaf05c8cf1cae281be18399febb3d1fbd112 100644 (file)
@@ -191,6 +191,9 @@ cmd_medpolicy(struct lldpctl_conn_t *conn, struct writer *w,
                    (what = "unknown flag", lldpctl_atom_set_int(med_policy,
                        lldpctl_k_med_policy_unknown,
                        cmdenv_get(env, "unknown")?1:0)) == NULL ||
+                   (what = "tagged flag", lldpctl_atom_set_int(med_policy,
+                       lldpctl_k_med_policy_tagged,
+                       cmdenv_get(env, "tagged")?1:0)) == NULL ||
                    (what = "vlan",
                        cmdenv_get(env, "vlan")?
                        lldpctl_atom_set_str(med_policy,
@@ -425,6 +428,10 @@ register_commands_medpol(struct cmd_node *configure_med)
                configure_medpolicy,
                "unknown", "Set unknown flag",
                cmd_check_application_but_no, cmd_store_env_and_pop, "unknown");
+       commands_new(
+               configure_medpolicy,
+               "tagged", "Set tagged flag",
+               cmd_check_application_but_no, cmd_store_env_and_pop, "tagged");
        commands_new(
                commands_new(
                        configure_medpolicy,
index b4594b64d7721166c4132484b2c9ca7a61068436..a47784a96f6c07e2a5770bfd5e0d6bec0945e2a5 100644 (file)
@@ -524,6 +524,7 @@ padded with 0. Here is an example of use:
 .Cd med policy
 .Cd application Ar application
 .Op Cd unknown
+.Op Cd tagged
 .Op Cd vlan Ar vlan
 .Op Cd priority Ar priority
 .Op Cd dscp Ar dscp
@@ -565,10 +566,13 @@ When a VLAN is specified with
 .Cd vlan
 tells which 802.1q VLAN ID has to be advertised for the network
 policy. A valid value is between 1 and 4094.
+.Cd tagged
+tells the VLAN should be tagged for the specified application type.
 .Cd priority
 allows one to specify IEEE 802.1d / IEEE 802.1p Layer 2 Priority, also
 known as Class of Service (CoS), to be used for the specified
-application type. It should be one of those values:
+application type. This field is usually ignored if no VLAN is
+specified. It should be one of those values:
 .Bl -bullet -compact -offset XXXXXXXX
 .It
 background