]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: refactor Prefix-SID binary syntax 5755/head
authorHiroki Shirokura <slank.dev@gmail.com>
Thu, 13 Feb 2020 23:41:17 +0000 (23:41 +0000)
committerHiroki Shirokura <slank.dev@gmail.com>
Fri, 14 Feb 2020 00:13:43 +0000 (00:13 +0000)
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
tests/bgpd/test_mp_attr.c

index d46dd8864e746a03af2fe602295f2e4c5f0c92b7..7fabaad7fa659a9c0f146c4ef3f5d3e2055b718a 100644 (file)
@@ -951,12 +951,19 @@ static struct test_segment mp_prefix_sid[] = {
                "PREFIX-SID",
                "PREFIX-SID Test 1",
                {
-                       0x01, 0x00, 0x07,
-                       0x00, 0x00, 0x00, 0x00,
-                       0x00, 0x00, 0x02,
-                       0x03, 0x00, 0x08, 0x00,
-                       0x00, 0x0a, 0x1b, 0xfe,
-                       0x00, 0x00, 0x0a
+                       /* TLV[0] Latel-Index TLV */
+                       0x01,                    /* Type 0x01:Label-Index */
+                       0x00, 0x07,              /* Length */
+                       0x00,                    /* RESERVED */
+                       0x00, 0x00,              /* Flags */
+                       0x00, 0x00, 0x00, 0x02,  /* Label Index */
+
+                       /* TLV[1] SRGB TLV */
+                       0x03,                    /* Type 0x03:SRGB */
+                       0x00, 0x08,              /* Length */
+                       0x00, 0x00,              /* Flags */
+                       0x0a, 0x1b, 0xfe,        /* SRGB[0] first label */
+                       0x00, 0x00, 0x0a         /* SRBG[0] nb-labels in range */
                },
                .len = 21,
                .parses = SHOULD_PARSE,