// Set the flag that enables or disables automatic private network VLAN spanning for a SoftLayer customer account. Enabling VLAN spanning allows an account's servers to talk on the same broadcast domain even if they reside within different private vlans.
195447
func (r Account) SetVlanSpan(enabled *bool) (resp bool, err error) {
	params := []interface{}{
		enabled,
	}
	err = r.Session.DoRequest("SoftLayer_Account", "setVlanSpan", params, &r.Options, &resp)
	return
}
1301592
func (s *NewPublicVirtualInterfaceAllocation) SetVlan(v int64) *NewPublicVirtualInterfaceAllocation {
	s.Vlan = &v
	return s
}
730742
func (s *APNSVoipChannelResponse) SetEnabled(v bool) *APNSVoipChannelResponse {
	s.Enabled = &v
	return s
}
156821
func (s *CreateModelInput) SetEnableNetworkIsolation(v bool) *CreateModelInput {
	s.EnableNetworkIsolation = &v
	return s
}
198652
func (s *APNSChannelResponse) SetEnabled(v bool) *APNSChannelResponse {
	s.Enabled = &v
	return s
}
1103100
func (s *VPCRouterSetting) SetInternetConnection(enabled bool) {
	if s.InternetConnection == nil {
		s.InternetConnection = &VPCRouterInternetConnection{
			Enabled: "True",
		}
	}
	if enabled {
		s.InternetConnection.Enabled = "True"
	} else {
		s.InternetConnection.Enabled = "False"
	}
}
919674
func (s *VPCRouterSetting) EnableL2TPIPsecServer(preSharedSecret string, rangeStart string, rangeStop string) {
	if s.L2TPIPsecServer == nil {
		s.L2TPIPsecServer = &VPCRouterL2TPIPsecServer{
			Enabled: "True",
		}
	}
	s.L2TPIPsecServer.Config = &VPCRouterL2TPIPsecServerConfig{
		PreSharedSecret: preSharedSecret,
		RangeStart:      rangeStart,
		RangeStop:       rangeStop,
	}
}
1043770
func (r Network_Subnet_Registration) ClearRegistration() (resp bool, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "clearRegistration", nil, &r.Options, &resp)
	return
}
407748
func (r Resource_Configuration) SetOsPasswordFromEncrypted(encryptedPassword *string) (resp bool, err error) {
	params := []interface{}{
		encryptedPassword,
	}
	err = r.Session.DoRequest("SoftLayer_Resource_Configuration", "setOsPasswordFromEncrypted", params, &r.Options, &resp)
	return
}
564763
func setLinkOptions(ifc *net.Interface, opts LinkOptions) error {
	macaddr, mtu, flags, ns := opts.MacAddr, opts.MTU, opts.Flags, opts.Ns

	// if MTU is passed in LinkOptions
	if mtu != 0 {
		if err := validMtu(mtu); err != nil {
			return err
		}

		if err := netlink.NetworkSetMTU(ifc, mtu); err != nil {
			return fmt.Errorf("Unable to set MTU: %s", err)
		}
	}

	// if MacAddress is passed in LinkOptions
	if macaddr != "" {
		if err := validMacAddress(macaddr); err != nil {
			return err
		}

		if err := netlink.NetworkSetMacAddress(ifc, macaddr); err != nil {
			return fmt.Errorf("Unable to set MAC Address: %s", err)
		}
	}

	// if ns is passed in LinkOptions
	if ns != 0 {
		if err := validNs(ns); err != nil {
			return err
		}

		if err := netlink.NetworkSetNsPid(ifc, ns); err != nil {
			return fmt.Errorf("Unable to set Network namespace: %s", err)
		}
	}

	// if flags is passed in LinkOptions
	if flags != 0 {
		if err := validFlags(flags); err != nil {
			return err
		}

		if ns != 0 && (ns != 1 || ns != os.Getpid()) {
			if (flags & syscall.IFF_UP) == syscall.IFF_UP {
				origNs, _ := NetNsHandle(os.Getpid())
				defer syscall.Close(int(origNs))
				defer system.Setns(origNs, syscall.CLONE_NEWNET)

				if err := SetNetNsToPid(ns); err != nil {
					return fmt.Errorf("Switching to %d network namespace failed: %s", ns, err)
				}

				if err := netlink.NetworkLinkUp(ifc); err != nil {
					return fmt.Errorf("Unable to bring %s interface UP: %s", ifc.Name, ns)
				}
			}
		} else {
			if err := netlink.NetworkLinkUp(ifc); err != nil {
				return fmt.Errorf("Could not bring up network link %s: %s", ifc.Name, err)
			}
		}
	}

	return nil
}
278214
func (m *MobileGateway) SetPrivateInterface(ip string, nwMaskLen int) {
	if len(m.Settings.MobileGateway.Interfaces) > 1 {
		m.Settings.MobileGateway.Interfaces[1].IPAddress = []string{ip}
		m.Settings.MobileGateway.Interfaces[1].NetworkMaskLen = nwMaskLen
	} else {
		nic := &MGWInterface{
			IPAddress:      []string{ip},
			NetworkMaskLen: nwMaskLen,
		}
		m.Settings.MobileGateway.Interfaces = append(m.Settings.MobileGateway.Interfaces, nic)
	}
}
209841
func (s *Stack) SetNetworkProtocolOption(network tcpip.NetworkProtocolNumber, option interface{}) *tcpip.Error {
	netProto, ok := s.networkProtocols[network]
	if !ok {
		return tcpip.ErrUnknownProtocol
	}
	return netProto.SetOption(option)
}
1218582
func SetDefaultNetModeIfBlank(hc *container.HostConfig) {
	if hc != nil {
		if hc.NetworkMode == container.NetworkMode("") {
			hc.NetworkMode = container.NetworkMode("default")
		}
	}
}
668573
func (s *UpdateVirtualInterfaceAttributesOutput) SetVlan(v int64) *UpdateVirtualInterfaceAttributesOutput {
	s.Vlan = &v
	return s
}
282029
func setIPVlanMode(mode string) (netlink.IPVlanMode, error) {
	switch mode {
	case modeL2:
		return netlink.IPVLAN_MODE_L2, nil
	case modeL3:
		return netlink.IPVLAN_MODE_L3, nil
	default:
		return 0, fmt.Errorf("Unknown ipvlan mode: %s", mode)
	}
}
486207
func (c *setFirewallRuleCommand) SetFlags(f *gnuflag.FlagSet) {
	f.StringVar(&c.whitelistValue, "whitelist", "", "list of subnets to whitelist")
}
807813
func (r Account) GetNetworkVlanSpan() (resp datatypes.Account_Network_Vlan_Span, err error) {
	err = r.Session.DoRequest("SoftLayer_Account", "getNetworkVlanSpan", nil, &r.Options, &resp)
	return
}