/* * fwd - OpenWrt firewall daemon - header for rtnetlink communication * * Copyright (C) 2009 Jo-Philipp Wich * * The fwd program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * The fwd program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with the fwd program. If not, see http://www.gnu.org/licenses/. */ #ifndef __FWD_ADDR_H__ #define __FWD_ADDR_H__ #include #include #include #include #include #include #include struct fwd_addr_list { char ifname[IFNAMSIZ]; char label[IFNAMSIZ]; int family; int index; struct fwd_cidr ipaddr; struct fwd_addr_list *next; }; struct fwd_addr_list * fwd_get_addrs(int, int); struct fwd_addr_list * fwd_append_addrs(struct fwd_addr_list *, struct fwd_addr_list *); void fwd_free_addrs(struct fwd_addr_list *); #define fwd_foreach_addrs(head, entry) for(entry = head; entry; entry = entry->next) #endif