#include "memory.h"
#include "log.h"
#include "jhash.h"
+#include "lib_errors.h"
DEFINE_MTYPE_STATIC(LIB, PREFIX, "Prefix")
memcpy((void *)dest->u.prefix_flowspec.ptr,
(void *)src->u.prefix_flowspec.ptr, len);
} else {
- zlog_err("prefix_copy(): Unknown address family %d",
- src->family);
+ flog_err(EC_LIB_DEVELOPMENT,
+ "prefix_copy(): Unknown address family %d",
+ src->family);
assert(0);
}
}
XFREE(MTYPE_PREFIX, p);
}
-/* Utility function. Check the string only contains digit
- * character.
- * FIXME str.[c|h] would be better place for this function. */
-int all_digit(const char *str)
-{
- for (; *str != '\0'; str++)
- if (!isdigit((int)*str))
- return 0;
- return 1;
-}
-
/* Utility function to convert ipv4 prefixes to Classful prefixes */
void apply_classful_mask_ipv4(struct prefix_ipv4 *p)
{