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
17 * along with GNU Zebra; see the file COPYING. If not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
27 #include "ospf6_route.h"
30 void *data
; /* data structure that holds this lsdb */
31 struct route_table
*table
;
33 void (*hook_add
)(struct ospf6_lsa
*);
34 void (*hook_remove
)(struct ospf6_lsa
*);
37 /* Function Prototypes */
38 extern struct ospf6_lsdb
*ospf6_lsdb_create(void *data
);
39 extern void ospf6_lsdb_delete(struct ospf6_lsdb
*lsdb
);
41 extern struct ospf6_lsa
*ospf6_lsdb_lookup(u_int16_t type
, u_int32_t id
,
43 struct ospf6_lsdb
*lsdb
);
44 extern struct ospf6_lsa
*ospf6_lsdb_lookup_next(u_int16_t type
, u_int32_t id
,
46 struct ospf6_lsdb
*lsdb
);
48 extern void ospf6_lsdb_add(struct ospf6_lsa
*lsa
, struct ospf6_lsdb
*lsdb
);
49 extern void ospf6_lsdb_remove(struct ospf6_lsa
*lsa
, struct ospf6_lsdb
*lsdb
);
51 extern struct ospf6_lsa
*ospf6_lsdb_head(struct ospf6_lsdb
*lsdb
);
52 extern struct ospf6_lsa
*ospf6_lsdb_next(struct ospf6_lsa
*lsa
);
54 extern struct ospf6_lsa
*ospf6_lsdb_type_router_head(u_int16_t type
,
56 struct ospf6_lsdb
*lsdb
);
57 extern struct ospf6_lsa
*ospf6_lsdb_type_router_next(u_int16_t type
,
59 struct ospf6_lsa
*lsa
);
61 extern struct ospf6_lsa
*ospf6_lsdb_type_head(u_int16_t type
,
62 struct ospf6_lsdb
*lsdb
);
63 extern struct ospf6_lsa
*ospf6_lsdb_type_next(u_int16_t type
,
64 struct ospf6_lsa
*lsa
);
66 extern void ospf6_lsdb_remove_all(struct ospf6_lsdb
*lsdb
);
67 extern void ospf6_lsdb_lsa_unlock(struct ospf6_lsa
*lsa
);
69 enum ospf_lsdb_show_level
{
70 OSPF6_LSDB_SHOW_LEVEL_NORMAL
= 0,
71 OSPF6_LSDB_SHOW_LEVEL_DETAIL
,
72 OSPF6_LSDB_SHOW_LEVEL_INTERNAL
,
73 OSPF6_LSDB_SHOW_LEVEL_DUMP
,
76 extern void ospf6_lsdb_show(struct vty
*vty
, enum ospf_lsdb_show_level level
,
77 u_int16_t
*type
, u_int32_t
*id
,
78 u_int32_t
*adv_router
, struct ospf6_lsdb
*lsdb
);
80 extern u_int32_t
ospf6_new_ls_id(u_int16_t type
, u_int32_t adv_router
,
81 struct ospf6_lsdb
*lsdb
);
82 extern u_int32_t
ospf6_new_ls_seqnum(u_int16_t type
, u_int32_t id
,
84 struct ospf6_lsdb
*lsdb
);
85 extern int ospf6_lsdb_maxage_remover(struct ospf6_lsdb
*lsdb
);
87 #endif /* OSPF6_LSDB_H */