net

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the Apache v2.0 license.

Index

Constants

View Source
const (
	LOOPBACK_ADDRESS = "127.0.0.1"
)

Variables

This section is empty.

Functions

func Decrement

func Decrement(ip net.IP) net.IP

func GetBroadcastAddress

func GetBroadcastAddress(cidr net.IPNet) net.IP

func GetCIDR

func GetCIDR(startip, endip net.IP) (*net.IPNet, error)

func GetIPAddress

func GetIPAddress() (string, error)

func GetNetworkInterface

func GetNetworkInterface() (string, error)

func Increment

func Increment(ip net.IP) net.IP

func IsRangeInCIDR

func IsRangeInCIDR(start, end net.IP, cidr *net.IPNet) bool

func Not

func Not(ip net.IP) net.IP

func Or

func Or(ip, ip1 net.IP) net.IP

func ParseMAC

func ParseMAC(macString string) (net.HardwareAddr, error)

func PrefixesOverlap

func PrefixesOverlap(cidr1 net.IPNet, cidr2 net.IPNet) bool

func RangeContains

func RangeContains(start, end, ip net.IP) bool

func RangesOverlap

func RangesOverlap(range1start, range1end, range2start, range2end net.IP) bool

func StringToNetIPAddress

func StringToNetIPAddress(ipString string) net.IP

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL