Lines Matching refs:bundle
275 bundle_AdjustDNS(ipcp->fsm.bundle); in ipcp_LoadDNS()
363 struct ipcp *ipcp = &arg->bundle->ncp.ipcp; in ipcp_Show()
434 arg->bundle->ncp.ipcp.cfg.vj.slots = slots; in ipcp_vjset()
438 arg->bundle->ncp.ipcp.cfg.vj.slotcomp = 1; in ipcp_vjset()
440 arg->bundle->ncp.ipcp.cfg.vj.slotcomp = 0; in ipcp_vjset()
449 ipcp_Init(struct ipcp *ipcp, struct bundle *bundle, struct link *l, in ipcp_Init() argument
459 bundle, l, parent, &ipcp_Callbacks, timer_names); in ipcp_Init()
525 struct iface *iface = ipcp->fsm.bundle->iface; in ipcp_Setup()
585 || (ipcp->fsm.bundle->radius.valid && ipcp->fsm.bundle->radius.vj) in ipcp_Setup()
623 int (*proxyfun)(struct bundle *, struct in_addr), in ipcp_proxyarp() argument
626 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_proxyarp() local
637 if (Enabled(bundle, OPT_PROXYALL)) { in ipcp_proxyarp()
651 if (!(ret = (*proxyfun)(bundle, ip))) in ipcp_proxyarp()
658 } else if (Enabled(bundle, OPT_PROXY)) in ipcp_proxyarp()
659 ret = (*proxyfun)(bundle, peer); in ipcp_proxyarp()
668 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_SetIPaddress() local
689 if (!iface_Add(bundle->iface, &bundle->ncp, &myrange, &hisncpaddr, in ipcp_SetIPaddress()
693 if (!Enabled(bundle, OPT_IFACEALIAS)) in ipcp_SetIPaddress()
694 iface_Clear(bundle->iface, &bundle->ncp, AF_INET, in ipcp_SetIPaddress()
697 if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) { in ipcp_SetIPaddress()
700 rt_Update(bundle, sadst, sagw, samask, NULL, NULL); in ipcp_SetIPaddress()
703 if (Enabled(bundle, OPT_SROUTES)) in ipcp_SetIPaddress()
704 route_Change(bundle, bundle->ncp.route, &myncpaddr, &hisncpaddr); in ipcp_SetIPaddress()
707 if (bundle->radius.valid) in ipcp_SetIPaddress()
708 route_Change(bundle, bundle->radius.routes, &myncpaddr, &hisncpaddr); in ipcp_SetIPaddress()
715 ChooseHisAddr(struct bundle *bundle, struct in_addr gw) in ChooseHisAddr() argument
720 for (f = 0; f < bundle->ncp.ipcp.cfg.peer_list.nItems; f++) { in ChooseHisAddr()
721 try = iplist_next(&bundle->ncp.ipcp.cfg.peer_list); in ChooseHisAddr()
724 if (ipcp_SetIPaddress(&bundle->ncp.ipcp, gw, try)) { in ChooseHisAddr()
730 if (f == bundle->ncp.ipcp.cfg.peer_list.nItems) { in ChooseHisAddr()
828 Enabled(fp->bundle, OPT_THROUGHPUT)); in IpcpLayerStart()
850 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_IfaceAddrAdded() local
852 if (Enabled(bundle, OPT_PROXY) || Enabled(bundle, OPT_PROXYALL)) in ipcp_IfaceAddrAdded()
862 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_IfaceAddrDeleted() local
864 if (Enabled(bundle, OPT_PROXY) || Enabled(bundle, OPT_PROXYALL)) in ipcp_IfaceAddrDeleted()
881 radius_Flush(&fp->bundle->radius); in IpcpLayerDown()
882 radius_Account(&fp->bundle->radius, &fp->bundle->radacct, in IpcpLayerDown()
883 fp->bundle->links, RAD_STOP, &ipcp->throughput); in IpcpLayerDown()
885 if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) in IpcpLayerDown()
886 system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, in IpcpLayerDown()
888 radius_StopTimer(&fp->bundle->radius); in IpcpLayerDown()
895 if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) { in IpcpLayerDown()
896 if (bundle_GetLabel(fp->bundle)) { in IpcpLayerDown()
897 if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), in IpcpLayerDown()
899 system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL); in IpcpLayerDown()
901 system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL); in IpcpLayerDown()
917 if (!iface_SetFlags(ipcp->fsm.bundle->iface->name, IFF_UP)) { in ipcp_InterfaceUp()
919 ipcp->fsm.bundle->iface->name); in ipcp_InterfaceUp()
924 if (ipcp->fsm.bundle->NatEnabled) in ipcp_InterfaceUp()
950 radius_Account_Set_Ip(&fp->bundle->radacct, &ipcp->peer_ip, &ipcp->ifmask); in IpcpLayerUp()
951 radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, in IpcpLayerUp()
954 if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) in IpcpLayerUp()
955 system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, in IpcpLayerUp()
957 radius_StartTimer(fp->bundle); in IpcpLayerUp()
964 if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) { in IpcpLayerUp()
965 if (bundle_GetLabel(fp->bundle)) { in IpcpLayerUp()
966 if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), in IpcpLayerUp()
968 system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL); in IpcpLayerUp()
970 system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL); in IpcpLayerUp()
982 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_ValidateReq() local
983 struct iface *iface = bundle->iface; in ipcp_ValidateReq()
1010 ipcp->peer_ip = ChooseHisAddr(bundle, myaddr); in ipcp_ValidateReq()
1097 bundle_AdjustFilters(fp->bundle, &ncpaddr, NULL); in IpcpDecodeConfig()
1316 bundle_AdjustDNS(fp->bundle); in IpcpDecodeConfig()
1319 bundle_AdjustDNS(fp->bundle); in IpcpDecodeConfig()
1343 ipcp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in ipcp_Input() argument
1347 if (bundle_Phase(bundle) == PHASE_NETWORK) in ipcp_Input()
1348 fsm_Input(&bundle->ncp.ipcp.fsm, bp); in ipcp_Input()
1350 if (bundle_Phase(bundle) < PHASE_NETWORK) in ipcp_Input()
1352 l->name, bundle_PhaseName(bundle)); in ipcp_Input()
1359 ipcp_UseHisIPaddr(struct bundle *bundle, struct in_addr hisaddr) in ipcp_UseHisIPaddr() argument
1361 struct ipcp *ipcp = &bundle->ncp.ipcp; in ipcp_UseHisIPaddr()
1374 ipcp_UseHisaddr(struct bundle *bundle, const char *hisaddr, int setaddr) in ipcp_UseHisaddr() argument
1377 struct ncp *ncp = &bundle->ncp; in ipcp_UseHisaddr()
1388 ipcp->peer_ip = ChooseHisAddr(bundle, ipcp->my_ip); in ipcp_UseHisaddr()
1412 bundle_AdjustFilters(bundle, NULL, &ncpaddr); in ipcp_UseHisaddr()
1446 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_PushPacket() local
1471 if (!FilterCheck(MBUF_CTOP(bp), AF_INET, &bundle->filter.alive, in ipcp_PushPacket()
1475 bundle_StartIdleTimer(bundle, secs); in ipcp_PushPacket()
1477 link_PushPacket(l, bp, bundle, 0, PROTO_IP); in ipcp_PushPacket()