diff --git a/cns/hnsclient/hnsclient_windows.go b/cns/hnsclient/hnsclient_windows.go index 3a78ebe305..249807efda 100644 --- a/cns/hnsclient/hnsclient_windows.go +++ b/cns/hnsclient/hnsclient_windows.go @@ -10,6 +10,21 @@ import ( "github.com/Microsoft/hcsshim" ) +const ( + // Name of the external hns network + ExtHnsNetworkName = "ext" + + // Address prefix for external hns network + ExtHnsNetworkAddressPrefix = "192.168.255.0/30" + + // Gateway address for external hns network + ExtHnsNetworkGwAddress = "192.168.255.1" + + // HNS network types + hnsL2Bridge = "l2bridge" + hnsL2Tunnel = "l2tunnel" +) + // CreateHnsNetwork creates the HNS network with the provided configuration func CreateHnsNetwork(nwConfig cns.CreateHnsNetworkRequest) error { log.Printf("[Azure CNS] CreateHnsNetwork") diff --git a/platform/os_windows.go b/platform/os_windows.go index b9fc9f7a11..e8bc2c6f4a 100644 --- a/platform/os_windows.go +++ b/platform/os_windows.go @@ -50,19 +50,6 @@ const ( // Command to restart HNS service RestartHnsServiceCommand = "Restart-Service -Name hns" - - // Name of the external hns network - ExtHnsNetworkName = "ext" - - // Address prefix for external hns network - ExtHnsNetworkAddressPrefix = "192.168.255.0/30" - - // Gateway address for external hns network - ExtHnsNetworkGwAddress = "192.168.255.1" - - // HNS network types - hnsL2Bridge = "l2bridge" - hnsL2Tunnel = "l2tunnel" ) // Flag to check if sdnRemoteArpMacAddress registry key is set