xref: /haiku/src/add-ons/kernel/network/stack/domains.h (revision 61729d9323a555b9025ef6ebeb85dc1627f8acf7)
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 DOMAINS_H
9 #define DOMAINS_H
10 
11 
12 #include <lock.h>
13 #include <util/list.h>
14 #include <util/DoublyLinkedList.h>
15 
16 #include "routes.h"
17 
18 
19 struct net_device_interface;
20 
21 
22 struct net_domain_private : net_domain,
23 		DoublyLinkedListLinkImpl<net_domain_private> {
24 	recursive_lock		lock;
25 
26 	RouteList			routes;
27 	RouteInfoList		route_infos;
28 };
29 
30 
31 net_domain* get_domain(int family);
32 status_t register_domain(int family, const char* name,
33 	struct net_protocol_module_info* module,
34 	struct net_address_module_info* addressModule, net_domain* *_domain);
35 status_t unregister_domain(net_domain* domain);
36 
37 status_t init_domains();
38 status_t uninit_domains();
39 
40 
41 #endif	// DOMAINS_H
42