diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-06-27 21:22:11 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-07-09 11:44:07 -0400 |
commit | 90acbcf20b5f896ca8f631923afe946c90d90de7 (patch) | |
tree | a4942121f0c624d1ea6f16bf093924fade010b88 /src/monitor/monitor.h | |
parent | 801fcc63a9ec83d76d8d027758f9a0357b34890f (diff) | |
download | sssd-90acbcf20b5f896ca8f631923afe946c90d90de7.tar.gz sssd-90acbcf20b5f896ca8f631923afe946c90d90de7.tar.xz sssd-90acbcf20b5f896ca8f631923afe946c90d90de7.zip |
Use netlink to detect going online
Integrates libnl to detect adding routes. When a route is added, the
offline status of all back ends is reset. This patch adds no heuristics
to detect whether back end went offline.
Fixes: #456
Diffstat (limited to 'src/monitor/monitor.h')
-rw-r--r-- | src/monitor/monitor.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h index 54ce39431..73234424f 100644 --- a/src/monitor/monitor.h +++ b/src/monitor/monitor.h @@ -30,6 +30,8 @@ #define NSCD_SOCKET_PATH "/var/run/nscd/socket" #endif +struct config_file_ctx; + typedef int (*monitor_reconf_fn) (struct config_file_ctx *file_ctx, const char *filename); @@ -38,4 +40,18 @@ struct mt_ctx; int monitor_process_init(struct mt_ctx *ctx, const char *config_file); +/* from monitor_netlink.c */ +struct netlink_ctx; + +enum network_change { + NL_ROUTE_UP, + NL_ROUTE_DOWN +}; + +typedef void (*network_change_cb)(enum network_change, void *); + +int setup_netlink(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + network_change_cb change_cb, void *cb_data, + struct netlink_ctx **_nlctx); + #endif /* _MONITOR_H */ |