diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-01 19:36:38 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-08-01 19:36:38 +0000 |
commit | 69099d84949a8044fdfc74e9d7ff6b9e57fc0bcd (patch) | |
tree | 9c97923869ff4f56717d7e0ac97c8588f816c798 /src/libwpactrl/wpactrl_xchg_timeout.c | |
parent | 22a1dc61ef8e4e1c98e3a088db1dbc84d424c7a7 (diff) | |
download | bcnm-69099d84949a8044fdfc74e9d7ff6b9e57fc0bcd.tar.xz |
Flesh out libwpactrl
Diffstat (limited to 'src/libwpactrl/wpactrl_xchg_timeout.c')
-rw-r--r-- | src/libwpactrl/wpactrl_xchg_timeout.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libwpactrl/wpactrl_xchg_timeout.c b/src/libwpactrl/wpactrl_xchg_timeout.c new file mode 100644 index 0000000..01907ea --- /dev/null +++ b/src/libwpactrl/wpactrl_xchg_timeout.c @@ -0,0 +1,15 @@ +/* ISC license. */ + +#include <errno.h> +#include <skalibs/tai.h> +#include <bcnm/wpactrl.h> + +int wpactrl_xchg_timeout (wpactrl_xchg_t *dt, tain_t const *stamp) +{ + if (!tain_less(stamp, &dt->deadline)) + { + dt->status = ETIMEDOUT ; + return 1 ; + } + else return 0 ; +} |