(iface string, proto string, port_from int, addr_to string, port_to int)
| 12 | } |
| 13 | |
| 14 | func NewRedirection(iface string, proto string, port_from int, addr_to string, port_to int) *Redirection { |
| 15 | return &Redirection{ |
| 16 | Interface: iface, |
| 17 | Protocol: proto, |
| 18 | SrcAddress: "", |
| 19 | SrcPort: port_from, |
| 20 | DstAddress: addr_to, |
| 21 | DstPort: port_to, |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func (r Redirection) String() string { |
| 26 | return fmt.Sprintf("[%s] (%s) %s:%d -> %s:%d", r.Interface, r.Protocol, r.SrcAddress, r.SrcPort, r.DstAddress, r.DstPort) |
no outgoing calls