1/* 2 * Copyright (C) NEC Europe Ltd., 2003 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the project nor the names of its contributors 14 * may be used to endorse or promote products derived from this software 15 * without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#ifndef __RELAY6_DATABASE_H_DEFINED 31#define __RELAY6_DATABASE_H_DEFINED 32 33#include "dhcp6r.h" 34#include "relay6_parser.h" 35 36struct cifaces { 37 struct cifaces *next; 38 char *ciface; 39}; 40 41struct sifaces { 42 struct sifaces *next; 43 char *siface; 44}; 45 46struct server { 47 struct server *next; 48 char *serv; 49}; 50 51struct IPv6_address { 52 struct IPv6_address *next; 53 char *gaddr; 54}; 55 56struct IPv6_uniaddr { /* STORAGE OF UNICAST DEST. SERVER ADRESSES */ 57 struct IPv6_uniaddr *next; 58 char *uniaddr; 59}; 60 61struct interface { 62 struct interface *next; 63 struct interface *prev; 64 65 struct server *sname; 66 struct IPv6_address *ipv6addr; 67 68 int got_addr; 69 char *ifname; 70 uint32_t devindex; 71 char *link_local; 72 int opaq; 73}; 74 75struct cifaces cifaces_list; 76struct sifaces sifaces_list; 77struct server server_list; 78struct IPv6_address IPv6_address_list; 79struct IPv6_uniaddr IPv6_uniaddr_list; 80struct interface interface_list ; 81 82int process_RELAY_FORW __P((struct msg_parser *msg)); 83int process_RELAY_REPL __P((struct msg_parser *msg)); 84struct msg_parser *get_send_messages_out __P((void)); 85void delete_messages __P((void)); 86int check_interface_semafor __P((int index)); 87struct interface *get_interface __P((int if_index)); 88struct interface *get_interface_s __P((char *s)); 89 90int nr_of_devices; 91int nr_of_uni_addr; 92int max_count; 93int multicast_off; 94 95void init_relay __P((void)); 96void command_text __P((void)); 97 98#endif /* __RELAY6_DATABASE_H_DEFINED */ 99