X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Futil.c;h=b66eb466b6cc79a8006b44c690eea95f56ca5da4;hp=11ab074569ec422f5ecf9581ba94785e83c4a7e0;hb=c5da34ef1ba450351638be0d71bddb54677a4d6e;hpb=8c6db8336536916d0476ff8233e0abf40a2f6aab diff --git a/src/util.c b/src/util.c index 11ab07456..b66eb466b 100644 --- a/src/util.c +++ b/src/util.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "macro.h" #include "util.h" @@ -75,7 +76,7 @@ usec_t now(clockid_t clock_id) { return timespec_load(&ts); } -timestamp* timestamp_get(timestamp *ts) { +dual_timestamp* dual_timestamp_get(dual_timestamp *ts) { assert(ts); ts->realtime = now(CLOCK_REALTIME); @@ -2625,3 +2626,12 @@ static const char* const rlimit_table[] = { }; DEFINE_STRING_TABLE_LOOKUP(rlimit, int); + +static const char* const ip_tos_table[] = { + [IPTOS_LOWDELAY] = "low-delay", + [IPTOS_THROUGHPUT] = "throughput", + [IPTOS_RELIABILITY] = "reliability", + [IPTOS_LOWCOST] = "low-cost", +}; + +DEFINE_STRING_TABLE_LOOKUP(ip_tos, int);