]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_nsm.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / ospfd / ospf_nsm.h
index 4531f6ec7da0ed52e5593618c0f34ef5aee5f553..dcfba84d8b475bc847519b724ed5488d16687ccd 100644 (file)
  * 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 _ZEBRA_OSPF_NSM_H
 #define OSPF_NSM_EVENT_MAX     14
 
 /* Macro for OSPF NSM timer turn on. */
-#define OSPF_NSM_TIMER_ON(T,F,V)                                              \
-      do {                                                                    \
-        if (!(T))                                                             \
-          (T) = thread_add_timer (master, (F), nbr, (V));                     \
-      } while (0)
+#define OSPF_NSM_TIMER_ON(T,F,V) thread_add_timer (master, (F), nbr, (V), &(T))
 
 /* Macro for OSPF NSM timer turn off. */
-#define OSPF_NSM_TIMER_OFF(X)                                                 \
-      do {                                                                    \
-        if (X)                                                                \
-          {                                                                   \
-            thread_cancel (X);                                                \
-            (X) = NULL;                                                       \
-          }                                                                   \
-      } while (0)
+#define OSPF_NSM_TIMER_OFF(X)                                                  \
+       do {                                                                   \
+               if (X) {                                                       \
+                       thread_cancel(X);                                      \
+                       (X) = NULL;                                            \
+               }                                                              \
+       } while (0)
 
 /* Macro for OSPF NSM schedule event. */
-#define OSPF_NSM_EVENT_SCHEDULE(N,E)                                          \
-      thread_add_event (master, ospf_nsm_event, (N), (E))
+#define OSPF_NSM_EVENT_SCHEDULE(N, E)                                          \
+       thread_add_event(master, ospf_nsm_event, (N), (E), NULL)
 
 /* Macro for OSPF NSM execute event. */
-#define OSPF_NSM_EVENT_EXECUTE(N,E)                                           \
-      thread_execute (master, ospf_nsm_event, (N), (E))
+#define OSPF_NSM_EVENT_EXECUTE(N, E)                                           \
+       thread_execute(master, ospf_nsm_event, (N), (E))
 
 /* Prototypes. */
-extern int ospf_nsm_event (struct thread *);
-extern void ospf_check_nbr_loading (struct ospf_neighbor *);
-extern int ospf_db_summary_isempty (struct ospf_neighbor *);
-extern int ospf_db_summary_count (struct ospf_neighbor *);
-extern void ospf_db_summary_clear (struct ospf_neighbor *);
+extern int ospf_nsm_event(struct thread *);
+extern void ospf_check_nbr_loading(struct ospf_neighbor *);
+extern int ospf_db_summary_isempty(struct ospf_neighbor *);
+extern int ospf_db_summary_count(struct ospf_neighbor *);
+extern void ospf_db_summary_clear(struct ospf_neighbor *);
 
 DECLARE_HOOK(ospf_nsm_change,
-               (struct ospf_neighbor *on, int state, int oldstate),
-               (on, state, oldstate))
+            (struct ospf_neighbor * on, int state, int oldstate),
+            (on, state, oldstate))
 
 #endif /* _ZEBRA_OSPF_NSM_H */
-