summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_abr.c7
-rw-r--r--ospf6d/ospf6_abr.h7
-rw-r--r--ospf6d/ospf6_area.c47
-rw-r--r--ospf6d/ospf6_area.h11
-rw-r--r--ospf6d/ospf6_asbr.c7
-rw-r--r--ospf6d/ospf6_asbr.h7
-rw-r--r--ospf6d/ospf6_bfd.c9
-rw-r--r--ospf6d/ospf6_bfd.h7
-rw-r--r--ospf6d/ospf6_flood.c76
-rw-r--r--ospf6d/ospf6_flood.h7
-rw-r--r--ospf6d/ospf6_interface.c47
-rw-r--r--ospf6d/ospf6_interface.h7
-rw-r--r--ospf6d/ospf6_intra.c7
-rw-r--r--ospf6d/ospf6_intra.h41
-rw-r--r--ospf6d/ospf6_lsa.c14
-rw-r--r--ospf6d/ospf6_lsa.h7
-rw-r--r--ospf6d/ospf6_lsdb.c7
-rw-r--r--ospf6d/ospf6_lsdb.h7
-rw-r--r--ospf6d/ospf6_main.c9
-rw-r--r--ospf6d/ospf6_memory.c7
-rw-r--r--ospf6d/ospf6_memory.h7
-rw-r--r--ospf6d/ospf6_message.c136
-rw-r--r--ospf6d/ospf6_message.h7
-rw-r--r--ospf6d/ospf6_neighbor.c47
-rw-r--r--ospf6d/ospf6_neighbor.h7
-rw-r--r--ospf6d/ospf6_network.c7
-rw-r--r--ospf6d/ospf6_network.h7
-rw-r--r--ospf6d/ospf6_proto.c7
-rw-r--r--ospf6d/ospf6_proto.h7
-rw-r--r--ospf6d/ospf6_route.c7
-rw-r--r--ospf6d/ospf6_route.h7
-rw-r--r--ospf6d/ospf6_snmp.c7
-rw-r--r--ospf6d/ospf6_spf.c12
-rw-r--r--ospf6d/ospf6_spf.h7
-rw-r--r--ospf6d/ospf6_top.c15
-rw-r--r--ospf6d/ospf6_top.h7
-rw-r--r--ospf6d/ospf6_zebra.c18
-rw-r--r--ospf6d/ospf6_zebra.h7
-rw-r--r--ospf6d/ospf6d.c9
-rw-r--r--ospf6d/ospf6d.h7
40 files changed, 313 insertions, 360 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index 2e31535d2..7ef7fdd94 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -14,10 +14,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_abr.h b/ospf6d/ospf6_abr.h
index 5bc2469e1..55d657cfc 100644
--- a/ospf6d/ospf6_abr.h
+++ b/ospf6d/ospf6_abr.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_ABR_H
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index a010ff322..deb2c0770 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -205,15 +204,31 @@ ospf6_area_no_summary_unset (struct ospf6 *ospf6, struct ospf6_area *area)
}
}
-/* Make new area structure */
+/**
+ * Make new area structure.
+ *
+ * @param area_id - ospf6 area ID
+ * @param o - ospf6 instance
+ * @param df - display format for area ID
+ */
struct ospf6_area *
-ospf6_area_create (u_int32_t area_id, struct ospf6 *o)
+ospf6_area_create (u_int32_t area_id, struct ospf6 *o, int df)
{
struct ospf6_area *oa;
oa = XCALLOC (MTYPE_OSPF6_AREA, sizeof (struct ospf6_area));
- inet_ntop (AF_INET, &area_id, oa->name, sizeof (oa->name));
+ switch (df)
+ {
+ case OSPF6_AREA_FMT_DECIMAL:
+ snprintf (oa->name, sizeof (oa->name), "%u", ntohl (area_id));
+ break;
+ default:
+ case OSPF6_AREA_FMT_DOTTEDQUAD:
+ inet_ntop (AF_INET, &area_id, oa->name, sizeof (oa->name));
+ break;
+ }
+
oa->area_id = area_id;
oa->if_list = list_new ();
@@ -312,16 +327,6 @@ ospf6_area_lookup (u_int32_t area_id, struct ospf6 *ospf6)
return (struct ospf6_area *) NULL;
}
-static struct ospf6_area *
-ospf6_area_get (u_int32_t area_id, struct ospf6 *o)
-{
- struct ospf6_area *oa;
- oa = ospf6_area_lookup (area_id, o);
- if (oa == NULL)
- oa = ospf6_area_create (area_id, o);
- return oa;
-}
-
void
ospf6_area_enable (struct ospf6_area *oa)
{
@@ -409,13 +414,17 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa)
#define OSPF6_CMD_AREA_GET(str, oa) \
{ \
char *ep; \
- u_int32_t area_id = htonl (strtol(str, &ep, 10)); \
+ u_int32_t area_id = htonl (strtoul (str, &ep, 10)); \
if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \
{ \
vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \
return CMD_SUCCESS; \
} \
- oa = ospf6_area_get (area_id, ospf6); \
+ int format = !*ep ? OSPF6_AREA_FMT_DECIMAL : \
+ OSPF6_AREA_FMT_DOTTEDQUAD; \
+ oa = ospf6_area_lookup (area_id, ospf6); \
+ if (oa == NULL) \
+ oa = ospf6_area_create (area_id, ospf6, format); \
}
DEFUN (area_range,
diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h
index 3b752d948..86c68af17 100644
--- a/ospf6d/ospf6_area.h
+++ b/ospf6d/ospf6_area.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF_AREA_H
@@ -32,6 +31,8 @@ struct ospf6_area
/* Area-ID */
u_int32_t area_id;
+#define OSPF6_AREA_FMT_DOTTEDQUAD 1
+#define OSPF6_AREA_FMT_DECIMAL 2
/* Area-ID string */
char name[16];
@@ -116,7 +117,7 @@ struct ospf6_area
/* prototypes */
extern int ospf6_area_cmp (void *va, void *vb);
-extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *);
+extern struct ospf6_area *ospf6_area_create (u_int32_t, struct ospf6 *, int);
extern void ospf6_area_delete (struct ospf6_area *);
extern struct ospf6_area *ospf6_area_lookup (u_int32_t, struct ospf6 *);
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index da90e2f96..302d8c986 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_asbr.h b/ospf6d/ospf6_asbr.h
index da6bbdd9c..aaa3c72a4 100644
--- a/ospf6d/ospf6_asbr.h
+++ b/ospf6d/ospf6_asbr.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_ASBR_H
diff --git a/ospf6d/ospf6_bfd.c b/ospf6d/ospf6_bfd.c
index fed502120..7d9abe233 100644
--- a/ospf6d/ospf6_bfd.c
+++ b/ospf6d/ospf6_bfd.c
@@ -15,10 +15,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -251,7 +250,7 @@ ospf6_bfd_interface_dest_update (int command, struct zclient *zclient,
if ((status == BFD_STATUS_DOWN) && (old_status == BFD_STATUS_UP))
{
THREAD_OFF (on->inactivity_timer);
- thread_add_event (master, inactivity_timer, on, 0);
+ thread_add_event(master, inactivity_timer, on, 0, NULL);
}
}
diff --git a/ospf6d/ospf6_bfd.h b/ospf6d/ospf6_bfd.h
index 9c3b57aa2..913f7dcf4 100644
--- a/ospf6d/ospf6_bfd.h
+++ b/ospf6d/ospf6_bfd.h
@@ -15,10 +15,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_BFD_H
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index 6ac93d898..8a8dcfcd2 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -112,8 +111,9 @@ ospf6_lsa_originate (struct ospf6_lsa *lsa)
lsdb_self = ospf6_get_scoped_lsdb_self (lsa);
ospf6_lsdb_add (ospf6_lsa_copy (lsa), lsdb_self);
- lsa->refresh = thread_add_timer (master, ospf6_lsa_refresh, lsa,
- OSPF_LS_REFRESH_TIME);
+ lsa->refresh = NULL;
+ thread_add_timer(master, ospf6_lsa_refresh, lsa, OSPF_LS_REFRESH_TIME,
+ &lsa->refresh);
if (IS_OSPF6_DEBUG_LSA_TYPE (lsa->header->type) ||
IS_OSPF6_DEBUG_ORIGINATE_TYPE (lsa->header->type))
@@ -225,9 +225,11 @@ ospf6_install_lsa (struct ospf6_lsa *lsa)
}
monotime(&now);
- if (! OSPF6_LSA_IS_MAXAGE (lsa))
- lsa->expire = thread_add_timer (master, ospf6_lsa_expire, lsa,
- OSPF_LSA_MAXAGE + lsa->birth.tv_sec - now.tv_sec);
+ if (! OSPF6_LSA_IS_MAXAGE (lsa)) {
+ lsa->expire = NULL;
+ thread_add_timer(master, ospf6_lsa_expire, lsa, OSPF_LSA_MAXAGE + lsa->birth.tv_sec - now.tv_sec,
+ &lsa->expire);
+ }
else
lsa->expire = NULL;
@@ -361,10 +363,8 @@ ospf6_flood_interface (struct ospf6_neighbor *from,
zlog_debug ("Add retrans-list of this neighbor");
ospf6_increment_retrans_count (lsa);
ospf6_lsdb_add (ospf6_lsa_copy (lsa), on->retrans_list);
- if (on->thread_send_lsupdate == NULL)
- on->thread_send_lsupdate =
- thread_add_timer (master, ospf6_lsupdate_send_neighbor,
- on, on->ospf6_if->rxmt_interval);
+ thread_add_timer(master, ospf6_lsupdate_send_neighbor, on, on->ospf6_if->rxmt_interval,
+ &on->thread_send_lsupdate);
retrans_added++;
}
@@ -406,9 +406,8 @@ ospf6_flood_interface (struct ospf6_neighbor *from,
(oi->type == OSPF_IFTYPE_POINTOPOINT))
{
ospf6_lsdb_add (ospf6_lsa_copy (lsa), oi->lsupdate_list);
- if (oi->thread_send_lsupdate == NULL)
- oi->thread_send_lsupdate =
- thread_add_event (master, ospf6_lsupdate_send_interface, oi, 0);
+ thread_add_event(master, ospf6_lsupdate_send_interface, oi, 0,
+ &oi->thread_send_lsupdate);
}
else
{
@@ -416,8 +415,9 @@ ospf6_flood_interface (struct ospf6_neighbor *from,
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->thread_send_lsupdate);
- on->thread_send_lsupdate =
- thread_add_event (master, ospf6_lsupdate_send_neighbor, on, 0);
+ on->thread_send_lsupdate = NULL;
+ thread_add_event(master, ospf6_lsupdate_send_neighbor, on, 0,
+ &on->thread_send_lsupdate);
}
}
}
@@ -577,9 +577,8 @@ ospf6_acknowledge_lsa_bdrouter (struct ospf6_lsa *lsa, int ismore_recent,
zlog_debug ("Delayed acknowledgement (BDR & MoreRecent & from DR)");
/* Delayed acknowledgement */
ospf6_lsdb_add (ospf6_lsa_copy (lsa), oi->lsack_list);
- if (oi->thread_send_lsack == NULL)
- oi->thread_send_lsack =
- thread_add_timer (master, ospf6_lsack_send_interface, oi, 3);
+ thread_add_timer(master, ospf6_lsack_send_interface, oi, 3,
+ &oi->thread_send_lsack);
}
else
{
@@ -601,9 +600,8 @@ ospf6_acknowledge_lsa_bdrouter (struct ospf6_lsa *lsa, int ismore_recent,
zlog_debug ("Delayed acknowledgement (BDR & Duplicate & ImpliedAck & from DR)");
/* Delayed acknowledgement */
ospf6_lsdb_add (ospf6_lsa_copy (lsa), oi->lsack_list);
- if (oi->thread_send_lsack == NULL)
- oi->thread_send_lsack =
- thread_add_timer (master, ospf6_lsack_send_interface, oi, 3);
+ thread_add_timer(master, ospf6_lsack_send_interface, oi, 3,
+ &oi->thread_send_lsack);
}
else
{
@@ -621,9 +619,8 @@ ospf6_acknowledge_lsa_bdrouter (struct ospf6_lsa *lsa, int ismore_recent,
if (is_debug)
zlog_debug ("Direct acknowledgement (BDR & Duplicate)");
ospf6_lsdb_add (ospf6_lsa_copy (lsa), from->lsack_list);
- if (from->thread_send_lsack == NULL)
- from->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_neighbor, from, 0);
+ thread_add_event(master, ospf6_lsack_send_neighbor, from, 0,
+ &from->thread_send_lsack);
return;
}
@@ -665,9 +662,8 @@ ospf6_acknowledge_lsa_allother (struct ospf6_lsa *lsa, int ismore_recent,
zlog_debug ("Delayed acknowledgement (AllOther & MoreRecent)");
/* Delayed acknowledgement */
ospf6_lsdb_add (ospf6_lsa_copy (lsa), oi->lsack_list);
- if (oi->thread_send_lsack == NULL)
- oi->thread_send_lsack =
- thread_add_timer (master, ospf6_lsack_send_interface, oi, 3);
+ thread_add_timer(master, ospf6_lsack_send_interface, oi, 3,
+ &oi->thread_send_lsack);
return;
}
@@ -689,9 +685,8 @@ ospf6_acknowledge_lsa_allother (struct ospf6_lsa *lsa, int ismore_recent,
if (is_debug)
zlog_debug ("Direct acknowledgement (AllOther & Duplicate)");
ospf6_lsdb_add (ospf6_lsa_copy (lsa), from->lsack_list);
- if (from->thread_send_lsack == NULL)
- from->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_neighbor, from, 0);
+ thread_add_event(master, ospf6_lsack_send_neighbor, from, 0,
+ &from->thread_send_lsack);
return;
}
@@ -828,9 +823,8 @@ ospf6_receive_lsa (struct ospf6_neighbor *from,
/* a) Acknowledge back to neighbor (Direct acknowledgement, 13.5) */
ospf6_lsdb_add (ospf6_lsa_copy (new), from->lsack_list);
- if (from->thread_send_lsack == NULL)
- from->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_neighbor, from, 0);
+ thread_add_event(master, ospf6_lsack_send_neighbor, from, 0,
+ &from->thread_send_lsack);
/* b) Discard */
ospf6_lsa_delete (new);
@@ -912,7 +906,8 @@ ospf6_receive_lsa (struct ospf6_neighbor *from,
zlog_debug ("Newer instance of the self-originated LSA");
zlog_debug ("Schedule reorigination");
}
- new->refresh = thread_add_event (master, ospf6_lsa_refresh, new, 0);
+ new->refresh = NULL;
+ thread_add_event(master, ospf6_lsa_refresh, new, 0, &new->refresh);
}
return;
@@ -932,7 +927,7 @@ ospf6_receive_lsa (struct ospf6_neighbor *from,
}
/* BadLSReq */
- thread_add_event (master, bad_lsreq, from, 0);
+ thread_add_event(master, bad_lsreq, from, 0, NULL);
ospf6_lsa_delete (new);
return;
@@ -998,9 +993,8 @@ ospf6_receive_lsa (struct ospf6_neighbor *from,
/* XXX, MinLSArrival check !? RFC 2328 13 (8) */
ospf6_lsdb_add (ospf6_lsa_copy (old), from->lsupdate_list);
- if (from->thread_send_lsupdate == NULL)
- from->thread_send_lsupdate =
- thread_add_event (master, ospf6_lsupdate_send_neighbor, from, 0);
+ thread_add_event(master, ospf6_lsupdate_send_neighbor, from, 0,
+ &from->thread_send_lsupdate);
ospf6_lsa_delete (new);
return;
}
diff --git a/ospf6d/ospf6_flood.h b/ospf6d/ospf6_flood.h
index ba7fd25f9..72482cadf 100644
--- a/ospf6d/ospf6_flood.h
+++ b/ospf6d/ospf6_flood.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_FLOOD_H
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 8cf7f4afa..111ca3f3d 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -392,9 +391,9 @@ ospf6_interface_state_update (struct interface *ifp)
if (if_is_operative (ifp)
&& (ospf6_interface_get_linklocal_address(oi->interface)
|| if_is_loopback(oi->interface)))
- thread_add_event (master, interface_up, oi, 0);
+ thread_add_event(master, interface_up, oi, 0, NULL);
else
- thread_add_event (master, interface_down, oi, 0);
+ thread_add_event(master, interface_down, oi, 0, NULL);
return;
}
@@ -671,7 +670,7 @@ dr_election (struct ospf6_interface *oi)
if (on->state < OSPF6_NEIGHBOR_TWOWAY)
continue;
/* Schedule AdjOK. */
- thread_add_event (master, adj_ok, on, 0);
+ thread_add_event(master, adj_ok, on, 0, NULL);
}
}
@@ -740,8 +739,8 @@ interface_up (struct thread *thread)
{
zlog_info("Scheduling %s for sso retry, trial count: %d",
oi->interface->name, oi->sso_try_cnt);
- thread_add_timer (master, interface_up, oi,
- OSPF6_INTERFACE_SSO_RETRY_INT);
+ thread_add_timer(master, interface_up, oi,
+ OSPF6_INTERFACE_SSO_RETRY_INT, NULL);
}
return 0;
}
@@ -752,8 +751,10 @@ interface_up (struct thread *thread)
/* Schedule Hello */
if (! CHECK_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE) &&
- !if_is_loopback (oi->interface))
- oi->thread_send_hello = thread_add_event (master, ospf6_hello_send, oi, 0);
+ !if_is_loopback (oi->interface)) {
+ oi->thread_send_hello = NULL;
+ thread_add_event(master, ospf6_hello_send, oi, 0, &oi->thread_send_hello);
+ }
/* decide next interface state */
if ((if_is_pointopoint (oi->interface)) ||
@@ -765,7 +766,7 @@ interface_up (struct thread *thread)
else
{
ospf6_interface_state_change (OSPF6_INTERFACE_WAITING, oi);
- thread_add_timer (master, wait_timer, oi, oi->dead_interval);
+ thread_add_timer(master, wait_timer, oi, oi->dead_interval, NULL);
}
return 0;
@@ -1140,7 +1141,7 @@ DEFUN (ipv6_ospf6_ifmtu,
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->inactivity_timer);
- thread_add_event (master, inactivity_timer, on, 0);
+ thread_add_event(master, inactivity_timer, on, 0, NULL);
}
return CMD_SUCCESS;
@@ -1187,7 +1188,7 @@ DEFUN (no_ipv6_ospf6_ifmtu,
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->inactivity_timer);
- thread_add_event (master, inactivity_timer, on, 0);
+ thread_add_event(master, inactivity_timer, on, 0, NULL);
}
return CMD_SUCCESS;
@@ -1490,7 +1491,7 @@ DEFUN (ipv6_ospf6_passive,
for (ALL_LIST_ELEMENTS (oi->neighbor_list, node, nnode, on))
{
THREAD_OFF (on->inactivity_timer);
- thread_add_event (master, inactivity_timer, on, 0);
+ thread_add_event(master, inactivity_timer, on, 0, NULL);
}
return CMD_SUCCESS;
@@ -1516,8 +1517,8 @@ DEFUN (no_ipv6_ospf6_passive,
UNSET_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE);
THREAD_OFF (oi->thread_send_hello);
- oi->thread_send_hello =
- thread_add_event (master, ospf6_hello_send, oi, 0);
+ oi->thread_send_hello = NULL;
+ thread_add_event(master, ospf6_hello_send, oi, 0, &oi->thread_send_hello);
return CMD_SUCCESS;
}
@@ -1685,8 +1686,8 @@ DEFUN (ipv6_ospf6_network,
}
/* Reset the interface */
- thread_add_event (master, interface_down, oi, 0);
- thread_add_event (master, interface_up, oi, 0);
+ thread_add_event(master, interface_down, oi, 0, NULL);
+ thread_add_event(master, interface_up, oi, 0, NULL);
return CMD_SUCCESS;
}
@@ -1720,8 +1721,8 @@ DEFUN (no_ipv6_ospf6_network,
oi->type = type;
/* Reset the interface */
- thread_add_event (master, interface_down, oi, 0);
- thread_add_event (master, interface_up, oi, 0);
+ thread_add_event(master, interface_down, oi, 0, NULL);
+ thread_add_event(master, interface_up, oi, 0, NULL);
return CMD_SUCCESS;
}
@@ -1864,8 +1865,8 @@ ospf6_interface_clear (struct vty *vty, struct interface *ifp)
zlog_debug ("Interface %s: clear by reset", ifp->name);
/* Reset the interface */
- thread_add_event (master, interface_down, oi, 0);
- thread_add_event (master, interface_up, oi, 0);
+ thread_add_event(master, interface_down, oi, 0, NULL);
+ thread_add_event(master, interface_up, oi, 0, NULL);
}
/* Clear interface */
diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h
index 846cde419..0408fc69d 100644
--- a/ospf6d/ospf6_interface.h
+++ b/ospf6d/ospf6_interface.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_INTERFACE_H
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 80e67ea2a..6acd45b7c 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h
index c9660b6a5..114784835 100644
--- a/ospf6d/ospf6_intra.h
+++ b/ospf6d/ospf6_intra.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_INTRA_H
@@ -156,40 +155,30 @@ struct ospf6_intra_prefix_lsa
#define OSPF6_ROUTER_LSA_SCHEDULE(oa) \
do { \
- if (! (oa)->thread_router_lsa \
- && CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \
- (oa)->thread_router_lsa = \
- thread_add_event (master, ospf6_router_lsa_originate, oa, 0); \
+ if (CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \
+ thread_add_event (master, ospf6_router_lsa_originate, oa, 0, &(oa)->thread_router_lsa); \
} while (0)
#define OSPF6_NETWORK_LSA_SCHEDULE(oi) \
do { \
- if (! (oi)->thread_network_lsa \
- && ! CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
- (oi)->thread_network_lsa = \
- thread_add_event (master, ospf6_network_lsa_originate, oi, 0); \
+ if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
+ thread_add_event (master, ospf6_network_lsa_originate, oi, 0, &(oi)->thread_network_lsa); \
} while (0)
#define OSPF6_LINK_LSA_SCHEDULE(oi) \
do { \
- if (! (oi)->thread_link_lsa \
- && ! CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
- (oi)->thread_link_lsa = \
- thread_add_event (master, ospf6_link_lsa_originate, oi, 0); \
+ if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
+ thread_add_event (master, ospf6_link_lsa_originate, oi, 0, &(oi)->thread_link_lsa); \
} while (0)
#define OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(oa) \
do { \
- if (! (oa)->thread_intra_prefix_lsa \
- && CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \
- (oa)->thread_intra_prefix_lsa = \
- thread_add_event (master, ospf6_intra_prefix_lsa_originate_stub, \
- oa, 0); \
+ if (CHECK_FLAG((oa)->flag, OSPF6_AREA_ENABLE)) \
+ thread_add_event (master, ospf6_intra_prefix_lsa_originate_stub, \
+ oa, 0, &(oa)->thread_intra_prefix_lsa); \
} while (0)
#define OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT(oi) \
do { \
- if (! (oi)->thread_intra_prefix_lsa \
- && ! CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
- (oi)->thread_intra_prefix_lsa = \
- thread_add_event (master, ospf6_intra_prefix_lsa_originate_transit, \
- oi, 0); \
+ if (!CHECK_FLAG((oi)->flag, OSPF6_INTERFACE_DISABLE)) \
+ thread_add_event (master, ospf6_intra_prefix_lsa_originate_transit, \
+ oi, 0, &(oi)->thread_intra_prefix_lsa); \
} while (0)
#define OSPF6_NETWORK_LSA_EXECUTE(oi) \
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index f943e16bf..acc8fe380 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -695,7 +694,6 @@ ospf6_lsa_refresh (struct thread *thread)
struct ospf6_lsa *old, *self, *new;
struct ospf6_lsdb *lsdb_self;
- assert (thread);
old = (struct ospf6_lsa *) THREAD_ARG (thread);
assert (old && old->header);
@@ -721,8 +719,9 @@ ospf6_lsa_refresh (struct thread *thread)
new = ospf6_lsa_create (self->header);
new->lsdb = old->lsdb;
- new->refresh = thread_add_timer (master, ospf6_lsa_refresh, new,
- OSPF_LS_REFRESH_TIME);
+ new->refresh = NULL;
+ thread_add_timer(master, ospf6_lsa_refresh, new, OSPF_LS_REFRESH_TIME,
+ &new->refresh);
/* store it in the LSDB for self-originated LSAs */
ospf6_lsdb_add (ospf6_lsa_copy (new), lsdb_self);
@@ -917,7 +916,6 @@ DEFUN (no_debug_ospf6_lsa_type,
return CMD_SUCCESS;
}
-
void
install_element_ospf6_debug_lsa (void)
{
diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h
index a95891ac5..36cf55986 100644
--- a/ospf6d/ospf6_lsa.h
+++ b/ospf6d/ospf6_lsa.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_LSA_H
diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c
index 1d4b557cd..cb522226a 100644
--- a/ospf6d/ospf6_lsdb.c
+++ b/ospf6d/ospf6_lsdb.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_lsdb.h b/ospf6d/ospf6_lsdb.h
index b21d9ee28..866868080 100644
--- a/ospf6d/ospf6_lsdb.h
+++ b/ospf6d/ospf6_lsdb.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_LSDB_H
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index 54ae4645a..f69c1e1bc 100644
--- a/ospf6d/ospf6_main.c
+++ b/ospf6d/ospf6_main.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -222,7 +221,7 @@ main (int argc, char *argv[], char *envp[])
/* thread master */
master = frr_init ();
- vrf_init ();
+ vrf_init (NULL, NULL, NULL, NULL);
access_list_init ();
prefix_list_init ();
diff --git a/ospf6d/ospf6_memory.c b/ospf6d/ospf6_memory.c
index 7f2fbbf0b..35d03f7e4 100644
--- a/ospf6d/ospf6_memory.c
+++ b/ospf6d/ospf6_memory.c
@@ -14,10 +14,9 @@
* 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 Quagga; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef HAVE_CONFIG_H
diff --git a/ospf6d/ospf6_memory.h b/ospf6d/ospf6_memory.h
index 3ff5de4c3..324065c3a 100644
--- a/ospf6d/ospf6_memory.h
+++ b/ospf6d/ospf6_memory.h
@@ -14,10 +14,9 @@
* 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 Quagga; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _QUAGGA_OSPF6_MEMORY_H
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index 578b39a64..87c905af3 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -352,9 +351,9 @@ ospf6_hello_recv (struct in6_addr *src, struct in6_addr *dst,
/* Schedule interface events */
if (backupseen)
- thread_add_event (master, backup_seen, oi, 0);
+ thread_add_event (master, backup_seen, oi, 0, NULL);
if (neighborchange)
- thread_add_event (master, neighbor_change, oi, 0);
+ thread_add_event (master, neighbor_change, oi, 0, NULL);
if (neighbor_ifindex_change && on->state == OSPF6_NEIGHBOR_FULL)
OSPF6_ROUTER_LSA_SCHEDULE (oi->area);
@@ -428,7 +427,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
{
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Master/Slave bit mismatch");
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -436,7 +435,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
{
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Initialize bit mismatch");
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -444,7 +443,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
{
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Option field mismatch");
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -453,7 +452,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Sequence number mismatch (%#lx expected)",
(u_long) on->dbdesc_seqnum);
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
break;
@@ -471,7 +470,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Not duplicate dbdesc in state %s",
ospf6_neighbor_state_str[on->state]);
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
default:
@@ -517,7 +516,7 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("SeqNumMismatch (E-bit mismatch), discard");
ospf6_lsa_delete (his);
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -549,19 +548,20 @@ ospf6_dbdesc_recv_master (struct ospf6_header *oh,
on->dbdesc_seqnum ++;
/* schedule send lsreq */
- if (on->request_list->count && (on->thread_send_lsreq == NULL))
- on->thread_send_lsreq =
- thread_add_event (master, ospf6_lsreq_send, on, 0);
+ if (on->request_list->count)
+ thread_add_event (master, ospf6_lsreq_send, on, 0, &on->thread_send_lsreq);
THREAD_OFF (on->thread_send_dbdesc);
/* More bit check */
if (! CHECK_FLAG (dbdesc->bits, OSPF6_DBDESC_MBIT) &&
! CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MBIT))
- thread_add_event (master, exchange_done, on, 0);
- else
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send_newone, on, 0);
+ thread_add_event (master, exchange_done, on, 0, NULL);
+ else {
+ on->thread_send_dbdesc = NULL;
+ thread_add_event(master, ospf6_dbdesc_send_newone, on, 0,
+ &on->thread_send_dbdesc);
+ }
/* save last received dbdesc */
memcpy (&on->dbdesc_last, dbdesc, sizeof (struct ospf6_dbdesc));
@@ -637,8 +637,9 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Duplicated dbdesc causes retransmit");
THREAD_OFF (on->thread_send_dbdesc);
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send, on, 0);
+ on->thread_send_dbdesc = NULL;
+ thread_add_event(master, ospf6_dbdesc_send, on, 0,
+ &on->thread_send_dbdesc);
return;
}
@@ -646,7 +647,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
{
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Master/Slave bit mismatch");
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -654,7 +655,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
{
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Initialize bit mismatch");
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -662,7 +663,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
{
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Option field mismatch");
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -671,7 +672,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Sequence number mismatch (%#lx expected)",
(u_long) on->dbdesc_seqnum + 1);
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
break;
@@ -684,15 +685,14 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Duplicated dbdesc causes retransmit");
THREAD_OFF (on->thread_send_dbdesc);
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send, on, 0);
+ thread_add_event (master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc);
return;
}
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("Not duplicate dbdesc in state %s",
ospf6_neighbor_state_str[on->state]);
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
default:
@@ -735,7 +735,7 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
zlog_debug ("E-bit mismatch with LSA Headers");
ospf6_lsa_delete (his);
- thread_add_event (master, seqnumber_mismatch, on, 0);
+ thread_add_event (master, seqnumber_mismatch, on, 0, NULL);
return;
}
@@ -756,14 +756,11 @@ ospf6_dbdesc_recv_slave (struct ospf6_header *oh,
on->dbdesc_seqnum = ntohl (dbdesc->seqnum);
/* schedule send lsreq */
- if ((on->thread_send_lsreq == NULL) &&
- (on->request_list->count))
- on->thread_send_lsreq =
- thread_add_event (master, ospf6_lsreq_send, on, 0);
+ if (on->request_list->count)
+ thread_add_event (master, ospf6_lsreq_send, on, 0, &on->thread_send_lsreq);
THREAD_OFF (on->thread_send_dbdesc);
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send_newone, on, 0);
+ thread_add_event (master, ospf6_dbdesc_send_newone, on, 0, &on->thread_send_dbdesc);
/* save last received dbdesc */
memcpy (&on->dbdesc_last, dbdesc, sizeof (struct ospf6_dbdesc));
@@ -880,7 +877,7 @@ ospf6_lsreq_recv (struct in6_addr *src, struct in6_addr *dst,
zlog_debug ("Can't find requested [%s Id:%s Adv:%s]",
ospf6_lstype_name (e->type), id, adv_router);
}
- thread_add_event (master, bad_lsreq, on, 0);
+ thread_add_event (master, bad_lsreq, on, 0, NULL);
return;
}
@@ -891,8 +888,7 @@ ospf6_lsreq_recv (struct in6_addr *src, struct in6_addr *dst,
/* schedule send lsupdate */
THREAD_OFF (on->thread_send_lsupdate);
- on->thread_send_lsupdate =
- thread_add_event (master, ospf6_lsupdate_send_neighbor, on, 0);
+ thread_add_event (master, ospf6_lsupdate_send_neighbor, on, 0, &on->thread_send_lsupdate);
}
/* Verify, that the specified memory area contains exactly N valid IPv6
@@ -1532,7 +1528,7 @@ ospf6_receive (struct thread *thread)
/* add next read thread */
sockfd = THREAD_FD (thread);
- thread_add_read (master, ospf6_receive, NULL, sockfd);
+ thread_add_read (master, ospf6_receive, NULL, sockfd, NULL);
/* initialize */
memset (&src, 0, sizeof (src));
@@ -1739,8 +1735,7 @@ ospf6_hello_send (struct thread *thread)
}
/* set next thread */
- oi->thread_send_hello = thread_add_timer (master, ospf6_hello_send,
- oi, oi->hello_interval);
+ thread_add_timer (master, ospf6_hello_send, oi, oi->hello_interval, &oi->thread_send_hello);
memset (sendbuf, 0, iobuflen);
oh = (struct ospf6_header *) sendbuf;
@@ -1804,9 +1799,9 @@ ospf6_dbdesc_send (struct thread *thread)
/* set next thread if master */
if (CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MSBIT))
- on->thread_send_dbdesc =
- thread_add_timer (master, ospf6_dbdesc_send, on,
- on->ospf6_if->rxmt_interval);
+ thread_add_timer (master, ospf6_dbdesc_send, on,
+ on->ospf6_if->rxmt_interval,
+ &on->thread_send_dbdesc);
memset (sendbuf, 0, iobuflen);
oh = (struct ospf6_header *) sendbuf;
@@ -1896,7 +1891,7 @@ ospf6_dbdesc_send_newone (struct thread *thread)
if (! CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MSBIT) && /* Slave */
! CHECK_FLAG (on->dbdesc_last.bits, OSPF6_DBDESC_MBIT) &&
! CHECK_FLAG (on->dbdesc_bits, OSPF6_DBDESC_MBIT))
- thread_add_event (master, exchange_done, on, 0);
+ thread_add_event (master, exchange_done, on, 0, NULL);
thread_execute (master, ospf6_dbdesc_send, on, 0);
return 0;
@@ -1927,7 +1922,7 @@ ospf6_lsreq_send (struct thread *thread)
/* schedule loading_done if request list is empty */
if (on->request_list->count == 0)
{
- thread_add_event (master, loading_done, on, 0);
+ thread_add_event (master, loading_done, on, 0, NULL);
return 0;
}
@@ -1978,9 +1973,9 @@ ospf6_lsreq_send (struct thread *thread)
/* set next thread */
if (on->request_list->count != 0)
{
- on->thread_send_lsreq =
- thread_add_timer (master, ospf6_lsreq_send, on,
- on->ospf6_if->rxmt_interval);
+ on->thread_send_lsreq = NULL;
+ thread_add_timer(master, ospf6_lsreq_send, on, on->ospf6_if->rxmt_interval,
+ &on->thread_send_lsreq);
}
return 0;
@@ -2097,13 +2092,16 @@ ospf6_lsupdate_send_neighbor (struct thread *thread)
on->ospf6_if, oh);
}
- if (on->lsupdate_list->count != 0)
- on->thread_send_lsupdate =
- thread_add_event (master, ospf6_lsupdate_send_neighbor, on, 0);
- else if (on->retrans_list->count != 0)
- on->thread_send_lsupdate =
- thread_add_timer (master, ospf6_lsupdate_send_neighbor, on,
- on->ospf6_if->rxmt_interval);
+ if (on->lsupdate_list->count != 0) {
+ on->thread_send_lsupdate = NULL;
+ thread_add_event(master, ospf6_lsupdate_send_neighbor, on, 0,
+ &on->thread_send_lsupdate);
+ }
+ else if (on->retrans_list->count != 0) {
+ on->thread_send_lsupdate = NULL;
+ thread_add_timer(master, ospf6_lsupdate_send_neighbor, on, on->ospf6_if->rxmt_interval,
+ &on->thread_send_lsupdate);
+ }
return 0;
}
@@ -2178,8 +2176,9 @@ ospf6_lsupdate_send_interface (struct thread *thread)
if (oi->lsupdate_list->count > 0)
{
- oi->thread_send_lsupdate =
- thread_add_event (master, ospf6_lsupdate_send_interface, oi, 0);
+ oi->thread_send_lsupdate = NULL;
+ thread_add_event(master, ospf6_lsupdate_send_interface, oi, 0,
+ &oi->thread_send_lsupdate);
}
return 0;
@@ -2223,8 +2222,7 @@ ospf6_lsack_send_neighbor (struct thread *thread)
/* if we run out of packet size/space here,
better to try again soon. */
THREAD_OFF (on->thread_send_lsack);
- on->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_neighbor, on, 0);
+ thread_add_event (master, ospf6_lsack_send_neighbor, on, 0, &on->thread_send_lsack);
ospf6_lsdb_lsa_unlock (lsa);
break;
@@ -2248,11 +2246,8 @@ ospf6_lsack_send_neighbor (struct thread *thread)
on->ospf6_if, oh);
}
- if (on->thread_send_lsack == NULL && on->lsack_list->count > 0)
- {
- on->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_neighbor, on, 0);
- }
+ if (on->lsack_list->count > 0)
+ thread_add_event (master, ospf6_lsack_send_neighbor, on, 0, &on->thread_send_lsack);
return 0;
}
@@ -2295,8 +2290,8 @@ ospf6_lsack_send_interface (struct thread *thread)
/* if we run out of packet size/space here,
better to try again soon. */
THREAD_OFF (oi->thread_send_lsack);
- oi->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_interface, oi, 0);
+ thread_add_event (master, ospf6_lsack_send_interface, oi, 0,
+ &oi->thread_send_lsack);
ospf6_lsdb_lsa_unlock (lsa);
break;
@@ -2324,11 +2319,8 @@ ospf6_lsack_send_interface (struct thread *thread)
ospf6_send (oi->linklocal_addr, &alldrouters6, oi, oh);
}
- if (oi->thread_send_lsack == NULL && oi->lsack_list->count > 0)
- {
- oi->thread_send_lsack =
- thread_add_event (master, ospf6_lsack_send_interface, oi, 0);
- }
+ if (oi->lsack_list->count > 0)
+ thread_add_event (master, ospf6_lsack_send_interface, oi, 0, &oi->thread_send_lsack);
return 0;
}
diff --git a/ospf6d/ospf6_message.h b/ospf6d/ospf6_message.h
index 4a9e0c7a6..b0107dfff 100644
--- a/ospf6d/ospf6_message.h
+++ b/ospf6d/ospf6_message.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_MESSAGE_H
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 118210dfc..c58922b0e 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -238,8 +237,9 @@ hello_received (struct thread *thread)
/* reset Inactivity Timer */
THREAD_OFF (on->inactivity_timer);
- on->inactivity_timer = thread_add_timer (master, inactivity_timer, on,
- on->ospf6_if->dead_interval);
+ on->inactivity_timer = NULL;
+ thread_add_timer(master, inactivity_timer, on, on->ospf6_if->dead_interval,
+ &on->inactivity_timer);
if (on->state <= OSPF6_NEIGHBOR_DOWN)
ospf6_neighbor_state_change (OSPF6_NEIGHBOR_INIT, on,
@@ -262,7 +262,7 @@ twoway_received (struct thread *thread)
if (IS_OSPF6_DEBUG_NEIGHBOR (EVENT))
zlog_debug ("Neighbor Event %s: *2Way-Received*", on->name);
- thread_add_event (master, neighbor_change, on->ospf6_if, 0);
+ thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
if (! need_adjacency (on))
{
@@ -278,8 +278,8 @@ twoway_received (struct thread *thread)
SET_FLAG (on->dbdesc_bits, OSPF6_DBDESC_IBIT);
THREAD_OFF (on->thread_send_dbdesc);
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send, on, 0);
+ on->thread_send_dbdesc = NULL;
+ thread_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc);
return 0;
}
@@ -385,9 +385,8 @@ exchange_done (struct thread *thread)
ospf6_neighbor_state_change (OSPF6_NEIGHBOR_LOADING, on,
OSPF6_NEIGHBOR_EVENT_EXCHANGE_DONE);
- if (on->thread_send_lsreq == NULL)
- on->thread_send_lsreq =
- thread_add_event (master, ospf6_lsreq_send, on, 0);
+ thread_add_event(master, ospf6_lsreq_send, on, 0,
+ &on->thread_send_lsreq);
}
return 0;
@@ -406,13 +405,14 @@ ospf6_check_nbr_loading (struct ospf6_neighbor *on)
(on->state == OSPF6_NEIGHBOR_EXCHANGE))
{
if (on->request_list->count == 0)
- thread_add_event (master, loading_done, on, 0);
+ thread_add_event(master, loading_done, on, 0, NULL);
else if (on->last_ls_req == NULL)
{
if (on->thread_send_lsreq != NULL)
THREAD_OFF (on->thread_send_lsreq);
- on->thread_send_lsreq =
- thread_add_event (master, ospf6_lsreq_send, on, 0);
+ on->thread_send_lsreq = NULL;
+ thread_add_event(master, ospf6_lsreq_send, on, 0,
+ &on->thread_send_lsreq);
}
}
}
@@ -460,8 +460,9 @@ adj_ok (struct thread *thread)
SET_FLAG (on->dbdesc_bits, OSPF6_DBDESC_IBIT);
THREAD_OFF (on->thread_send_dbdesc);
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send, on, 0);
+ on->thread_send_dbdesc = NULL;
+ thread_add_event(master, ospf6_dbdesc_send, on, 0,
+ &on->thread_send_dbdesc);
}
else if (on->state >= OSPF6_NEIGHBOR_EXSTART &&
@@ -515,8 +516,8 @@ seqnumber_mismatch (struct thread *thread)
THREAD_OFF (on->thread_send_dbdesc);
on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send, on, 0);
+ on->thread_send_dbdesc = NULL;
+ thread_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc);
return 0;
}
@@ -554,8 +555,8 @@ bad_lsreq (struct thread *thread)
THREAD_OFF (on->thread_send_dbdesc);
on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */
- on->thread_send_dbdesc =
- thread_add_event (master, ospf6_dbdesc_send, on, 0);
+ on->thread_send_dbdesc = NULL;
+ thread_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc);
return 0;
}
@@ -577,7 +578,7 @@ oneway_received (struct thread *thread)
ospf6_neighbor_state_change (OSPF6_NEIGHBOR_INIT, on,
OSPF6_NEIGHBOR_EVENT_ONEWAY_RCVD);
- thread_add_event (master, neighbor_change, on->ospf6_if, 0);
+ thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
ospf6_lsdb_remove_all (on->summary_list);
ospf6_lsdb_remove_all (on->request_list);
@@ -613,7 +614,7 @@ inactivity_timer (struct thread *thread)
ospf6_neighbor_state_change (OSPF6_NEIGHBOR_DOWN, on,
OSPF6_NEIGHBOR_EVENT_INACTIVITY_TIMER);
- thread_add_event (master, neighbor_change, on->ospf6_if, 0);
+ thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
listnode_delete (on->ospf6_if->neighbor_list, on);
ospf6_neighbor_delete (on);
diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h
index c275ff830..3ff341933 100644
--- a/ospf6d/ospf6_neighbor.h
+++ b/ospf6d/ospf6_neighbor.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_NEIGHBOR_H
diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c
index 0217d6603..9e7dd06bd 100644
--- a/ospf6d/ospf6_network.c
+++ b/ospf6d/ospf6_network.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h
index 4fa283951..690901ca0 100644
--- a/ospf6d/ospf6_network.h
+++ b/ospf6d/ospf6_network.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_NETWORK_H
diff --git a/ospf6d/ospf6_proto.c b/ospf6d/ospf6_proto.c
index d011601f0..1538c891c 100644
--- a/ospf6d/ospf6_proto.c
+++ b/ospf6d/ospf6_proto.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_proto.h b/ospf6d/ospf6_proto.h
index af60eb922..e4f29aa3e 100644
--- a/ospf6d/ospf6_proto.h
+++ b/ospf6d/ospf6_proto.h
@@ -14,10 +14,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_PROTO_H
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index b8e5ca619..117f7af6e 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h
index 8b973d28f..7cf69a26e 100644
--- a/ospf6d/ospf6_route.h
+++ b/ospf6d/ospf6_route.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_ROUTE_H
diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c
index 96f1e3dd2..b30d3efb0 100644
--- a/ospf6d/ospf6_snmp.c
+++ b/ospf6d/ospf6_snmp.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index 333ce5588..e7cfd3fc9 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* Shortest Path First calculation for OSPFv3 */
@@ -727,8 +726,9 @@ ospf6_spf_schedule (struct ospf6 *ospf6, unsigned int reason)
zlog_info ("SPF: Scheduled in %ld msec", delay);
- ospf6->t_spf_calc =
- thread_add_timer_msec (master, ospf6_spf_calculation_thread, ospf6, delay);
+ ospf6->t_spf_calc = NULL;
+ thread_add_timer_msec(master, ospf6_spf_calculation_thread, ospf6, delay,
+ &ospf6->t_spf_calc);
}
void
diff --git a/ospf6d/ospf6_spf.h b/ospf6d/ospf6_spf.h
index 7bf525d6f..87a86c0ac 100644
--- a/ospf6d/ospf6_spf.h
+++ b/ospf6d/ospf6_spf.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_SPF_H
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index e592d3c4f..dfda06678 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -286,9 +285,9 @@ ospf6_maxage_remover (struct thread *thread)
void
ospf6_maxage_remove (struct ospf6 *o)
{
- if (o && ! o->maxage_remover)
- o->maxage_remover = thread_add_timer (master, ospf6_maxage_remover, o,
- OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT);
+ if (o)
+ thread_add_timer(master, ospf6_maxage_remover, o, OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT,
+ &o->maxage_remover);
}
/* start ospf6 */
@@ -604,7 +603,7 @@ DEFUN (ospf6_interface_area,
/* find/create ospf6 area */
oa = ospf6_area_lookup (area_id, o);
if (oa == NULL)
- oa = ospf6_area_create (area_id, o);
+ oa = ospf6_area_create (area_id, o, OSPF6_AREA_FMT_DOTTEDQUAD);
/* attach interface to area */
listnode_add (oa->if_list, oi); /* sort ?? */
diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h
index 42a4d1248..5e101520d 100644
--- a/ospf6d/ospf6_top.h
+++ b/ospf6d/ospf6_top.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_TOP_H
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index d0c9e4f04..305870a64 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -305,13 +304,12 @@ ospf6_zebra_read_ipv6 (int command, struct zclient *zclient,
return 0;
}
-
-
-
DEFUN (show_zebra,
- show_zebra_cmd,
- "show zebra",
+ show_ospf6_zebra_cmd,
+ "show ipv6 ospf6 zebra",
SHOW_STR
+ IPV6_STR
+ OSPF6_STR
"Zebra information\n")
{
int i;
@@ -837,7 +835,7 @@ ospf6_zebra_init (struct thread_master *master)
install_node (&zebra_node, config_write_ospf6_zebra);
/* Install command element for zebra node. */
- install_element (VIEW_NODE, &show_zebra_cmd);
+ install_element (VIEW_NODE, &show_ospf6_zebra_cmd);
install_default (ZEBRA_NODE);
install_element (ZEBRA_NODE, &redistribute_ospf6_cmd);
install_element (ZEBRA_NODE, &no_redistribute_ospf6_cmd);
diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h
index 83032b64b..f7f808c86 100644
--- a/ospf6d/ospf6_zebra.h
+++ b/ospf6d/ospf6_zebra.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6_ZEBRA_H
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index aa219c780..1ccf7ce7a 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
@@ -1252,7 +1251,7 @@ ospf6_init (void)
/* Make ospf protocol socket. */
ospf6_serv_sock ();
- thread_add_read (master, ospf6_receive, NULL, ospf6_sock);
+ thread_add_read(master, ospf6_receive, NULL, ospf6_sock, NULL);
}
void
diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h
index f0bc02274..6595e7045 100644
--- a/ospf6d/ospf6d.h
+++ b/ospf6d/ospf6d.h
@@ -13,10 +13,9 @@
* 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 GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef OSPF6D_H