Skip to main content

Network Address Type

The SQL type inet describes IPv4 network addresses. The inet module contains a collection of functions that operate on IPv4 addresses.  The most relevant functions are the `containment' functions that deal with subnet masks. 

  Description
  broadcast(p inet) returns inet
  host(p inet) returns clob
  masklen(p inet) returns int
  setmasklen(p inet) returns inet
  netmask(p inet) returns inet
  hostmask(p inet) returns inet
  network(p inet) returns inet
  text(p inet) returns clob
  abbrev(p inet) returns clob

The functionality of this module is greatly inspired by the PostgreSQL inet atom. It should be extended to also support IPv6.