ForwardingRule Structure/Class

[C]

struct FlowSshC_ForwardingRule
{
  bool m_clientToServer;
  wchar_t const* m_listInterface;
  unsigned int m_listPort;
  wchar_t const* m_destHost;
  unsigned int m_destPort;
};

[C++]

struct ForwardingRuleRef
{
  bool m_clientToServer;
  wchar_t const* m_listInterface;
  unsigned int m_listPort;
};

struct ForwardingRule : public ForwardingRuleRef
{
  std::wstring m_destHost;
  wchar_t const* m_listInterface;
  unsigned int m_destPort;
};

[C#]

public class ForwardingRuleRef
{
  public bool ClientToServer;
  public string ListInterface;
  public uint ListPort;
}

public sealed class ForwardingRule : ForwardingRuleRef
{
  public string DestHost;
  public uint DestPort;
}

Members

  • ClientToServer: Is this a C2S or S2C forwarding?
  • ListInterface: IPv4 or IPv6 listening interface on which the client (or server*) will accept incoming TCP connections. If 127.0.0.1 is specified, this means the local loopback interface, and only programs running on the client (or server*) computer will be able to connect. In this case, the application program must be configured to use 127.0.0.1 or "localhost" as the connection host. If 0.0.0.0 is specified, connections will be accepted from programs on all machines that have a route to the client (or server*) computer. Finally, it is possible to specify any of the IP addresses belonging to the client (or server*) computer: in this case, connections will be accepted only through the network adapter which owns the specified IP address.
  • ListPort: Port number on which the client (C2S forwarding) or server (S2C forwarding) will listen for the incoming TCP connection from the application program.
  • DestHost: Specifies the DNS name or IPv4 or IPv6 address to which the TCP connection should be forwarded. With C2S forwarding this field is relative to the server; with S2C forwarding it is relative to the client. **
  • DestPort: Port number on which the application server is listening. **

Remarks

Contains information about a port forwarding. Used with [Client]AddForwarding and [Client]CancelForwarding.

* With S2C forwardings this description applies to the server.
** [C] When canceling a forwarding, DestHost and DestPort are not used and may be left uninitialized.