Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/neon-devel-0.24.7/html/ drwxr-xr-x |
Viewing file: Select action/file-type: Namene_iaddr_make, ne_iaddr_cmp, ne_iaddr_print, ne_iaddr_free — functions to manipulate and compare network addresses Synopsis#include <ne_socket.h> typedef enum { ne_iaddr_ipv4 = 0, ne_iaddr_ipv6 } ne_iaddr_type;
Descriptionne_iaddr_make creates an ne_inet_addr object from a raw binary network address; for instance the four bytes 0x7f 0x00 0x00 0x01 represent the IPv4 address 127.0.0.1. The object returned is suitable for passing to ne_sock_connect. A binary IPv4 address contains four bytes; a binary IPv6 address contains sixteen bytes; addresses passed must be in network byte order. ne_iaddr_cmp can be used to compare two network addresses; returning zero only if they are identical. The addresses need not be of the same address type; if the addresses are not of the same type, the return value is guaranteed to be non-zero. ne_iaddr_print can be used to print the human-readable string representation of a network address into a buffer, for instance the string "127.0.0.1". ne_iaddr_free releases the memory associated with a network address object. Return valuene_iaddr_make returns NULL if the address type passed is not supported (for instance on a platform which does not support IPv6). ne_iaddr_print returns the buffer pointer, and never NULL. ExamplesThe following example connects a socket to port 80 at the address 127.0.0.1. unsigned char addr[] = "\0x7f\0x00\0x00\0x01"; ne_inet_addr *ia; ia = ne_iaddr_make(ne_iaddr_ipv4, addr); if (ia != NULL) { ne_socket *sock = ne_sock_connect(ia, 80); ne_iaddr_free(ia); /* ... */ } else { /* ... */ } |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0032 ]-- |