Lines Matching refs:sw
213 ProcessArgs(int argc, char **argv, struct switches *sw)
219 memset(sw, '\0', sizeof *sw);
220 sw->mode = PHYS_INTERACTIVE;
221 sw->unit = -1;
232 sw->nat = 1;
242 sw->nat = 1;
253 sw->unit = atoi(argv[arg]);
255 sw->unit = atoi(cp + 4);
257 sw->quiet = 1;
268 sw->mode = newmode;
270 sw->fg = 1;
279 if (sw->mode == PHYS_AUTO && arg == argc) {
312 struct switches sw;
335 label = ProcessArgs(argc, argv, &sw);
344 if (sw.mode == PHYS_INTERACTIVE) {
353 if (sw.mode == PHYS_DIRECT)
379 CheckLabel(argv[arg], prompt, sw.mode);
381 CheckLabel("default", prompt, sw.mode);
383 if (!sw.quiet)
384 prompt_Printf(prompt, "Working in %s mode\n", mode2Nam(sw.mode));
386 if ((bundle = bundle_Create(TUN_PREFIX, sw.mode, sw.unit)) == NULL)
392 bundle->NatEnabled = sw.nat;
393 if (sw.nat)
406 if (sw.mode == PHYS_INTERACTIVE)
423 if (sw.mode == PHYS_AUTO &&
432 if (!sw.quiet)
436 if (sw.mode != PHYS_INTERACTIVE) {
437 if (sw.mode != PHYS_DIRECT) {
438 if (!sw.fg) {
442 if (sw.mode == PHYS_BACKGROUND && pipe(bgpipe)) {
457 if (sw.mode == PHYS_BACKGROUND) {
470 if (!sw.quiet) {
476 if (!sw.quiet)
480 if (!sw.quiet)
498 } else if (sw.mode == PHYS_BACKGROUND) {
512 if (!sw.fg)
534 log_Printf(LogPHASE, "PPP Started (%s mode).\n", mode2Nam(sw.mode));