Changeset View
Changeset View
Standalone View
Standalone View
sbin/ifconfig/carp.c
Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | static struct afswtch af_carp = { | ||||
.af_name = "af_carp", | .af_name = "af_carp", | ||||
.af_af = AF_UNSPEC, | .af_af = AF_UNSPEC, | ||||
.af_other_status = carp_status, | .af_other_status = carp_status, | ||||
}; | }; | ||||
static __constructor void | static __constructor void | ||||
carp_ctor(void) | carp_ctor(void) | ||||
{ | { | ||||
int i; | |||||
/* Default to multicast. */ | /* Default to multicast. */ | ||||
setcarp_mcast(NULL, 0, 0, NULL); | setcarp_mcast(NULL, 0, 0, NULL); | ||||
setcarp_mcast6(NULL, 0, 0, NULL); | setcarp_mcast6(NULL, 0, 0, NULL); | ||||
for (i = 0; i < nitems(carp_cmds); i++) | for (size_t i = 0; i < nitems(carp_cmds); i++) | ||||
cmd_register(&carp_cmds[i]); | cmd_register(&carp_cmds[i]); | ||||
af_register(&af_carp); | af_register(&af_carp); | ||||
} | } |