func (receiver *Ipv4Address) DecreaseNetworkAddress() *Ipv4Address {
	result := receiver.clone()
	result.network--
	return result
}
DecreaseNetworkAddress decreases given Ipv4Address network part
package network
import (
	"encoding/binary"
	"fmt"
	"github.com/qb0C80aE/clay/logging"
	"net"
)
var utility = &Utility{}
type Utility struct {
}
func GetUtility() *Utility {
	return utility
}
func (receiver *Utility) ParseCIDR(cidr string) (*Ipv4Address, error) {
	ip, ipNet, err := net.ParseCIDR(cidr)
	if err != nil {
		logging.Logger().Debug(err.Error())
		return nil, err
	}
	ip = ip.To4()
	result := &Ipv4Address{}
	result.v4address = (uint32(ip[0])<<24 | (uint32(ip[1]) << 16) | (uint32(ip[2]) << 8) | uint32(ip[3]))
	prefix, _ := ipNet.Mask.Size()
	result.prefix = uint(prefix)
	result.mask = (uint32(ipNet.Mask[0])<<24 | (uint32(ipNet.Mask[1]) << 16) | (uint32(ipNet.Mask[2]) << 8) | uint32(ipNet.Mask[3]))
	result.network = (result.v4address & result.mask) >> uint32(32-prefix)
	result.host = (result.v4address & ^result.mask)
	return result, nil
}
type Ipv4Address struct {
	v4address uint32
	mask      uint32
	prefix    uint
	network   uint32
	host      uint32
}
func (receiver *Ipv4Address) clone() *Ipv4Address {
	result := &Ipv4Address{
		v4address: receiver.v4address,
		mask:      receiver.mask,
		prefix:    receiver.prefix,
		network:   receiver.network,
		host:      receiver.host,
	}
	return result
}
func (receiver *Ipv4Address) IncreaseHostAddress() *Ipv4Address {
	result := receiver.clone()
	if (result.host & ^result.mask) == (0xFFFFFFFF & ^result.mask) {
		result.host = 0
	} else {
		result.host++
	}
	return result
}
func (receiver *Ipv4Address) DecreaseHostAddress() *Ipv4Address {
	result := receiver.clone()
	if result.host == 0x00000000 {
		result.host = 0xFFFFFFFF & ^result.mask
	} else {
		result.host--
	}
	return result
}
func (receiver *Ipv4Address) IncreaseNetworkAddress() *Ipv4Address {
	result := receiver.clone()
	result.network++
	return result
}