3 * Copyright (C) 2008 Everton da Silva Marques
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 #include "memory_vty.h"
43 #include "pim_version.h"
44 #include "pim_signals.h"
45 #include "pim_zebra.h"
47 #include "pim_iface.h"
50 extern struct host host
;
52 struct option longopts
[] = {
57 zebra_capabilities_t _caps_p
[] =
65 /* pimd privileges to run with */
66 struct zebra_privs_t pimd_privs
=
68 #if defined(FRR_USER) && defined(FRR_GROUP)
73 .vty_group
= VTY_GROUP
,
76 .cap_num_p
= sizeof(_caps_p
)/sizeof(_caps_p
[0]),
80 FRR_DAEMON_INFO(pimd
, PIM
,
81 .vty_port
= PIMD_VTY_PORT
,
83 .proghelp
= "Implementation of the PIM routing protocol.",
85 .signals
= pimd_signals
,
86 .n_signals
= 4 /* XXX array_size(pimd_signals) XXX*/,
92 int main(int argc
, char** argv
, char** envp
) {
93 frr_preinit(&pimd_di
, argc
, argv
);
94 frr_opt_add("", longopts
, "");
96 /* this while just reads the options */
100 opt
= frr_getopt(argc
, argv
, NULL
);
122 prefix_list_add_hook (pim_prefix_list_update
);
123 prefix_list_delete_hook (pim_prefix_list_update
);
125 pim_route_map_init ();
127 pim_msdp_init (master
);
130 * Initialize zclient "update" and "lookup" sockets
137 #ifdef PIM_DEBUG_BYDEFAULT
138 zlog_notice("PIM_DEBUG_BYDEFAULT: Enabling all debug commands");
139 PIM_DO_DEBUG_PIM_EVENTS
;
140 PIM_DO_DEBUG_PIM_PACKETS
;
141 PIM_DO_DEBUG_PIM_TRACE
;
142 PIM_DO_DEBUG_IGMP_EVENTS
;
143 PIM_DO_DEBUG_IGMP_PACKETS
;
144 PIM_DO_DEBUG_IGMP_TRACE
;
148 #ifdef PIM_CHECK_RECV_IFINDEX_SANITY
149 zlog_notice("PIM_CHECK_RECV_IFINDEX_SANITY: will match sock/recv ifindex");
150 #ifdef PIM_REPORT_RECV_IFINDEX_MISMATCH
151 zlog_notice("PIM_REPORT_RECV_IFINDEX_MISMATCH: will report sock/recv ifindex mismatch");
155 #ifdef PIM_UNEXPECTED_KERNEL_UPCALL
156 zlog_notice("PIM_UNEXPECTED_KERNEL_UPCALL: report unexpected kernel upcall");