projects
/
osmocom-bb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
649793b
)
Import value_string utilities and some RSL stuff from OpenBSC
author
Harald Welte
<laforge@gnumonks.org>
Mon, 1 Mar 2010 20:58:31 +0000
(21:58 +0100)
committer
Harald Welte
<laforge@gnumonks.org>
Mon, 1 Mar 2010 22:48:43 +0000
(23:48 +0100)
include/osmocore/utils.h
[new file with mode: 0644]
patch
|
blob
diff --git a/include/osmocore/utils.h
b/include/osmocore/utils.h
new file mode 100644
(file)
index 0000000..
cf3b460
--- /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