- Standard unformat_function_t arguments
-
- @param input - pointer an unformat_input_t
- @param va - varargs list comprising a single uword **
- @returns 1 on success, 0 on failure
-*/
-static inline uword
-unformat_bitmap_list (unformat_input_t * input, va_list * va)
-{
- uword **bitmap_return = va_arg (*va, uword **);
- uword *bitmap = 0;
-
- u32 a, b;
-
- while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
- {
- int i;
- if (unformat (input, "%u-%u,", &a, &b))
- ;
- else if (unformat (input, "%u,", &a))
- b = a;
- else if (unformat (input, "%u-%u", &a, &b))
- ;
- else if (unformat (input, "%u", &a))
- b = a;
- else if (bitmap)
- {
- unformat_put_input (input);
- break;
- }
- else
- goto error;
-
- if (b < a)
- goto error;
-
- for (i = a; i <= b; i++)
- bitmap = clib_bitmap_set (bitmap, i, 1);