Mon Mar 19 11:30:58 2012

Asterisk developer's documentation


ast_sockaddr Struct Reference

Socket address structure. More...

#include <netsock2.h>


Data Fields

socklen_t len
sockaddr_storage ss


Detailed Description

Socket address structure.

The first member is big enough to contain addresses of any family. The second member contains the length (in bytes) used in the first member.

Note:
Some BSDs have the length embedded in sockaddr structs. We ignore them. (This is the right thing to do.)

It is important to always initialize ast_sockaddr before use -- even if they are passed to ast_sockaddr_copy() as the underlying storage could be bigger than what ends up being copied -- leaving part of the data unitialized.

Definition at line 63 of file netsock2.h.


Field Documentation

socklen_t len

Definition at line 65 of file netsock2.h.

Referenced by _ast_sockaddr_from_sin(), _ast_sockaddr_port(), _ast_sockaddr_set_port(), _ast_sockaddr_to_sin(), apply_netmask(), ast_accept(), ast_bind(), ast_connect(), ast_getsockname(), ast_recvfrom(), ast_sendto(), ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_copy(), ast_sockaddr_is_ipv4(), ast_sockaddr_is_ipv4_mapped(), ast_sockaddr_is_ipv6(), ast_sockaddr_isnull(), ast_sockaddr_parse(), ast_sockaddr_setnull(), ast_sockaddr_stringify_fmt(), dnsmgr_refresh(), and parse_cidr_mask().

struct sockaddr_storage ss

Definition at line 64 of file netsock2.h.

Referenced by __oh323_rtp_create(), _ast_sockaddr_from_sin(), _ast_sockaddr_port(), _ast_sockaddr_set_port(), _ast_sockaddr_to_sin(), apply_netmask(), ast_accept(), ast_bind(), ast_connect(), ast_get_ip_or_srv(), ast_getsockname(), ast_recvfrom(), ast_rtp_instance_bridge(), ast_sendto(), ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_hash(), ast_sockaddr_ipv4(), ast_sockaddr_ipv4_mapped(), ast_sockaddr_is_any(), ast_sockaddr_is_ipv4(), ast_sockaddr_is_ipv4_mapped(), ast_sockaddr_is_ipv6(), ast_sockaddr_is_ipv6_link_local(), ast_sockaddr_parse(), ast_sockaddr_stringify_fmt(), build_peer(), build_user(), config_parse_variables(), create_addr(), dnsmgr_refresh(), get_address_family_filter(), internal_dnsmgr_lookup(), parse_cidr_mask(), and peer_set_srcaddr().


The documentation for this struct was generated from the following file:
Generated on Mon Mar 19 11:30:58 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7