NetnsPath returns the network namespace's path and true, if a network has been created - else the empty string and false.
()
| 212 | // NetnsPath returns the network namespace's path and true, if a network has been |
| 213 | // created - else the empty string and false. |
| 214 | func (sb *Sandbox) NetnsPath() (path string, ok bool) { |
| 215 | sb.mu.Lock() |
| 216 | osSbox := sb.osSbox |
| 217 | sb.mu.Unlock() |
| 218 | if osSbox == nil { |
| 219 | return "", false |
| 220 | } |
| 221 | return osSbox.Key(), true |
| 222 | } |
| 223 | |
| 224 | // IPv6Enabled determines whether a container supports IPv6. |
| 225 | // IPv6 support can always be determined for host networking. For other network |