Fix FreeBSD build.
[haiku.git] / headers / os / net / NetworkNotifications.h
blob6523c16e6877b0c067c371509981fe6ff2a189b0
1 /*
2 * Copyright 2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _NETWORK_NOTIFICATIONS_H
6 #define _NETWORK_NOTIFICATIONS_H
9 #include <SupportDefs.h>
12 // Flags for the start_watching_network() calls.
14 #define B_NETWORK_INTERFACE_ADDED 0x0001
15 #define B_NETWORK_INTERFACE_REMOVED 0x0002
16 #define B_NETWORK_INTERFACE_CHANGED 0x0003
17 #define B_NETWORK_DEVICE_LINK_CHANGED 0x0010
18 #define B_NETWORK_WLAN_JOINED 0x0100
19 #define B_NETWORK_WLAN_LEFT 0x0200
20 #define B_NETWORK_WLAN_SCANNED 0x0300
21 #define B_NETWORK_WLAN_MESSAGE_INTEGRITY_FAILED 0x0400
23 // TODO: add routes, stack unloaded/loaded, ... events
25 enum {
26 B_WATCH_NETWORK_INTERFACE_CHANGES = 0x000f,
27 B_WATCH_NETWORK_LINK_CHANGES = 0x00f0,
28 B_WATCH_NETWORK_WLAN_CHANGES = 0x0f00
31 #define B_NETWORK_MONITOR '_NTN'
34 #if defined(__cplusplus) && !defined(_KERNEL_MODE)
36 // these are only needed for the function exports
37 #include <Messenger.h>
39 class BHandler;
40 class BLooper;
43 extern status_t start_watching_network(uint32 flags, const BMessenger& target);
44 extern status_t start_watching_network(uint32 flags, const BHandler* handler,
45 const BLooper* looper = NULL);
47 extern status_t stop_watching_network(const BMessenger& target);
48 extern status_t stop_watching_network(const BHandler* handler,
49 const BLooper* looper = NULL);
51 #endif // __cplusplus && !_KERNEL_MODE
54 #endif // _NETWORK_NOTIFICATIONS_H