Home | History | Annotate | Download | only in dist

Lines Matching refs:fwd

417 	struct Forward *fwd;
428 fwd = &options->local_forwards[options->num_local_forwards++];
430 fwd->listen_host = newfwd->listen_host;
431 fwd->listen_port = newfwd->listen_port;
432 fwd->listen_path = newfwd->listen_path;
433 fwd->connect_host = newfwd->connect_host;
434 fwd->connect_port = newfwd->connect_port;
435 fwd->connect_path = newfwd->connect_path;
446 struct Forward *fwd;
457 fwd = &options->remote_forwards[options->num_remote_forwards++];
459 fwd->listen_host = newfwd->listen_host;
460 fwd->listen_port = newfwd->listen_port;
461 fwd->listen_path = newfwd->listen_path;
462 fwd->connect_host = newfwd->connect_host;
463 fwd->connect_port = newfwd->connect_port;
464 fwd->connect_path = newfwd->connect_path;
465 fwd->handle = newfwd->handle;
466 fwd->allocated_port = 0;
1188 struct Forward fwd;
1849 if (parse_forward(&fwd, fwdarg, dynamicfwd, remotefwd) == 0) {
1857 add_remote_forward(options, &fwd);
1859 add_local_forward(options, &fwd);
3365 * sets fwd to the parsed field and advances p past the colon
3370 parse_fwd_field(char **p, struct fwdarg *fwd)
3397 fwd->arg = cp + 1;
3398 fwd->ispath = ispath;
3419 fwd->arg = *p;
3420 fwd->ispath = ispath;
3436 parse_forward(struct Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
3442 memset(fwd, 0, sizeof(*fwd));
3471 fwd->listen_path = xstrdup(fwdargs[0].arg);
3472 fwd->listen_port = PORT_STREAMLOCAL;
3474 fwd->listen_host = NULL;
3475 fwd->listen_port = a2port(fwdargs[0].arg);
3477 fwd->connect_host = xstrdup("socks");
3482 fwd->listen_path = xstrdup(fwdargs[0].arg);
3483 fwd->listen_port = PORT_STREAMLOCAL;
3484 fwd->connect_path = xstrdup(fwdargs[1].arg);
3485 fwd->connect_port = PORT_STREAMLOCAL;
3487 fwd->listen_host = NULL;
3488 fwd->listen_port = a2port(fwdargs[0].arg);
3489 fwd->connect_path = xstrdup(fwdargs[1].arg);
3490 fwd->connect_port = PORT_STREAMLOCAL;
3492 fwd->listen_host = xstrdup(fwdargs[0].arg);
3493 fwd->listen_port = a2port(fwdargs[1].arg);
3494 fwd->connect_host = xstrdup("socks");
3500 fwd->listen_path = xstrdup(fwdargs[0].arg);
3501 fwd->listen_port = PORT_STREAMLOCAL;
3502 fwd->connect_host = xstrdup(fwdargs[1].arg);
3503 fwd->connect_port = a2port(fwdargs[2].arg);
3505 fwd->listen_host = xstrdup(fwdargs[0].arg);
3506 fwd->listen_port = a2port(fwdargs[1].arg);
3507 fwd->connect_path = xstrdup(fwdargs[2].arg);
3508 fwd->connect_port = PORT_STREAMLOCAL;
3510 fwd->listen_host = NULL;
3511 fwd->listen_port = a2port(fwdargs[0].arg);
3512 fwd->connect_host = xstrdup(fwdargs[1].arg);
3513 fwd->connect_port = a2port(fwdargs[2].arg);
3518 fwd->listen_host = xstrdup(fwdargs[0].arg);
3519 fwd->listen_port = a2port(fwdargs[1].arg);
3520 fwd->connect_host = xstrdup(fwdargs[2].arg);
3521 fwd->connect_port = a2port(fwdargs[3].arg);
3534 if (fwd->connect_path == NULL &&
3535 fwd->listen_path == NULL)
3538 if (fwd->connect_port <= 0 && fwd->connect_path == NULL)
3542 if ((fwd->listen_port < 0 && fwd->listen_path == NULL) ||
3543 (!remotefwd && fwd->listen_port == 0))
3545 if (fwd->connect_host != NULL &&
3546 strlen(fwd->connect_host) >= NI_MAXHOST)
3552 if (fwd->connect_path != NULL &&
3553 strlen(fwd->connect_path) >= PATH_MAX_SUN)
3555 if (fwd->listen_host != NULL &&
3556 strlen(fwd->listen_host) >= NI_MAXHOST)
3558 if (fwd->listen_path != NULL &&
3559 strlen(fwd->listen_path) >= PATH_MAX_SUN)
3565 free(fwd->connect_host);
3566 fwd->connect_host = NULL;
3567 free(fwd->connect_path);
3568 fwd->connect_path = NULL;
3569 free(fwd->listen_host);
3570 fwd->listen_host = NULL;
3571 free(fwd->listen_path);
3572 fwd->listen_path = NULL;
3841 const struct Forward *fwd;
3846 fwd = &fwds[i];
3847 if (code == oDynamicForward && fwd->connect_host != NULL &&
3848 strcmp(fwd->connect_host, "socks") != 0)
3850 if (code == oLocalForward && fwd->connect_host != NULL &&
3851 strcmp(fwd->connect_host, "socks") == 0)
3854 if (fwd->listen_port == PORT_STREAMLOCAL)
3855 printf(" %s", fwd->listen_path);
3856 else if (fwd->listen_host == NULL)
3857 printf(" %d", fwd->listen_port);
3860 fwd->listen_host, fwd->listen_port);
3863 if (fwd->connect_port == PORT_STREAMLOCAL)
3864 printf(" %s", fwd->connect_path);
3865 else if (fwd->connect_host == NULL)
3866 printf(" %d", fwd->connect_port);
3869 fwd->connect_host, fwd->connect_port);