Home | History | Annotate | Download | only in src

Lines Matching refs:sw

210 ProcessArgs(int argc, char **argv, struct switches *sw)
216 memset(sw, '\0', sizeof *sw);
217 sw->mode = PHYS_INTERACTIVE;
218 sw->unit = -1;
229 sw->nat = 1;
239 sw->nat = 1;
250 sw->unit = atoi(argv[arg]);
252 sw->unit = atoi(cp + 4);
254 sw->quiet = 1;
265 sw->mode = newmode;
267 sw->fg = 1;
276 if (sw->mode == PHYS_AUTO && arg == argc) {
309 struct switches sw;
332 label = ProcessArgs(argc, argv, &sw);
341 if (sw.mode == PHYS_INTERACTIVE) {
350 if (sw.mode == PHYS_DIRECT)
376 CheckLabel(argv[arg], prompt, sw.mode);
378 CheckLabel("default", prompt, sw.mode);
380 if (!sw.quiet)
381 prompt_Printf(prompt, "Working in %s mode\n", mode2Nam(sw.mode));
383 if ((bundle = bundle_Create(TUN_PREFIX, sw.mode, sw.unit)) == NULL)
390 if (!sw.quiet)
394 bundle->NatEnabled = sw.nat;
395 if (sw.nat)
408 if (sw.mode == PHYS_INTERACTIVE)
425 if (sw.mode == PHYS_AUTO &&
432 if (sw.mode != PHYS_INTERACTIVE) {
433 if (sw.mode != PHYS_DIRECT) {
434 if (!sw.fg) {
438 if (sw.mode == PHYS_BACKGROUND && pipe(bgpipe)) {
453 if (sw.mode == PHYS_BACKGROUND) {
466 if (!sw.quiet) {
472 if (!sw.quiet)
476 if (!sw.quiet)
494 } else if (sw.mode == PHYS_BACKGROUND) {
508 if (!sw.fg)
530 log_Printf(LogPHASE, "PPP Started (%s mode).\n", mode2Nam(sw.mode));