]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add 'match' and 'no match' remove 'data' and 'fail'
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 18 Oct 2019 18:41:25 +0000 (14:41 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 18 Oct 2019 21:46:57 +0000 (17:46 -0400)
27 files changed:
src/bin/unit_test_attribute.c
src/tests/unit/command.txt
src/tests/unit/condition.txt
src/tests/unit/data_types.txt
src/tests/unit/dhcpv4.txt
src/tests/unit/dhcpv6.txt
src/tests/unit/dict.txt
src/tests/unit/eap_aka_decode.txt
src/tests/unit/eap_aka_encode.txt
src/tests/unit/eap_aka_error.txt
src/tests/unit/eap_sim_decode.txt
src/tests/unit/eap_sim_encode.txt
src/tests/unit/eap_sim_error.txt
src/tests/unit/escape.txt
src/tests/unit/radius_errors.txt
src/tests/unit/radius_extended.txt
src/tests/unit/radius_lucent.txt
src/tests/unit/radius_rfc.txt
src/tests/unit/radius_struct.txt
src/tests/unit/radius_tunnel.txt
src/tests/unit/radius_unit.txt
src/tests/unit/radius_vendor.txt
src/tests/unit/radius_wimax.txt
src/tests/unit/regex.txt
src/tests/unit/tacacs.txt
src/tests/unit/unknown.txt
src/tests/unit/xlat.txt

index af6e444b0c0eae1ac589cf5f6a7b5874bda5800a..58602ba9e777203627c17afcb00db38481fe0b4b 100644 (file)
@@ -65,32 +65,41 @@ do { \
 #define RETURN_OK(_len) \
        do { \
                result->rcode = RESULT_OK; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return (_len); \
        } while (0)
 
 #define RETURN_SKIP_FILE() \
        do { \
                result->rcode = RESULT_SKIP_FILE; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return 0; \
        } while (0)
 
 #define RETURN_DRAIN_ERROR_STACK_TO_DATA() \
        do { \
                result->rcode = RESULT_DRAIN_ERROR_STACK_TO_DATA; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return 0; \
        } while (0)
 
 #define RETURN_PARSE_ERROR(_offset) \
        do { \
-               result->rcode = RESULT_PARSE_ERROR; \
                result->rcode = RESULT_PARSE_ERROR; \
                result->offset = _offset; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return 0; \
        } while (0)
 
 #define RETURN_COMMAND_ERROR() \
        do { \
                result->rcode = RESULT_COMMAND_ERROR; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return 0; \
        } while (0)
 
@@ -101,6 +110,8 @@ do { \
                result->expected_len = _expected_len; \
                result->got = _got; \
                result->got_len = _got_len; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return 0; \
        } while (0)
 
@@ -108,6 +119,8 @@ do { \
        do { \
                result->rcode = RESULT_EXIT; \
                result->ret = _ret; \
+               result->file = __FILE__; \
+               result->line = __LINE__; \
                return 0; \
        } while (0)
 
@@ -144,6 +157,8 @@ typedef struct {
                size_t  offset;                 //!< Where we failed parsing the command.
                int     ret;                    //!< What code we should exit with.
        };
+       char const      *file;
+       int             line;
        command_rcode_t rcode;
 } command_result_t;
 
@@ -152,6 +167,7 @@ typedef struct {
 
        char const      *path;                  //!< Current path we're operating in.
        int             lineno;                 //!< Current line number.
+       char const      *filename;              //!< Current file we're operating on.
 
        fr_dict_t       *dict;                  //!< Base dictionary.
        fr_dict_t       *proto_dict;            //!< Protocol specific dictionary.
@@ -163,12 +179,12 @@ typedef struct {
  * @param[out] result  Of executing the command.
  * @param[in] cc       Information about the file being processed.
  * @param[in,out] data Output of this command, or the previous command.
- * @param[in] data_len Length of data in the data buffer.
+ * @param[in] data_used        Length of data in the data buffer.
  * @param[in] in       Command text to process.
  * @param[in] inlen    Length of the remainder of the command to process.
  */
 typedef size_t (*command_func_t)(command_result_t *result, command_ctx_t *cc, char *data,
-                                size_t data_len, char *in, size_t inlen);
+                                size_t data_used, char *in, size_t inlen);
 
 typedef struct {
        command_func_t  func;
@@ -189,6 +205,7 @@ static dl_loader_t  *dl_loader;
 static const char      *process_filename;
 static int             process_lineno;
 
+size_t process_line(command_result_t *result, command_ctx_t *cc, char *data, size_t data_used, char *in, size_t inlen);
 static int process_file(bool *exit_now, TALLOC_CTX *ctx, CONF_SECTION *features,
                        fr_dict_t *dict, const char *root_dir, char const *filename);
 
@@ -987,22 +1004,6 @@ static size_t command_condition_normalise(command_result_t *result, command_ctx_
        RETURN_OK(len);
 }
 
-/** Compare the data buffer to an expected value
- *
- */
-static size_t command_data(command_result_t *result, UNUSED command_ctx_t *cc,
-                          char *data, size_t data_used, char *in, size_t inlen)
-{
-       if (strcmp(in, data) != 0) RETURN_MISMATCH(in, inlen, data, data_used);
-
-       /*
-        *      We didn't actually write anything, but this
-        *      keeps the contents of the data buffer around
-        *      for the next command to operate on.
-        */
-       RETURN_OK(data_used);
-}
-
 static size_t command_decode_pair(command_result_t *result, command_ctx_t *cc,
                                  char *data, size_t data_used, char *in, size_t inlen)
 {
@@ -1116,12 +1117,9 @@ static size_t command_decode_proto(command_result_t *result, UNUSED command_ctx_
        fr_test_point_proto_decode_t *tp = NULL;
 
        load_test_point_by_command((void **)&tp, in, "tp_decode");
-       if (!tp) {
-               result->rcode = RESULT_PARSE_ERROR;
-               return 0;
-       }
+       if (!tp) RETURN_PARSE_ERROR(0);
 
-       return 0;
+       RETURN_OK(0);
 }
 
 /** Parse a dictionary attribute, writing "ok" to the data buffer is everything was ok
@@ -1250,12 +1248,9 @@ static size_t command_encode_proto(command_result_t *result, UNUSED command_ctx_
        fr_test_point_proto_encode_t *tp = NULL;
 
        load_test_point_by_command((void **)&tp, in, "tp_encode");
-       if (!tp) {
-               result->rcode = RESULT_PARSE_ERROR;
-               return 0;
-       }
+       if (!tp) RETURN_PARSE_ERROR(0);
 
-       return 0;
+       RETURN_OK(0);
 }
 
 /** Command eof
@@ -1281,26 +1276,6 @@ static size_t command_exit(command_result_t *result, UNUSED command_ctx_t *cc,
        RETURN_EXIT(atoi(in));
 }
 
-/** Compare the data buffer to an expected value
- *
- *  Note that we fail if the string DOES match!  This command is used
- *  as a place-holder for tests which SHOULD work in the future, but
- *  which do not work right no.  It allows us to store the expected
- *  output in a test that isn't commented out.
- */
-static size_t command_fail(command_result_t *result, UNUSED command_ctx_t *cc,
-                          char *data, size_t data_used, char *in, size_t inlen)
-{
-       if (strcmp(in, data) == 0) RETURN_MISMATCH(in, inlen, data, data_used);
-
-       /*
-        *      We didn't actually write anything, but this
-        *      keeps the contents of the data buffer around
-        *      for the next command to operate on.
-        */
-       RETURN_OK(data_used);
-}
-
 /** Dynamically load a protocol library
  *
  */
@@ -1320,6 +1295,22 @@ static size_t command_proto_load(command_result_t *result, UNUSED command_ctx_t
        RETURN_OK(0);
 }
 
+/** Compare the data buffer to an expected value
+ *
+ */
+static size_t command_match(command_result_t *result, UNUSED command_ctx_t *cc,
+                          char *data, size_t data_used, char *in, size_t inlen)
+{
+       if (strcmp(in, data) != 0) RETURN_MISMATCH(in, inlen, data, data_used);
+
+       /*
+        *      We didn't actually write anything, but this
+        *      keeps the contents of the data buffer around
+        *      for the next command to operate on.
+        */
+       RETURN_OK(data_used);
+}
+
 /** Skip the test file if we're missing a particular feature
  *
  */
@@ -1343,6 +1334,36 @@ static size_t command_need_feature(command_result_t *result, command_ctx_t *cc,
        RETURN_OK(0);
 }
 
+/** Negate the result of a match command or any command which returns "OK"
+ *
+ */
+static size_t command_no(command_result_t *result, command_ctx_t *cc,
+                        char *data, size_t data_used, char *in, size_t inlen)
+{
+       data_used = process_line(result, cc, data, data_used, in, inlen);
+       switch (result->rcode) {
+       /*
+        *      OK becomes a command error
+        */
+       case RESULT_OK:
+               RETURN_COMMAND_ERROR();
+
+       /*
+        *      Mismatch becomes OK
+        */
+       case RESULT_MISMATCH:
+               RETURN_OK(0);
+
+       /*
+        *      The rest are unchanged...
+        */
+       default:
+               break;
+       }
+
+       return data_used;
+}
+
 /** Encode a RADIUS attribute writing the result to the data buffer as space separated hexits
  *
  */
@@ -1511,11 +1532,6 @@ static fr_table_ptr_sorted_t     commands[] = {
                                        .usage = "condition <string>",
                                        .description = "Parse and reprint a condition, writing the normalised condition to the data buffer on success"
                                }},
-       { "data",               &(command_entry_t){
-                                       .func = command_data,
-                                       .usage = "data <string>",
-                                       .description = "Compare the contents of the data buffer with an expected value"
-                               }},
        { "decode-pair",        &(command_entry_t){
                                        .func = command_decode_pair,
                                        .usage = "decode-pair[.<testpoint_symbol>] (-|<hex_string>)",
@@ -1561,21 +1577,26 @@ static fr_table_ptr_sorted_t    commands[] = {
                                        .usage = "exit[ <num>]",
                                        .description = "Exit with the specified error number.  If no <num> is provided, process will exit with 0"
                                }},
-       { "fail",               &(command_entry_t){
-                                       .func = command_fail,
-                                       .usage = "fail <string>",
-                                       .description = "The expected output should NOT match the string"
-                               }},
        { "load ",              &(command_entry_t){
                                        .func = command_proto_load,
                                        .usage = "load <protocol>",
                                        .description = "Switch the active protocol to the one specified, unloading the previous protocol",
                                }},
+       { "match",              &(command_entry_t){
+                                       .func = command_match,
+                                       .usage = "match <string>",
+                                       .description = "Compare the contents of the data buffer with an expected value"
+                               }},
        { "need-feature ",      &(command_entry_t){
                                        .func = command_need_feature,
                                        .usage = "need-feature <feature>",
                                        .description = "Skip the contents of the current file, or up to the next \"eof\" command if a particular feature is not available"
                                }},
+       { "no ",                &(command_entry_t){
+                                       .func = command_no,
+                                       .usage = "no ...",
+                                       .description = "Negate the result of a \"match\" command"
+                               }},
        { "raw ",               &(command_entry_t){
                                        .func = command_encode_raw,
                                        .usage = "raw <string>",
@@ -1599,23 +1620,77 @@ static fr_table_ptr_sorted_t    commands[] = {
 };
 static size_t commands_len = NUM_ELEMENTS(commands);
 
+size_t process_line(command_result_t *result, command_ctx_t *cc, char *data, size_t data_used, char *in, UNUSED size_t inlen)
+{
+
+       command_entry_t         *command;
+       size_t                  match_len;
+       char                    *p;
+
+       p = in;
+       fr_skip_whitespace(p);
+       if (*p == '\0') RETURN_OK(data_used);
+
+       DEBUG2("%s[%d]: %s", cc->filename, cc->lineno, p);
+
+       /*
+        *      Look up the command by longest prefix
+        */
+       command = fr_table_value_by_longest_prefix(&match_len, commands, p, -1, NULL);
+       if (!command) {
+               fr_strerror_printf("Unknown command: %s", p);
+               RETURN_COMMAND_ERROR();
+       }
+
+       /*
+        *      Skip processing the command
+        */
+       if (command->func == command_comment) RETURN_OK(data_used);
+
+       p += match_len;                                         /* Jump to after the command */
+       fr_skip_whitespace(p);                                  /* Skip any whitespace */
+
+       /*
+        *      Feed the data buffer in as the command
+        */
+       if (*p == '-') {
+               data_used = command->func(result, cc, data, data_used, data, data_used);
+       }
+       else {
+               data_used = command->func(result, cc, data, data_used, p, strlen(p));
+       }
+
+       rad_assert((size_t)data_used < COMMAND_OUTPUT_MAX);
+       data[data_used] = '\0';                 /* Ensure the data buffer is \0 terminated */
+
+       if (data_used) {
+               DEBUG2("%s[%d]: --> %s (wrote %zu bytes)", cc->filename, cc->lineno,
+                      fr_table_str_by_value(command_rcode_table, result->rcode, "<INVALID>"), data_used);
+       } else {
+               DEBUG2("%s[%d]: --> %s", cc->filename, cc->lineno,
+                      fr_table_str_by_value(command_rcode_table, result->rcode, "<INVALID>"));
+       }
+       return data_used;
+}
+
 static int process_file(bool *exit_now, TALLOC_CTX *ctx, CONF_SECTION *features,
                        fr_dict_t *dict, const char *root_dir, char const *filename)
 {
-       int                             ret = 0;
-       FILE                            *fp;                            /* File we're reading from */
-       char                            buffer[8192];                   /* Command buffer */
-       char                            data[COMMAND_OUTPUT_MAX + 1];   /* Data written by previous command */
-       ssize_t                         data_len = 0;                   /* How much data the last command wrote */
-       static char                     path[PATH_MAX] = { '\0' };
-
-       command_ctx_t                   cc = {
-                                               .tmp_ctx = talloc_named_const(ctx, 0, "tmp_ctx"),
-                                               .lineno = 0,
-                                               .path = path,
-                                               .dict = dict,
-                                               .features = features
-                                       };
+       int             ret = 0;
+       FILE            *fp;                            /* File we're reading from */
+       char            buffer[8192];                   /* Command buffer */
+       char            data[COMMAND_OUTPUT_MAX + 1];   /* Data written by previous command */
+       ssize_t         data_used = 0;                  /* How much data the last command wrote */
+       static char     path[PATH_MAX] = { '\0' };
+
+       command_ctx_t   cc = {
+                               .tmp_ctx = talloc_named_const(ctx, 0, "tmp_ctx"),
+                               .lineno = 0,
+                               .path = path,
+                               .dict = dict,
+                               .filename = filename,
+                               .features = features
+                       };
 
        /*
         *      Open the file, or stdin
@@ -1646,16 +1721,13 @@ static int process_file(bool *exit_now, TALLOC_CTX *ctx, CONF_SECTION *features,
         *      Loop over lines in the file or stdin
         */
        while (fgets(buffer, sizeof(buffer), fp) != NULL) {
-               char                    *p;
-               command_entry_t *command;
                command_result_t        result = { .rcode = RESULT_OK };        /* Reset to OK */
-               size_t                  match_len;
+               char                    *p = strchr(buffer, '\n');
 
                cc.lineno++;
-               p = strchr(buffer, '\n');
+               process_lineno = cc.lineno;
 
                if (!p) {
-               line_too_long:
                        if (!feof(fp)) {
                                ERROR("Line %d too long in %s", cc.lineno, cc.path);
                                ret = -1;
@@ -1665,70 +1737,12 @@ static int process_file(bool *exit_now, TALLOC_CTX *ctx, CONF_SECTION *features,
                        *p = '\0';
                }
 
-               /*
-                *      Backslash? then keep buffering.
-                */
-               while ((p > buffer) && (p[-1] == '\\')) {
-                       char *q;
-
-                       p--;
-
-                       if (!fgets(p, buffer + sizeof(buffer) - p, fp)) break;
-
-                       cc.lineno++;
-                       q = strchr(p, '\n');
-                       if (!q) goto line_too_long;
-
-                       *q = '\0';
-
-                       if (q[-1] != '\\') break;
-
-                       p = q;
-               }
-
-               p = buffer;
-               fr_skip_whitespace(p);
-               if (*p == '\0') continue;                               /* Blank line */
-
-               process_lineno = cc.lineno;
-               DEBUG2("%s[%d]: %s", filename, cc.lineno, p);
-
-               /*
-                *      Look up the command by longest prefix
-                */
-               command = fr_table_value_by_longest_prefix(&match_len, commands, p, -1, NULL);
-               if (!command) {
-               bad_input:
-                       ERROR("%s[%d]: Unknown command: %s", cc.path, cc.lineno, p);
-                       ret = -1;
-                       goto finish;
-               }
-
-               if (command->func == command_comment) continue;         /* Skip comments */
-
-               p += match_len;                                         /* Jump to after the command */
-               fr_skip_whitespace(p);                                  /* Skip any whitespace */
-
-               /*
-                *      Feed the data buffer in as the command
-                */
-               if (*p == '-') {
-                       data_len = command->func(&result, &cc, data, data_len, data, data_len);
-               }
-               else {
-                       data_len = command->func(&result, &cc, data, data_len, p, strlen(p));
-               }
-
-               DEBUG2("%s[%d]: --> %s", filename, cc.lineno,
-                      fr_table_str_by_value(command_rcode_table, result.rcode, "<INVALID>"));
-
+               data_used = process_line(&result, &cc, data, data_used, buffer, strlen(buffer));
                switch (result.rcode) {
                /*
                 *      Command completed successfully
                 */
                case RESULT_OK:
-                       rad_assert((size_t)data_len < sizeof(data));
-                       data[data_len] = '\0';                  /* Ensure the data buffer is \0 terminated */
                        continue;
 
                /*
@@ -1745,9 +1759,15 @@ static int process_file(bool *exit_now, TALLOC_CTX *ctx, CONF_SECTION *features,
                         *      is closed.
                         */
                        while (fgets(buffer, sizeof(buffer), fp) != NULL) {
-                               command = fr_table_value_by_longest_prefix(&match_len, commands,
-                                                                       buffer, -1, NULL);
-                               if (!command) goto bad_input;
+                               command_entry_t *command;
+                               size_t          match_len;
+
+                               command = fr_table_value_by_longest_prefix(&match_len, commands, buffer, -1, NULL);
+                               if (!command) {
+                                       ERROR("%s[%d]: Unknown command: %s", cc.path, cc.lineno, p);
+                                       ret = -1;
+                                       goto finish;
+                               }
 
                                if (command->func == command_eof) break;
                        }
@@ -1768,7 +1788,7 @@ static int process_file(bool *exit_now, TALLOC_CTX *ctx, CONF_SECTION *features,
                 *      correctness.
                 */
                case RESULT_DRAIN_ERROR_STACK_TO_DATA:
-                       data_len = strerror_concat(data, sizeof(data));
+                       data_used = strerror_concat(data, sizeof(data));
                        break;
 
                /*
index cae474c45b61b2deba1aa8c5769fbfac9d4f3b06..a8b089bbf17b49d97dc7165cd36bf71b92363b2a 100644 (file)
@@ -28,17 +28,17 @@ command add foo :did have INTEGER
 #  Alternate parameters
 #
 command add show module :sql (alive|dead)
-data ok
+match ok
 
 command add show module :file (alive|(foo bar))
-data ok
+match ok
 
 #
 #  Optional parameters
 #
 command add set home server :localhost IPADDR [INTEGER]
-data ok
+match ok
 
 command add set home server :remote [state INTEGER]
-data ok
+match ok
 
index 7ee1e4e5aaabc3385735ecd8f58446ce5b23ec29..96af7a6aef718d84ddcd2577ffb54597da77f0b8 100644 (file)
 dictionary-load radius
 
 condition &request:User-Name == &reply:User-Name
-data &User-Name == &reply:User-Name
+match &User-Name == &reply:User-Name
 
 # All IP address literals should be parsed as prefixes
 condition ("foo\
-data ERROR offset 6 End of string after escape
+match ERROR offset 6 End of string after escape
 
 condition ("foo
-data ERROR offset 2 Unterminated string
+match ERROR offset 2 Unterminated string
 
 condition ()
 
-data ERROR offset 1 Empty string is invalid
+match ERROR offset 1 Empty string is invalid
 
 condition (!)
-data ERROR offset 2 Empty string is invalid
+match ERROR offset 2 Empty string is invalid
 
 condition (foo == bar
-data ERROR offset 11 No closing brace at end of string
+match ERROR offset 11 No closing brace at end of string
 
 condition (|| b)
-data ERROR offset 1 Empty string is invalid
+match ERROR offset 1 Empty string is invalid
 
 condition ((ok || handled) foo)
-data ERROR offset 17 Unexpected text after condition
+match ERROR offset 17 Unexpected text after condition
 
 # escapes in names are illegal
 condition (ok\ foo || handled)
-data ERROR offset 3 Unexpected escape
+match ERROR offset 3 Unexpected escape
 
 condition (ok FOO handled)
-data ERROR offset 4 Invalid text. Expected comparison operator
+match ERROR offset 4 Invalid text. Expected comparison operator
 
 condition (ok !x handled)
-data ERROR offset 4 Invalid operator
+match ERROR offset 4 Invalid operator
 
 condition (ok =x handled)
-data ERROR offset 4 Invalid operator
+match ERROR offset 4 Invalid operator
 
 condition (ok == handled"foo")
-data ERROR offset 14 Unexpected start of string
+match ERROR offset 14 Unexpected start of string
 
 # And now we have a bunch of VALID conditions we want to parse.
 
 # sillyness is OK
 condition ((((((ok))))))
-data ok
+match ok
 
 #
 #  Extra braces get squashed
 #
 condition (&User-Name == &User-Password)
-data &User-Name == &User-Password
+match &User-Name == &User-Password
 
 condition (!ok)
-data !ok
+match !ok
 
 condition !(ok)
-data !ok
+match !ok
 
 condition !!ok
-data ERROR offset 1 Double negation is invalid
+match ERROR offset 1 Double negation is invalid
 
 condition !(!ok)
-data ok
+match ok
 
 #
 #  These next two are identical after normalization
 #
 condition (&User-Name == &User-Password || &Filter-Id == &Reply-Message)
-data &User-Name == &User-Password || &Filter-Id == &Reply-Message
+match &User-Name == &User-Password || &Filter-Id == &Reply-Message
 
 condition ((&User-Name == &User-Password) || (&Filter-Id == &Reply-Message))
-data &User-Name == &User-Password || &Filter-Id == &Reply-Message
+match &User-Name == &User-Password || &Filter-Id == &Reply-Message
 
 condition (!(&User-Name == &User-Password) || (&Filter-Id == &Reply-Message))
-data !&User-Name == &User-Password || &Filter-Id == &Reply-Message
+match !&User-Name == &User-Password || &Filter-Id == &Reply-Message
 
 #  different from the previous ones.
 condition (!((&User-Name == &User-Password) || (&Filter-Id == &Reply-Message)))
-data !(&User-Name == &User-Password || &Filter-Id == &Reply-Message)
+match !(&User-Name == &User-Password || &Filter-Id == &Reply-Message)
 
 condition (!(&User-Name == &User-Password) || (&Filter-Id == &Reply-Message))
-data !&User-Name == &User-Password || &Filter-Id == &Reply-Message
+match !&User-Name == &User-Password || &Filter-Id == &Reply-Message
 
 condition ((a == b) || (c == d)))
-data ERROR offset 22 Unexpected closing brace
+match ERROR offset 22 Unexpected closing brace
 
 condition (handled && (&Response-Packet-Type == Access-Challenge))
-data handled && &Response-Packet-Type == Access-Challenge
+match handled && &Response-Packet-Type == Access-Challenge
 
 # This is OK, without the braces
 condition handled && &Response-Packet-Type == Access-Challenge
-data handled && &Response-Packet-Type == Access-Challenge
+match handled && &Response-Packet-Type == Access-Challenge
 
 # and this, though it's not a good idea.
 condition handled &&&Response-Packet-Type == Access-Challenge
-data handled && &Response-Packet-Type == Access-Challenge
+match handled && &Response-Packet-Type == Access-Challenge
 
 condition &reply: == &request:
-data ERROR offset 0 Cannot use list references in condition
+match ERROR offset 0 Cannot use list references in condition
 
 condition &reply: == "hello"
-data ERROR offset 0 Cannot use list references in condition
+match ERROR offset 0 Cannot use list references in condition
 
 condition "hello" == &reply:
-data ERROR offset 11 Cannot use list references in condition
+match ERROR offset 11 Cannot use list references in condition
 
 
 #
 #  Convert != to !(COND) for normal checks
 #
 condition &User-Name == &User-Password
-data &User-Name == &User-Password
+match &User-Name == &User-Password
 
 condition &User-Name != &User-Password
-data !&User-Name == &User-Password
+match !&User-Name == &User-Password
 
 condition !&User-Name != &User-Password
-data &User-Name == &User-Password
+match &User-Name == &User-Password
 
 condition <ipv6addr>foo
-data ERROR offset 0 Cannot do cast for existence check
+match ERROR offset 0 Cannot do cast for existence check
 
 condition <ipaddr>&Filter-Id == &Framed-IP-Address
-data <ipaddr>&Filter-Id == &Framed-IP-Address
+match <ipaddr>&Filter-Id == &Framed-IP-Address
 
 condition <ipaddr>&Filter-Id == <ipaddr>&Framed-IP-Address
-data ERROR offset 22 Unexpected cast
+match ERROR offset 22 Unexpected cast
 
 condition <ipaddr>&Filter-Id == <integer>&Framed-IP-Address
-data ERROR offset 22 Unexpected cast
+match ERROR offset 22 Unexpected cast
 
 condition <ipaddr>&Filter-Id == <blerg>&Framed-IP-Address
-data ERROR offset 22 Unexpected cast
+match ERROR offset 22 Unexpected cast
 
 condition <blerg>&Filter-Id == "foo"
-data ERROR offset 1 Unknown data type
+match ERROR offset 1 Unknown data type
 
 #
 #  Normalize things
 #
 condition <ipaddr>&Filter-Id == "127.0.0.1"
-data <ipaddr>&Filter-Id == '127.0.0.1'
+match <ipaddr>&Filter-Id == '127.0.0.1'
 
 condition <ipaddr>127.0.0.1 < &Framed-IP-Address
-data &Framed-IP-Address > 127.0.0.1
+match &Framed-IP-Address > 127.0.0.1
 
 # =* and !* are only for attrs / lists
 condition "foo" !* bar
-data ERROR offset 6 Cannot use !* on a string
+match ERROR offset 6 Cannot use !* on a string
 
 condition "foo" =* bar
-data ERROR offset 6 Cannot use =* on a string
+match ERROR offset 6 Cannot use =* on a string
 
 # existence checks don't need the RHS
 condition &User-Name =* bar
-data &User-Name
+match &User-Name
 
 condition &User-Name !* bar
-data !&User-Name
+match !&User-Name
 
 condition !&User-Name =* bar
-data !&User-Name
+match !&User-Name
 
 condition !&User-Name !* bar
-data &User-Name
+match &User-Name
 
 # redundant casts get squashed
 condition <ipaddr>&Framed-IP-Address == 127.0.0.1
-data &Framed-IP-Address == 127.0.0.1
+match &Framed-IP-Address == 127.0.0.1
 
 condition <cidr>&Framed-IP-Address <= 192.168.0.0/16
-data <ipv4prefix>&Framed-IP-Address <= 192.168.0.0/16
+match <ipv4prefix>&Framed-IP-Address <= 192.168.0.0/16
 
 # All IP address literals should be parsed as prefixes
 condition &Framed-IP-Address <= 192.168.0.0/16
-data <ipv4prefix>&Framed-IP-Address <= 192.168.0.0/16
+match <ipv4prefix>&Framed-IP-Address <= 192.168.0.0/16
 
 # string attributes must be string
 condition &User-Name == "bob"
-data &User-Name == "bob"
+match &User-Name == "bob"
 
 condition &User-Name == `bob`
-data &User-Name == `bob`
+match &User-Name == `bob`
 
 condition &User-Name == 'bob'
-data &User-Name == 'bob'
+match &User-Name == 'bob'
 
 condition &User-Name == bob
-data ERROR offset 14 Comparison value must be a quoted string
+match ERROR offset 14 Comparison value must be a quoted string
 
 # Integer (etc.) types must be "bare"
 condition &Session-Timeout == 10
-data &Session-Timeout == 10
+match &Session-Timeout == 10
 
 condition &Session-Timeout == '10'
-data ERROR offset 21 Comparison value must be an unquoted string
+match ERROR offset 21 Comparison value must be an unquoted string
 
 # Except for dates, which can be humanly readable!
 # This one is be an expansion, so it's left as-is.
 condition &Event-Timestamp == "January 1, 2012 %{blah}"
-data &Event-Timestamp == "January 1, 2012 %{blah}"
+match &Event-Timestamp == "January 1, 2012 %{blah}"
 
 # This one is NOT an expansion, so it's parsed into normal form
 condition &Event-Timestamp == 'January 1, 2012'
@@ -221,101 +221,101 @@ condition &Event-Timestamp == 'January 1, 2012'
 
 # literals are parsed when the conditions are parsed
 condition <integer>X == 1
-data ERROR offset 9 Failed to parse field
+match ERROR offset 9 Failed to parse field
 
 condition &NAS-Port == X
-data ERROR offset 13 Failed to parse value for attribute
+match ERROR offset 13 Failed to parse value for attribute
 
 #
 #  The RHS is a static string, so this gets mashed to a literal,
 #  and then statically evaluated.
 #
 condition <ipaddr>127.0.0.1 == "127.0.0.1"
-data true
+match true
 
 condition <ipaddr>127.0.0.1 == "%{sql: 127.0.0.1}"
-data <ipaddr>127.0.0.1 == "%{sql: 127.0.0.1}"
+match <ipaddr>127.0.0.1 == "%{sql: 127.0.0.1}"
 
 #
 #  Bare %{...} is allowed.
 #
 condition <ipaddr>127.0.0.1 == %{sql:127.0.0.1}
-data <ipaddr>127.0.0.1 == "%{sql:127.0.0.1}"
+match <ipaddr>127.0.0.1 == "%{sql:127.0.0.1}"
 
 condition <ipaddr>127.0.0.1 == %{sql: SELECT user FROM table WHERE user='%{User-Name}'}
-data <ipaddr>127.0.0.1 == "%{sql: SELECT user FROM table WHERE user='%{User-Name}'}"
+match <ipaddr>127.0.0.1 == "%{sql: SELECT user FROM table WHERE user='%{User-Name}'}"
 
 condition <ether> 00:11:22:33:44:55 == "00:11:22:33:44:55"
-data true
+match true
 
 condition <ether> 00:11:22:33:44:55 == "ff:11:22:33:44:55"
-data false
+match false
 
 condition <ether> 00:11:22:33:44:55 == "%{sql:00:11:22:33:44:55}"
-data <ether>00:11:22:33:44:55 == "%{sql:00:11:22:33:44:55}"
+match <ether>00:11:22:33:44:55 == "%{sql:00:11:22:33:44:55}"
 
 condition <ether> 00:XX:22:33:44:55 == 00:11:22:33:44:55
-data ERROR offset 8 Failed to parse field
+match ERROR offset 8 Failed to parse field
 
 #
 #  Tests for boolean data types.
 #
 condition true
-data true
+match true
 
 condition 1
-data true
+match true
 
 condition false
-data false
+match false
 
 condition 0
-data false
+match false
 
 condition true && (&User-Name == "bob")
-data &User-Name == "bob"
+match &User-Name == "bob"
 
 condition false && (&User-Name == "bob")
-data false
+match false
 
 condition false || (&User-Name == "bob")
-data &User-Name == "bob"
+match &User-Name == "bob"
 
 condition true || (&User-Name == "bob")
-data true
+match true
 
 #
 #  Both sides static data with a cast: evaluate at parse time.
 #
 condition <integer>20 < 100
-data true
+match true
 
 #
 #  Both sides literal: evaluate at parse time
 #
 condition ('foo' == 'bar')
-data false
+match false
 
 condition ('foo' < 'bar')
-data false
+match false
 
 condition ('foo' > 'bar')
-data true
+match true
 
 condition ('foo' == 'foo')
-data true
+match true
 
 condition ("foo" == "%{sql: foo}")
-data "foo" == "%{sql: foo}"
+match "foo" == "%{sql: foo}"
 
 condition ("foo bar" == "%{sql: foo}")
-data "foo bar" == "%{sql: foo}"
+match "foo bar" == "%{sql: foo}"
 
 condition ("foo" == "bar")
-data false
+match false
 
 condition ("foo" == 'bar')
-data false
+match false
 
 #
 #  The RHS gets parsed as a VPT_TYPE_DATA, which is
@@ -323,86 +323,86 @@ data false
 #  in it, so it reverts back to a literal.
 #
 condition (&User-Name == "bob")
-data &User-Name == "bob"
+match &User-Name == "bob"
 
 condition (&User-Name == "%{sql: blah}")
-data &User-Name == "%{sql: blah}"
+match &User-Name == "%{sql: blah}"
 
 condition <ipaddr>127.0.0.1 == 2130706433
-data true
+match true
 
 # /32 suffix should be trimmed for this type
 condition <ipaddr>127.0.0.1/32 == 127.0.0.1
-data true
+match true
 
 condition <ipaddr>127.0.0.1/327 == 127.0.0.1
-data ERROR offset 8 Failed to parse field
+match ERROR offset 8 Failed to parse field
 
 condition <ipaddr>127.0.0.1/32 == 127.0.0.1
-data true
+match true
 
 condition (/foo/)
-data ERROR offset 1 Unexpected regular expression
+match ERROR offset 1 Unexpected regular expression
 
 #
 #  Tests for (FOO).
 #
 condition (1)
-data true
+match true
 
 condition (0)
-data false
+match false
 
 condition (true)
-data true
+match true
 
 condition (false)
-data false
+match false
 
 condition ('')
-data false
+match false
 
 condition ("")
-data false
+match false
 
 #
 #  Integers are true, as are non-zero strings
 #
 condition (4)
-data true
+match true
 
 condition ('a')
-data true
+match true
 
 condition (a)
-data ERROR offset 1 Expected a module return code
+match ERROR offset 1 Expected a module return code
 
 #
 #  Module return codes are OK
 #
 condition (ok)
-data ok
+match ok
 
 condition (handled)
-data handled
+match handled
 
 condition (fail)
-data fail
+match fail
 
 condition ("a")
-data true
+match true
 
 condition (`a`)
-data `a`
+match `a`
 
 condition (&User-name)
-data &User-Name
+match &User-Name
 
 #
 #  Forbidden data types in cast
 #
 condition (<vsa>"foo" == &User-Name)
-data ERROR offset 2 Forbidden data type in cast
+match ERROR offset 2 Forbidden data type in cast
 
 #
 #  If the LHS is a cast to a type, and the RHS is an attribute
@@ -410,74 +410,74 @@ data ERROR offset 2 Forbidden data type in cast
 #  is on the LHS of the condition.
 #
 condition <string>"foo" == &User-Name
-data &User-Name == "foo"
+match &User-Name == "foo"
 
 condition <integer>"%{expr: 1 + 1}" < &NAS-Port
-data &NAS-Port > "%{expr: 1 + 1}"
+match &NAS-Port > "%{expr: 1 + 1}"
 
 condition &Filter-Id == &Framed-IP-Address
-data ERROR offset 0 Attribute comparisons must be of the same data type
+match ERROR offset 0 Attribute comparisons must be of the same data type
 
 condition <ipaddr>127.0.0.1 == &Filter-Id
-data ERROR offset 0 Attribute comparisons must be of the same data type
+match ERROR offset 0 Attribute comparisons must be of the same data type
 
 condition &Tmp-Integer64-0 == &request:Foo-Stuff-Bar
-data &Tmp-Integer64-0 == &Foo-Stuff-Bar
+match &Tmp-Integer64-0 == &Foo-Stuff-Bar
 
 condition &Tmp-Integer64-0 == &reply:Foo-Stuff-Bar
-data &Tmp-Integer64-0 == &reply:Foo-Stuff-Bar
+match &Tmp-Integer64-0 == &reply:Foo-Stuff-Bar
 
 #
 #  Casting attributes of different size
 #
 condition <ipaddr>&Tmp-Integer64-0 == &Framed-IP-Address
-data ERROR offset 0 Cannot cast to attribute of incompatible size
+match ERROR offset 0 Cannot cast to attribute of incompatible size
 
 condition <ipaddr>&PMIP6-Home-IPv4-HoA == &Framed-IP-Address
-data ERROR offset 0 Cannot cast to attribute of incompatible size
+match ERROR offset 0 Cannot cast to attribute of incompatible size
 
 # but these are allowed
 condition <ether>&Tmp-Integer64-0 == "%{module: foo}"
-data <ether>&Tmp-Integer64-0 == "%{module: foo}"
+match <ether>&Tmp-Integer64-0 == "%{module: foo}"
 
 condition <ipaddr>&Filter-Id == &Framed-IP-Address
-data <ipaddr>&Filter-Id == &Framed-IP-Address
+match <ipaddr>&Filter-Id == &Framed-IP-Address
 
 condition <ipaddr>&Class == &Framed-IP-Address
-data <ipaddr>&Class == &Framed-IP-Address
+match <ipaddr>&Class == &Framed-IP-Address
 
 #
 #  Tags of zero mean there's no tag
 #
 condition &Tunnel-Password:0 == "Hello"
-data &Tunnel-Password == "Hello"
+match &Tunnel-Password == "Hello"
 
 condition &Tunnel-Password:1 == "Hello"
-data &Tunnel-Password:1 == "Hello"
+match &Tunnel-Password:1 == "Hello"
 
 #
 # Single quoted strings are left as-is
 #
 condition &Tunnel-Password:1 == 'Hello'
-data &Tunnel-Password:1 == 'Hello'
+match &Tunnel-Password:1 == 'Hello'
 
 #
 #  zero offset into arrays get parsed and ignored
 #
 condition &User-Name[0] == "bob"
-data &User-Name[0] == "bob"
+match &User-Name[0] == "bob"
 
 condition &User-Name[1] == "bob"
-data &User-Name[1] == "bob"
+match &User-Name[1] == "bob"
 
 condition &User-Name[n] == "bob"
-data &User-Name[n] == "bob"
+match &User-Name[n] == "bob"
 
 condition &Tunnel-Password:1[0] == "Hello"
-data &Tunnel-Password:1[0] == "Hello"
+match &Tunnel-Password:1[0] == "Hello"
 
 condition &Tunnel-Password:1[3] == "Hello"
-data &Tunnel-Password:1[3] == "Hello"
+match &Tunnel-Password:1[3] == "Hello"
 
 #
 #  This is allowed for pass2-fixups.  Foo-Bar MAY be an attribute.
@@ -485,7 +485,7 @@ data &Tunnel-Password:1[3] == "Hello"
 #  it's an unknown attribute
 #
 condition &Foo-Bar
-data &Foo-Bar
+match &Foo-Bar
 
 #  Same types are optimized
 #
@@ -495,17 +495,17 @@ data &Foo-Bar
 #      data &Acct-Input-Octets > &Session-Timeout
 #
 condition &Acct-Input-Octets > "%{Session-Timeout}"
-data &Acct-Input-Octets > "%{Session-Timeout}"
+match &Acct-Input-Octets > "%{Session-Timeout}"
 
 #  Separate types aren't optimized
 condition &Acct-Input-Octets-64 > "%{Session-Timeout}"
-data &Acct-Input-Octets-64 > "%{Session-Timeout}"
+match &Acct-Input-Octets-64 > "%{Session-Timeout}"
 
 #
 #  Parse OIDs into known attributes, where possible.
 #
 condition &Attr-26.24757.84.9.5.4 == 0x1a99
-data &WiMAX-PFDv2-Src-Port == 6809
+match &WiMAX-PFDv2-Src-Port == 6809
 
 #
 #  This OID is known, but the data is malformed.
@@ -513,153 +513,153 @@ data &WiMAX-PFDv2-Src-Port == 6809
 #  in packets.
 #
 condition &Attr-26.24757.84.9.5.7 == 0x1a99
-data &Attr-26.24757.84.9.5.7 == 0x1a99
+match &Attr-26.24757.84.9.5.7 == 0x1a99
 
 #  This one is really unknown
 condition &Attr-26.24757.84.9.5.15 == 0x1a99
-data &Attr-26.24757.84.9.5.15 == 0x1a99
+match &Attr-26.24757.84.9.5.15 == 0x1a99
 
 #
 #  Invalid array references.
 #
 condition &User-Name[a] == 'bob'
-data ERROR offset 11 Array index is not an integer
+match ERROR offset 11 Array index is not an integer
 
 condition &User-Name == &Filter-Id[a]
-data ERROR offset 25 Array index is not an integer
+match ERROR offset 25 Array index is not an integer
 
 #
 #  This one is still wrong.
 #
 condition User-Name[a] == 'bob'
-data ERROR offset 9 Invalid text. Expected comparison operator
+match ERROR offset 9 Invalid text. Expected comparison operator
 
 #
 #  Bounds checks...
 #
 condition &User-Name[1001] == 'bob'
-data ERROR offset 11 Invalid array reference '1001' (should be between 0-1000)
+match ERROR offset 11 Invalid array reference '1001' (should be between 0-1000)
 
 condition &User-Name[-1] == 'bob'
-data ERROR offset 11 Array index is not an integer
+match ERROR offset 11 Array index is not an integer
 
 #
 #  Tags
 #
 condition &Tunnel-Private-Group-Id:10 == 'test'
-data &Tunnel-Private-Group-Id:10 == 'test'
+match &Tunnel-Private-Group-Id:10 == 'test'
 
 condition &User-Name:10 == 'test'
-data ERROR offset 10 Attribute 'User-Name' cannot have a tag
+match ERROR offset 10 Attribute 'User-Name' cannot have a tag
 
 #
 #  Tags are always wrong for attributes which aren't tagged.
 #
 condition &User-Name:0 == 'test'
-data ERROR offset 10 Attribute 'User-Name' cannot have a tag
+match ERROR offset 10 Attribute 'User-Name' cannot have a tag
 
 #
 #  Bounds checks...
 #
 condition &Tunnel-Private-Group-Id:32 == 'test'
-data ERROR offset 25 Invalid tag value '32' (should be between 0-31)
+match ERROR offset 25 Invalid tag value '32' (should be between 0-31)
 
 condition &request:Tunnel-Private-Group-Id:-1 == 'test'
-data ERROR offset 33 Invalid tag value '-1' (should be between 0-31)
+match ERROR offset 33 Invalid tag value '-1' (should be between 0-31)
 
 #
 #  Sometimes the attribute/condition parser needs to fallback to bare words
 #
 condition request:Foo == 'request:Foo'
-data true
+match true
 
 condition request:Foo+Bar == request:Foo+Bar
-data ERROR offset 11 Invalid text. Expected comparison operator
+match ERROR offset 11 Invalid text. Expected comparison operator
 
 condition &request:Foo+Bar == 'request:Foo+Bar'
-data ERROR offset 12 Invalid text. Expected comparison operator
+match ERROR offset 12 Invalid text. Expected comparison operator
 
 condition 'request:Foo+d' == &request:Foo+Bar
-data ERROR offset 31 Unexpected text after condition
+match ERROR offset 31 Unexpected text after condition
 
 #  Attribute tags are not allowed for unknown attributes
 condition &request:FooBar:0 == &request:FooBar
-data ERROR offset 15 Unexpected text after attribute name
+match ERROR offset 15 Unexpected text after attribute name
 
 condition &not-a-list:User-Name == &not-a-list:User-Name
-data ERROR offset 1 Invalid list qualifier
+match ERROR offset 1 Invalid list qualifier
 
 # . is a valid dictionary name attribute, so we can't error out in pass1
 condition &not-a-packet.User-Name == &not-a-packet.User-Name
-data &not-a-packet.User-Name == &not-a-packet.User-Name
+match &not-a-packet.User-Name == &not-a-packet.User-Name
 
 #
 #  The LHS is a string with ASCII 5C 30 30 30 inside of it.
 #
 condition ('i have scary embedded things\000 inside me' == "i have scary embedded things\000 inside me")
-data false
+match false
 
 #
 #  'Unknown' attributes which are defined in the main dictionary
 #  should be resolved to their real names.
 condition &Attr-1 == 0x616263
-data &User-Name == 'abc'
+match &User-Name == 'abc'
 
 condition &Attr-26.11344.1 == 0x7f000001
-data &FreeRADIUS-Proxied-To == 127.0.0.1
+match &FreeRADIUS-Proxied-To == 127.0.0.1
 
 #
 #  Escape the backslashes correctly
 #  And print them correctly
 #
 condition &User-Name == '\\'
-data &User-Name == '\\'
+match &User-Name == '\\'
 
 condition &User-Name == "@|\\"
-data &User-Name == "@|\\"
+match &User-Name == "@|\\"
 
 condition &User-Name != "foo\nbar"
-data !&User-Name == "foo\nbar"
+match !&User-Name == "foo\nbar"
 
 #
 #  We require explicit casts
 #
 condition 192.168.0.0/16 > 192.168.1.2
-data false
+match false
 
 condition <ipv4prefix>192.168.0.0/16 > 192.168.1.2
-data true
+match true
 
 condition <ipv4prefix>&NAS-IP-Address == 192.168.0.0/24
-data <ipv4prefix>&NAS-IP-Address == 192.168.0.0/24
+match <ipv4prefix>&NAS-IP-Address == 192.168.0.0/24
 
 condition <ipv4prefix>192.168.0.0/24 > &NAS-IP-Address
-data <ipv4prefix>192.168.0.0/24 > &NAS-IP-Address
+match <ipv4prefix>192.168.0.0/24 > &NAS-IP-Address
 
 #
 #  We add casts to the LHS if necessary
 #
 condition &NAS-IP-Address < &PMIP6-Home-IPv4-HoA
-data <ipv4prefix>&NAS-IP-Address < &PMIP6-Home-IPv4-HoA
+match <ipv4prefix>&NAS-IP-Address < &PMIP6-Home-IPv4-HoA
 
 condition &NAS-IP-Address < 192.168/16
-data <ipv4prefix>&NAS-IP-Address < 192.168.0.0/16
+match <ipv4prefix>&NAS-IP-Address < 192.168.0.0/16
 
 condition &NAS-IP-Address < "%{echo: 192.168/16}"
-data <ipv4prefix>&NAS-IP-Address < "%{echo: 192.168/16}"
+match <ipv4prefix>&NAS-IP-Address < "%{echo: 192.168/16}"
 
 condition &NAS-IP-Address < `/bin/echo 192.168/16`
-data <ipv4prefix>&NAS-IP-Address < `/bin/echo 192.168/16`
+match <ipv4prefix>&NAS-IP-Address < `/bin/echo 192.168/16`
 
 #
 #  This is allowed and means "the list is not empty"
 #
 condition (&reply:)
-data &reply:
+match &reply:
 
 #
 #  Expansions of environment variables
 #  and empty strings
 #
 condition ("$ENV{SOMETHING_OR_OTHER}" == '')
-data true
+match true
index 455485003f546f5b70038edd0032c3fa4a560743..0e1d9169b5249683729e27fa4d70e75f3b568e89 100644 (file)
@@ -2,14 +2,14 @@
 #  Parse / print data types
 #
 value uint32 0
-data 0
+match 0
 
 value ipaddr 127.0.0.1
-data 127.0.0.1
+match 127.0.0.1
 
 #  And canonicalized
 value ipaddr 127.0.0.001
-data 127.0.0.1
+match 127.0.0.1
 
 #
 #  Time deltas can have qualifiers, but they're always printed
@@ -18,61 +18,61 @@ data 127.0.0.1
 #  Unless the attribute (which we don't have here) has a scale defined
 #
 value time_delta 1
-data 1
+match 1
 
 value time_delta 2.4
-data 2.4
+match 2.4
 
 value time_delta 1ms
-data 0.001
+match 0.001
 
 value time_delta 1us
-data 0.000001
+match 0.000001
 
 value time_delta 1.5us
-data 0.0000015
+match 0.0000015
 
 value time_delta 1ns
-data 0.000000001
+match 0.000000001
 
 value time_delta 1:30
-data 90
+match 90
 
 value uint8 256
-data Value 256 is invalid for type uint8 (must be in range 0...255)
+match Value 256 is invalid for type uint8 (must be in range 0...255)
 
 value uint8 -128
-data Invalid negative value "-128" for unsigned integer
+match Invalid negative value "-128" for unsigned integer
 
 value int8 128
-data Value 128 is invalid for type int8 (must be in range -128...127)
+match Value 128 is invalid for type int8 (must be in range -128...127)
 
 value int8 -128
-data -128
+match -128
 
 value int8 -130
-data Value -130 is invalid for type int8 (must be in range -128...127)
+match Value -130 is invalid for type int8 (must be in range -128...127)
 
 value date Jan  1 1970 12:00:00 UTC
-data Jan  1 1970 12:00:00 UTC
+match Jan  1 1970 12:00:00 UTC
 
 #
 #  10 days in
 #
 value date 864000
-data Jan 11 1970 00:00:00 UTC
+match Jan 11 1970 00:00:00 UTC
 
 # 100 days
 value date 8640000
-data Apr 11 1970 00:00:00 UTC
+match Apr 11 1970 00:00:00 UTC
 
 # 1,000 days
 value date 86400000
-data Sep 27 1972 00:00:00 UTC
+match Sep 27 1972 00:00:00 UTC
 
 # 10,000 days
 value date 864000000
-data May 19 1997 00:00:00 UTC
+match May 19 1997 00:00:00 UTC
 
 #
 #  Input can be whatever.  But for the tests, output is UTC.
@@ -82,7 +82,7 @@ data May 19 1997 00:00:00 UTC
 #  Our parse function ignores time zones, which is bad.
 #
 value date Aug 21 2019 07:43:03 EDT
-data Aug 21 2019 07:43:03 UTC
+match Aug 21 2019 07:43:03 UTC
 
 #
 #  Can't yet test this as the parse / print / parse / cmp
index 10a219706c8b51221e4f301b319bd2d594d4b634..6abe9bb1c9936c610cd1ab01dd6583dce658c0ae 100644 (file)
@@ -8,74 +8,74 @@ dictionary-load dhcpv4
 #  DHCP TLV types
 #
 encode-pair DHCP-Relay-Circuit-Id = 0xabcdef, DHCP-Relay-Remote-Id = 0x010203040506
-data 52 0d 01 03 ab cd ef 02 06 01 02 03 04 05 06
+match 52 0d 01 03 ab cd ef 02 06 01 02 03 04 05 06
 
 decode-pair -
-data DHCP-Relay-Circuit-Id = 0xabcdef, DHCP-Relay-Remote-Id = 0x010203040506
+match DHCP-Relay-Circuit-Id = 0xabcdef, DHCP-Relay-Remote-Id = 0x010203040506
 
 encode-pair DHCP-Subnet-Mask = 255.255.0.0
-data 01 04 ff ff 00 00
+match 01 04 ff ff 00 00
 
 decode-pair -
-data DHCP-Subnet-Mask = 255.255.0.0
+match DHCP-Subnet-Mask = 255.255.0.0
 
 # Packing multiple fixed length attributes
 encode-pair DHCP-CAPWAP-AC-IPv4-Address = 127.0.0.1, DHCP-CAPWAP-AC-IPv4-Address = 192.168.3.1
-data 8a 08 7f 00 00 01 c0 a8 03 01
+match 8a 08 7f 00 00 01 c0 a8 03 01
 
 # Overflow with multiple fixed length attributes (16x16)
 encode-pair DHCP-ANDSF-IPv6-Address = fe80::1, DHCP-ANDSF-IPv6-Address = fe80::2, DHCP-ANDSF-IPv6-Address = fe80::3, DHCP-ANDSF-IPv6-Address = fe80::4, DHCP-ANDSF-IPv6-Address = fe80::5, DHCP-ANDSF-IPv6-Address = fe80::6, DHCP-ANDSF-IPv6-Address = fe80::7, DHCP-ANDSF-IPv6-Address = fe80::8, DHCP-ANDSF-IPv6-Address = fe80::9, DHCP-ANDSF-IPv6-Address = fe80::a, DHCP-ANDSF-IPv6-Address = fe80::b, DHCP-ANDSF-IPv6-Address = fe80::c, DHCP-ANDSF-IPv6-Address = fe80::d, DHCP-ANDSF-IPv6-Address = fe80::e, DHCP-ANDSF-IPv6-Address = fe80::f, DHCP-ANDSF-IPv6-Address = fe80::10
 
-data 8f f0 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 01 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 02 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 03 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 04 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 05 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 06 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 07 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 08 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 09 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0a fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0b fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0c fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0d fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0e fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0f 8f 10 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 10
+match 8f f0 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 01 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 02 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 03 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 04 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 05 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 06 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 07 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 08 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 09 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0a fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0b fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0c fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0d fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0e fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 0f 8f 10 fe 80 00 00 00 00 00 00 00 00 00 00 00 00 00 10
 
 decode-pair -
-data DHCP-ANDSF-IPv6-Address = fe80::1, DHCP-ANDSF-IPv6-Address = fe80::2, DHCP-ANDSF-IPv6-Address = fe80::3, DHCP-ANDSF-IPv6-Address = fe80::4, DHCP-ANDSF-IPv6-Address = fe80::5, DHCP-ANDSF-IPv6-Address = fe80::6, DHCP-ANDSF-IPv6-Address = fe80::7, DHCP-ANDSF-IPv6-Address = fe80::8, DHCP-ANDSF-IPv6-Address = fe80::9, DHCP-ANDSF-IPv6-Address = fe80::a, DHCP-ANDSF-IPv6-Address = fe80::b, DHCP-ANDSF-IPv6-Address = fe80::c, DHCP-ANDSF-IPv6-Address = fe80::d, DHCP-ANDSF-IPv6-Address = fe80::e, DHCP-ANDSF-IPv6-Address = fe80::f, DHCP-ANDSF-IPv6-Address = fe80::10
+match DHCP-ANDSF-IPv6-Address = fe80::1, DHCP-ANDSF-IPv6-Address = fe80::2, DHCP-ANDSF-IPv6-Address = fe80::3, DHCP-ANDSF-IPv6-Address = fe80::4, DHCP-ANDSF-IPv6-Address = fe80::5, DHCP-ANDSF-IPv6-Address = fe80::6, DHCP-ANDSF-IPv6-Address = fe80::7, DHCP-ANDSF-IPv6-Address = fe80::8, DHCP-ANDSF-IPv6-Address = fe80::9, DHCP-ANDSF-IPv6-Address = fe80::a, DHCP-ANDSF-IPv6-Address = fe80::b, DHCP-ANDSF-IPv6-Address = fe80::c, DHCP-ANDSF-IPv6-Address = fe80::d, DHCP-ANDSF-IPv6-Address = fe80::e, DHCP-ANDSF-IPv6-Address = fe80::f, DHCP-ANDSF-IPv6-Address = fe80::10
 
 #
 #  A long one... with a weird DHCP-specific vendor ID.
 #
 decode-pair 3501013d0701001ceaadac1e37070103060f2c2e2f3c094d5346545f495054565232011c4c41424f4c54322065746820312f312f30312f30312f31302f312f3209120000197f0d050b4c4142373336304f4c5432
-data DHCP-Message-Type = DHCP-Discover, DHCP-Client-Identifier = 0x01001ceaadac1e, DHCP-Parameter-Request-List = DHCP-Subnet-Mask, DHCP-Parameter-Request-List = DHCP-Router-Address, DHCP-Parameter-Request-List = DHCP-Domain-Name-Server, DHCP-Parameter-Request-List = DHCP-Domain-Name, DHCP-Parameter-Request-List = DHCP-NETBIOS-Name-Servers, DHCP-Parameter-Request-List = DHCP-NETBIOS-Node-Type, DHCP-Parameter-Request-List = DHCP-NETBIOS, DHCP-Vendor-Class-Identifier = 0x4d5346545f49505456, DHCP-Relay-Circuit-Id = 0x4c41424f4c54322065746820312f312f30312f30312f31302f312f32, DHCP-Vendor-Specific-Information = 0x0000197f0d050b4c4142373336304f4c5432
+match DHCP-Message-Type = DHCP-Discover, DHCP-Client-Identifier = 0x01001ceaadac1e, DHCP-Parameter-Request-List = DHCP-Subnet-Mask, DHCP-Parameter-Request-List = DHCP-Router-Address, DHCP-Parameter-Request-List = DHCP-Domain-Name-Server, DHCP-Parameter-Request-List = DHCP-Domain-Name, DHCP-Parameter-Request-List = DHCP-NETBIOS-Name-Servers, DHCP-Parameter-Request-List = DHCP-NETBIOS-Node-Type, DHCP-Parameter-Request-List = DHCP-NETBIOS, DHCP-Vendor-Class-Identifier = 0x4d5346545f49505456, DHCP-Relay-Circuit-Id = 0x4c41424f4c54322065746820312f312f30312f30312f31302f312f32, DHCP-Vendor-Specific-Information = 0x0000197f0d050b4c4142373336304f4c5432
 
 #
 #  Two sub-options 82, that cannot fit in a single option.
 #
 encode-pair DHCP-Agent-Circuit-Id = 'oh hai this is an agent, how are you doing DHCP server? this is a really long agent circuit id, which will occupy most of the maximum size for an option so that the next sub option will not fit and a new option will be needed', DHCP-Agent-Remote-Id = 'trying to add a sub option agent remote id'
-data 52 e3 01 e1 6f 68 20 68 61 69 20 74 68 69 73 20 69 73 20 61 6e 20 61 67 65 6e 74 2c 20 68 6f 77 20 61 72 65 20 79 6f 75 20 64 6f 69 6e 67 20 44 48 43 50 20 73 65 72 76 65 72 3f 20 74 68 69 73 20 69 73 20 61 20 72 65 61 6c 6c 79 20 6c 6f 6e 67 20 61 67 65 6e 74 20 63 69 72 63 75 69 74 20 69 64 2c 20 77 68 69 63 68 20 77 69 6c 6c 20 6f 63 63 75 70 79 20 6d 6f 73 74 20 6f 66 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 73 69 7a 65 20 66 6f 72 20 61 6e 20 6f 70 74 69 6f 6e 20 73 6f 20 74 68 61 74 20 74 68 65 20 6e 65 78 74 20 73 75 62 20 6f 70 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 66 69 74 20 61 6e 64 20 61 20 6e 65 77 20 6f 70 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 6e 65 65 64 65 64 52 2c 02 2a 74 72 79 69 6e 67 20 74 6f 20 61 64 64 20 61 20 73 75 62 20 6f 70 74 69 6f 6e 20 61 67 65 6e 74 20 72 65 6d 6f 74 65 20 69 64
+match 52 e3 01 e1 6f 68 20 68 61 69 20 74 68 69 73 20 69 73 20 61 6e 20 61 67 65 6e 74 2c 20 68 6f 77 20 61 72 65 20 79 6f 75 20 64 6f 69 6e 67 20 44 48 43 50 20 73 65 72 76 65 72 3f 20 74 68 69 73 20 69 73 20 61 20 72 65 61 6c 6c 79 20 6c 6f 6e 67 20 61 67 65 6e 74 20 63 69 72 63 75 69 74 20 69 64 2c 20 77 68 69 63 68 20 77 69 6c 6c 20 6f 63 63 75 70 79 20 6d 6f 73 74 20 6f 66 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 73 69 7a 65 20 66 6f 72 20 61 6e 20 6f 70 74 69 6f 6e 20 73 6f 20 74 68 61 74 20 74 68 65 20 6e 65 78 74 20 73 75 62 20 6f 70 74 69 6f 6e 20 77 69 6c 6c 20 6e 6f 74 20 66 69 74 20 61 6e 64 20 61 20 6e 65 77 20 6f 70 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 6e 65 65 64 65 64 52 2c 02 2a 74 72 79 69 6e 67 20 74 6f 20 61 64 64 20 61 20 73 75 62 20 6f 70 74 69 6f 6e 20 61 67 65 6e 74 20 72 65 6d 6f 74 65 20 69 64
 
 #  An empty option (Rapid Commit)
 encode-pair DHCP-Rapid-Commit = ''
-data 50 00
+match 50 00
 
 #
 #  Decoding empty options yields empty data
 #
 decode-pair -
-data DHCP-Rapid-Commit = 0x
+match DHCP-Rapid-Commit = 0x
 
 # 255 bytes are OK
 encode-pair DHCP-Domain-Name = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-data 0f ff 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
+match 0f ff 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
 
 encode-pair DHCP-Merit-Dump-File="1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"
-data 0e ff 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 0e 01 36
+match 0e ff 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 0e 01 36
 
 # A very long option should be split automatically
 encode-pair DHCP-Domain-Name = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-data 0f ff 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 0f 2d 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
+match 0f ff 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 0f 2d 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78
 
 
 #
 #  3 isn't used for anything, and should just be treated as an unknown attribute
 #
 decode-pair 52 07 01 03 ab cd ef 03 00
-data DHCP-Relay-Circuit-Id = 0xabcdef, Attr-82.3 = 0x
+match DHCP-Relay-Circuit-Id = 0xabcdef, Attr-82.3 = 0x
 
 decode-pair 52 07 01 03 ab cd ef 03 01 ad
-data DHCP-Relay-Circuit-Id = 0xabcdef, Attr-82.3 = 0xad
+match DHCP-Relay-Circuit-Id = 0xabcdef, Attr-82.3 = 0xad
 
 #
 #  And option 82 with full suboptions
 #
 encode-pair DHCP-Agent-Circuit-Id = "123456789a123456789b123456789c123456789d123456789e123456789f123456789g123456789h123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789a123456789axyz"
-data 52 ff 01 fd 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 62 31 32 33 34 35 36 37 38 39 63 31 32 33 34 35 36 37 38 39 64 31 32 33 34 35 36 37 38 39 65 31 32 33 34 35 36 37 38 39 66 31 32 33 34 35 36 37 38 39 67 31 32 33 34 35 36 37 38 39 68 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 78 79 7a
+match 52 ff 01 fd 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 62 31 32 33 34 35 36 37 38 39 63 31 32 33 34 35 36 37 38 39 64 31 32 33 34 35 36 37 38 39 65 31 32 33 34 35 36 37 38 39 66 31 32 33 34 35 36 37 38 39 67 31 32 33 34 35 36 37 38 39 68 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 31 32 33 34 35 36 37 38 39 61 78 79 7a
index 9fe92b78d93c08270bb2651b946c84e02d58942d..fd2db1aa6a030adf20ec03bfcfbfeb654d200aeb 100644 (file)
@@ -8,168 +8,168 @@ dictionary-load dhcpv6
 #  Simple string type
 #
 encode-pair Subscriber-ID = "fred"
-data 00 26 00 04 66 72 65 64
+match 00 26 00 04 66 72 65 64
 
 encode-pair Subscriber-ID = "bob", New-Posix-Timezone = "GB"
-data 00 26 00 03 62 6f 62 00 29 00 02 47 42
+match 00 26 00 03 62 6f 62 00 29 00 02 47 42
 
 # Zero length string
 encode-pair Subscriber-ID = ""
-data 00 26 00 00
+match 00 26 00 00
 
 #
 #  Bool
 #
 encode-pair Rapid-Commit = yes
-data 00 0e 00 00
+match 00 0e 00 00
 
 encode-pair Rapid-Commit = no
-data
+match
 
 #
 #  1 byte unsigned integer (uint8)
 #
 encode-pair Preference = 255
-data 00 07 00 01 ff
+match 00 07 00 01 ff
 
 encode-pair Preference = 0
-data 00 07 00 01 00
+match 00 07 00 01 00
 
 #
 #  2 byte unsigned integer (uint16)
 #
 encode-pair ANI-Access-Technology-Type = 3GPP2-NB-IOT
-data 00 69 00 02 00 0d
+match 00 69 00 02 00 0d
 
 #
 #  4 byte unsigned integer (uint32)
 #
 encode-pair Information-Refresh-Time = 99
-data 00 20 00 04 00 00 00 63
+match 00 20 00 04 00 00 00 63
 
 #
 #  Date. Like a 32bit unix timestamp but starts from 1st Jan 2000 instead of 1st Jan 1970
 #
 encode-pair Failover-Expiration-Time = 0
-data 00 78 00 04 00 00 00 00
+match 00 78 00 04 00 00 00 00
 
 # Still less than 946080000 (30 years), so still 0 (we can't represent dates earlier than 1st Jan 2000)
 encode-pair Failover-Expiration-Time = 500
-data 00 78 00 04 00 00 00 00
+match 00 78 00 04 00 00 00 00
 
 encode-pair Failover-Expiration-Time = 946080000
-data 00 78 00 04 00 00 00 00
+match 00 78 00 04 00 00 00 00
 
 # 1st second of 1st Jan 2000
 encode-pair Failover-Expiration-Time = 946080001
-data 00 78 00 04 00 00 00 01
+match 00 78 00 04 00 00 00 01
 
 #
 #  Encode ipv6address
 #
 encode-pair Unicast = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
-data 00 0c 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
+match 00 0c 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 # Scope should be ignored.  We use %0 as numbered scopes work everywhere, interfaces don't
 encode-pair Unicast = 2001:0db8:85a3:0000:0000:8a2e:0370:7334%0
-data 00 0c 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
+match 00 0c 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 #
 #  Encode ipv6prefix
 #
 encode-pair MIP6-Home-Net-Prefix = 2001:db8::/32
-data 00 47 00 05 20 20 01 0d b8
+match 00 47 00 05 20 20 01 0d b8
 
 # Prefix truncates address portion
 encode-pair MIP6-Home-Net-Prefix = 2001:db8:00ff::/32
-data 00 47 00 05 20 20 01 0d b8
+match 00 47 00 05 20 20 01 0d b8
 
 # Prefix longer than address portion
 encode-pair MIP6-Home-Net-Prefix = 2001:db8:00ff::/64
-data 00 47 00 09 40 20 01 0d b8 00 ff 00 00
+match 00 47 00 09 40 20 01 0d b8 00 ff 00 00
 
 encode-pair MIP6-Home-Net-Prefix = 2001:0db8:85a3:0000:0000:8a2e:0370:7334/128
-data 00 47 00 11 80 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
+match 00 47 00 11 80 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 # Cast ipv6addr to 128bit prefix
 encode-pair MIP6-Home-Net-Prefix = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
-data 00 47 00 11 80 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
+match 00 47 00 11 80 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 # 0 bit prefix
 encode-pair MIP6-Home-Net-Prefix = ::/0
-data 00 47 00 01 00
+match 00 47 00 01 00
 
 # v4 address - Check the correct 4in6 prefix is added
 encode-pair MIP6-Home-Net-Prefix = ::ffff:192.168.0.1
-data 00 47 00 11 80 00 00 00 00 00 00 00 00 00 00 ff ff c0 a8 00 01
+match 00 47 00 11 80 00 00 00 00 00 00 00 00 00 00 ff ff c0 a8 00 01
 
 #
 #  Array of 16bit integers
 #
 encode-pair Client-Arch-Type = x86-BIOS, Client-Arch-Type = ARM-64-Uboot
-data 00 3d 00 04 00 00 00 16
+match 00 3d 00 04 00 00 00 16
 
 #
 #  Two different arrays of 16bit integers
 #
 encode-pair Client-Arch-Type = x86-BIOS, Client-Arch-Type = ARM-64-Uboot, S46-Priority = DS-Lite, S46-Priority = MAP-E
-data 00 3d 00 04 00 00 00 16 00 6f 00 04 00 40 00 5e
+match 00 3d 00 04 00 00 00 16 00 6f 00 04 00 40 00 5e
 
 #
 #  Array type with one element
 #
 encode-pair Client-Arch-Type = x86-BIOS
-data 00 3d 00 02 00 00
+match 00 3d 00 02 00 00
 
 #
 #  Array of IPv6 addresses
 #
 encode-pair SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, SIP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
-data 00 16 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
+match 00 16 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
 
 #
 #  Array of strings, each substring should have a 16bit length field containing its length
 #
 encode-pair Bootfile-Param = "I LIKE CHICKEN",  Bootfile-Param = "I LIKE LIVER"
-data 00 3c 00 1e 00 0e 49 20 4c 49 4b 45 20 43 48 49 43 4b 45 4e 00 0c 49 20 4c 49 4b 45 20 4c 49 56 45 52
+match 00 3c 00 1e 00 0e 49 20 4c 49 4b 45 20 43 48 49 43 4b 45 4e 00 0c 49 20 4c 49 4b 45 20 4c 49 56 45 52
 
 # Still needs to add the length field with only one element
 encode-pair Bootfile-Param = "MEOW MIX MEOW MIX"
-data 00 3c 00 13 00 11 4d 45 4f 57 20 4d 49 58 20 4d 45 4f 57 20 4d 49 58
+match 00 3c 00 13 00 11 4d 45 4f 57 20 4d 49 58 20 4d 45 4f 57 20 4d 49 58
 
 encode-pair Bootfile-Param = ""
-data 00 3c 00 02 00 00
+match 00 3c 00 02 00 00
 
 encode-pair Bootfile-Param = "",  Bootfile-Param = "foo"
-data 00 3c 00 07 00 00 00 03 66 6f 6f
+match 00 3c 00 07 00 00 00 03 66 6f 6f
 
 #
 #  Variable length octets array
 #
 encode-pair User-Class = 0x010203, User-Class = 0x02040810
-data 00 0f 00 0b 00 03 01 02 03 00 04 02 04 08 10
+match 00 0f 00 0b 00 03 01 02 03 00 04 02 04 08 10
 
 encode-pair User-Class = 0x010203
-data 00 0f 00 05 00 03 01 02 03
+match 00 0f 00 05 00 03 01 02 03
 
 encode-pair User-Class = 0x, User-Class = 0x
-data 00 0f 00 04 00 00 00 00
+match 00 0f 00 04 00 00 00 00
 
 #
 #  TLV with array type values
 #
 encode-pair MOS-Address-IS = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
-data 00 36 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
+match 00 36 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 encode-pair MOS-Address-IS = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, MOS-Address-IS = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
-data 00 36 00 24 00 01 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
+match 00 36 00 24 00 01 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
 
 encode-pair MOS-Address-IS = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, MOS-Address-ES = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
-data 00 36 00 28 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 00 03 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
+match 00 36 00 28 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 00 03 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
 
 #
 #  TLV with single values
 #
 encode-pair NTP-Server-Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
-data 00 38 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
+match 00 38 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
index acf8333d9baeeadaeb51d50cdbc70887e997b6ac..8f26e3c8111e8e988fab1d1952bcc3ffb9148978 100644 (file)
@@ -8,83 +8,83 @@ dictionary-load radius
 #  VALUEs
 #
 dictionary VALUE       Unit-Enumv      Foo     bar
-data Invalid VALUE for ATTRIBUTE "Unit-Enumv": Invalid integer value "bar"
+match Invalid VALUE for ATTRIBUTE "Unit-Enumv": Invalid integer value "bar"
 
 dictionary VALUE       Unit-Byte       TooBig  256
-data Invalid VALUE for ATTRIBUTE "Unit-Byte": Value 256 is invalid for type uint8 (must be in range 0-255)
+match Invalid VALUE for ATTRIBUTE "Unit-Byte": Value 256 is invalid for type uint8 (must be in range 0-255)
 
 dictionary VALUE       Unit-Byte       Too-Small       -1
-data Invalid VALUE for ATTRIBUTE "Unit-Byte": Value 18446744073709551615 is invalid for type uint8 (must be in range 0-255)
+match Invalid VALUE for ATTRIBUTE "Unit-Byte": Value 18446744073709551615 is invalid for type uint8 (must be in range 0-255)
 
 dictionary VALUE       Unit-Short      Too-Big 65537
-data Invalid VALUE for ATTRIBUTE "Unit-Short": Value 65537 is invalid for type uint16 (must be in range 0-65535)
+match Invalid VALUE for ATTRIBUTE "Unit-Short": Value 65537 is invalid for type uint16 (must be in range 0-65535)
 
 # Check non-uint32 types
 dictionary VALUE       Unit-Integer64  OK         1
-data ok
+match ok
 
 dictionary VALUE       Unit-Octets     Porridge        1
-data ok
+match ok
 
 dictionary VALUE       Unit-Byte       Life    42
-data ok
+match ok
 
 # re-defining it is not OK
 dictionary VALUE       Unit-Byte       Life    43
-data Duplicate VALUE alias "Life" for attribute "Unit-Byte". Old value was "42", new value was "43"
+match Duplicate VALUE alias "Life" for attribute "Unit-Byte". Old value was "42", new value was "43"
 
 
 #
 #  ATTRIBUTEs
 #
 dictionary ATTRIBUTE   Foo
-data Invalid ATTRIBUTE syntax
+match Invalid ATTRIBUTE syntax
 
 dictionary ATTRIBUTE   Attr-26         26              octets
-data Invalid ATTRIBUTE name
+match Invalid ATTRIBUTE name
 
 dictionary ATTRIBUTE   My-Guy          bob             octets
-data Invalid ATTRIBUTE number
+match Invalid ATTRIBUTE number
 
 dictionary ATTRIBUTE   Unit-Fail       241.243.bob     integer
-data Invalid OID component "bob" (0)
+match Invalid OID component "bob" (0)
 
 # 243.244 doesn't exist
 dictionary ATTRIBUTE   Unit-Fail       241.243.255.1   integer
-data Unknown attribute "255" in OID string "255.1"
+match Unknown attribute "255" in OID string "255.1"
 
 dictionary ATTRIBUTE   Unit-Array      255             octets[123458]
-data Invalid length for 'octets[...]'
+match Invalid length for 'octets[...]'
 
 dictionary ATTRIBUTE   Unit-Integer    255             integer[1]
-data Only 'octets' types can have a 'length' parameter
+match Only 'octets' types can have a 'length' parameter
 
 dictionary ATTRIBUTE   Unit-$bad$stuff 255             integer
-data Invalid character '$' in attribute name "Unit-$bad$stuff"
+match Invalid character '$' in attribute name "Unit-$bad$stuff"
 
 #
 # flags
 #
 dictionary ATTRIBUTE   Unit-Array      241.254         octets[1234]
-data Invalid length for 'octets[...]'
+match Invalid length for 'octets[...]'
 
 dictionary ATTRIBUTE   Unit-Tag        241.255         integer has_tag
-data Definition for 'Unit-Tag' is invalid: The 'has_tag' flag can only be used with RFC and VSA attributes
+match Definition for 'Unit-Tag' is invalid: The 'has_tag' flag can only be used with RFC and VSA attributes
 
 dictionary ATTRIBUTE   Unit-Tag        255             date    has_tag
-data Definition for 'Unit-Tag' is invalid: The 'has_tag' flag can only be used for attributes of type 'integer' or 'string'
+match Definition for 'Unit-Tag' is invalid: The 'has_tag' flag can only be used for attributes of type 'integer' or 'string'
 
 dictionary ATTRIBUTE   Unit-Tag        255             tlv     encrypt=1
-data Definition for 'Unit-Tag' is invalid: The 'encrypt=1' flag can only be used with attributes of type 'string'
+match Definition for 'Unit-Tag' is invalid: The 'encrypt=1' flag can only be used with attributes of type 'string'
 
 #
 #  structs
 #
 dictionary ATTRIBUTE   Unit-Struct     241.254         struct
-data ok
+match ok
 
 dictionary ATTRIBUTE   Unit-Struct-Byte        241.254.1               byte
-data ok
+match ok
 
 dictionary ATTRIBUTE   Unit-Struct-Octets      241.254.2               octets[2]
-data ok
+match ok
index f1d2db2437c09d1ca10381eac1745097d4cb011f..5b5434d2ce90d371dfad428adec4686f0723133e 100644 (file)
@@ -16,22 +16,22 @@ dictionary-load eap-aka-sim eap/aka-sim
 # Res is an octets type attribute but with a length field containing the length
 # of the value in bits.  It may be between 32 - 128 bits in length.
 decode-pair.aka_tp_decode 03 02 00 20 01 02 03 04
-data RES = 0x01020304
+match RES = 0x01020304
 
 decode-pair.aka_tp_decode 03 05 00 80 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08
-data RES = 0x01020304050607080102030405060708
+match RES = 0x01020304050607080102030405060708
 
 decode-pair.aka_tp_decode 03 05 00 78 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08
-data RES = 0x010203040506070801020304050607
+match RES = 0x010203040506070801020304050607
 
 decode-pair.aka_tp_decode 04 04 01 02 03 04 05 06 07 08 09 aa bb cc dd ee
-data AUTS = 0x010203040506070809aabbccddee
+match AUTS = 0x010203040506070809aabbccddee
 
 decode-pair.aka_tp_decode 86 01 00 00
-data Checkcode = 0x
+match Checkcode = 0x
 
 decode-pair.aka_tp_decode 86 06 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 a0 b0 c0 d0
-data Checkcode = 0x0102030405060708090a0b0c0d0e0f00a0b0c0d0
+match Checkcode = 0x0102030405060708090a0b0c0d0e0f00a0b0c0d0
 
 decode-pair.aka_tp_decode 86 09 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 a0 b0 c0 d0 a0 b0 c0 d0 a0 b0 c0 d0 a0 b0 c0 d0
-data Checkcode = 0x0102030405060708090a0b0c0d0e0f00a0b0c0d0a0b0c0d0a0b0c0d0a0b0c0d0
+match Checkcode = 0x0102030405060708090a0b0c0d0e0f00a0b0c0d0a0b0c0d0a0b0c0d0a0b0c0d0
index ee2414fc3706d829a8a99d48e0751ee4f4d40470..39460fd91d63b7c8ebd8ef600d24dd05eb03c1ba 100644 (file)
@@ -16,19 +16,19 @@ dictionary-load eap-aka-sim eap/aka-sim
 # Res is an octets type attribute but with a length field containing the length
 # of the value in bits.  It may be between 32 - 128 bits in length.
 encode-pair.aka_tp_encode RES = 0x01020304
-data 03 02 00 20 01 02 03 04
+match 03 02 00 20 01 02 03 04
 
 encode-pair.aka_tp_encode RES = 0x01020304050607080102030405060708
-data 03 05 00 80 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08
+match 03 05 00 80 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08
 
 encode-pair.aka_tp_encode AUTS = 0x010203040506070809aabbccddee
-data 04 04 01 02 03 04 05 06 07 08 09 aa bb cc dd ee
+match 04 04 01 02 03 04 05 06 07 08 09 aa bb cc dd ee
 
 encode-pair.aka_tp_encode Checkcode = 0x
-data 86 01 00 00
+match 86 01 00 00
 
 encode-pair.aka_tp_encode Checkcode = 0x0102030405060708090a0b0c0d0e0f00a0b0c0d0
-data 86 06 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 a0 b0 c0 d0
+match 86 06 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 a0 b0 c0 d0
 
 encode-pair.aka_tp_encode Checkcode = 0x0102030405060708090a0b0c0d0e0f00a0b0c0d0a0b0c0d0a0b0c0d0a0b0c0d0
-data 86 09 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 a0 b0 c0 d0 a0 b0 c0 d0 a0 b0 c0 d0 a0 b0 c0 d0
+match 86 09 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 a0 b0 c0 d0 a0 b0 c0 d0 a0 b0 c0 d0 a0 b0 c0 d0
index 435db927f8c5515c880850556d7e335b902758ac..eddbee4804ba10bc3b8873a33745671ff5504943 100644 (file)
@@ -13,24 +13,24 @@ dictionary-load eap-aka-sim eap/aka-sim
 
 # AKA_RES with invalid length (too small)
 decode-pair.aka_tp_decode 04 03 aa bb aa aa aa aa bb bb bb bb
-data sim_decode_pair_value: Failed parsing non-skippable attribute 'AUTS': sim_decode_pair_value: Attribute "AUTS" needs a value of exactly 14 bytes, but value was 10 bytes
+match sim_decode_pair_value: Failed parsing non-skippable attribute 'AUTS': sim_decode_pair_value: Attribute "AUTS" needs a value of exactly 14 bytes, but value was 10 bytes
 
 # AKA_RES with invalid length (too big)
 decode-pair.aka_tp_decode 04 05 aa bb aa aa aa aa bb bb bb bb cc cc cc cc dd dd dd dd
-data sim_decode_pair_value: Failed parsing non-skippable attribute 'AUTS': sim_decode_pair_value: Attribute "AUTS" needs a value of exactly 14 bytes, but value was 18 bytes
+match sim_decode_pair_value: Failed parsing non-skippable attribute 'AUTS': sim_decode_pair_value: Attribute "AUTS" needs a value of exactly 14 bytes, but value was 18 bytes
 
 # AKA_RES with invalid number of bits (too small)
 decode-pair.aka_tp_decode 03 02 00 18 aa bb cc dd
-data sim_decode_pair_value: RES Length field value must be between 32-128 bits, got 24 bits
+match sim_decode_pair_value: RES Length field value must be between 32-128 bits, got 24 bits
 
 # AKA_RES with invalid number of bits (too big - exceed buff)
 decode-pair.aka_tp_decode 03 02 00 80 aa bb cc dd
-data sim_decode_pair_value: RES Length field value (128 bits) > attribute value length (32 bits)
+match sim_decode_pair_value: RES Length field value (128 bits) > attribute value length (32 bits)
 
 # AKA_RES with invalid number of bits (too big - exceed buff)
 decode-pair.aka_tp_decode 03 07 00 88 aa bb cc dd aa bb cc dd aa bb cc dd aa bb cc dd aa bb cc dd aa bb cc dd
-data sim_decode_pair_value: RES Length field value must be between 32-128 bits, got 136 bits
+match sim_decode_pair_value: RES Length field value must be between 32-128 bits, got 136 bits
 
 # AKA_RES with invalid number of bits (too big - exceed limit)
 decode-pair.aka_tp_decode 03 05 00 7f aa bb cc dd aa bb cc dd aa bb cc dd aa bb cc dd
-data sim_decode_pair_value: RES Length (127) is not a multiple of 8
\ No newline at end of file
+match sim_decode_pair_value: RES Length (127) is not a multiple of 8
index 871ce45e5678107dee448913461060ae8a7727f8..af0b96e9c37a3fbb0ad50ec9ea2a7039864e7c6a 100644 (file)
@@ -13,106 +13,106 @@ dictionary-load eap-aka-sim eap/aka-sim
 
 # Boolean attribute
 decode-pair.sim_tp_decode 0d 01 00 00
-data Any-ID-Req = yes
+match Any-ID-Req = yes
 
 # Short
 decode-pair.sim_tp_decode 10 01 ff ff
-data Selected-Version = 65535
+match Selected-Version = 65535
 
 # Octets
 decode-pair.sim_tp_decode 01 05 00 00 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77
-data RAND = 0x00112233445566770011223344556677
+match RAND = 0x00112233445566770011223344556677
 
 decode-pair.sim_tp_decode 01 09 00 00 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 78
-data RAND = 0x00112233445566770011223344556677, RAND = 0x00112233445566770011223344556678
+match RAND = 0x00112233445566770011223344556677, RAND = 0x00112233445566770011223344556678
 
 # Aliased (found)
 decode-pair.sim_tp_decode 0c 01 04 02
-data Notification = Temporarily-Denied
+match Notification = Temporarily-Denied
 
 # Aliased (notfound)
 decode-pair.sim_tp_decode 0c 01 ff ff
-data Notification = 65535
+match Notification = 65535
 
 # No string padding
 decode-pair.sim_tp_decode 0e 05 00 10 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 69
-data Identity = "testing123@simfi"
+match Identity = "testing123@simfi"
 
 # Three bytes string padding
 decode-pair.sim_tp_decode 0e 05 00 0d 74 65 73 74 69 6e 67 31 32 33 40 73 69 00 00 00
-data Identity = "testing123@si"
+match Identity = "testing123@si"
 
 # Two bytes string padding
 decode-pair.sim_tp_decode 0e 05 00 0e 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 00 00
-data Identity = "testing123@sim"
+match Identity = "testing123@sim"
 
 # One byte string padding
 decode-pair.sim_tp_decode 0e 05 00 0f 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 00
-data Identity = "testing123@simf"
+match Identity = "testing123@simf"
 
 # Empty string
 decode-pair.sim_tp_decode 0e 01 00 00
-data Identity = ""
+match Identity = ""
 
 # Two attributes
 decode-pair.sim_tp_decode 0e 05 00 10 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 69 0d 01 00 00
-data Identity = "testing123@simfi", Any-ID-Req = yes
+match Identity = "testing123@simfi", Any-ID-Req = yes
 
 # Array (one element)
 decode-pair.sim_tp_decode 0f 02 00 02 00 02 00 00
-data Version-List = 2
+match Version-List = 2
 
 # Array (multiple elements, with padding)
 decode-pair.sim_tp_decode 0f 03 00 06 00 02 00 03 00 04 00 00
-data Version-List = 2, Version-List = 3, Version-List = 4
+match Version-List = 2, Version-List = 3, Version-List = 4
 
 # Array (multiple elements, with no padding)
 decode-pair.sim_tp_decode 0f 03 00 08 00 02 ff ff 00 ff ff 00
-data Version-List = 2, Version-List = 65535, Version-List = 255, Version-List = 65280
+match Version-List = 2, Version-List = 65535, Version-List = 255, Version-List = 65280
 
 # Zero length array
 decode-pair.sim_tp_decode 0f 01 00 00
-data
+match
 
 # Empty TLV
 decode-pair.sim_tp_decode 82 01 00 00
-data
+match
 
 # Non-encrypted skippable attribute found inside AT_ENCR_DATA
 decode-pair.sim_tp_decode 82 05 00 00 e1 8b 0e ec 5a bf 10 ac 81 ac e3 f2 ae 71 cb ef
-data Attr-130.255 = 0x0000000000000000000000000000
+match Attr-130.255 = 0x0000000000000000000000000000
 
 # Mixture of known and than skippable unknown
 decode-pair.sim_tp_decode 82 05 00 00 47 bd f4 5e 3d c5 69 da e8 fa 73 2a 69 44 a8 78
-data Counter = 0, Attr-130.255 = 0x00000000000000000000
+match Counter = 0, Attr-130.255 = 0x00000000000000000000
 
 decode-pair.sim_tp_decode 82 05 00 00 b2 dd 1d a3 e1 fc 91 3d 94 6b 3f a1 ba 5d 73 e2
-data Attr-130.255 = 0x00000000000000000000, Counter = 0
+match Attr-130.255 = 0x00000000000000000000, Counter = 0
 
 # RFC4186 A.3. example
 decode-pair.sim_tp_decode_rfc4186 0f 02 00 02 00 01 00 00
-data Version-List = 1
+match Version-List = 1
 
 # RFC4186 A.4. example
 decode-pair.sim_tp_decode_rfc4186 07 05 00 00 01 23 45 67 89 ab cd ef fe dc ba 98 76 54 32 10 10 01 00 01
-data Nonce-MT = 0x0123456789abcdeffedcba9876543210, Selected-Version = 1
+match Nonce-MT = 0x0123456789abcdeffedcba9876543210, Selected-Version = 1
 
 # RFC4186 A.5. example
 decode-pair.sim_tp_decode_rfc4186 01 0d 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 81 05 00 00 9e 18 b0 c2 9a 65 22 63 c0 6e fb 54 dd 00 a8 95 82 2d 00 00 55 f2 93 9b bd b1 b1 9e a1 b4 7f c0 b3 e0 be 4c ab 2c f7 37 2d 98 e3 02 3c 6b b9 24 15 72 3d 58 ba d6 6c e0 84 e1 01 b6 0f 53 58 35 4b d4 21 82 78 ae a7 bf 2c ba ce 33 10 6a ed dc 62 5b 0c 1d 5a a6 7a 41 73 9a e5 b5 79 50 97 3f c7 ff 83 01 07 3c 6f 95 31 50 fc 30 3e a1 52 d1 e1 0a 2d 1f 4f 52 26 da a1 ee 90 05 47 22 52 bd b3 b7 1d 6f 0c 3a 34 90 31 6c 46 92 98 71 bd 45 cd fd bc a6 11 2f 07 f8 be 71 79 90 d2 5f 6d d7 f2 b7 b3 20 bf 4d 5a 99 2e 88 03 31 d7 29 94 5a ec 75 ae 5d 43 c8 ed a5 fe 62 33 fc ac 49 4e e6 7a 0d 50 4d 0b 05 00 00 fe f3 24 ac 39 62 b5 9f 3b d7 82 53 ae 4d cb 6a
-data RAND = 0x101112131415161718191a1b1c1d1e1f, RAND = 0x202122232425262728292a2b2c2d2e2f, RAND = 0x303132333435363738393a3b3c3d3e3f, IV = 0x9e18b0c29a652263c06efb54dd00a895, Next-Pseudonym = "w8w49PexCazWJ&xCIARmxuMKht5S1sxRDqXSEFBEg3DcZP9cIxTe5J4OyIwNGVzxeJOU1G", Next-Reauth-ID = "Y24fNSrz8BP274jOJaF17WfxI8YO7QX00pMXk9XMMVOw7broaNhTczuFq53aEpOkk3L0dm@eapsim.foo", MAC = 0xfef324ac3962b59f3bd78253ae4dcb6a
+match RAND = 0x101112131415161718191a1b1c1d1e1f, RAND = 0x202122232425262728292a2b2c2d2e2f, RAND = 0x303132333435363738393a3b3c3d3e3f, IV = 0x9e18b0c29a652263c06efb54dd00a895, Next-Pseudonym = "w8w49PexCazWJ&xCIARmxuMKht5S1sxRDqXSEFBEg3DcZP9cIxTe5J4OyIwNGVzxeJOU1G", Next-Reauth-ID = "Y24fNSrz8BP274jOJaF17WfxI8YO7QX00pMXk9XMMVOw7broaNhTczuFq53aEpOkk3L0dm@eapsim.foo", MAC = 0xfef324ac3962b59f3bd78253ae4dcb6a
 
 # RFC4186 A.6. example
 decode-pair.sim_tp_decode_rfc4186 0b 05 00 00 f5 6d 64 33 e6 8e d2 97 6a c1 19 37 fc 3d 11 54
-data MAC = 0xf56d6433e68ed2976ac11937fc3d1154
+match MAC = 0xf56d6433e68ed2976ac11937fc3d1154
 
 # RFC4186 A.9. example
 decode-pair.sim_tp_decode_rfc4186 81 05 00 00 d5 85 ac 77 86 b9 03 36 65 7c 77 b4 65 75 b9 c4 82 1d 00 00 68 62 91 a9 d2 ab c5 8c aa 32 94 b6 e8 5b 44 84 6c 44 e5 dc b2 de 8b 9e 80 d6 9d 49 85 8a 5d b8 4c dc 1c 9b c9 5c 01 b9 6b 6e ca 31 34 74 ae a6 d3 14 16 e1 9d aa 9d f7 0f 05 00 88 41 ca 80 14 96 4d 3b 30 a4 9b cf 43 e4 d3 f1 8e 86 29 5a 4a 2b 38 d9 6c 97 05 c2 bb b0 5c 4a ac e9 7d 5e af f5 64 04 6c 8b d3 0b c3 9b e5 e1 7a ce 2b 10 a6 0b 05 00 00 48 3a 17 99 b8 3d 7c d3 d0 a1 e4 01 d9 ee 47 70
-data IV = 0xd585ac7786b90336657c77b46575b9c4, Counter = 1, Nonce-S = 0x0123456789abcdeffedcba9876543210, Next-Reauth-ID = "uta0M0iyIsMwWp5TTdSdnOLvg2XDVf21OYt1vnfiMcs5dnIDHOIFVavIRzMRyzW6vFzdHW@eapsim.foo", MAC = 0x483a1799b83d7cd3d0a1e401d9ee4770
+match IV = 0xd585ac7786b90336657c77b46575b9c4, Counter = 1, Nonce-S = 0x0123456789abcdeffedcba9876543210, Next-Reauth-ID = "uta0M0iyIsMwWp5TTdSdnOLvg2XDVf21OYt1vnfiMcs5dnIDHOIFVavIRzMRyzW6vFzdHW@eapsim.foo", MAC = 0x483a1799b83d7cd3d0a1e401d9ee4770
 
 # RFC4186 A.10. example
 decode-pair.sim_tp_decode_rfc4186 81 05 00 00 cd f7 ff a6 5d e0 4c 02 6b 56 c8 6b 76 b1 02 ea 82 05 00 00 b6 ed d3 82 79 e2 a1 42 3c 1a fc 5c 45 5c 7d 56 0b 05 00 00 fa f7 6b 71 fb e2 d2 55 b9 6a 35 66 c9 15 c6 17
-data IV = 0xcdf7ffa65de04c026b56c86b76b102ea, Counter = 1, MAC = 0xfaf76b71fbe2d255b96a3566c915c617
+match IV = 0xcdf7ffa65de04c026b56c86b76b102ea, Counter = 1, MAC = 0xfaf76b71fbe2d255b96a3566c915c617
 
 # RFC4186 A.10. example - With IV at the end of the packet
 decode-pair.sim_tp_decode_rfc4186 82 05 00 00 b6 ed d3 82 79 e2 a1 42 3c 1a fc 5c 45 5c 7d 56 0b 05 00 00 fa f7 6b 71 fb e2 d2 55 b9 6a 35 66 c9 15 c6 17 81 05 00 00 cd f7 ff a6 5d e0 4c 02 6b 56 c8 6b 76 b1 02 ea
-data Counter = 1, MAC = 0xfaf76b71fbe2d255b96a3566c915c617, IV = 0xcdf7ffa65de04c026b56c86b76b102ea
+match Counter = 1, MAC = 0xfaf76b71fbe2d255b96a3566c915c617, IV = 0xcdf7ffa65de04c026b56c86b76b102ea
index b5397d9c4ec61d41c6ab3cdcce13cf81c8cc75c6..2900b638c389ec52d123e72551835b657029e042 100644 (file)
@@ -11,115 +11,115 @@ dictionary-load eap-aka-sim eap/aka-sim
 
 # Boolean attribute
 encode-pair.sim_tp_encode Any-ID-Req = yes
-data 0d 01 00 00
+match 0d 01 00 00
 
 # False Boolean attribute (should produce no data)
 encode-pair.sim_tp_encode Any-ID-Req = no
-data
+match
 
 # Short
 encode-pair.sim_tp_encode Selected-Version = 1
-data 10 01 00 01
+match 10 01 00 01
 
 # Octets
 encode-pair.sim_tp_encode RAND = 0x00112233445566770011223344556677
-data 01 05 00 00 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77
+match 01 05 00 00 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77
 
 encode-pair.sim_tp_encode RAND = 0x00112233445566770011223344556677, RAND = 0x00112233445566770011223344556678
-data 01 09 00 00 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 78
+match 01 09 00 00 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 77 00 11 22 33 44 55 66 78
 
 # Octets (autopad)
 encode-pair.sim_tp_encode RAND = 0x11
-data 01 05 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+match 01 05 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
 # Empty octets
 encode-pair.sim_tp_encode RAND = 0x
-data 01 01 00 00
+match 01 01 00 00
 
 # Aliased
 encode-pair.sim_tp_encode Notification = Temporarily-Denied
-data 0c 01 04 02
+match 0c 01 04 02
 
 # No string padding
 encode-pair.sim_tp_encode Identity = "testing123@simfi"
-data 0e 05 00 10 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 69
+match 0e 05 00 10 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 69
 
 # Three bytes string padding
 encode-pair.sim_tp_encode Identity = "testing123@si"
-data 0e 05 00 0d 74 65 73 74 69 6e 67 31 32 33 40 73 69 00 00 00
+match 0e 05 00 0d 74 65 73 74 69 6e 67 31 32 33 40 73 69 00 00 00
 
 # Two bytes string padding
 encode-pair.sim_tp_encode Identity = "testing123@sim"
-data 0e 05 00 0e 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 00 00
+match 0e 05 00 0e 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 00 00
 
 # One byte string padding
 encode-pair.sim_tp_encode Identity = "testing123@simf"
-data 0e 05 00 0f 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 00
+match 0e 05 00 0f 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 00
 
 # Empty string
 encode-pair.sim_tp_encode Identity = ""
-data 0e 01 00 00
+match 0e 01 00 00
 
 # Two attributes
 encode-pair.sim_tp_encode Identity = "testing123@simfi", Any-ID-Req = yes
-data 0e 05 00 10 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 69 0d 01 00 00
+match 0e 05 00 10 74 65 73 74 69 6e 67 31 32 33 40 73 69 6d 66 69 0d 01 00 00
 
 # A single encrypted attribute
 encode-pair.sim_tp_encode Next-Pseudonym = "testing123"
-data 82 05 00 00 3f b8 34 1f f8 26 e0 4d 4a f3 f9 61 3c a9 84 26
+match 82 05 00 00 3f b8 34 1f f8 26 e0 4d 4a f3 f9 61 3c a9 84 26
 
 decode-pair.sim_tp_decode -
-data Next-Pseudonym = "testing123"
+match Next-Pseudonym = "testing123"
 
 # Encrypt attribute requiring padding
 encode-pair.sim_tp_encode Counter-Too-Small = yes
-data 82 05 00 00 5a f8 99 3c 02 f5 6c 04 b8 6e bb 54 3a af 74 32
+match 82 05 00 00 5a f8 99 3c 02 f5 6c 04 b8 6e bb 54 3a af 74 32
 
 decode-pair.sim_tp_decode -
-data Counter-Too-Small = yes
+match Counter-Too-Small = yes
 
 # Two encrypted attributes, one bool to extend plaintext so it's not a multiple block of block length
 encode-pair.sim_tp_encode Next-Pseudonym = "testing123", Counter-Too-Small = yes
-data 82 09 00 00 3f b8 34 1f f8 26 e0 4d 4a f3 f9 61 3c a9 84 26 0f 4a 53 ce 33 99 9e 4f 29 df a4 79 18 a9 57 dd
+match 82 09 00 00 3f b8 34 1f f8 26 e0 4d 4a f3 f9 61 3c a9 84 26 0f 4a 53 ce 33 99 9e 4f 29 df a4 79 18 a9 57 dd
 
 decode-pair.sim_tp_decode -
-data Next-Pseudonym = "testing123", Counter-Too-Small = yes
+match Next-Pseudonym = "testing123", Counter-Too-Small = yes
 
 # Plaintext and encrypted attributes interleaved (this shouldn't happen usually, due to sorting)
 encode-pair.sim_tp_encode Next-Pseudonym = "testing123", Any-ID-Req = yes, Counter-Too-Small = yes
-data 82 05 00 00 3f b8 34 1f f8 26 e0 4d 4a f3 f9 61 3c a9 84 26 0d 01 00 00 82 05 00 00 5a f8 99 3c 02 f5 6c 04 b8 6e bb 54 3a af 74 32
+match 82 05 00 00 3f b8 34 1f f8 26 e0 4d 4a f3 f9 61 3c a9 84 26 0d 01 00 00 82 05 00 00 5a f8 99 3c 02 f5 6c 04 b8 6e bb 54 3a af 74 32
 
 decode-pair.sim_tp_decode -
-data Next-Pseudonym = "testing123", Any-ID-Req = yes, Counter-Too-Small = yes
+match Next-Pseudonym = "testing123", Any-ID-Req = yes, Counter-Too-Small = yes
 
 # Array (one element)
 encode-pair.sim_tp_encode Version-List = 1
-data 0f 02 00 02 00 01 00 00
+match 0f 02 00 02 00 01 00 00
 
 # Array (multiple elements, with padding)
 encode-pair.sim_tp_encode Version-List = 1, Version-List = 2, Version-List = 3
-data 0f 03 00 06 00 01 00 02 00 03 00 00
+match 0f 03 00 06 00 01 00 02 00 03 00 00
 
 # Array (multiple elements, with no padding)
 encode-pair.sim_tp_encode Version-List = 1, Version-List = 2, Version-List = 3, Version-List = 4
-data 0f 03 00 08 00 01 00 02 00 03 00 04
+match 0f 03 00 08 00 01 00 02 00 03 00 04
 
 # RFC4186 A.3. example
 encode-pair.sim_tp_encode_rfc4186 Version-List = 1
-data 0f 02 00 02 00 01 00 00
+match 0f 02 00 02 00 01 00 00
 
 # RFC4186 A.4. example
 encode-pair.sim_tp_encode_rfc4186 Nonce-MT = 0x0123456789abcdeffedcba9876543210, Selected-Version = 1
-data 07 05 00 00 01 23 45 67 89 ab cd ef fe dc ba 98 76 54 32 10 10 01 00 01
+match 07 05 00 00 01 23 45 67 89 ab cd ef fe dc ba 98 76 54 32 10 10 01 00 01
 
 # RFC4186 A.5. example
 encode-pair.sim_tp_encode_rfc4186 RAND = 0x101112131415161718191a1b1c1d1e1f, RAND = 0x202122232425262728292a2b2c2d2e2f, RAND = 0x303132333435363738393a3b3c3d3e3f, IV = 0x9e18b0c29a652263c06efb54dd00a895, Next-Pseudonym = "w8w49PexCazWJ&xCIARmxuMKht5S1sxRDqXSEFBEg3DcZP9cIxTe5J4OyIwNGVzxeJOU1G", Next-Reauth-ID = "Y24fNSrz8BP274jOJaF17WfxI8YO7QX00pMXk9XMMVOw7broaNhTczuFq53aEpOkk3L0dm@eapsim.foo"
-data 01 0d 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 81 05 00 00 9e 18 b0 c2 9a 65 22 63 c0 6e fb 54 dd 00 a8 95 82 2d 00 00 55 f2 93 9b bd b1 b1 9e a1 b4 7f c0 b3 e0 be 4c ab 2c f7 37 2d 98 e3 02 3c 6b b9 24 15 72 3d 58 ba d6 6c e0 84 e1 01 b6 0f 53 58 35 4b d4 21 82 78 ae a7 bf 2c ba ce 33 10 6a ed dc 62 5b 0c 1d 5a a6 7a 41 73 9a e5 b5 79 50 97 3f c7 ff 83 01 07 3c 6f 95 31 50 fc 30 3e a1 52 d1 e1 0a 2d 1f 4f 52 26 da a1 ee 90 05 47 22 52 bd b3 b7 1d 6f 0c 3a 34 90 31 6c 46 92 98 71 bd 45 cd fd bc a6 11 2f 07 f8 be 71 79 90 d2 5f 6d d7 f2 b7 b3 20 bf 4d 5a 99 2e 88 03 31 d7 29 94 5a ec 75 ae 5d 43 c8 ed a5 fe 62 33 fc ac 49 4e e6 7a 0d 50 4d
+match 01 0d 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 81 05 00 00 9e 18 b0 c2 9a 65 22 63 c0 6e fb 54 dd 00 a8 95 82 2d 00 00 55 f2 93 9b bd b1 b1 9e a1 b4 7f c0 b3 e0 be 4c ab 2c f7 37 2d 98 e3 02 3c 6b b9 24 15 72 3d 58 ba d6 6c e0 84 e1 01 b6 0f 53 58 35 4b d4 21 82 78 ae a7 bf 2c ba ce 33 10 6a ed dc 62 5b 0c 1d 5a a6 7a 41 73 9a e5 b5 79 50 97 3f c7 ff 83 01 07 3c 6f 95 31 50 fc 30 3e a1 52 d1 e1 0a 2d 1f 4f 52 26 da a1 ee 90 05 47 22 52 bd b3 b7 1d 6f 0c 3a 34 90 31 6c 46 92 98 71 bd 45 cd fd bc a6 11 2f 07 f8 be 71 79 90 d2 5f 6d d7 f2 b7 b3 20 bf 4d 5a 99 2e 88 03 31 d7 29 94 5a ec 75 ae 5d 43 c8 ed a5 fe 62 33 fc ac 49 4e e6 7a 0d 50 4d
 
 # RFC4186 A.9. example
 encode-pair.sim_tp_encode_rfc4186 IV = 0xd585ac7786b90336657c77b46575b9c4, Counter = 1, Nonce-S = 0x0123456789abcdeffedcba9876543210, Next-Reauth-ID = "uta0M0iyIsMwWp5TTdSdnOLvg2XDVf21OYt1vnfiMcs5dnIDHOIFVavIRzMRyzW6vFzdHW@eapsim.foo"
-data 81 05 00 00 d5 85 ac 77 86 b9 03 36 65 7c 77 b4 65 75 b9 c4 82 1d 00 00 68 62 91 a9 d2 ab c5 8c aa 32 94 b6 e8 5b 44 84 6c 44 e5 dc b2 de 8b 9e 80 d6 9d 49 85 8a 5d b8 4c dc 1c 9b c9 5c 01 b9 6b 6e ca 31 34 74 ae a6 d3 14 16 e1 9d aa 9d f7 0f 05 00 88 41 ca 80 14 96 4d 3b 30 a4 9b cf 43 e4 d3 f1 8e 86 29 5a 4a 2b 38 d9 6c 97 05 c2 bb b0 5c 4a ac e9 7d 5e af f5 64 04 6c 8b d3 0b c3 9b e5 e1 7a ce 2b 10 a6
+match 81 05 00 00 d5 85 ac 77 86 b9 03 36 65 7c 77 b4 65 75 b9 c4 82 1d 00 00 68 62 91 a9 d2 ab c5 8c aa 32 94 b6 e8 5b 44 84 6c 44 e5 dc b2 de 8b 9e 80 d6 9d 49 85 8a 5d b8 4c dc 1c 9b c9 5c 01 b9 6b 6e ca 31 34 74 ae a6 d3 14 16 e1 9d aa 9d f7 0f 05 00 88 41 ca 80 14 96 4d 3b 30 a4 9b cf 43 e4 d3 f1 8e 86 29 5a 4a 2b 38 d9 6c 97 05 c2 bb b0 5c 4a ac e9 7d 5e af f5 64 04 6c 8b d3 0b c3 9b e5 e1 7a ce 2b 10 a6
 
 # RFC4186 A.10. example
 encode-pair.sim_tp_encode_rfc4186 IV = 0xcdf7ffa65de04c026b56c86b76b102ea, Counter = 1
-data 81 05 00 00 cd f7 ff a6 5d e0 4c 02 6b 56 c8 6b 76 b1 02 ea 82 05 00 00 b6 ed d3 82 79 e2 a1 42 3c 1a fc 5c 45 5c 7d 56
+match 81 05 00 00 cd f7 ff a6 5d e0 4c 02 6b 56 c8 6b 76 b1 02 ea 82 05 00 00 b6 ed d3 82 79 e2 a1 42 3c 1a fc 5c 45 5c 7d 56
index 651af398c6f44bb6864752a55b373dfe5c2dc22d..9b7eef17ce40f3a84c302656d1734b7c725d7658 100644 (file)
@@ -13,92 +13,92 @@ dictionary-load eap-aka-sim eap/aka-sim
 
 # Zero length attribute
 decode-pair.sim_tp_decode 0d 00
-data sim_decode_pair_internal: Malformed attribute 13: Length field 0
+match sim_decode_pair_internal: Malformed attribute 13: Length field 0
 
 # No length field
 decode-pair.sim_tp_decode 0d
-data sim_decode_pair_internal: Insufficient data: Expected >= 2 bytes, got 1 bytes
+match sim_decode_pair_internal: Insufficient data: Expected >= 2 bytes, got 1 bytes
 
 # Boolean attribute (without reserved bytes)
 decode-pair.sim_tp_decode 0d 01
-data sim_decode_pair_internal: Insufficient data for attribute 13: Length field 4, remaining data 2
+match sim_decode_pair_internal: Insufficient data for attribute 13: Length field 4, remaining data 2
 
 # Boolean attribute (invalid length field)
 decode-pair.sim_tp_decode 0d 00 00 00
-data sim_decode_pair_internal: Malformed attribute 13: Length field 0
+match sim_decode_pair_internal: Malformed attribute 13: Length field 0
 
 # Boolean attribute (invalid length field)
 decode-pair.sim_tp_decode 0d 02 00 00
-data sim_decode_pair_internal: Insufficient data for attribute 13: Length field 8, remaining data 4
+match sim_decode_pair_internal: Insufficient data for attribute 13: Length field 8, remaining data 4
 
 # Unknown non-skippable attribute (99)
 decode-pair.sim_tp_decode 63 01 00 00
-data Unknown (non-skippable) attribute 99
+match Unknown (non-skippable) attribute 99
 
 # Unknown skippable attribute (150) - Ensure the 'reserved bytes' in a normal octets
 # attribute are not skipped.
 decode-pair.sim_tp_decode 97 02 00 00 ff ff ff ff
-data Attr-151 = 0x0000ffffffff
+match Attr-151 = 0x0000ffffffff
 
 # Array missing length field
 decode-pair.sim_tp_decode 0f 01
-data sim_decode_pair_internal: Insufficient data for attribute 15: Length field 4, remaining data 2
+match sim_decode_pair_internal: Insufficient data for attribute 15: Length field 4, remaining data 2
 
 # Array actual length field > remaining data
 decode-pair.sim_tp_decode 0f 01 00 01
-data sim_decode_array: Actual length field value (1) > attribute value length (0)
+match sim_decode_array: Actual length field value (1) > attribute value length (0)
 
 # Array actual length not a multiple of the data type
 decode-pair.sim_tp_decode 0f 02 00 03 00 00 00 00
-data sim_array_members: Expected array actual length to be multiple of 2, got 3
+match sim_array_members: Expected array actual length to be multiple of 2, got 3
 
 # Array actual length < element length
 decode-pair.sim_tp_decode 0f 02 00 01 00 00 00 00
-data sim_array_members: Element length (2) > array length (1)
+match sim_array_members: Element length (2) > array length (1)
 
 # String actual length greater than value length
 decode-pair.sim_tp_decode 0e 05 00 11 74 65 73 74 69 6e 67 31 32 33 40 73 69 00 00 00
-data sim_decode_pair_value: Actual length field value (17) > attribute value length (16)
+match sim_decode_pair_value: Actual length field value (17) > attribute value length (16)
 
 # String actual length (possible overflow)
 decode-pair.sim_tp_decode 0e 05 ff ff 74 65 73 74 69 6e 67 31 32 33 40 73 69 00 00 00
-data sim_decode_pair_value: Actual length field value (65535) > attribute value length (16)
+match sim_decode_pair_value: Actual length field value (65535) > attribute value length (16)
 
 # TLV encrypted data not a multiple of 16
 decode-pair.sim_tp_decode 82 02 00 00 00 00 00 00
-data sim_value_decrypt: Encrypted attribute is not a multiple of cipher's block size (16)
+match sim_value_decrypt: Encrypted attribute is not a multiple of cipher's block size (16)
 
 # TLV encrypted data multiple of 16, zeroed out
 decode-pair.sim_tp_decode 82 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
-data sim_decode_tlv: Malformed nested attribute 123: Length field (116 bytes) value longer than remaining data in parent (16 bytes)
+match sim_decode_tlv: Malformed nested attribute 123: Length field (116 bytes) value longer than remaining data in parent (16 bytes)
 
 # RFC4186 A.10. example - With IV absent
 decode-pair.sim_tp_decode_rfc4186 82 05 00 00 b6 ed d3 82 79 e2 a1 42 3c 1a fc 5c 45 5c 7d 56 0b 05 00 00 fa f7 6b 71 fb e2 d2 55 b9 6a 35 66 c9 15 c6 17
-data sim_value_decrypt: No IV present in packet, can't decrypt data
+match sim_value_decrypt: No IV present in packet, can't decrypt data
 
 # TLV encrypted data, non zero padding
 decode-pair.sim_tp_decode 82 05 00 00 27 a8 93 8c b2 97 44 32 42 a8 eb f7 d5 fd 82 c6
-data sim_decode_tlv: Padding attribute value not zeroed 0x00000000000000000001
+match sim_decode_tlv: Padding attribute value not zeroed 0x00000000000000000001
 
 decode-pair.sim_tp_decode 82 05 00 00 0f 37 39 c9 fb db 00 7a e2 eb 6f 7c e3 3c bd a0
-data sim_decode_tlv: Padding attribute value not zeroed 0x10000000000000000000
+match sim_decode_tlv: Padding attribute value not zeroed 0x10000000000000000000
 
 decode-pair.sim_tp_decode 82 05 00 00 08 05 38 24 76 76 01 0b 3a f1 48 60 24 08 3b 91
-data sim_decode_tlv: Malformed nested attribute 0: Length field 0
+match sim_decode_tlv: Malformed nested attribute 0: Length field 0
 
 # Padding overruns decrypted data
 decode-pair.sim_tp_decode 82 05 00 00 d7 67 d7 c7 f3 35 13 23 2e 65 c1 15 77 37 35 dc
-data sim_decode_tlv: Malformed nested attribute 6: Length field (12 bytes) value longer than remaining data in parent (8 bytes)
+match sim_decode_tlv: Malformed nested attribute 6: Length field (12 bytes) value longer than remaining data in parent (8 bytes)
 
 # Padding is the entirety of the encrypted TLV
 decode-pair.sim_tp_decode 82 05 00 00 bd 7a 99 e9 72 9b 58 84 52 82 4f d1 0a a7 06 c0
-data sim_decode_tlv: Expected padding attribute length <= 12 bytes, got 16 bytes
+match sim_decode_tlv: Expected padding attribute length <= 12 bytes, got 16 bytes
 
 # Padding has zero length field
 decode-pair.sim_tp_decode 82 05 00 00 eb 3e e8 51 46 11 07 fe c2 72 97 b2 7a d5 e5 63
-data sim_decode_tlv: Malformed nested attribute 6: Length field 0
+match sim_decode_tlv: Malformed nested attribute 6: Length field 0
 
 # Non-encrypted non-skippable attribute found inside AT_ENCR_DATA
 decode-pair.sim_tp_decode 82 05 00 00 c5 3c b6 fb a8 67 79 f0 6d 45 c4 3a 42 33 8e c1
-data sim_decode_tlv: Unknown (non-skippable) attribute 1
+match sim_decode_tlv: Unknown (non-skippable) attribute 1
 
index 07f7c531f741a1bdba0f4b1452adc07d302bca38..76703119b1497c69e4e4701497fd44bd420a7a41 100644 (file)
@@ -2,73 +2,73 @@
 #  Like the conditional tests, but tests for escape sequences
 #
 condition "bob" == 0x626f62
-data true
+match true
 
 condition 0x == '0x'
-data ERROR offset 0 Empty octet string is invalid
+match ERROR offset 0 Empty octet string is invalid
 
 condition 'foo' == 0x
-data ERROR offset 9 Empty octet string is invalid
+match ERROR offset 9 Empty octet string is invalid
 
 # \n gets escaped in double quoted strings
 condition "\n" == 0x0a
-data true
+match true
 
 # but not in single quoted strings
 condition '\n' == 0x5c6e
-data true
+match true
 
 condition '\'' == 0x27
-data true
+match true
 
 condition "'" == 0x27
-data true
+match true
 
 condition "\"" == 0x22
-data true
+match true
 
 condition 0x22 == '"'
-data true
+match true
 
 condition '\'' == "'"
-data true
+match true
 
 condition '\\' == "\\"
-data true
+match true
 
 #
 #  The first string is \ + x
 #
 condition '\x' == "x"
-data false
+match false
 
 # embedded zeros are OK
 condition "a\000a" == 0x610061
-data true
+match true
 
 condition "aa\000" == 0x616100
-data true
+match true
 
 condition 'aa\000' == 0x61615c303030
-data true
+match true
 
 condition 'aa\000' == "aa\000"
-data false
+match false
 
 condition 'a\n' == "a\n"
-data false
+match false
 
 condition  0x626f62 == 'bob'
-data true
+match true
 
 condition  0x626f62 == "bob"
-data true
+match true
 
 condition  0x626f62 == bob
-data true
+match true
 
 condition  \n == 0x0a
-data ERROR offset 0 Unexpected escape
+match ERROR offset 0 Unexpected escape
 
 condition  a\n == 0x610a
-data ERROR offset 1 Unexpected escape
+match ERROR offset 1 Unexpected escape
index 26e2d6e7e452bb0232548295cc9f9ebcb32bd407..efbfdaa33b3f9713c61f97f965cd5856319e35c9 100644 (file)
@@ -5,7 +5,7 @@ load radius
 dictionary-load radius
 
 decode-pair 01 04 00
-data fr_radius_decode_pair: Insufficient data
+match fr_radius_decode_pair: Insufficient data
 
 decode-pair 01 01 00
-data fr_radius_decode_pair: Insufficient data
+match fr_radius_decode_pair: Insufficient data
index 966c65d6905f591506913b7d2457d41ce694940d..0ec5bff8ed5ad7a920aea22d65389da43e3e7ed1 100644 (file)
@@ -4,103 +4,103 @@ dictionary-load radius
 
 # Example attributes as used in RFC 6929
 raw 241.1 "bob"
-data f1 06 01 62 6f 62
+match f1 06 01 62 6f 62
 
 raw 241.2 {1 23 45 }
-data f1 07 02 01 04 23 45
+match f1 07 02 01 04 23 45
 
 raw 241.2 {1 23 45 } { 2 67 89 }
-data f1 0b 02 01 04 23 45 02 04 67 89
+match f1 0b 02 01 04 23 45 02 04 67 89
 
 raw 241.2 {1 23 45 } { 3 { 1 ab cd } }
-data f1 0d 02 01 04 23 45 03 06 01 04 ab cd
+match f1 0d 02 01 04 23 45 03 06 01 04 ab cd
 
 raw 241.2 {1 23 45 } { 3 { 1 ab cd } {2 "foo" } }
-data f1 12 02 01 04 23 45 03 0b 01 04 ab cd 02 05 66 6f 6f
+match f1 12 02 01 04 23 45 03 0b 01 04 ab cd 02 05 66 6f 6f
 
 raw 241.1 {1 { 2 { 3 { 4 { 5 cd ef } } } } }
-data f1 0f 01 01 0c 02 0a 03 08 04 06 05 04 cd ef
+match f1 0f 01 01 0c 02 0a 03 08 04 06 05 04 cd ef
 
 raw 241.26.1.4 "test"
-data f1 0c 1a 00 00 00 01 04 74 65 73 74
+match f1 0c 1a 00 00 00 01 04 74 65 73 74
 
 raw 241.26.1.5 { 3 "test" }
-data f1 0e 1a 00 00 00 01 05 03 06 74 65 73 74
+match f1 0e 1a 00 00 00 01 05 03 06 74 65 73 74
 
 # More examples.
 raw 245.1 "bob"
-data f5 07 01 00 62 6f 62
+match f5 07 01 00 62 6f 62
 
 raw 245.2 {1 23 45 }
-data f5 08 02 00 01 04 23 45
+match f5 08 02 00 01 04 23 45
 
 raw 245.2 {1 23 45 } { 2 67 89 }
-data f5 0c 02 00 01 04 23 45 02 04 67 89
+match f5 0c 02 00 01 04 23 45 02 04 67 89
 
 raw 245.2 {1 23 45 } { 3 { 1 ab cd } }
-data f5 0e 02 00 01 04 23 45 03 06 01 04 ab cd
+match f5 0e 02 00 01 04 23 45 03 06 01 04 ab cd
 
 raw 245.2 {1 23 45 } { 3 { 1 ab cd } {2 "foo" } }
-data f5 13 02 00 01 04 23 45 03 0b 01 04 ab cd 02 05 66 6f 6f
+match f5 13 02 00 01 04 23 45 03 0b 01 04 ab cd 02 05 66 6f 6f
 
 raw 245.1 {1 { 2 { 3 { 4 { 5 cd ef } } } } }
-data f5 10 01 00 01 0c 02 0a 03 08 04 06 05 04 cd ef
+match f5 10 01 00 01 0c 02 0a 03 08 04 06 05 04 cd ef
 
 raw 245.26.1.4 "test"
-data f5 0d 1a 00 00 00 00 01 04 74 65 73 74
+match f5 0d 1a 00 00 00 00 01 04 74 65 73 74
 
 raw 245.26.1.5 { 3 "test" }
-data f5 0f 1a 00 00 00 00 01 05 03 06 74 65 73 74
+match f5 0f 1a 00 00 00 00 01 05 03 06 74 65 73 74
 
 raw 245.4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccc
-data f5 ff 04 80 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb f5 13 04 00 cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
+match f5 ff 04 80 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb f5 13 04 00 cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
 
 #
 #  256 copies of 'x'
 #
 raw 245.1 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
-data f5 ff 01 80 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 f5 09 01 00 78 78 78 78 78
+match f5 ff 01 80 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 f5 09 01 00 78 78 78 78 78
 
 decode-pair f5 ff 01 80 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 f5 09 01 00 78 78 78 78 79
-data Attr-245.1 = 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787879
+match Attr-245.1 = 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787879
 
 #
 #  A VSA which has lots of data
 #
 raw 245.26.1.6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccc13456789
-data f5 ff 1a 80 00 00 00 01 06 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb f5 17 1a 00 bb bb bb bb bb cc cc cc cc cc cc cc cc cc cc 13 45 67 89
+match f5 ff 1a 80 00 00 00 01 06 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb f5 17 1a 00 bb bb bb bb bb cc cc cc cc cc cc cc cc cc cc 13 45 67 89
 
 decode-pair f5 ff 1a 80 00 00 00 01 06 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb f5 17 1a 00 bb bb bb bb bb cc cc cc cc cc cc cc cc cc cc 13 45 67 89
-data Attr-245.26.1.6 = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccc13456789
+match Attr-245.26.1.6 = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccc13456789
 
 # Same as above, but the first attribute doesn't have
 # the "continuation" bit set.
 #
 #  Which means we decode-pair the second attribute as an EVS with vendor-ID of 0xbbbbbbbb
 decode-pair f5 ff 1a 00 00 00 00 01 06 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb f5 17 1a 00 bb bb bb bb bb cc cc cc cc cc cc cc cc cc cc 13 45 67 89
-data Attr-245.26.1.6 = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, Attr-245.26.3149642683.187 = 0xcccccccccccccccccccc13456789
+match Attr-245.26.1.6 = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, Attr-245.26.3149642683.187 = 0xcccccccccccccccccccc13456789
 
 
 # again, but the second one attr is not an extended attr
 decode-pair f5 ff 1a 80 00 00 00 01 06 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ab bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb 01 05 62 6f 62
-data Attr-245.26.1.6 = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, User-Name = "bob"
+match Attr-245.26.1.6 = 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, User-Name = "bob"
 
 # No data means that the attribute is an "invalid attribute"
 decode-pair f5 04 01 00
-data Attr-245 = 0x0100
+match Attr-245 = 0x0100
 
 # No "flags" field means it's an invalid attribute.
 decode-pair f5 03 01
-data Attr-245 = 0x01
+match Attr-245 = 0x01
 
 decode-pair f5 09 1a 00 00 00 00 01 06
-data Attr-245.26 = 0x0000000106
+match Attr-245.26 = 0x0000000106
 
 decode-pair f5 0a 1a 00 00 00 00 01 06 01
-data Attr-245.26.1.6 = 0x01
+match Attr-245.26.1.6 = 0x01
 
 decode-pair f5 09 1a 80 00 00 00 01 06 f5 05 1a 80 01
-data Attr-245.26.1.6 = 0x01
+match Attr-245.26.1.6 = 0x01
 
 decode-pair f5 0a 1a 80 00 00 00 01 06 01 f5 05 1a 80 01
-data Attr-245.26.1.6 = 0x0101
+match Attr-245.26.1.6 = 0x0101
index 1813c84b891127f0e6ba1a351717c44e6cfd39d1..3bd972c209a86d306633303f3638ce8f30469499 100644 (file)
@@ -2,13 +2,13 @@ load radius
 dictionary-load radius
 
 encode-pair Lucent-Max-Shared-Users = 1
-data 1a 0d 00 00 12 ee 00 02 07 00 00 00 01
+match 1a 0d 00 00 12 ee 00 02 07 00 00 00 01
 
 decode-pair -
-data Lucent-Max-Shared-Users = 1
+match Lucent-Max-Shared-Users = 1
 
 decode-pair 1a 0d 00 00 12 ee ff 02 07 00 00 00 01
-data Attr-26.4846.65282 = 0x00000001
+match Attr-26.4846.65282 = 0x00000001
 
 encode-pair -
-data 1a 0d 00 00 12 ee ff 02 07 00 00 00 01
+match 1a 0d 00 00 12 ee ff 02 07 00 00 00 01
index 8f92275172da0bc8f84d2dad806def4ed5859a8f..16404d63e7b12aea15f719638e4e92ee4533c8f3 100644 (file)
@@ -78,126 +78,126 @@ load radius
 dictionary-load radius
 
 encode-pair User-Name = "bob"
-data 01 05 62 6f 62
+match 01 05 62 6f 62
 
 decode-pair -
-data User-Name = "bob"
+match User-Name = "bob"
 
 decode-pair 01 05 62 6f 62
-data User-Name = "bob"
+match User-Name = "bob"
 
 #
 #  The Type/Length is OK, but the attribute data is of the wrong size.
 #
 decode-pair 04 04 ab cd
-data Attr-4 = 0xabcd
+match Attr-4 = 0xabcd
 
 #  Zero-length attributes
 decode-pair 01 02
-data
+match
 
 # don't encode-pair zero-length attributes
 encode-pair User-Name = ""
-data
+match
 
 # except for CUI.  Thank you, WiMAX!
 decode-pair 59 02
-data Chargeable-User-Identity = 0x
+match Chargeable-User-Identity = 0x
 
 # Hah! Thought you had it figured out, didn't you?
 encode-pair -
-data 59 02
+match 59 02
 
 attribute Framed-IP-Address = 127.0.0.1/32
-data Framed-IP-Address = 127.0.0.1
+match Framed-IP-Address = 127.0.0.1
 
 attribute Framed-IP-Address = 127.0.0.1/323
-data Invalid IPv4 mask length "/323".  Should be between 0-32
+match Invalid IPv4 mask length "/323".  Should be between 0-32
 
 attribute Framed-IP-Address = 127.0.0.1/30
-data Invalid IPv4 mask length "/30".  Only "/32" permitted for non-prefix types
+match Invalid IPv4 mask length "/30".  Only "/32" permitted for non-prefix types
 
 attribute Framed-IP-Address = *
-data Framed-IP-Address = 0.0.0.0
+match Framed-IP-Address = 0.0.0.0
 
 attribute Framed-IP-Address = 127
-data Framed-IP-Address = 0.0.0.127
+match Framed-IP-Address = 0.0.0.127
 
 attribute Framed-IP-Address = 127.0
-data Framed-IP-Address = 127.0.0.0
+match Framed-IP-Address = 127.0.0.0
 
 #
 #  The encode-pairr should work...
 #
 encode-pair -
-data 08 06 7f 00 00 00
+match 08 06 7f 00 00 00
 
 decode-pair -
-data Framed-IP-Address = 127.0.0.0
+match Framed-IP-Address = 127.0.0.0
 
 attribute Framed-IPv6-Prefix = ::1
-data Framed-IPv6-Prefix = ::1/128
+match Framed-IPv6-Prefix = ::1/128
 
 attribute Framed-IPv6-Prefix = ::1/200
-data Invalid IPv6 mask length "/200".  Should be between 0-128
+match Invalid IPv6 mask length "/200".  Should be between 0-128
 
 attribute Framed-IPv6-Prefix = ::1/200
-data Invalid IPv6 mask length "/200".  Should be between 0-128
+match Invalid IPv6 mask length "/200".  Should be between 0-128
 
 attribute Framed-IPv6-Prefix = 11:22:33:44:55:66:77:88/128
-data Framed-IPv6-Prefix = 11:22:33:44:55:66:77:88/128
+match Framed-IPv6-Prefix = 11:22:33:44:55:66:77:88/128
 
 attribute Framed-IPv6-Prefix = *
-data Framed-IPv6-Prefix = ::/128
+match Framed-IPv6-Prefix = ::/128
 
 attribute PMIP6-Home-IPv4-HoA = 127/8
-data PMIP6-Home-IPv4-HoA = 127.0.0.0/8
+match PMIP6-Home-IPv4-HoA = 127.0.0.0/8
 
 attribute PMIP6-Home-IPv4-HoA = 127/8
-data PMIP6-Home-IPv4-HoA = 127.0.0.0/8
+match PMIP6-Home-IPv4-HoA = 127.0.0.0/8
 
 #
 #  Octets outside of the mask are OK, but
 #  are mashed to zero.
 #
 attribute PMIP6-Home-IPv4-HoA = 127.63/8
-data PMIP6-Home-IPv4-HoA = 127.0.0.0/8
+match PMIP6-Home-IPv4-HoA = 127.0.0.0/8
 
 #
 #  Unless you give a good mask.
 #
 attribute PMIP6-Home-IPv4-HoA = 127.63/16
-data PMIP6-Home-IPv4-HoA = 127.63.0.0/16
+match PMIP6-Home-IPv4-HoA = 127.63.0.0/16
 
 attribute PMIP6-Home-IPv4-HoA = 127.999/16
-data Failed to parse IPv4 prefix string "127.999/16"
+match Failed to parse IPv4 prefix string "127.999/16"
 
 attribute PMIP6-Home-IPv4-HoA = 127.bob/16
-data Failed to parse IPv4 prefix string "127.bob/16"
+match Failed to parse IPv4 prefix string "127.bob/16"
 
 attribute PMIP6-Home-IPv4-HoA = 127.63/15
-data PMIP6-Home-IPv4-HoA = 127.62.0.0/15
+match PMIP6-Home-IPv4-HoA = 127.62.0.0/15
 
 attribute PMIP6-Home-IPv4-HoA = 127.63.1/24
-data PMIP6-Home-IPv4-HoA = 127.63.1.0/24
+match PMIP6-Home-IPv4-HoA = 127.63.1.0/24
 
 attribute PMIP6-Home-IPv4-HoA = 127.63.1.6
-data PMIP6-Home-IPv4-HoA = 127.63.1.6/32
+match PMIP6-Home-IPv4-HoA = 127.63.1.6/32
 
 attribute PMIP6-Home-IPv4-HoA = 256/8
-data Failed to parse IPv4 prefix string "256/8"
+match Failed to parse IPv4 prefix string "256/8"
 
 attribute PMIP6-Home-IPv4-HoA = bob/8
-data Failed to parse IPv4 prefix string "bob/8"
+match Failed to parse IPv4 prefix string "bob/8"
 
 #
 #  Concatenated messages
 #
 attribute EAP-Message = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa"
-data EAP-Message = 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787861
+match EAP-Message = 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787861
 
 encode-pair -
-data 4f ff 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 4f 32 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 61
+match 4f ff 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 4f 32 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 61
 
 decode-pair -
-data EAP-Message = 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787861
+match EAP-Message = 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787861
index 353e0524b4e5c4aca1d1e0684768f1003d825081..eec5ed554c250a2d5236ebab97dffcc74d3a2942 100644 (file)
@@ -5,10 +5,10 @@ dictionary-load radius
 #  Structs in RADIUS
 #
 encode-pair Unit-Struct1-Int1 = 1, Unit-Struct1-Int2 = 2, Unit-Struct1-Short = 4, Unit-Struct1-String = "foo"
-data f1 10 f7 00 00 00 01 00 00 00 02 00 04 66 6f 6f
+match f1 10 f7 00 00 00 01 00 00 00 02 00 04 66 6f 6f
 
 decode-pair -
-data Unit-Struct1-Int1 = 1, Unit-Struct1-Int2 = 2, Unit-Struct1-Short = 4, Unit-Struct1-String = "foo"
+match Unit-Struct1-Int1 = 1, Unit-Struct1-Int2 = 2, Unit-Struct1-Short = 4, Unit-Struct1-String = "foo"
 
 #
 # And structs where the last part is a TLV.
@@ -16,49 +16,49 @@ data Unit-Struct1-Int1 = 1, Unit-Struct1-Int2 = 2, Unit-Struct1-Short = 4, Unit-
 #  Note that we don't encode the TLV itself, only the children.
 #
 encode-pair Unit-Struct2-Int1 = 1, Unit-Struct2-Short = 4, Unit-Struct2-TLV-Int1 = 6, Unit-Struct2-TLV-Int2 = 7, Unit-Struct2-TLV-String = "foo"
-data f1 1a f8 00 00 00 01 00 04 01 06 00 00 00 06 02 06 00 00 00 07 03 05 66 6f 6f
+match f1 1a f8 00 00 00 01 00 04 01 06 00 00 00 06 02 06 00 00 00 07 03 05 66 6f 6f
 
 decode-pair -
-data Unit-Struct2-Int1 = 1, Unit-Struct2-Short = 4, Unit-Struct2-TLV-Int1 = 6, Unit-Struct2-TLV-Int2 = 7, Unit-Struct2-TLV-String = "foo"
+match Unit-Struct2-Int1 = 1, Unit-Struct2-Short = 4, Unit-Struct2-TLV-Int1 = 6, Unit-Struct2-TLV-Int2 = 7, Unit-Struct2-TLV-String = "foo"
 
 encode-pair Unit-Struct3-Int = 1, Unit-Struct3a-Ipaddr1 = 127.0.0.1, Unit-Struct3a-Ipaddr2 = 8.8.8.8
-data f1 11 f9 00 00 00 01 01 0a 7f 00 00 01 08 08 08 08
+match f1 11 f9 00 00 00 01 01 0a 7f 00 00 01 08 08 08 08
 
 decode-pair -
-data Unit-Struct3-Int = 1, Unit-Struct3a-Ipaddr1 = 127.0.0.1, Unit-Struct3a-Ipaddr2 = 8.8.8.8
+match Unit-Struct3-Int = 1, Unit-Struct3a-Ipaddr1 = 127.0.0.1, Unit-Struct3a-Ipaddr2 = 8.8.8.8
 
 #
 #  Fixed size struct
 #
 encode-pair Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4
-data f1 0d fa 00 00 00 01 00 00 00 02 00 04
+match f1 0d fa 00 00 00 01 00 00 00 02 00 04
 
 decode-pair -
-data Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4
+match Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4
 
 #
 #  Wrong-sized struct (last field missing), it just decodes what it can.
 #
 decode-pair f1 0b fa 00 00 00 01 00 00 00 02
-data Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2
+match Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2
 
 #
 #  Wrong-sized struct (last two fields missing), it just decodes what it can.
 #
 decode-pair f1 07 fa 00 00 00 01
-data Unit-Struct4-Int1 = 1
+match Unit-Struct4-Int1 = 1
 
 #
 #  Wrong-sized struct (data is too long), we ignore the extra data.
 #
 decode-pair f1 0e fa 00 00 00 01 00 00 00 02 00 04 00
-data Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4
+match Unit-Struct4-Int1 = 1, Unit-Struct4-Int2 = 2, Unit-Struct4-Short = 4
 
 decode-pair ff 09 01 00 00 1a 99 05 06
-data Key-Field = Sub-Struct, Filler = 6809, Nested-Sub1 = 5, Nested-Sub2 = 6
+match Key-Field = Sub-Struct, Filler = 6809, Nested-Sub1 = 5, Nested-Sub2 = 6
 
 encode-pair Key-Field = Sub-Struct, \
                        Filler = 6809, \
                        Nested-Sub1 = 5, \
                        Nested-Sub2 = 6
-data ff 0b 01 00 00 1a 99 01 04 05 06
+match ff 0b 01 00 00 1a 99 01 04 05 06
index b0428255751b3257db40e8d5a6b314062f982304..2f25b7a5565885147a3940ac7689dfefd8eec692 100644 (file)
@@ -7,71 +7,71 @@ dictionary-load radius
 #
 encode-pair Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxabc"
 decode-pair -
-data Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxabc"
+match Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxabc"
 
 encode-pair Tunnel-Password:0 = "0"
 decode-pair -
-data Tunnel-Password:0 = "0"
+match Tunnel-Password:0 = "0"
 
 encode-pair Tunnel-Password:0 = "01"
 decode-pair -
-data Tunnel-Password:0 = "01"
+match Tunnel-Password:0 = "01"
 
 encode-pair Tunnel-Password:0 = "012"
 decode-pair -
-data Tunnel-Password:0 = "012"
+match Tunnel-Password:0 = "012"
 
 encode-pair Tunnel-Password:0 = "0123"
 decode-pair -
-data Tunnel-Password:0 = "0123"
+match Tunnel-Password:0 = "0123"
 
 encode-pair Tunnel-Password:0 = "01234"
 decode-pair -
-data Tunnel-Password:0 = "01234"
+match Tunnel-Password:0 = "01234"
 
 encode-pair Tunnel-Password:0 = "012345"
 decode-pair -
-data Tunnel-Password:0 = "012345"
+match Tunnel-Password:0 = "012345"
 
 encode-pair Tunnel-Password:0 = "0123456"
 decode-pair -
-data Tunnel-Password:0 = "0123456"
+match Tunnel-Password:0 = "0123456"
 
 encode-pair Tunnel-Password:0 = "01234567"
 decode-pair -
-data Tunnel-Password:0 = "01234567"
+match Tunnel-Password:0 = "01234567"
 
 encode-pair Tunnel-Password:0 = "012345678"
 decode-pair -
-data Tunnel-Password:0 = "012345678"
+match Tunnel-Password:0 = "012345678"
 
 encode-pair Tunnel-Password:0 = "0123456789"
 decode-pair -
-data Tunnel-Password:0 = "0123456789"
+match Tunnel-Password:0 = "0123456789"
 
 encode-pair Tunnel-Password:0 = "0123456789a"
 decode-pair -
-data Tunnel-Password:0 = "0123456789a"
+match Tunnel-Password:0 = "0123456789a"
 
 encode-pair Tunnel-Password:0 = "0123456789ab"
 decode-pair -
-data Tunnel-Password:0 = "0123456789ab"
+match Tunnel-Password:0 = "0123456789ab"
 
 encode-pair Tunnel-Password:0 = "0123456789abc"
 decode-pair -
-data Tunnel-Password:0 = "0123456789abc"
+match Tunnel-Password:0 = "0123456789abc"
 
 encode-pair Tunnel-Password:0 = "0123456789abcd"
 decode-pair -
-data Tunnel-Password:0 = "0123456789abcd"
+match Tunnel-Password:0 = "0123456789abcd"
 
 encode-pair Tunnel-Password:0 = "0123456789abcde"
 decode-pair -
-data Tunnel-Password:0 = "0123456789abcde"
+match Tunnel-Password:0 = "0123456789abcde"
 
 encode-pair Tunnel-Password:0 = "0123456789abcdef"
 decode-pair -
-data Tunnel-Password:0 = "0123456789abcdef"
+match Tunnel-Password:0 = "0123456789abcdef"
 
 #
 #  We can't look at the data here, because the encode-paird Tunnel-Password has a 2 byte
@@ -79,7 +79,7 @@ data Tunnel-Password:0 = "0123456789abcdef"
 #
 encode-pair Tunnel-Password:0 := "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
 decode-pair -
-data Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+match Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
 
 #
 #  1 octet for the tag.  2 octets for salt.  One octet for encrypted length.
@@ -87,4 +87,4 @@ data Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 #
 encode-pair Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789ab"
 decode-pair -
-data Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789"
+match Tunnel-Password:0 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx123456789"
index 98f217b963704ab80898301e502f792a857c1ae8..9e08301f8067f6fae2427e8da65887eca94cc98c 100644 (file)
@@ -6,31 +6,31 @@ dictionary-load radius
 #  And using the dictionaries
 #
 encode-pair Unit-EVS-5-Integer = 1, Unit-EVS-5-Integer = 2
-data f5 0d 1a 00 00 00 2c 50 01 00 00 00 01 f5 0d 1a 00 00 00 2c 50 01 00 00 00 02
+match f5 0d 1a 00 00 00 2c 50 01 00 00 00 01 f5 0d 1a 00 00 00 2c 50 01 00 00 00 02
 
 attribute Unit-Ext-241-Integer = 6809
-data Unit-Ext-241-Integer = 6809
+match Unit-Ext-241-Integer = 6809
 
 encode-pair Unit-Ext-241-Integer = 6809
-data f1 07 f1 00 00 1a 99
+match f1 07 f1 00 00 1a 99
 
 decode-pair -
-data Unit-Ext-241-Integer = 6809
+match Unit-Ext-241-Integer = 6809
 
 #
 #  Encoded as two different top-level attributes.
 #
 encode-pair Unit-Ext-241-Integer = 6809, Unit-Ext-241-Integer = 2112
-data f1 07 f1 00 00 1a 99 f1 07 f1 00 00 08 40
+match f1 07 f1 00 00 1a 99 f1 07 f1 00 00 08 40
 
 #
 #  EVS data types
 #
 encode-pair Unit-EVS-Integer = 6809
-data f2 0c 1a 00 00 2c 50 01 00 00 1a 99
+match f2 0c 1a 00 00 2c 50 01 00 00 1a 99
 
 decode-pair -
-data Unit-EVS-Integer = 6809
+match Unit-EVS-Integer = 6809
 
 #
 #  This is ambiguous, so we do something.  Anything...
@@ -38,51 +38,51 @@ data Unit-EVS-Integer = 6809
 #  that format instead of guessing.
 #
 encode-pair Unit-TLV-Integer = 1, Unit-TLV-Integer = 2
-data f1 0f f3 01 06 00 00 00 01 01 06 00 00 00 02
+match f1 0f f3 01 06 00 00 00 01 01 06 00 00 00 02
 
 decode-pair -
-data Unit-TLV-Integer = 1, Unit-TLV-Integer = 2
+match Unit-TLV-Integer = 1, Unit-TLV-Integer = 2
 
 #
 #  And "long extended" EVS
 #
 encode-pair Unit-EVS-5-Integer = 1, Unit-EVS-5-Integer = 2
-data f5 0d 1a 00 00 00 2c 50 01 00 00 00 01 f5 0d 1a 00 00 00 2c 50 01 00 00 00 02
+match f5 0d 1a 00 00 00 2c 50 01 00 00 00 01 f5 0d 1a 00 00 00 2c 50 01 00 00 00 02
 
 decode-pair -
-data Unit-EVS-5-Integer = 1, Unit-EVS-5-Integer = 2
+match Unit-EVS-5-Integer = 1, Unit-EVS-5-Integer = 2
 
 encode-pair Event-Timestamp := 864000
-data 37 06 00 0d 2f 00
+match 37 06 00 0d 2f 00
 
 # Same as from "data_types.txt"
 decode-pair -
-data Event-Timestamp = "Jan 11 1970 00:00:00 UTC"
+match Event-Timestamp = "Jan 11 1970 00:00:00 UTC"
 
 encode-pair -
-data 37 06 00 0d 2f 00
+match 37 06 00 0d 2f 00
 
 # Can we parse RFC 3339 dates correctly?
 attribute Unit-TLV-Milliseconds = "2019-08-21T07:40:31.123-04:00"
-data Unit-TLV-Milliseconds = "2019-08-21T03:40:31.123Z"
+match Unit-TLV-Milliseconds = "2019-08-21T03:40:31.123Z"
 
 #
 #  Time delta in milliseconds.
 #
 attribute Unit-TLV-Delta-MSec = 5
-data Unit-TLV-Delta-MSec = 5
+match Unit-TLV-Delta-MSec = 5
 
 encode-pair -
-data fe 08 02 06 00 00 00 05
+match fe 08 02 06 00 00 00 05
 
 decode-pair -
-data Unit-TLV-Delta-MSec = 5
+match Unit-TLV-Delta-MSec = 5
 
 attribute Unit-TLV-Delta-Sec = 10
-data Unit-TLV-Delta-Sec = 10
+match Unit-TLV-Delta-Sec = 10
 
 encode-pair -
-data fe 08 03 06 00 00 00 0a
+match fe 08 03 06 00 00 00 0a
 
 decode-pair -
-data Unit-TLV-Delta-Sec = 10
+match Unit-TLV-Delta-Sec = 10
index a78f9a6d2dc4b66264edb7a607548c5bce1cdf8d..aff8c35ed580956f02d278c821bb5a8e727ae7d6 100644 (file)
@@ -2,56 +2,56 @@ load radius
 dictionary-load radius
 
 encode-pair SN-VPN-Name = "foo"
-data 1a 0d 00 00 1f e4 00 02 00 07 66 6f 6f
+match 1a 0d 00 00 1f e4 00 02 00 07 66 6f 6f
 
 decode-pair -
-data SN-VPN-Name = "foo"
+match SN-VPN-Name = "foo"
 
 encode-pair USR-Event-Id = 1234
-data 1a 0e 00 00 01 ad 00 00 bf be 00 00 04 d2
+match 1a 0e 00 00 01 ad 00 00 bf be 00 00 04 d2
 
 decode-pair -
-data USR-Event-Id = 1234
+match USR-Event-Id = 1234
 
 decode-pair 1a 15 00 00 4e 20 01 0f 6c 69 74 68 69 61 73 70 72 69 6e 67 73
-data Attr-26.20000.1 = 0x6c6974686961737072696e6773
+match Attr-26.20000.1 = 0x6c6974686961737072696e6773
 
 encode-pair 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
-data 1a 0c 00 00 00 2b 01 06 00 00 00 00 1a 26 00 00 00 2b 3c 20 31 35 35 2e 34 2e 31 32 2e 31 30 30 20 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30
+match 1a 0c 00 00 00 2b 01 06 00 00 00 00 1a 26 00 00 00 2b 3c 20 31 35 35 2e 34 2e 31 32 2e 31 30 30 20 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30
 
 decode-pair -
-data 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
+match 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
 
 #
 #  The VSAs could also be packet into one Vendor-Specific
 #
 decode-pair 1a 2e 00 00 00 2b 1c 02 01 06 00 00 00 00 3c 20 31 35 35 2e 34 2e 31 32 2e 31 30 30 20 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30
-data 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
+match 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
 
 decode-pair 1a 2c 00 00 00 2b 01 06 00 00 00 00 3c 20 31 35 35 2e 34 2e 31 32 2e 31 30 30 20 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30 3a 30 30
-data 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
+match 3Com-User-Access-Level = 3Com-Visitor, 3Com-Ip-Host-Addr = "155.4.12.100 00:00:00:00:00:00"
 
 encode-pair Vendor-Specific = 0xabcdef
-data Must use 'Attr-26 = ...' instead of 'Vendor-Specific = ...'
+match Must use 'Attr-26 = ...' instead of 'Vendor-Specific = ...'
 
 encode-pair Attr-26 = 0x00000009abcdef
-data 1a 09 00 00 00 09 ab cd ef
+match 1a 09 00 00 00 09 ab cd ef
 
 attribute Attr-26 = 0x00000009abcdef
-data Attr-26 = 0x00000009abcdef
+match Attr-26 = 0x00000009abcdef
 attribute Ascend-Data-Filter = 0x01010100010203040a0b0c0d05200600000504d2020200000000000000000000
-data Ascend-Data-Filter = "ip in forward srcip 1.2.3.4/5 dstip 10.11.12.13/32 tcp srcport = 5 dstport = 1234"
+match Ascend-Data-Filter = "ip in forward srcip 1.2.3.4/5 dstip 10.11.12.13/32 tcp srcport = 5 dstport = 1234"
 
 encode-pair -
-data 1a 28 00 00 02 11 f2 22 01 01 01 00 01 02 03 04 0a 0b 0c 0d 05 20 06 00 00 05 04 d2 02 02 00 00 00 00 00 00 00 00 00 00
+match 1a 28 00 00 02 11 f2 22 01 01 01 00 01 02 03 04 0a 0b 0c 0d 05 20 06 00 00 05 04 d2 02 02 00 00 00 00 00 00 00 00 00 00
 
 decode-pair 1a2800000211f22201010100010203040a0b0c0d05200600000504d2020200000000000000000000
-data Ascend-Data-Filter = "ip in forward srcip 1.2.3.4/5 dstip 10.11.12.13/32 tcp srcport = 5 dstport = 1234"
+match Ascend-Data-Filter = "ip in forward srcip 1.2.3.4/5 dstip 10.11.12.13/32 tcp srcport = 5 dstport = 1234"
 
 # this untagged tunnel encrypted VSA is valid in both access accepts and CoA requests
 encode-pair ERX-LI-Action = off
 decode-pair -
-data ERX-LI-Action = off
+match ERX-LI-Action = off
 
 #packet coa_request
 #original null
index 6838315e28face7ce6c102be691ab8a718dc4e13..af1b642019ed1f818f2a39d94871ee2728c12839 100644 (file)
@@ -5,28 +5,28 @@ dictionary-load radius
 #  Test vectors for WiMAX attributes.
 #
 encode-pair WiMAX-Release = "1.0"
-data 1a 0e 00 00 60 b5 01 08 00 01 05 31 2e 30
+match 1a 0e 00 00 60 b5 01 08 00 01 05 31 2e 30
 
 decode-pair -
-data WiMAX-Release = "1.0"
+match WiMAX-Release = "1.0"
 
 encode-pair WiMAX-Accounting-Capabilities = 1
-data 1a 0c 00 00 60 b5 01 06 00 02 03 01
+match 1a 0c 00 00 60 b5 01 06 00 02 03 01
 
 decode-pair -
-data WiMAX-Accounting-Capabilities = IP-Session-Based
+match WiMAX-Accounting-Capabilities = IP-Session-Based
 
 encode-pair WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = 1
-data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 03 01
+match 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 03 01
 
 decode-pair -
-data WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = IP-Session-Based
+match WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = IP-Session-Based
 
 encode-pair -
-data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 03 01
+match 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 03 01
 
 encode-pair WiMAX-PFDv2-Classifier-Direction = 1
-data 1a 0e 00 00 60 b5 54 08 00 09 05 04 03 01
+match 1a 0e 00 00 60 b5 54 08 00 09 05 04 03 01
 
 # Encoding this as an unknown should have it also encode-pair to the right data.
 #
@@ -41,117 +41,117 @@ data 1a 0e 00 00 60 b5 54 08 00 09 05 04 03 01
 #data WiMAX-PFDv2-Classifier-Direction = 1
 
 encode-pair WiMAX-PFDv2-Classifier-Direction = 1, WiMAX-PFDv2-Src-Port = 6809
-data 1a 14 00 00 60 b5 54 0e 00 09 0b 04 03 01 05 06 04 04 1a 99
+match 1a 14 00 00 60 b5 54 0e 00 09 0b 04 03 01 05 06 04 04 1a 99
 
 decode-pair -
-data WiMAX-PFDv2-Classifier-Direction = 1, WiMAX-PFDv2-Src-Port = 6809
+match WiMAX-PFDv2-Classifier-Direction = 1, WiMAX-PFDv2-Src-Port = 6809
 
 decode-pair 1a 11 00 00 60 b5 54 0b 00 09 08 05 06 04 04 1a 99
-data WiMAX-PFDv2-Src-Port = 6809
+match WiMAX-PFDv2-Src-Port = 6809
 
 # 26.24757.84.9.4 has the correct length.
 # 26.24757.84.9.5 has the correct length.
 # 26.24757.84.9.5.4 has the wrong length.
 decode-pair 1a 14 00 00 60 b5 54 0e 00 09 0b 04 03 01 05 06 04 05 1a 99
-data WiMAX-PFDv2-Classifier-Direction = 1, Attr-26.24757.84.9.5 = 0x04051a99
+match WiMAX-PFDv2-Classifier-Direction = 1, Attr-26.24757.84.9.5 = 0x04051a99
 
 # The 26.24757.1 has the wrong length
 decode-pair 1a 11 00 00 60 b5 01 0a 00 01 05 31 2e 30 02 03 01
-data Attr-26 = 0x000060b5010a000105312e30020301
+match Attr-26 = 0x000060b5010a000105312e30020301
 
 encode-pair -
-data 1a 11 00 00 60 b5 01 0a 00 01 05 31 2e 30 02 03 01
+match 1a 11 00 00 60 b5 01 0a 00 01 05 31 2e 30 02 03 01
 
 decode-pair 1a 11 00 00 60 b5 01 0c 00 01 05 31 2e 30 02 03 01
-data Attr-26 = 0x000060b5010c000105312e30020301
+match Attr-26 = 0x000060b5010c000105312e30020301
 
 encode-pair -
-data 1a 11 00 00 60 b5 01 0c 00 01 05 31 2e 30 02 03 01
+match 1a 11 00 00 60 b5 01 0c 00 01 05 31 2e 30 02 03 01
 
 # 26.24757.1.1 has the wrong length
 decode-pair 1a 11 00 00 60 b5 01 0b 00 01 04 31 2e 30 02 03 01
-data Attr-26.24757.1 = 0x0104312e30020301
+match Attr-26.24757.1 = 0x0104312e30020301
 
 decode-pair 1a 11 00 00 60 b5 01 0b 00 01 06 31 2e 30 02 03 01
-data Attr-26.24757.1 = 0x0106312e30020301
+match Attr-26.24757.1 = 0x0106312e30020301
 
 encode-pair -
-data 1a 11 00 00 60 b5 01 0b 00 01 06 31 2e 30 02 03 01
+match 1a 11 00 00 60 b5 01 0b 00 01 06 31 2e 30 02 03 01
 
 
 # 26.24757.1.2 has the wrong length
 decode-pair 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 02 01
-data Attr-26.24757.1 = 0x0105312e30020201
+match Attr-26.24757.1 = 0x0105312e30020201
 
 encode-pair -
-data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 02 01
+match 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 02 01
 
 # 26.24757.1.1 has the correct length
 # 26.24757.1.2 has the wrong length
 # This means that 26.24757.1 is invalid, and we create a raw attribute.
 decode-pair 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 04 01
-data Attr-26.24757.1 = 0x0105312e30020401
+match Attr-26.24757.1 = 0x0105312e30020401
 
 encode-pair -
-data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 04 01
+match 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 04 01
 
 encode-pair WiMAX-PFDv2-Eth-Priority-Range-Low = 55
-data 1a 12 00 00 60 b5 54 0c 00 09 09 09 07 03 05 01 03 37
+match 1a 12 00 00 60 b5 54 0c 00 09 09 09 07 03 05 01 03 37
 
 encode-pair WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
-data 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 03 37 02 03 54
+match 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 03 37 02 03 54
 
 decode-pair -
-data WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
+match WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
 
 #  A less efficient encoding of the above data
 decode-pair 1a 17 00 00 60 b5 54 11 00 09 0e 09 0c 03 05 01 03 37 03 05 02 03 54
-data WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
+match WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
 
 # 26.24757.84.9.9.3.1 has the wrong length
 decode-pair 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 04 37 02 03 54
-data Attr-26.24757.84.9.9.3 = 0x010437020354
+match Attr-26.24757.84.9.9.3 = 0x010437020354
 
 # 26.24757.84.9.9.3.2 has the wrong length
 decode-pair 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 03 37 02 04 54
-data Attr-26.24757.84.9.9.3 = 0x010337020454
+match Attr-26.24757.84.9.9.3 = 0x010337020454
 
 # 26.24757.84.9.9.3.2 has the wrong length
 # This means that the SECOND 26.24757.84.9.9.3 is invalid.
 decode-pair 1a 17 00 00 60 b5 54 11 00 09 0e 09 0c 03 05 01 03 37 03 05 02 04 54
-data WiMAX-PFDv2-Eth-Priority-Range-Low = 55, Attr-26.24757.84.9.9.3 = 0x020454
+match WiMAX-PFDv2-Eth-Priority-Range-Low = 55, Attr-26.24757.84.9.9.3 = 0x020454
 
 # 26.24757.84.9.9.3.1 has the wrong length
 # This means that 26.24757.84.9.9.3 is invalid.
 decode-pair 1a 17 00 00 60 b5 54 11 00 09 0e 09 0c 03 05 01 02 37 03 05 02 03 54
-data Attr-26.24757.84.9.9.3 = 0x010237, WiMAX-PFDv2-Eth-Priority-Range-High = 84
+match Attr-26.24757.84.9.9.3 = 0x010237, WiMAX-PFDv2-Eth-Priority-Range-High = 84
 
 #
 #  Simple test for continued attributes
 #
 decode-pair 1a 0e 00 00 60 b5 01 08 80 01 05 31 2e 30 1a 0c 00 00 60 b5 01 06 00 02 03 00
-data WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = No-Accounting
+match WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = No-Accounting
 
 #
 #  See if encoding multiple attributes works
 #
 encode-pair WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32
-data 1a 17 00 00 60 b5 1c 11 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20
+match 1a 17 00 00 60 b5 1c 11 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20
 
 encode-pair WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33
-data 1a 17 00 00 60 b5 1c 11 00 01 04 00 21 02 04 00 21 03 06 00 00 00 21
+match 1a 17 00 00 60 b5 1c 11 00 01 04 00 21 02 04 00 21 03 06 00 00 00 21
 
 encode-pair WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33
-data 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21
+match 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21
 
 encode-pair WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33, Session-Timeout := 7200
-data 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21 1b 06 00 00 1c 20
+match 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21 1b 06 00 00 1c 20
 
 encode-pair Acct-Interim-Interval := 3600, WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33, Session-Timeout := 7200
-data 55 06 00 00 0e 10 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21 1b 06 00 00 1c 20
+match 55 06 00 00 0e 10 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21 1b 06 00 00 1c 20
 
 encode-pair WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, Session-Timeout := 7200, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33
-data 1a 17 00 00 60 b5 1c 11 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 1b 06 00 00 1c 20 1a 17 00 00 60 b5 1c 11 00 01 04 00 21 02 04 00 21 03 06 00 00 00 21
+match 1a 17 00 00 60 b5 1c 11 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 1b 06 00 00 1c 20 1a 17 00 00 60 b5 1c 11 00 01 04 00 21 02 04 00 21 03 06 00 00 00 21
 
 #
 #  For now, we disallow the create of VPs with an attribute of type TLV, and octets data.
index 6dd21955b825cecf3aefa5c63847fadaf25446d7..24edf9168601b25aa4e3ebbd9b4294777be2326a 100644 (file)
@@ -1,52 +1,52 @@
 dictionary-load radius
 
 condition &User-Name !~ /^foo\nbar$/
-data !&User-Name =~ /^foo\nbar$/
+match !&User-Name =~ /^foo\nbar$/
 
 condition (ok =~ handled)
-data ERROR offset 7 Expected regular expression
+match ERROR offset 7 Expected regular expression
 
 condition (ok == /foo/)
-data ERROR offset 7 Unexpected regular expression
+match ERROR offset 7 Unexpected regular expression
 
 condition /foo/ =~ bar
-data ERROR offset 0 Unexpected regular expression
+match ERROR offset 0 Unexpected regular expression
 
 #
 #  Convert !~ to !(COND) for regex
 #
 condition foo =~ /bar/
-data foo =~ /bar/
+match foo =~ /bar/
 
 condition foo !~ /bar/
-data !foo =~ /bar/
+match !foo =~ /bar/
 
 condition !foo !~ /bar/
-data foo =~ /bar/
+match foo =~ /bar/
 
 #
 #  Flags
 #
 condition foo =~ /bar/i
-data foo =~ /bar/i
+match foo =~ /bar/i
 
 condition foo =~ /bar/m
-data foo =~ /bar/m
+match foo =~ /bar/m
 
 condition foo =~ /bar/im
-data foo =~ /bar/im
+match foo =~ /bar/im
 
 condition foo =~ /bar/gimsux
-data foo =~ /bar/gimsux
+match foo =~ /bar/gimsux
 
 condition foo =~ /bar/ima
-data ERROR offset 14 Unexpected text after condition
+match ERROR offset 14 Unexpected text after condition
 
 condition foo =~ /bar/ii
-data ERROR offset 13 Duplicate flag
+match ERROR offset 13 Duplicate flag
 
 condition foo =~ /bar/iia
-data ERROR offset 13 Duplicate flag
+match ERROR offset 13 Duplicate flag
 
 #
 #  Escape the backslashes correctly
@@ -54,19 +54,19 @@ data ERROR offset 13 Duplicate flag
 #
 
 condition &User-Name =~ /@|\\/
-data &User-Name =~ /@|\\/
+match &User-Name =~ /@|\\/
 
 condition &User-Name =~ /^([^\\]*)\\(.*)$/
-data &User-Name =~ /^([^\\]*)\\(.*)$/
+match &User-Name =~ /^([^\\]*)\\(.*)$/
 
 xlat %{1}
-data %{1}
+match %{1}
 
 xlat %{33}
-data ERROR offset 2 'Invalid regex reference.  Must be in range 0-32'
+match ERROR offset 2 'Invalid regex reference.  Must be in range 0-32'
 
 condition &User-Name == /foo/
-data ERROR offset 14 Unexpected regular expression
+match ERROR offset 14 Unexpected regular expression
 
 #
 #  Allow a match operator.  Which the user will
@@ -74,4 +74,4 @@ data ERROR offset 14 Unexpected regular expression
 #  like '=' or '{' or '}.  If they do, too bad.
 #
 condition &User-Name =~ m,foo,
-data &User-Name =~ /foo/
+match &User-Name =~ /foo/
index d6c488a99bbe4be1ffdf9cefe5c5751eb0a84493..c0c1151fee9e092804cc202d538668cfde15783e 100644 (file)
 #
 
 decode-tacacs c1 01 01 01 2b 5a d2 8a 00 00 00 1c 01 00 02 03 03 05 07 05 62 6f 62 70 74 73 2f 36 31 2e 31 2e 31 2e 31 68 65 6c 6c 6f
-data TACACS-Packet-Type = Authentication, TACACS-Sequence-Number = 1, TACACS-Session-Id = 727372426, TACACS-Action = LOGIN, TACACS-Privilege-Level = Minimum, TACACS-Authentication-Type = PAP, TACACS-Authentication-Service = PPP, TACACS-User-Name = "bob", TACACS-Client-Port = "pts/6", TACACS-Remote-Address = "1.1.1.1", TACACS-Data = "hello"
+match TACACS-Packet-Type = Authentication, TACACS-Sequence-Number = 1, TACACS-Session-Id = 727372426, TACACS-Action = LOGIN, TACACS-Privilege-Level = Minimum, TACACS-Authentication-Type = PAP, TACACS-Authentication-Service = PPP, TACACS-User-Name = "bob", TACACS-Client-Port = "pts/6", TACACS-Remote-Address = "1.1.1.1", TACACS-Data = "hello"
 
 encode-tacacs TACACS-Packet-Type = Authentication, TACACS-Sequence-Number = 2, TACACS-Session-Id = 1002925488, TACACS-Authentication-Status = Pass, TACACS-Server-Message = "Hello, bob"
-data c0 01 02 01 3b c7 6d b0 00 00 00 10 01 00 00 0a 00 00 48 65 6c 6c 6f 2c 20 62 6f 62
+match c0 01 02 01 3b c7 6d b0 00 00 00 10 01 00 00 0a 00 00 48 65 6c 6c 6f 2c 20 62 6f 62
 
 #
 #  Authorization
 #
 
 decode-tacacs c0 02 01 01 a1 77 c4 5e 00 00 00 2f 06 00 02 03 03 05 07 02 0b 0b 62 6f 62 70 74 73 2f 36 31 2e 31 2e 31 2e 31 73 65 72 76 69 63 65 3d 70 70 70 70 72 6f 74 6f 63 6f 6c 3d 69 70
-data TACACS-Packet-Type = Authorization, TACACS-Sequence-Number = 1, TACACS-Session-Id = 2708980830, TACACS-Authentication-Method = TACACSPLUS, TACACS-Privilege-Level = Minimum, TACACS-Authentication-Type = PAP, TACACS-Authentication-Service = PPP, TACACS-User-Name = "bob", TACACS-Client-Port = "pts/6", TACACS-Remote-Address = "1.1.1.1"
+match TACACS-Packet-Type = Authorization, TACACS-Sequence-Number = 1, TACACS-Session-Id = 2708980830, TACACS-Authentication-Method = TACACSPLUS, TACACS-Privilege-Level = Minimum, TACACS-Authentication-Type = PAP, TACACS-Authentication-Service = PPP, TACACS-User-Name = "bob", TACACS-Client-Port = "pts/6", TACACS-Remote-Address = "1.1.1.1"
 
 encode-tacacs TACACS-Packet-Type = Authorization, TACACS-Sequence-Number = 2, TACACS-Session-Id = 2708980830, TACACS-Authorization-Status = Pass-Repl
-data c0 02 02 01 a1 77 c4 5e 00 00 00 06 02 00 00 00 00 00
+match c0 02 02 01 a1 77 c4 5e 00 00 00 06 02 00 00 00 00 00
 
 #
 #  Accounting
 #
 
 decode-tacacs c0 03 01 01 62 b0 61 30 00 00 00 54 02 06 00 02 03 03 05 07 04 15 0d 0b 0b 62 6f 62 70 74 73 2f 36 31 2e 31 2e 31 2e 31 73 74 61 72 74 5f 74 69 6d 65 3d 31 34 38 30 39 36 39 39 35 35 74 61 73 6b 5f 69 64 3d 31 36 39 39 38 73 65 72 76 69 63 65 3d 70 70 70 70 72 6f 74 6f 63 6f 6c 3d 69 70
-data TACACS-Packet-Type = Accounting, TACACS-Sequence-Number = 1, TACACS-Session-Id = 1655726384, TACACS-Accounting-Flags = Start, TACACS-Authentication-Method = TACACSPLUS, TACACS-Privilege-Level = Minimum, TACACS-Authentication-Type = PAP, TACACS-Authentication-Service = PPP, TACACS-User-Name = "bob", TACACS-Client-Port = "pts/6", TACACS-Remote-Address = "1.1.1.1"
+match TACACS-Packet-Type = Accounting, TACACS-Sequence-Number = 1, TACACS-Session-Id = 1655726384, TACACS-Accounting-Flags = Start, TACACS-Authentication-Method = TACACSPLUS, TACACS-Privilege-Level = Minimum, TACACS-Authentication-Type = PAP, TACACS-Authentication-Service = PPP, TACACS-User-Name = "bob", TACACS-Client-Port = "pts/6", TACACS-Remote-Address = "1.1.1.1"
 
 encode-tacacs TACACS-Packet-Type = Accounting, TACACS-Sequence-Number = 2, TACACS-Session-Id = 1655726384, TACACS-Accounting-Status = Success
-data c0 03 02 01 62 b0 61 30 00 00 00 05 00 00 00 00 01
+match c0 03 02 01 62 b0 61 30 00 00 00 05 00 00 00 00 01
index d0ae30410e18ef7399f0134bcfad69abd16e7501..890fb621696dc69cadceaf10c2380fc0c5edf0c8 100644 (file)
@@ -1,17 +1,17 @@
 encode Attr-240.1.1 = 0x01
-data Previous OID component specified a non-structural type
+match Previous OID component specified a non-structural type
 
 encode Attr-240.26.1.1.1 = 0x01
-data Previous OID component specified a non-structural type
+match Previous OID component specified a non-structural type
 
 encode Attr-246.26.1.1.1 = 0x01
-data Previous OID component specified a non-structural type
+match Previous OID component specified a non-structural type
 
 encode Attr-240.9999999999999999999.1.1 = 0x01
-data Previous OID component specified a non-structural type
+match Previous OID component specified a non-structural type
 
 encode Attr-26.1.1 = 0x01
-data 1a 09 00 00 00 01 01 03 01
+match 1a 09 00 00 00 01 01 03 01
 
 encode Attr-26.1344.1 = 0x01020304
-data 1a 0c 00 00 05 40 01 06 01 02 03 04
\ No newline at end of file
+match 1a 0c 00 00 05 40 01 06 01 02 03 04
index d6dad7a6ec6962c5af9ae497809034eca34ac442..15411ac0652064650c387a52d26e19d37f9f933c 100644 (file)
@@ -4,250 +4,250 @@ dictionary-load radius
 #  Literals
 #
 xlat \t\n\t
-data \t\n\t
+match \t\n\t
 
 xlat the quick brown fox jumped over the lazy dog
-data the quick brown fox jumped over the lazy dog
+match the quick brown fox jumped over the lazy dog
 
 # The second % should not be present in the output.  We should also not see 'Missing closing brace' type errors
 xlat should not start %%{expansion
-data should not start %{expansion
+match should not start %{expansion
 
 xlat %
-data ERROR offset 1 'Invalid variable expansion'
+match ERROR offset 1 'Invalid variable expansion'
 
 xlat %%
-data %
+match %
 
 xlat \
-data ERROR offset 0 'Invalid escape at end of string'
+match ERROR offset 0 'Invalid escape at end of string'
 
 #
 #  Regex capture groups
 #
 xlat %{0}
-data %{0}
+match %{0}
 
 xlat %{32}
-data %{32}
+match %{32}
 
 xlat %{33}
-data ERROR offset 2 'Invalid regex reference.  Must be in range 0-32'
+match ERROR offset 2 'Invalid regex reference.  Must be in range 0-32'
 
 xlat %{3a}
-data ERROR offset 2 'Unknown attribute'
+match ERROR offset 2 'Unknown attribute'
 
 xlat %{-3}
-data ERROR offset 2 'Unknown attribute'
+match ERROR offset 2 'Unknown attribute'
 
 xlat %{3
-data ERROR offset 1 'No matching closing brace'
+match ERROR offset 1 'No matching closing brace'
 
 #
 #  Tests for xlat expansion
 #
 xlat %{Tunnel-Password}
-data %{Tunnel-Password}
+match %{Tunnel-Password}
 
 xlat %{test:bar}
-data %{test:bar}
+match %{test:bar}
 
 xlat %{Tunnel-Password}
-data %{Tunnel-Password}
+match %{Tunnel-Password}
 
 xlat %{Tunnel-Password:1}
-data %{Tunnel-Password:1}
+match %{Tunnel-Password:1}
 
 xlat %{Tunnel-Password:1[3]}
-data %{Tunnel-Password:1[3]}
+match %{Tunnel-Password:1[3]}
 
 xlat %{Tunnel-Password:1[*]}
-data %{Tunnel-Password:1[*]}
+match %{Tunnel-Password:1[*]}
 
 xlat %{Tunnel-Password:1[#]}
-data %{Tunnel-Password:1[#]}
+match %{Tunnel-Password:1[#]}
 
 xlat %{reply:Tunnel-Password}
-data %{reply:Tunnel-Password}
+match %{reply:Tunnel-Password}
 
 xlat %{reply:Tunnel-Password:1}
-data %{reply:Tunnel-Password:1}
+match %{reply:Tunnel-Password:1}
 
 xlat %{reply:Tunnel-Password:1[3]}
-data %{reply:Tunnel-Password:1[3]}
+match %{reply:Tunnel-Password:1[3]}
 
 xlat %{reply:Tunnel-Password:1[*]}
-data %{reply:Tunnel-Password:1[*]}
+match %{reply:Tunnel-Password:1[*]}
 
 xlat %{reply:Tunnel-Password:1[#]}
-data %{reply:Tunnel-Password:1[#]}
+match %{reply:Tunnel-Password:1[#]}
 
 xlat %{User-Name[3]}
-data %{User-Name[3]}
+match %{User-Name[3]}
 
 xlat %{User-Name[*]}
-data %{User-Name[*]}
+match %{User-Name[*]}
 
 xlat %{User-Name[#]}
-data %{User-Name[#]}
+match %{User-Name[#]}
 
 xlat %{User-Name[n]}
-data %{User-Name[n]}
+match %{User-Name[n]}
 
 xlat %{request:User-Name[3]}
-data %{User-Name[3]}
+match %{User-Name[3]}
 
 xlat %{request:User-Name[*]}
-data %{User-Name[*]}
+match %{User-Name[*]}
 
 xlat %{request:User-Name[#]}
-data %{User-Name[#]}
+match %{User-Name[#]}
 
 xlat %{3GPP-SGSN-Address}
-data %{3GPP-SGSN-Address}
+match %{3GPP-SGSN-Address}
 
 xlat \"Hello %S goo\"
-data \"Hello %S goo\"
+match \"Hello %S goo\"
 
 xlat \"%{Foreach-Variable-0}\"
-data \"%{Foreach-Variable-0}\"
+match \"%{Foreach-Variable-0}\"
 
 #
 #  3GPP stuff, to distinguish "list:3GPP" from
 #  "attribute:tag"
 #
 xlat \"%{request:3GPP-IMSI}\"
-data \"%{3GPP-IMSI}\"
+match \"%{3GPP-IMSI}\"
 
 xlat \"%{reply:3GPP-IMSI}\"
-data \"%{reply:3GPP-IMSI}\"
+match \"%{reply:3GPP-IMSI}\"
 
 xlat \"%{reply:3GPP-IMSI[2]}\"
-data \"%{reply:3GPP-IMSI[2]}\"
+match \"%{reply:3GPP-IMSI[2]}\"
 
 xlat /([A-Z0-9\\-]*)_%{Calling-Station-Id}/
-data /([A-Z0-9\\-]*)_%{Calling-Station-Id}/
+match /([A-Z0-9\\-]*)_%{Calling-Station-Id}/
 
 xlat %{length:1 + 2
-data ERROR offset 14 'Missing closing brace at end of string'
+match ERROR offset 14 'Missing closing brace at end of string'
 
 xlat \"%t\tfoo\"
-data \"%t\tfoo\"
+match \"%t\tfoo\"
 
 xlat \"%t\t%{Client-IP-Address}\"
-data \"%t\t%{Client-IP-Address}\"
+match \"%t\t%{Client-IP-Address}\"
 
 xlat \"foo %{test:foo}\"
-data \"foo %{test:foo}\"
+match \"foo %{test:foo}\"
 
 #
 #  Alternations
 #
 xlat %{%{foo}:-%{bar}}
-data ERROR offset 4 'Unknown attribute'
+match ERROR offset 4 'Unknown attribute'
 
 xlat %{%{User-Name}:-%{bar}}
-data ERROR offset 18 'Unknown attribute'
+match ERROR offset 18 'Unknown attribute'
 
 xlat %{%{User-Name}:-bar}
-data %{%{User-Name}:-bar}
+match %{%{User-Name}:-bar}
 
 xlat foo %{%{User-Name}:-bar} baz
-data foo %{%{User-Name}:-bar} baz
+match foo %{%{User-Name}:-bar} baz
 
 xlat %{%{test:bar}:-%{User-Name}}
-data %{%{test:bar}:-%{User-Name}}
+match %{%{test:bar}:-%{User-Name}}
 
 xlat %{%{test:bar}:-%{%{User-Name}:-bar}}
-data %{%{test:bar}:-%{%{User-Name}:-bar}}
+match %{%{test:bar}:-%{%{User-Name}:-bar}}
 
 xlat %{%{User-Name}:-}
-data %{%{User-Name}:-}
+match %{%{User-Name}:-}
 
 xlat %{%{Operator-Name}:-}
-data %{%{Operator-Name}:-}
+match %{%{Operator-Name}:-}
 
 xlat %{%{%{User-Name}:-foo}:-bar}
-data %{%{%{User-Name}:-foo}:-bar}
+match %{%{%{User-Name}:-foo}:-bar}
 
 xlat %{%{%{User-Name}:-foo}:-%{%{test:bar}:-%{User-Name}}}
-data %{%{%{User-Name}:-foo}:-%{%{test:bar}:-%{User-Name}}}
+match %{%{%{User-Name}:-foo}:-%{%{test:bar}:-%{User-Name}}}
 
 xlat %{:-}
-data ERROR offset 2 'First item in alternation cannot be empty'
+match ERROR offset 2 'First item in alternation cannot be empty'
 
 xlat %{:-%{User-Name}}
-data ERROR offset 2 'First item in alternation cannot be empty'
+match ERROR offset 2 'First item in alternation cannot be empty'
 
 xlat %{%{}:-}
-data ERROR offset 4 'Empty expression is invalid'
+match ERROR offset 4 'Empty expression is invalid'
 
 xlat %{%{}:-foo}
-data ERROR offset 4 'Empty expression is invalid'
+match ERROR offset 4 'Empty expression is invalid'
 
 xlat %{%{User-Name}:-
-data ERROR offset 2 'No matching closing brace'
+match ERROR offset 2 'No matching closing brace'
 
 # Discuss - Not sure the offset/message is correct here, but not sure if we can determine the correct offset either
 xlat %{%{User-Name}:-foo
-data ERROR offset 19 'Missing closing brace at end of string'
+match ERROR offset 19 'Missing closing brace at end of string'
 
 xlat %{%{User-Name}:}
-data ERROR offset 15 'Expected '-' after ':''
+match ERROR offset 15 'Expected '-' after ':''
 
 xlat %{%{User-Name}}
-data ERROR offset 14 'Expected ':' after first expansion, got '}''
+match ERROR offset 14 'Expected ':' after first expansion, got '}''
 
 
 #
 #  Empty and malformed expansions
 #
 xlat %{
-data ERROR offset 1 'No matching closing brace'
+match ERROR offset 1 'No matching closing brace'
 
 xlat %{}
-data ERROR offset 2 'Empty expression is invalid'
+match ERROR offset 2 'Empty expression is invalid'
 
 xlat %{:}
-data ERROR offset 2 'Missing expansion function or list qualifier'
+match ERROR offset 2 'Missing expansion function or list qualifier'
 
 xlat %{:bar}
-data ERROR offset 2 'Missing expansion function or list qualifier'
+match ERROR offset 2 'Missing expansion function or list qualifier'
 
 xlat %{foo: bar}
-data ERROR offset 2 'Unknown expansion function or invalid list qualifier'
+match ERROR offset 2 'Unknown expansion function or invalid list qualifier'
 
 xlat %{[}
-data ERROR offset 2 'Missing attribute name'
+match ERROR offset 2 'Missing attribute name'
 
 xlat %{[baz}
-data ERROR offset 2 'Missing attribute name'
+match ERROR offset 2 'Missing attribute name'
 
 xlat %{ }
-data ERROR offset 2 'Invalid char ' ' in expression'
+match ERROR offset 2 'Invalid char ' ' in expression'
 
 xlat %{\t}
-data ERROR offset 2 'Invalid char '\t' in expression'
+match ERROR offset 2 'Invalid char '\t' in expression'
 
 xlat %{\n}
-data ERROR offset 2 'Invalid char '\n' in expression'
+match ERROR offset 2 'Invalid char '\n' in expression'
 
 xlat %{foo }
-data ERROR offset 5 'Invalid char ' ' in expression'
+match ERROR offset 5 'Invalid char ' ' in expression'
 
 xlat %{foo bar}
-data ERROR offset 5 'Invalid char ' ' in expression'
+match ERROR offset 5 'Invalid char ' ' in expression'
 
 xlat %{test:
-data ERROR offset 1 'No matching closing brace'
+match ERROR offset 1 'No matching closing brace'
 
 xlat %{test:%{User-Name
-data ERROR offset 8 'No matching closing brace'
+match ERROR offset 8 'No matching closing brace'
 
 # Discuss - Not sure the offset/message is correct here, but not sure if we can determine the correct offset either
 xlat %{test:%{User-Name}
-data ERROR offset 19 'Missing closing brace at end of string'
+match ERROR offset 19 'Missing closing brace at end of string'
 
 xlat %{myfirstxlat
-data ERROR offset 1 'No matching closing brace'
+match ERROR offset 1 'No matching closing brace'