]>
git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6d.h
2 * Copyright (C) 2003 Yasuhiro Ohara
4 * This file is part of GNU Zebra.
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #define OSPF6_DAEMON_VERSION "0.9.7r"
29 #include "ospf6_memory.h"
31 /* global variables */
32 extern struct thread_master
*master
;
34 /* Historical for KAME. */
35 #ifndef IPV6_JOIN_GROUP
36 #ifdef IPV6_ADD_MEMBERSHIP
37 #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
38 #endif /* IPV6_ADD_MEMBERSHIP. */
39 #ifdef IPV6_JOIN_MEMBERSHIP
40 #define IPV6_JOIN_GROUP IPV6_JOIN_MEMBERSHIP
41 #endif /* IPV6_JOIN_MEMBERSHIP. */
42 #endif /* ! IPV6_JOIN_GROUP*/
44 #ifndef IPV6_LEAVE_GROUP
45 #ifdef IPV6_DROP_MEMBERSHIP
46 #define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
47 #endif /* IPV6_DROP_MEMBERSHIP */
48 #endif /* ! IPV6_LEAVE_GROUP */
53 /* cast macro: XXX - these *must* die, ick ick. */
54 #define OSPF6_PROCESS(x) ((struct ospf6 *) (x))
55 #define OSPF6_AREA(x) ((struct ospf6_area *) (x))
56 #define OSPF6_INTERFACE(x) ((struct ospf6_interface *) (x))
57 #define OSPF6_NEIGHBOR(x) ((struct ospf6_neighbor *) (x))
59 /* operation on timeval structure */
60 #define timerstring(tv, buf, size) \
62 if ((tv)->tv_sec / 60 / 60 / 24) \
63 snprintf (buf, size, "%lldd%02lld:%02lld:%02lld", \
64 (tv)->tv_sec / 60LL / 60 / 24, \
65 (tv)->tv_sec / 60LL / 60 % 24, \
66 (tv)->tv_sec / 60LL % 60, \
67 (tv)->tv_sec % 60LL); \
69 snprintf (buf, size, "%02lld:%02lld:%02lld", \
70 (tv)->tv_sec / 60LL / 60 % 24, \
71 (tv)->tv_sec / 60LL % 60, \
72 (tv)->tv_sec % 60LL); \
75 #define threadtimer_string(now, t, buf, size) \
77 struct timeval result; \
79 snprintf(buf, size, "inactive"); \
81 timersub(&t->u.sands, &now, &result); \
82 timerstring(&result, buf, size); \
87 #define OSPF6_AREA_STR "Area information\n"
88 #define OSPF6_AREA_ID_STR "Area ID (as an IPv4 notation)\n"
89 #define OSPF6_SPF_STR "Shortest Path First tree information\n"
90 #define OSPF6_ROUTER_ID_STR "Specify Router-ID\n"
91 #define OSPF6_LS_ID_STR "Specify Link State ID\n"
94 #define OSPF6_CMD_CHECK_RUNNING() \
97 vty_out (vty, "OSPFv3 is not running%s", VTYNL); \
102 /* Function Prototypes */
103 extern struct route_node
*route_prev (struct route_node
*node
);
105 extern void ospf6_debug (void);
106 extern void ospf6_init (void);
108 #endif /* OSPF6D_H */