1 /* 2 * Copyright 2006, 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 "routes.h" 13 14 #include <lock.h> 15 #include <util/list.h> 16 #include <util/DoublyLinkedList.h> 17 18 19 struct net_domain_private : net_domain { 20 struct list_link link; 21 22 benaphore lock; 23 24 RouteList routes; 25 RouteInfoList route_infos; 26 }; 27 28 29 status_t init_domains(); 30 status_t uninit_domains(); 31 32 uint32 count_domain_interfaces(); 33 status_t list_domain_interfaces(void *buffer, size_t size); 34 status_t add_interface_to_domain(net_domain *domain, struct ifreq& request); 35 status_t remove_interface_from_domain(net_interface *interface); 36 37 net_domain *get_domain(int family); 38 status_t register_domain(int family, const char *name, 39 struct net_protocol_module_info *module, 40 struct net_address_module_info *addressModule, 41 net_domain **_domain); 42 status_t unregister_domain(net_domain *domain); 43 44 #endif // DOMAINS_H 45