Home  Contents

Internet addresses

String Core4 Lua Commands

SYNOPSIS

  1. bits = string.inet_aton(str)
  2. str = string.inet_ntoa(bits)

DESCRIPTION

string.inet_aton() takes an IPv4 address in the Internet standard "dot" notation and returns a 32-bit integer value in host byte order or nil if the passed string is invalid.

Conversely, the function string.inet_ntoa() converts a 32-bit integer in host byte order into the standard "dot" notation.

NOTES

Both functions just call the base implementation in the standard C library.