• Home
  • Raw
  • Download

Lines Matching refs:fwd

3183 channel_setup_fwd_listener_tcpip(int type, struct Forward *fwd,  argument
3195 if (is_client && fwd->connect_path != NULL) {
3196 host = fwd->connect_path;
3199 fwd->listen_host : fwd->connect_host;
3211 addr = channel_fwd_bind_addr(fwd->listen_host, &wildcard,
3224 snprintf(strport, sizeof strport, "%d", fwd->listen_port);
3255 if (type == SSH_CHANNEL_RPORT_LISTENER && fwd->listen_port == 0 &&
3301 if (type == SSH_CHANNEL_RPORT_LISTENER && fwd->listen_port == 0 &&
3314 c->host_port = fwd->connect_port;
3316 if (fwd->listen_port == 0 && allocated_listen_port != NULL &&
3320 c->listening_port = fwd->listen_port;
3325 fwd->listen_port);
3331 channel_setup_fwd_listener_streamlocal(int type, struct Forward *fwd, argument
3342 if (fwd->connect_path != NULL) {
3343 if (strlen(fwd->connect_path) > sizeof(sunaddr.sun_path)) {
3345 fwd->connect_path);
3348 path = fwd->connect_path;
3351 if (fwd->connect_host == NULL) {
3355 if (strlen(fwd->connect_host) >= NI_MAXHOST) {
3359 path = fwd->connect_host;
3360 port = fwd->connect_port;
3364 path = fwd->listen_path;
3372 if (fwd->listen_path == NULL) {
3376 if (strlen(fwd->listen_path) > sizeof(sunaddr.sun_path)) {
3377 error("Local listening path too long: %s", fwd->listen_path);
3381 debug3("%s: type %d path %s", __func__, type, fwd->listen_path);
3385 sock = unix_listener(fwd->listen_path, SSH_LISTEN_BACKLOG,
3391 debug("Local forwarding listening on path %s.", fwd->listen_path);
3400 c->listening_addr = xstrdup(fwd->listen_path);
3447 channel_cancel_rport_listener(struct Forward *fwd) argument
3449 if (fwd->listen_path != NULL)
3450 return channel_cancel_rport_listener_streamlocal(fwd->listen_path);
3452 return channel_cancel_rport_listener_tcpip(fwd->listen_host, fwd->listen_port);
3518 channel_cancel_lport_listener(struct Forward *fwd, int cport, struct ForwardOptions *fwd_opts) argument
3520 if (fwd->listen_path != NULL)
3521 return channel_cancel_lport_listener_streamlocal(fwd->listen_path);
3523 return channel_cancel_lport_listener_tcpip(fwd->listen_host, fwd->listen_port, cport, fwd_opts);
3528 channel_setup_local_fwd_listener(struct Forward *fwd, struct ForwardOptions *fwd_opts) argument
3530 if (fwd->listen_path != NULL) {
3532 SSH_CHANNEL_UNIX_LISTENER, fwd, fwd_opts);
3535 fwd, NULL, fwd_opts);
3541 channel_setup_remote_fwd_listener(struct Forward *fwd, argument
3544 if (fwd->listen_path != NULL) {
3546 SSH_CHANNEL_RUNIX_LISTENER, fwd, fwd_opts);
3549 SSH_CHANNEL_RPORT_LISTENER, fwd, allocated_listen_port,
3582 channel_request_remote_forwarding(struct Forward *fwd) argument
3589 if (fwd->listen_path != NULL) {
3592 packet_put_cstring(fwd->listen_path);
3596 packet_put_cstring(channel_rfwd_bind_host(fwd->listen_host));
3597 packet_put_int(fwd->listen_port);
3603 } else if (fwd->listen_path == NULL) {
3605 packet_put_int(fwd->listen_port);
3606 packet_put_cstring(fwd->connect_host);
3607 packet_put_int(fwd->connect_port);
3632 if (fwd->connect_path != NULL) {
3634 xstrdup(fwd->connect_path);
3639 xstrdup(fwd->connect_host);
3641 fwd->connect_port;
3643 if (fwd->listen_path != NULL) {
3646 xstrdup(fwd->listen_path);
3650 fwd->listen_host ? xstrdup(fwd->listen_host) : NULL;
3652 permitted_opens[idx].listen_port = fwd->listen_port;
3797 channel_request_rforward_cancel(struct Forward *fwd) argument
3799 if (fwd->listen_path != NULL) {
3801 fwd->listen_path));
3803 return (channel_request_rforward_cancel_tcpip(fwd->listen_host,
3804 fwd->listen_port ? fwd->listen_port : fwd->allocated_port));