xref: /haiku/src/add-ons/kernel/network/stack/stack_private.h (revision b671e9bbdbd10268a042b4f4cc4317ccd03d105e)
1 /*
2  * Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  */
8 #ifndef STACK_PRIVATE_H
9 #define STACK_PRIVATE_H
10 
11 
12 #include <net_buffer.h>
13 #include <net_datalink.h>
14 #include <net_datalink_protocol.h>
15 #include <net_protocol.h>
16 #include <net_socket.h>
17 #include <net_stack.h>
18 #include <net_stack_interface.h>
19 
20 
21 extern net_stack_module_info gNetStackModule;
22 extern net_buffer_module_info gNetBufferModule;
23 extern net_socket_module_info gNetSocketModule;
24 extern net_datalink_module_info gNetDatalinkModule;
25 extern net_datalink_protocol_module_info gDatalinkInterfaceProtocolModule;
26 extern net_stack_interface_module_info gNetStackInterfaceModule;
27 
28 // stack.cpp
29 status_t register_domain_datalink_protocols(int family, int type, ...);
30 status_t register_domain_protocols(int family, int type, int protocol, ...);
31 status_t get_domain_protocols(net_socket *socket);
32 status_t put_domain_protocols(net_socket *socket);
33 status_t get_domain_datalink_protocols(net_interface *interface);
34 status_t put_domain_datalink_protocols(net_interface *interface);
35 
36 // notifications.cpp
37 status_t notify_interface_added(net_interface* interface);
38 status_t notify_interface_removed(net_interface* interface);
39 status_t notify_interface_changed(net_interface* interface);
40 status_t notify_link_changed(net_device* device);
41 status_t init_notifications();
42 void uninit_notifications();
43 
44 status_t init_stack();
45 status_t uninit_stack();
46 
47 #endif	// STACK_PRIVATE_H
48