Home | History | Annotate | Download | only in openssh

Lines Matching refs:fwd

293 	struct Forward *fwd;
303 fwd = &options->local_forwards[options->num_local_forwards++];
305 fwd->listen_host = newfwd->listen_host;
306 fwd->listen_port = newfwd->listen_port;
307 fwd->listen_path = newfwd->listen_path;
308 fwd->connect_host = newfwd->connect_host;
309 fwd->connect_port = newfwd->connect_port;
310 fwd->connect_path = newfwd->connect_path;
321 struct Forward *fwd;
326 fwd = &options->remote_forwards[options->num_remote_forwards++];
328 fwd->listen_host = newfwd->listen_host;
329 fwd->listen_port = newfwd->listen_port;
330 fwd->listen_path = newfwd->listen_path;
331 fwd->connect_host = newfwd->connect_host;
332 fwd->connect_port = newfwd->connect_port;
333 fwd->connect_path = newfwd->connect_path;
334 fwd->handle = newfwd->handle;
335 fwd->allocated_port = 0;
756 struct Forward fwd;
1178 if (parse_forward(&fwd, fwdarg,
1187 add_local_forward(options, &fwd);
1189 add_remote_forward(options, &fwd);
1891 * sets fwd to the parsed field and advances p past the colon
1896 parse_fwd_field(char **p, struct fwdarg *fwd)
1923 fwd->arg = cp + 1;
1924 fwd->ispath = ispath;
1945 fwd->arg = *p;
1946 fwd->ispath = ispath;
1962 parse_forward(struct Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
1968 memset(fwd, 0, sizeof(*fwd));
1990 fwd->listen_path = xstrdup(fwdargs[0].arg);
1991 fwd->listen_port = PORT_STREAMLOCAL;
1993 fwd->listen_host = NULL;
1994 fwd->listen_port = a2port(fwdargs[0].arg);
1996 fwd->connect_host = xstrdup("socks");
2001 fwd->listen_path = xstrdup(fwdargs[0].arg);
2002 fwd->listen_port = PORT_STREAMLOCAL;
2003 fwd->connect_path = xstrdup(fwdargs[1].arg);
2004 fwd->connect_port = PORT_STREAMLOCAL;
2006 fwd->listen_host = NULL;
2007 fwd->listen_port = a2port(fwdargs[0].arg);
2008 fwd->connect_path = xstrdup(fwdargs[1].arg);
2009 fwd->connect_port = PORT_STREAMLOCAL;
2011 fwd->listen_host = xstrdup(fwdargs[0].arg);
2012 fwd->listen_port = a2port(fwdargs[1].arg);
2013 fwd->connect_host = xstrdup("socks");
2019 fwd->listen_path = xstrdup(fwdargs[0].arg);
2020 fwd->listen_port = PORT_STREAMLOCAL;
2021 fwd->connect_host = xstrdup(fwdargs[1].arg);
2022 fwd->connect_port = a2port(fwdargs[2].arg);
2024 fwd->listen_host = xstrdup(fwdargs[0].arg);
2025 fwd->listen_port = a2port(fwdargs[1].arg);
2026 fwd->connect_path = xstrdup(fwdargs[2].arg);
2027 fwd->connect_port = PORT_STREAMLOCAL;
2029 fwd->listen_host = NULL;
2030 fwd->listen_port = a2port(fwdargs[0].arg);
2031 fwd->connect_host = xstrdup(fwdargs[1].arg);
2032 fwd->connect_port = a2port(fwdargs[2].arg);
2037 fwd->listen_host = xstrdup(fwdargs[0].arg);
2038 fwd->listen_port = a2port(fwdargs[1].arg);
2039 fwd->connect_host = xstrdup(fwdargs[2].arg);
2040 fwd->connect_port = a2port(fwdargs[3].arg);
2053 if (fwd->connect_path == NULL &&
2054 fwd->listen_path == NULL)
2057 if (fwd->connect_port <= 0 && fwd->connect_path == NULL)
2061 if ((fwd->listen_port < 0 && fwd->listen_path == NULL) ||
2062 (!remotefwd && fwd->listen_port == 0))
2064 if (fwd->connect_host != NULL &&
2065 strlen(fwd->connect_host) >= NI_MAXHOST)
2068 if (fwd->connect_path != NULL &&
2069 strlen(fwd->connect_path) >= PATH_MAX_SUN)
2071 if (fwd->listen_host != NULL &&
2072 strlen(fwd->listen_host) >= NI_MAXHOST)
2074 if (fwd->listen_path != NULL &&
2075 strlen(fwd->listen_path) >= PATH_MAX_SUN)
2081 free(fwd->connect_host);
2082 fwd->connect_host = NULL;
2083 free(fwd->connect_path);
2084 fwd->connect_path = NULL;
2085 free(fwd->listen_host);
2086 fwd->listen_host = NULL;
2087 free(fwd->listen_path);
2088 fwd->listen_path = NULL;
2204 const struct Forward *fwd;
2209 fwd = &fwds[i];
2211 strcmp(fwd->connect_host, "socks") != 0)
2214 strcmp(fwd->connect_host, "socks") == 0)
2217 if (fwd->listen_port == PORT_STREAMLOCAL)
2218 printf(" %s", fwd->listen_path);
2219 else if (fwd->listen_host == NULL)
2220 printf(" %d", fwd->listen_port);
2223 fwd->listen_host, fwd->listen_port);
2226 if (fwd->connect_port == PORT_STREAMLOCAL)
2227 printf(" %s", fwd->connect_path);
2228 else if (fwd->connect_host == NULL)
2229 printf(" %d", fwd->connect_port);
2232 fwd->connect_host, fwd->connect_port);