netutils

package
v0.0.0-...-7a1321c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNoIpv4 = errors.New("no IPv4 address")

Functions

func CalculateBcast

func CalculateBcast(ip, netmask string) string

CalculateBcast Gets strings (ip and netmask) Returns a string representing broadcast address

func ConvertMaskDotStringToBits

func ConvertMaskDotStringToBits(netmask string) (int, int)

ConvertMaskDotStringToBits converts decimal mask (255.255.0.0 for example) to net.IPMask and returns once and bits of the mask

func ConvertMaskHexToDotString

func ConvertMaskHexToDotString(hexMask net.IPMask) string

ConvertMaskHexToDotString converts a subnet mask from hexadecimal to a decimal form

func GetIfaceAddr

func GetIfaceAddr(name string) (net.Addr, error)

Return the IPv4 address of a network interface

func GetLocalBridges

func GetLocalBridges() (installedBridges []string, err error)

GetLocalBridges finds bridges installed on the local system Returns a slice containing bridges names and error/nil

func HexToDec

func HexToDec(hexMask string, base int) (int, bool)

/// Functions providing verification services ///// HexToDec converts hexadecimal number (two bytes) to decimal

func ParseInterfacesRH

func ParseInterfacesRH() (map[string]map[string]string, error)

ParseInterfacesRH parses network configuration based on RHEL topology and represents the contents as a map

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳