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

Function deriveAddressRewriteLocalScopeKey

agent_options.go:290–306  ·  view source on GitHub ↗
(local string)

Source from the content-addressed store, hash-verified

288}
289
290func deriveAddressRewriteLocalScopeKey(local string) string {
291 local = strings.TrimSpace(local)
292 if local == "" {
293 return ""
294 }
295
296 ip, _, err := validateIPString(local)
297 if err != nil {
298 return "family:unknown"
299 }
300
301 if ip.To4() != nil {
302 return "family:ipv4"
303 }
304
305 return "family:ipv6"
306}
307
308func deriveAddressRewriteFamilyScopeKey(ipStr string) string {
309 ip, _, err := validateIPString(ipStr)

Calls 1

validateIPStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…