| java.lang.Object org.apache.tomcat.jni.Address
Address | public class Address (Code) | | Address
author: Mladen Turk version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Method Summary | |
native public static boolean | equal(long a, long b) See if the IP addresses in two APR socket addresses are
equivalent. | native public static boolean | fill(Sockaddr info, long sa) | native public static long | get(int which, long sock) | native public static Sockaddr | getInfo(long sa) | native public static String | getip(long sa) Return the IP address (in numeric address string format) in
an APR socket address. | native public static String | getnameinfo(long sa, int flags) Look up the host name from an apr_sockaddr_t.
Parameters: sa - The apr_sockaddr_t. Parameters: flags - Special processing flags. | native public static int | getservbyname(long sockaddr, String servname) | native public static long | info(String hostname, int family, int port, int flags, long p) Create apr_sockaddr_t from hostname, address family, and port.
Parameters: hostname - The hostname or numeric address string to resolve/parse, orNULL to build an address that corresponds to 0.0.0.0 or :: Parameters: family - The address family to use, or APR_UNSPEC if the system shoulddecide. Parameters: port - The port number. Parameters: flags - Special processing flags:APR_IPV4_ADDR_OK first query for IPv4 addresses; only lookfor IPv6 addresses if the first query failed;only valid if family is APR_UNSPEC and hostnameisn't NULL; mutually exclusive withAPR_IPV6_ADDR_OKAPR_IPV6_ADDR_OK first query for IPv6 addresses; only lookfor IPv4 addresses if the first query failed;only valid if family is APR_UNSPEC and hostnameisn't NULL and APR_HAVE_IPV6; mutually exclusivewith APR_IPV4_ADDR_OK Parameters: p - The pool for the apr_sockaddr_t and associated storage. |
equal | native public static boolean equal(long a, long b)(Code) | | See if the IP addresses in two APR socket addresses are
equivalent. Appropriate logic is present for comparing
IPv4-mapped IPv6 addresses with IPv4 addresses.
Parameters: a - One of the APR socket addresses. Parameters: b - The other APR socket address.The return value will be True if the addressesare equivalent. |
fill | native public static boolean fill(Sockaddr info, long sa)(Code) | | Fill the Sockaddr class from apr_sockaddr_t
Parameters: info - Sockaddr class to fill Parameters: sa - Structure pointer |
get | native public static long get(int which, long sock) throws Exception(Code) | | Return an apr_sockaddr_t from an apr_socket_t
Parameters: which - Which interface do we want the apr_sockaddr_t for? Parameters: sock - The socket to use The returned apr_sockaddr_t. |
getInfo | native public static Sockaddr getInfo(long sa)(Code) | | Create the Sockaddr object from apr_sockaddr_t
Parameters: sa - Structure pointer |
getip | native public static String getip(long sa)(Code) | | Return the IP address (in numeric address string format) in
an APR socket address. APR will allocate storage for the IP address
string from the pool of the apr_sockaddr_t.
Parameters: sa - The socket address to reference. The IP address. |
getnameinfo | native public static String getnameinfo(long sa, int flags)(Code) | | Look up the host name from an apr_sockaddr_t.
Parameters: sa - The apr_sockaddr_t. Parameters: flags - Special processing flags. The hostname. |
getservbyname | native public static int getservbyname(long sockaddr, String servname)(Code) | | Given an apr_sockaddr_t and a service name, set the port for the service
Parameters: sockaddr - The apr_sockaddr_t that will have its port set Parameters: servname - The name of the service you wish to use APR status code. |
info | native public static long info(String hostname, int family, int port, int flags, long p) throws Exception(Code) | | Create apr_sockaddr_t from hostname, address family, and port.
Parameters: hostname - The hostname or numeric address string to resolve/parse, orNULL to build an address that corresponds to 0.0.0.0 or :: Parameters: family - The address family to use, or APR_UNSPEC if the system shoulddecide. Parameters: port - The port number. Parameters: flags - Special processing flags:APR_IPV4_ADDR_OK first query for IPv4 addresses; only lookfor IPv6 addresses if the first query failed;only valid if family is APR_UNSPEC and hostnameisn't NULL; mutually exclusive withAPR_IPV6_ADDR_OKAPR_IPV6_ADDR_OK first query for IPv6 addresses; only lookfor IPv4 addresses if the first query failed;only valid if family is APR_UNSPEC and hostnameisn't NULL and APR_HAVE_IPV6; mutually exclusivewith APR_IPV4_ADDR_OK Parameters: p - The pool for the apr_sockaddr_t and associated storage. The new apr_sockaddr_t. |
|
|