3 * Copyright (C) 2013-2015
15 * This file is part of GNU Zebra.
17 * GNU Zebra is free software; you can redistribute it and/or modify it
18 * under the terms of the GNU General Public License as published by the
19 * Free Software Foundation; either version 2, or (at your option) any
22 * GNU Zebra is distributed in the hope that it will be useful, but
23 * WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * General Public License for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with this program; see the file COPYING; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 #include <lib/version.h>
51 #include "distribute.h"
53 //#include "routemap.h"
54 //#include "if_rmap.h"
56 #include "eigrpd/eigrp_structs.h"
57 #include "eigrpd/eigrpd.h"
58 #include "eigrpd/eigrp_dump.h"
59 #include "eigrpd/eigrp_interface.h"
60 #include "eigrpd/eigrp_neighbor.h"
61 #include "eigrpd/eigrp_packet.h"
62 #include "eigrpd/eigrp_vty.h"
63 #include "eigrpd/eigrp_zebra.h"
64 #include "eigrpd/eigrp_network.h"
65 #include "eigrpd/eigrp_snmp.h"
66 #include "eigrpd/eigrp_filter.h"
67 //#include "eigrpd/eigrp_routemap.h"
69 /* eigprd privileges */
70 zebra_capabilities_t _caps_p
[] =
77 struct zebra_privs_t eigrpd_privs
=
79 #if defined (FRR_USER) && defined (FRR_GROUP)
83 #if defined (VTY_GROUP)
84 .vty_group
= VTY_GROUP
,
87 .cap_num_p
= array_size (_caps_p
),
92 struct option longopts
[] =
97 /* Master of threads. */
98 struct thread_master
*master
;
100 /* SIGHUP handler. */
104 zlog_info ("SIGHUP received");
107 /* SIGINT / SIGTERM handler. */
111 zlog_notice ("Terminating on signal");
115 /* SIGUSR1 handler. */
122 struct quagga_signal_t eigrp_signals
[] =
142 FRR_DAEMON_INFO(eigrpd
, EIGRP
,
143 .vty_port
= EIGRP_VTY_PORT
,
145 .proghelp
= "Implementation of the EIGRP routing protocol.",
147 .signals
= eigrp_signals
,
148 .n_signals
= array_size(eigrp_signals
),
150 .privs
= &eigrpd_privs
,
153 /* EIGRPd main routine. */
155 main (int argc
, char **argv
, char **envp
)
157 frr_preinit (&eigrpd_di
, argc
, argv
);
158 frr_opt_add ("", longopts
, "");
164 opt
= frr_getopt (argc
, argv
, NULL
);
179 /* EIGRP master init. */
180 eigrp_master_init ();
181 eigrp_om
->master
= frr_init();
182 master
= eigrp_om
->master
;
191 /* Get configuration file. */
192 /* EIGRP VTY inits */
195 eigrp_vty_show_init ();
196 eigrp_vty_if_init ();
200 #endif /* HAVE_SNMP */
202 /* Access list install. */
204 access_list_add_hook (eigrp_distribute_update_all_wrapper
);
205 access_list_delete_hook (eigrp_distribute_update_all_wrapper
);
207 /* Prefix list initialize.*/
209 prefix_list_add_hook (eigrp_distribute_update_all
);
210 prefix_list_delete_hook (eigrp_distribute_update_all
);
212 /*eigrp_route_map_init();
213 route_map_add_hook (eigrp_rmap_update);
214 route_map_delete_hook (eigrp_rmap_update);*/
215 /*if_rmap_init (EIGRP_NODE);
216 if_rmap_hook_add (eigrp_if_rmap_update);
217 if_rmap_hook_delete (eigrp_if_rmap_update);*/
219 /* Distribute list install. */
220 distribute_list_init (EIGRP_NODE
);
221 distribute_list_add_hook (eigrp_distribute_update
);
222 distribute_list_delete_hook (eigrp_distribute_update
);