* More or less completed the network notification module - it does not remove
old invalid user listeners yet, though (ie. if a team dies). * Implemented userland network monitor functions. * Added a few notifications to the network stack, even though this part isn't complete yet (especially notify_interface_changed()). * Added optional debug output to the notifications module. * Added the module to the image, it basically works now (tested). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28825 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -24,8 +24,7 @@ struct net_notifications_module_info {
|
||||
// generic syscall interface
|
||||
#define NET_NOTIFICATIONS_SYSCALLS "network/notifications"
|
||||
|
||||
#define NET_NOTIFICATIONS_START_WATCHING 1
|
||||
#define NET_NOTIFICATIONS_STOP_WATCHING 2
|
||||
#define NET_NOTIFICATIONS_CONTROL_WATCHING 1
|
||||
|
||||
struct net_notifications_control {
|
||||
uint32 flags;
|
||||
@@ -36,15 +35,15 @@ struct net_notifications_control {
|
||||
// TODO: the following part of this header should end up in a public header
|
||||
// some day!
|
||||
|
||||
#define B_NETWORK_INTERFACE_ADDED 1
|
||||
#define B_NETWORK_INTERFACE_REMOVED 2
|
||||
#define B_NETWORK_INTERFACE_CHANGED 3
|
||||
#define B_NETWORK_DEVICE_LINK_CHANGED 4
|
||||
#define B_NETWORK_INTERFACE_ADDED 0x01
|
||||
#define B_NETWORK_INTERFACE_REMOVED 0x02
|
||||
#define B_NETWORK_INTERFACE_CHANGED 0x03
|
||||
#define B_NETWORK_DEVICE_LINK_CHANGED 0x10
|
||||
// TODO: add routes, stack unloaded/loaded, ... events
|
||||
|
||||
enum {
|
||||
B_WATCH_NETWORK_INTERFACE_CHANGES = 0x0001,
|
||||
B_WATCH_NETWORK_LINK_CHANGES = 0x0002
|
||||
B_WATCH_NETWORK_INTERFACE_CHANGES = 0x000f,
|
||||
B_WATCH_NETWORK_LINK_CHANGES = 0x00f0
|
||||
};
|
||||
|
||||
#define B_NETWORK_MONITOR '_NTN'
|
||||
|
||||
Reference in New Issue
Block a user