]>
git.proxmox.com Git - mirror_frr.git/blob - ospfd/ospf_ism.h
2 * OSPF version 2 Interface State Machine.
3 * From RFC2328 [OSPF Version 2]
4 * Copyright (C) 1999 Toshiaki Takada
6 * This file is part of GNU Zebra.
8 * GNU Zebra is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2, or (at your option) any
13 * GNU Zebra is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with GNU Zebra; see the file COPYING. If not, write to the Free
20 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 #ifndef _ZEBRA_OSPF_ISM_H
25 #define _ZEBRA_OSPF_ISM_H
27 /* OSPF Interface State Machine Status. */
28 #define ISM_DependUpon 0
30 #define ISM_Loopback 2
32 #define ISM_PointToPoint 4
36 #define OSPF_ISM_STATE_MAX 8
38 /* OSPF Interface State Machine Event. */
40 #define ISM_InterfaceUp 1
41 #define ISM_WaitTimer 2
42 #define ISM_BackupSeen 3
43 #define ISM_NeighborChange 4
45 #define ISM_UnloopInd 6
46 #define ISM_InterfaceDown 7
47 #define OSPF_ISM_EVENT_MAX 8
49 #define OSPF_ISM_WRITE_ON() \
52 if (oi->on_write_q == 0) \
54 listnode_add (ospf_top->oi_write_q, oi); \
57 if (ospf_top->t_write == NULL) \
59 thread_add_write (master, ospf_write, ospf_top, ospf_top->fd); \
62 /* Macro for OSPF ISM timer turn on. */
63 #define OSPF_ISM_TIMER_ON(T,F,V) \
65 (T) = thread_add_timer (master, (F), oi, (V))
67 /* Macro for OSPF ISM timer turn off. */
68 #define OSPF_ISM_TIMER_OFF(X) \
75 /* Macro for OSPF schedule event. */
76 #define OSPF_ISM_EVENT_SCHEDULE(I,E) \
77 thread_add_event (master, ospf_ism_event, (I), (E))
79 /* Macro for OSPF execute event. */
80 #define OSPF_ISM_EVENT_EXECUTE(I,E) \
81 thread_execute (master, ospf_ism_event, (I), (E))
84 int ospf_ism_event (struct thread
*);
85 void ism_change_status (struct ospf_interface
*, int);
86 int ospf_hello_timer (struct thread
*thread
);
88 #endif /* _ZEBRA_OSPF_ISM_H */