MCPcopy Create free account
hub / github.com/pion/ice / validateIPString

Function validateIPString

external_ip_mapper.go:59–66  ·  view source on GitHub ↗
(ipStr string)

Source from the content-addressed store, hash-verified

57}
58
59func validateIPString(ipStr string) (net.IP, bool, error) {
60 ip := net.ParseIP(ipStr)
61 if ip == nil {
62 return nil, false, ErrInvalidNAT1To1IPMapping
63 }
64
65 return ip, (ip.To4() != nil), nil
66}
67
68// ipMapping holds the mapping of local and external IP address
69//

Callers 10

addExternalMappingsFunction · 0.85
newAddressRewriteMapperFunction · 0.85
findExternalIPsMethod · 0.85
sanitizeExternalIPsFunction · 0.85
TestValidateIPStringFunction · 0.85
legacyNAT1To1RulesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestValidateIPStringFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…