summaryrefslogtreecommitdiff
path: root/libpod/network/internal/util/interfaces.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/network/internal/util/interfaces.go')
-rw-r--r--libpod/network/internal/util/interfaces.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/libpod/network/internal/util/interfaces.go b/libpod/network/internal/util/interfaces.go
deleted file mode 100644
index 20819f756..000000000
--- a/libpod/network/internal/util/interfaces.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package util
-
-import "net"
-
-// getLiveNetworkSubnets returns a slice of subnets representing what the system
-// has defined as network interfaces
-func getLiveNetworkSubnets() ([]*net.IPNet, error) {
- addrs, err := net.InterfaceAddrs()
- if err != nil {
- return nil, err
- }
- nets := make([]*net.IPNet, 0, len(addrs))
- for _, address := range addrs {
- _, n, err := net.ParseCIDR(address.String())
- if err != nil {
- return nil, err
- }
- nets = append(nets, n)
- }
- return nets, nil
-}
-
-// GetLiveNetworkNames returns a list of network interface names on the system
-func GetLiveNetworkNames() ([]string, error) {
- liveInterfaces, err := net.Interfaces()
- if err != nil {
- return nil, err
- }
- interfaceNames := make([]string, 0, len(liveInterfaces))
- for _, i := range liveInterfaces {
- interfaceNames = append(interfaceNames, i.Name)
- }
- return interfaceNames, nil
-}