1/*
2 * Copyright 2006-2010, 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// Stack-wide configuration
22#define ENABLE_DEBUGGER_COMMANDS	1
23#define STACK_DEBUG_PREFIX			"\33[31mnet:\33[0m "
24
25
26class Interface;
27
28
29extern net_stack_module_info gNetStackModule;
30extern net_buffer_module_info gNetBufferModule;
31extern net_socket_module_info gNetSocketModule;
32extern net_datalink_module_info gNetDatalinkModule;
33extern net_datalink_protocol_module_info gDatalinkInterfaceProtocolModule;
34extern net_stack_interface_module_info gNetStackInterfaceModule;
35
36// stack.cpp
37status_t register_domain_datalink_protocols(int family, int type, ...);
38status_t register_domain_protocols(int family, int type, int protocol, ...);
39status_t get_domain_protocols(net_socket* socket);
40status_t put_domain_protocols(net_socket* socket);
41status_t get_domain_datalink_protocols(Interface* interface,
42	net_domain* domain);
43status_t put_domain_datalink_protocols(Interface* interface,
44	net_domain* domain);
45
46// notifications.cpp
47status_t notify_interface_added(net_interface* interface);
48status_t notify_interface_removed(net_interface* interface);
49status_t notify_interface_changed(net_interface* interface, uint32 oldFlags = 0,
50	uint32 newFlags = 0);
51status_t notify_link_changed(net_device* device);
52status_t init_notifications();
53void uninit_notifications();
54
55status_t init_stack();
56status_t uninit_stack();
57
58
59#endif	// STACK_PRIVATE_H
60