GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
IPADDR_LEN(3) libdill Library Functions IPADDR_LEN(3)

ipaddr_len - returns length of the address


#include <libdill.h>
int ipaddr_len(
    const struct ipaddr* addr);

    

Returns lenght of the address, in bytes. This function is typically used in combination with ipaddr_sockaddr to pass address and its length to POSIX socket APIs.

addr: IP address object.

This function is not available if libdill is compiled with --disable-sockets option.

Length of the IP address.

None.


ipaddr addr;
ipaddr_remote(&addr, "www.example.org", 80, 0, -1);
int s = socket(ipaddr_family(addr), SOCK_STREAM, 0);
connect(s, ipaddr_sockaddr(&addr), ipaddr_len(&addr));

    

ipaddr_equal(3) ipaddr_family(3) ipaddr_local(3) ipaddr_port(3) ipaddr_remote(3) ipaddr_remotes(3) ipaddr_setport(3) ipaddr_sockaddr(3) ipaddr_str(3)
libdill

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.