c->rif->busy = NULL;
rem_node(NODE c);
mb_free(c);
- debug( "done\n" );
+ debug( " done\n" );
return;
}
static void
rip_start(struct proto *p)
{
- debug( "RIP: initializing instance...\n" );
+ debug( "RIP: starting instance...\n" );
P->magic = RIP_MAGIC;
init_list( &P->rtable );
i->sock->daddr = new->opposite;
if (!ipa_nonzero(i->sock->daddr))
- log( L_WARN "RIP: interface %s is too strange for me\n", i->iface->name );
+ log( L_WARN "RIP: interface %s is too strange for me", i->iface->name );
if (sk_open(i->sock)<0)
die( "RIP/%s: could not listen on %s\n", p->name, i->iface->name );
rem_node( &rte->u.rip.garbage );
}
-static void
-rip_preconfig(struct protocol *x)
+void
+rip_init_instance(struct proto *p)
{
- struct proto *p = proto_new(&proto_rip, sizeof(struct rip_data));
-
- debug( "RIP: preconfig\n" );
p->preference = DEF_PREF_RIP;
p->start = rip_start;
p->if_notify = rip_if_notify;
p->dump = rip_dump;
}
+static void
+rip_preconfig(struct protocol *x)
+{
+ debug( "RIP: preconfig\n" );
+}
+
static void
rip_postconfig(struct protocol *p)
{
rip_preconfig,
rip_postconfig
};
-
#define RIP_MAGIC 81861253
#define CHK_MAGIC do { if (P->magic != RIP_MAGIC) die( "Not enough magic\n" ); } while (0)
+
+void rip_init_instance(struct proto *p);