()
| 69 | } |
| 70 | |
| 71 | func (n *natpmpNAT) GetExternalAddress() (addr net.IP, err error) { |
| 72 | res, err := n.c.GetExternalAddress() |
| 73 | if err != nil { |
| 74 | return nil, err |
| 75 | } |
| 76 | |
| 77 | d := res.ExternalIPAddress |
| 78 | return net.IPv4(d[0], d[1], d[2], d[3]), nil |
| 79 | } |
| 80 | |
| 81 | func (n *natpmpNAT) addPortMapping(protocol string, externalPort, internalPort int, description string, timeout time.Duration) error { |
| 82 | n.deletePortMapping(protocol, internalPort) |
nothing calls this directly
no test coverage detected