diff options
| author | Michael Biebl <biebl@debian.org> | 2023-08-09 21:55:35 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-08-09 21:55:35 +0200 |
| commit | 05e4a733f2141995181a551854d5df929f084adf (patch) | |
| tree | 83bb937740a6667525ba0df046748ecaa829c269 /src/core/nm-netns.h | |
| parent | 14b0f3a9dc9ea90d60a3b057350fd4d637dc021a (diff) | |
New upstream version 1.44.0 upstream/1.44.0
Diffstat (limited to 'src/core/nm-netns.h')
| -rw-r--r-- | src/core/nm-netns.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/core/nm-netns.h b/src/core/nm-netns.h index 84a78f83..7725ae79 100644 --- a/src/core/nm-netns.h +++ b/src/core/nm-netns.h @@ -59,4 +59,46 @@ void nm_netns_ip_route_ecmp_commit(NMNetns *self, GPtrArray **routes, gboolean is_reapply); +/*****************************************************************************/ + +typedef enum { + NM_NETNS_WATCHER_TYPE_IP_ADDR, +} NMNetnsWatcherType; + +typedef struct { + union { + struct { + NMIPAddrTyped addr; + } ip_addr; + }; +} NMNetnsWatcherData; + +typedef struct { + union { + struct { + const NMPObject *obj; + NMPlatformSignalChangeType change_type; + } ip_addr; + }; +} NMNetnsWatcherEventData; + +typedef struct _NMNetnsWatcherHandle NMNetnsWatcherHandle; + +typedef void (*NMNetnsWatcherCallback)(NMNetns *self, + NMNetnsWatcherType watcher_type, + const NMNetnsWatcherData *watcher_data, + gconstpointer tag, + const NMNetnsWatcherEventData *event_data, + gpointer user_data); + +void nm_netns_watcher_add(NMNetns *self, + NMNetnsWatcherType watcher_type, + const NMNetnsWatcherData *watcher_data, + gconstpointer tag, + NMNetnsWatcherCallback callback, + gpointer user_data); + +void +nm_netns_watcher_remove_all(NMNetns *self, gconstpointer tag, gboolean all /* or only dirty */); + #endif /* __NM_NETNS_H__ */ |