byteorder

package
v1.16.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 143

Documentation

Overview

Package byteorder provides functions to convert from and to network byte order.

Index

Constants

This section is empty.

Variables

Functions

func HostToNetwork16 added in v0.15.7

func HostToNetwork16(u uint16) uint16

func HostToNetwork32 added in v0.15.7

func HostToNetwork32(u uint32) uint32

func HostToNetwork64 added in v0.15.7

func HostToNetwork64(u uint64) uint64

func NetIPAddrToHost32 added in v0.15.7

func NetIPAddrToHost32(ip netip.Addr) uint32

func NetIPv4ToHost32 added in v0.15.7

func NetIPv4ToHost32(ip net.IP) uint32

NetIPv4ToHost32 converts an net.IP to a uint32 in host byte order. ip must be a IPv4 address, otherwise the function will panic.

func NetworkToHost16 added in v0.15.7

func NetworkToHost16(u uint16) uint16

func NetworkToHost32 added in v0.15.7

func NetworkToHost32(u uint32) uint32

func NetworkToHost64 added in v0.15.7

func NetworkToHost64(u uint64) uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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