Lines Matching refs:bundle
273 bundle_AdjustDNS(ipcp->fsm.bundle); in ipcp_LoadDNS()
361 struct ipcp *ipcp = &arg->bundle->ncp.ipcp; in ipcp_Show()
432 arg->bundle->ncp.ipcp.cfg.vj.slots = slots; in ipcp_vjset()
436 arg->bundle->ncp.ipcp.cfg.vj.slotcomp = 1; in ipcp_vjset()
438 arg->bundle->ncp.ipcp.cfg.vj.slotcomp = 0; in ipcp_vjset()
447 ipcp_Init(struct ipcp *ipcp, struct bundle *bundle, struct link *l, in ipcp_Init() argument
457 bundle, l, parent, &ipcp_Callbacks, timer_names); in ipcp_Init()
523 struct iface *iface = ipcp->fsm.bundle->iface; in ipcp_Setup()
583 || (ipcp->fsm.bundle->radius.valid && ipcp->fsm.bundle->radius.vj) in ipcp_Setup()
621 int (*proxyfun)(struct bundle *, struct in_addr), in ipcp_proxyarp() argument
624 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_proxyarp() local
635 if (Enabled(bundle, OPT_PROXYALL)) { in ipcp_proxyarp()
649 if (!(ret = (*proxyfun)(bundle, ip))) in ipcp_proxyarp()
656 } else if (Enabled(bundle, OPT_PROXY)) in ipcp_proxyarp()
657 ret = (*proxyfun)(bundle, peer); in ipcp_proxyarp()
666 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_SetIPaddress() local
687 if (!iface_Add(bundle->iface, &bundle->ncp, &myrange, &hisncpaddr, in ipcp_SetIPaddress()
691 if (!Enabled(bundle, OPT_IFACEALIAS)) in ipcp_SetIPaddress()
692 iface_Clear(bundle->iface, &bundle->ncp, AF_INET, in ipcp_SetIPaddress()
695 if (bundle->ncp.cfg.sendpipe > 0 || bundle->ncp.cfg.recvpipe > 0) { in ipcp_SetIPaddress()
698 rt_Update(bundle, sadst, sagw, samask, NULL, NULL); in ipcp_SetIPaddress()
701 if (Enabled(bundle, OPT_SROUTES)) in ipcp_SetIPaddress()
702 route_Change(bundle, bundle->ncp.route, &myncpaddr, &hisncpaddr); in ipcp_SetIPaddress()
705 if (bundle->radius.valid) in ipcp_SetIPaddress()
706 route_Change(bundle, bundle->radius.routes, &myncpaddr, &hisncpaddr); in ipcp_SetIPaddress()
713 ChooseHisAddr(struct bundle *bundle, struct in_addr gw) in ChooseHisAddr() argument
718 for (f = 0; f < bundle->ncp.ipcp.cfg.peer_list.nItems; f++) { in ChooseHisAddr()
719 try = iplist_next(&bundle->ncp.ipcp.cfg.peer_list); in ChooseHisAddr()
722 if (ipcp_SetIPaddress(&bundle->ncp.ipcp, gw, try)) { in ChooseHisAddr()
728 if (f == bundle->ncp.ipcp.cfg.peer_list.nItems) { in ChooseHisAddr()
826 Enabled(fp->bundle, OPT_THROUGHPUT)); in IpcpLayerStart()
848 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_IfaceAddrAdded() local
850 if (Enabled(bundle, OPT_PROXY) || Enabled(bundle, OPT_PROXYALL)) in ipcp_IfaceAddrAdded()
860 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_IfaceAddrDeleted() local
862 if (Enabled(bundle, OPT_PROXY) || Enabled(bundle, OPT_PROXYALL)) in ipcp_IfaceAddrDeleted()
879 radius_Flush(&fp->bundle->radius); in IpcpLayerDown()
880 radius_Account(&fp->bundle->radius, &fp->bundle->radacct, in IpcpLayerDown()
881 fp->bundle->links, RAD_STOP, &ipcp->throughput); in IpcpLayerDown()
883 if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) in IpcpLayerDown()
884 system_Select(fp->bundle, fp->bundle->radius.filterid, LINKDOWNFILE, in IpcpLayerDown()
886 radius_StopTimer(&fp->bundle->radius); in IpcpLayerDown()
893 if (system_Select(fp->bundle, addr, LINKDOWNFILE, NULL, NULL) < 0) { in IpcpLayerDown()
894 if (bundle_GetLabel(fp->bundle)) { in IpcpLayerDown()
895 if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), in IpcpLayerDown()
897 system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL); in IpcpLayerDown()
899 system_Select(fp->bundle, "MYADDR", LINKDOWNFILE, NULL, NULL); in IpcpLayerDown()
915 if (!iface_SetFlags(ipcp->fsm.bundle->iface->name, IFF_UP)) { in ipcp_InterfaceUp()
917 ipcp->fsm.bundle->iface->name); in ipcp_InterfaceUp()
922 if (ipcp->fsm.bundle->NatEnabled) in ipcp_InterfaceUp()
948 radius_Account_Set_Ip(&fp->bundle->radacct, &ipcp->peer_ip, &ipcp->ifmask); in IpcpLayerUp()
949 radius_Account(&fp->bundle->radius, &fp->bundle->radacct, fp->bundle->links, in IpcpLayerUp()
952 if (*fp->bundle->radius.cfg.file && fp->bundle->radius.filterid) in IpcpLayerUp()
953 system_Select(fp->bundle, fp->bundle->radius.filterid, LINKUPFILE, in IpcpLayerUp()
955 radius_StartTimer(fp->bundle); in IpcpLayerUp()
962 if (system_Select(fp->bundle, tbuff, LINKUPFILE, NULL, NULL) < 0) { in IpcpLayerUp()
963 if (bundle_GetLabel(fp->bundle)) { in IpcpLayerUp()
964 if (system_Select(fp->bundle, bundle_GetLabel(fp->bundle), in IpcpLayerUp()
966 system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL); in IpcpLayerUp()
968 system_Select(fp->bundle, "MYADDR", LINKUPFILE, NULL, NULL); in IpcpLayerUp()
980 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_ValidateReq() local
981 struct iface *iface = bundle->iface; in ipcp_ValidateReq()
1008 ipcp->peer_ip = ChooseHisAddr(bundle, myaddr); in ipcp_ValidateReq()
1095 bundle_AdjustFilters(fp->bundle, &ncpaddr, NULL); in IpcpDecodeConfig()
1314 bundle_AdjustDNS(fp->bundle); in IpcpDecodeConfig()
1317 bundle_AdjustDNS(fp->bundle); in IpcpDecodeConfig()
1341 ipcp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) in ipcp_Input() argument
1345 if (bundle_Phase(bundle) == PHASE_NETWORK) in ipcp_Input()
1346 fsm_Input(&bundle->ncp.ipcp.fsm, bp); in ipcp_Input()
1348 if (bundle_Phase(bundle) < PHASE_NETWORK) in ipcp_Input()
1350 l->name, bundle_PhaseName(bundle)); in ipcp_Input()
1357 ipcp_UseHisIPaddr(struct bundle *bundle, struct in_addr hisaddr) in ipcp_UseHisIPaddr() argument
1359 struct ipcp *ipcp = &bundle->ncp.ipcp; in ipcp_UseHisIPaddr()
1372 ipcp_UseHisaddr(struct bundle *bundle, const char *hisaddr, int setaddr) in ipcp_UseHisaddr() argument
1375 struct ncp *ncp = &bundle->ncp; in ipcp_UseHisaddr()
1386 ipcp->peer_ip = ChooseHisAddr(bundle, ipcp->my_ip); in ipcp_UseHisaddr()
1410 bundle_AdjustFilters(bundle, NULL, &ncpaddr); in ipcp_UseHisaddr()
1444 struct bundle *bundle = ipcp->fsm.bundle; in ipcp_PushPacket() local
1469 if (!FilterCheck(MBUF_CTOP(bp), AF_INET, &bundle->filter.alive, in ipcp_PushPacket()
1473 bundle_StartIdleTimer(bundle, secs); in ipcp_PushPacket()
1475 link_PushPacket(l, bp, bundle, 0, PROTO_IP); in ipcp_PushPacket()