netadv

package module
v0.0.0-...-a652cc7 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertIPv4InIPv6Network

func ConvertIPv4InIPv6Network(network, ip string) (*net.IPNet, error)

ConvertIPv4InIPv6Network convert ipv6 network followed by ipv4

func IPNetOr

func IPNetOr(n1, n2 *net.IPNet) *net.IPNet

IPNetOr make OR bitwise operation on net.IPNet

func MaxI

func MaxI(a, b int) int

MaxI return the maximum between two int

func MinI

func MinI(a, b int) int

MinI return the minimum between two int

func SliceAnd

func SliceAnd(s1, s2 []byte) []byte

SliceAnd return an AND on two slice of bytes

func SliceNot

func SliceNot(s1 []byte) []byte

SliceNot return the NOT of bytes slice

func SliceOr

func SliceOr(s1, s2 []byte) []byte

SliceOr return an OR on two slice of bytes

func SliceSetOne

func SliceSetOne(s1 []byte, b uint) []byte

SliceSetOne set 1 into the b'th byte

func SliceShiftRight

func SliceShiftRight(s1 []byte, bits uint) []byte

SliceShiftRight return a slive of bytes shifted by "bits" bits

func SliceXor

func SliceXor(s1, s2 []byte) []byte

SliceXor return an XOR on two slice of bytes

func SplitNetworkInTwo

func SplitNetworkInTwo(network *net.IPNet) (*net.IPNet, *net.IPNet)

SplitNetworkInTwo split a network in two. return two sub network

func SplitNetworks

func SplitNetworks(network *net.IPNet, newsize uint) ([]*net.IPNet, error)

SplitNetworks split network in a

Types

This section is empty.

Jump to

Keyboard shortcuts

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