Lines Matching refs:bundle

105 static void DoLoop(struct bundle *);
108 static struct bundle *SignalBundle;
308 struct bundle *bundle; in main() local
384 if ((bundle = bundle_Create(TUN_PREFIX, sw.mode, sw.unit)) == NULL) in main()
389 SignalBundle = bundle; in main()
390 bundle->NatEnabled = sw.nat; in main()
392 opt_enable(bundle, OPT_IFACEALIAS); in main()
394 if (system_Select(bundle, "default", CONFFILE, prompt, NULL) < 0) in main()
413 bundle_SetLabel(bundle, lastlabel); in main()
414 system_Select(bundle, argv[arg], CONFFILE, prompt, NULL); in main()
419 bundle_SetLabel(bundle, lastlabel); in main()
422 ncprange_family(&bundle->ncp.ipcp.cfg.peer_range) == AF_UNSPEC) { in main()
429 prompt->bundle = bundle; /* couldn't do it earlier */ in main()
431 prompt_Printf(prompt, "Using interface: %s\n", bundle->iface->name); in main()
498 bundle->notify.fd = bgpipe[1]; in main()
501 bundle_ChangedPID(bundle); in main()
502 bundle_LockTun(bundle); /* we have a new pid */ in main()
533 DoLoop(bundle); in main()
540 DoLoop(struct bundle *bundle) in DoLoop() argument
563 for (; !bundle_IsDead(bundle); bundle_CleanDatalinks(bundle)) { in DoLoop()
570 descriptor_UpdateSet(&bundle->desc, rfds, wfds, efds, &nfds); in DoLoop()
575 bundle_CleanDatalinks(bundle); in DoLoop()
576 if (bundle_IsDead(bundle)) in DoLoop()
642 if (!bundle_Exception(bundle, i)) { in DoLoop()
654 descriptor_Read(&server.desc, bundle, rfds); in DoLoop()
658 if (descriptor_IsSet(&bundle->desc, rfds)) { in DoLoop()
659 descriptor_Read(&bundle->desc, bundle, rfds); in DoLoop()
663 if (descriptor_IsSet(&bundle->desc, wfds)) in DoLoop()
664 if (descriptor_Write(&bundle->desc, bundle, wfds) <= 0 && nothing_done) { in DoLoop()