from small one page howto to huge articles all in one place
 

search text in:





Poll
What does your sytem tell when running "ulimit -u"?








poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

20240

userrating:

average rating: 3.4 (205 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

36019

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

20986

userrating:

average rating: 1.0 (50 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion
You are here: manpages





NE_IADDR_MAKE

Section: neon API reference (3)
Updated: 11 January 2010
Index Return to Main Contents
 

NAME

ne_iaddr_make, ne_iaddr_cmp, ne_iaddr_print, ne_iaddr_typeof, 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;
ne_inet_addr *ne_iaddr_make(ne_iaddr_type type, const unsigned char *raw);
int ne_iaddr_cmp(const ne_inet_addr *ia1, const ne_inet_addr *ia2);
char *ne_iaddr_print(const ne_inet_addr *ia, char *buffer, size_t bufsiz);
ne_iaddr_type ne_iaddr_typeof(const ne_inet_addr *ia);
void ne_iaddr_free(const ne_inet_addr *ia);
 

DESCRIPTION

ne_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_typeof returns the type of the given network address.

ne_iaddr_free releases the memory associated with a network address object.  

RETURN VALUE

ne_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.  

EXAMPLES

The 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 {
    /* ... */
}
 

SEE ALSO

ne_addr_resolve  

AUTHOR

Joe Orton <neon@lists.manyfish.co.uk>

Author.
 

COPYRIGHT



 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLES
SEE ALSO
AUTHOR
COPYRIGHT

Please read "Why adblockers are badwww.cars2fast4u.de



Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2011 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 31.5 ms
system status display