diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-03-01 21:58:31 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-01 23:48:43 +0100 |
commit | cc2ae91e48473cfad4e51e7070b1f8c45e27a478 (patch) | |
tree | 5aac0734ca9b1b725b938fa3af6bcbcbcadc1d8f /include | |
parent | 649793bf04f9289aca1d507909b072e2e0e36f58 (diff) |
Import value_string utilities and some RSL stuff from OpenBSC
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocore/utils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/osmocore/utils.h b/include/osmocore/utils.h new file mode 100644 index 00000000..cf3b4607 --- /dev/null +++ b/include/osmocore/utils.h @@ -0,0 +1,17 @@ +#ifndef OSMOCORE_UTIL_H +#define OSMOCORE_UTIL_H + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +#include <stdint.h> + +struct value_string { + unsigned int value; + const char *str; +}; + +const char *get_value_string(const struct value_string *vs, uint32_t val); +int get_string_value(const struct value_string *vs, const char *str); + + +#endif |