func (kv *KeyValue) GetMapSection() string {
	return kv.Key.GetMapSection()
}
GetMapSection - Returns the map section of the hashmap in which the key-value should live
package keyvalue
import (
	"encoding/binary"
	"fmt"
	"math/rand"
	"net"
	"unsafe"
	"github.com/pkg/errors"
	"github.com/Gui774ume/network-security-probe/pkg/model/kernel"
	"github.com/Gui774ume/network-security-probe/pkg/utils"
)
type Cookie uint32
type CookieValue struct {
	Cookie Cookie
}
func NewCookie() Cookie {
	return Cookie(rand.Uint32())
}
func CookieListContains(cookies []Cookie, cookie Cookie) int {
	for index, c := range cookies {
		if c == cookie {
			return index
		}
	}
	return -1
}
func (cv *CookieValue) GetUnsafePointer(byteOrder binary.ByteOrder) (unsafe.Pointer, error) {
	valueB, err := utils.InterfaceToBytes(cv, byteOrder)
	if err != nil {
		return nil, err
	}
	return unsafe.Pointer(&valueB[0]), nil
}
func NewRandomMapName() string {
	allowedCharacters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
	allowedCharactersLen := len(allowedCharacters)
	nameLength := 15
	b := make([]rune, nameLength)
	for i := range b {
		b[i] = allowedCharacters[rand.Intn(allowedCharactersLen)]
	}
	return string(b)
}
type SecurityProfileActionValue struct {
	Action kernel.SecurityProfileAction
}
type NetworkAttack uint32
const (
	EmptyNetworkAttack NetworkAttack = 0
	ArpSpoofing NetworkAttack = 1 << 0
)
func (na NetworkAttack) String() string {
	switch na {
	case EmptyNetworkAttack:
		return "EmptyNetworkAttack"
	case ArpSpoofing:
		return "ArpSpoofing"
	default:
		return "Unknown"
	}
}
type KeyValue struct {
	Key   Key
	Value interface{}
}
func (kv *KeyValue) String() string {
	return fmt.Sprintf("%v", *kv)
}