summaryrefslogtreecommitdiff
path: root/src/basic/parse-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-02 23:57:21 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-03 00:02:00 +0100
commit6ad623a3f77e087e308f334525fd4046811f2a9a (patch)
tree1030c9d7eb6e88cc605c36ed50901d4527a4fcf1 /src/basic/parse-util.h
parent6a37c684695befff2d2ce7e0fcce90e25e2e252c (diff)
parse-util: introduce parse_ifindex() and make use of it everywhere
We have enough places where we parse an ifindex, hence introduce a proper parsing function for it, that verifies all parameters.
Diffstat (limited to 'src/basic/parse-util.h')
-rw-r--r--src/basic/parse-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h
index 0e56848e26..408690d0b3 100644
--- a/src/basic/parse-util.h
+++ b/src/basic/parse-util.h
@@ -31,6 +31,7 @@
int parse_boolean(const char *v) _pure_;
int parse_pid(const char *s, pid_t* ret_pid);
int parse_mode(const char *s, mode_t *ret);
+int parse_ifindex(const char *s, int *ret);
int parse_size(const char *t, uint64_t base, uint64_t *size);
int parse_range(const char *t, unsigned *lower, unsigned *upper);