IP string to convert
Converts 4-bytes into an IPv4 string representation or 16-bytes into an IPv6 string representation. The bytes must be in network order.
console.log(bytesToIP(Buffer.from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))) // '::1'
buffer to convert
Returns Object Identifier (dot-separated numeric string) that registered by initOID function. It will return empty string if not exists.
OID name or OID
Returns Object Identifier name that registered by initOID function. It will return the argument nameOrId if not exists.
OID name or OID
Register OID and name
Object Identifier
Object Identifier name
Generated using TypeDoc
Converts IP string into buffer, 4 bytes for IPv4, and 16 bytes for IPv6. It will return null when IP string invalid.
console.log(bytesFromIP('::1')) // <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01>