void in6_addrtou_range(const struct in6_addr *src, u_char width, struct u_range *dst) { u_rangeclear(dst); in6_addrtou_addr(src, &dst->addr); dst->width = width; }
struct u_range *in_addrtou_range(const struct in_addr *src, u_char width, struct u_range *dst) { u_rangeclear(dst); in_addrtou_addr(src, &dst->addr); dst->width = width; return dst; }
void IpcpInit(Bund b) { IpcpState const ipcp = &b->ipcp; /* Init state machine */ memset(ipcp, 0, sizeof(*ipcp)); FsmInit(&ipcp->fsm, &gIpcpFsmType, b); /* Come up with a default IP address for my side of the link */ u_rangeclear(&ipcp->conf.self_allow); GetAnyIpAddress(&ipcp->conf.self_allow.addr, NULL); #ifdef USE_NG_VJC /* Default we want VJ comp */ Enable(&ipcp->conf.options, IPCP_CONF_VJCOMP); Accept(&ipcp->conf.options, IPCP_CONF_VJCOMP); #endif }