Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#415 closed enhancement (fixed)

IPv6 support in PJLIB

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-0.9.0
Component: pjlib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:



  • should work on most platforms where IPv6 is available (Windows, WinCE, Linux, *nix, MacOS X, and Symbian)
  • optional

Change History (6)

comment:1 Changed 17 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Done in r1585:

New Configuration Macros:

  • PJ_HAS_IPV6: declare this to enable IPv6 support. Default is no at the moment (may change in the future) (<pj/config.h>).
  • PJ_SOCK_HAS_INET_PTON, PJ_SOCK_HAS_INET_NTOP, and PJ_SOCK_HAS_GETADDRINFO are macros that are autodetected by ./configure. These macros specify the presence of inet_pton(), inet_ntop(), and getaddrinfo() functions respectively.

New functions:

  • pj_inet_ntop() - Converts binary IPv4/IPv6 address to text (<pj/sock.h>).
  • pj_inet_pton() - Converts IPv6/IPv6 address text to binary (<pj/sock.h>).
  • pj_getaddrinfo() - Query the IPv4/IPv6 address of a given hostname (<pj/addr_resolv.h>).

New error code::

  • PJ_EIPV6NOTSUP - To indicate error because PJ_HAS_IPV6 is disabled (<pj/errno.h>)

New macros::

  • PJ_INET_ADDRSTRLEN - To indicate the maximum length of IPv4 numeric address (<pj/sock.h>).
  • PJ_INET6_ADDRSTRLEN - To indicate the maximum length of IPv6 numeric address (<pj/sock.h>).

comment:2 Changed 17 years ago by bennylp

Some more major modifications in r1601:

In addr_resolv.h:

  • Changed pj_gethostip() function to include address family
  • Changed pj_getdefaultipinterface() function to include address family
  • Added rhostresolver6 field in pj_symbianos_params

In errno.h:

  • Added new errno: PJ_EAFNOTSUP

In sock.h:

  • Various constant accessor functions (e.g. pj_AF_INET() now are implemented as macros when PJ_DLL is not declared
  • Do not align pj_sockaddr_in6 to 64bit boundary since Winsock doesn't like it
  • New API: pj_sockaddr_init()
  • New API: pj_sockaddr_get_addr()
  • New API: pj_sockaddr_has_addr()
  • New API: pj_sockaddr_get_addr_len()
  • New API: pj_sockaddr_set_str_addr()
  • New API: pj_sockaddr_get_port()
  • New API: pj_sockaddr_set_port()

comment:3 Changed 17 years ago by bennylp

In r1608 and r1609:

  • Added pj_sockaddr_get_len() and pj_inet_ntop2() API
  • Fixed compilation warnings on Symbian with gcce.

comment:4 Changed 17 years ago by bennylp

Fixed IPv6 interface enumeration on Linux in r1612

comment:5 Changed 17 years ago by bennylp

New socket API in r1613:

  • pj_sockaddr_cmp()
  • pj_sockaddr_copy_addr()
  • pj_sockaddr_print()

comment:6 Changed 17 years ago by bennylp

Symbian's pjlibU.def file was updated in r1614

Note: See TracTickets for help on using tickets.