#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <sys/socket.h>
Go to the source code of this file.
Defines | |
#define | IFNAMSIZ 16 |
#define | inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__ |
#define | MAXHOSTNAMELEN 256 |
Functions | |
const char * | ast_inet_ntoa (struct in_addr ia) |
thread-safe replacement for inet_ntoa(). | |
static force_inline int | inaddrcmp (const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) |
Compares the source address and port of two sockaddr_in. | |
int | inet_aton (const char *cp, struct in_addr *pin) |
Definition in file network.h.
#define inet_ntoa __dont__use__inet_ntoa__use__ast_inet_ntoa__instead__ |
#define MAXHOSTNAMELEN 256 |
Definition at line 67 of file network.h.
Referenced by ast_find_ourip(), ast_readconfig(), cli_prompt(), create_addr(), find_user_realtime(), main(), make_email_file(), netconsole(), sendmail(), sendpage(), and set_config().
const char* ast_inet_ntoa | ( | struct in_addr | ia | ) |
thread-safe replacement for inet_ntoa().
Definition at line 428 of file utils.c.
References ast_threadstorage_get(), and inet_ntoa_buf.
Referenced by __attempt_transmit(), __find_callno(), __iax2_show_peers(), __sip_xmit(), _sip_show_peer(), _sip_show_peers(), acf_channel_read(), action_login(), add_sdp(), ast_append_ha(), ast_apply_ha(), ast_netsock_bindaddr(), ast_parse_arg(), ast_rtcp_read(), ast_rtcp_write_rr(), ast_rtcp_write_sr(), ast_rtp_raw_write(), ast_rtp_read(), ast_rtp_sendcng(), ast_rtp_senddigit_begin(), ast_rtp_senddigit_continuation(), ast_rtp_senddigit_end(), ast_sip_ouraddrfor(), ast_tcptls_client_start(), ast_tcptls_server_start(), ast_udptl_bridge(), ast_udptl_read(), ast_udptl_write(), authenticate(), bridge_native_loop(), bridge_p2p_rtp_write(), build_callid_pvt(), build_callid_registry(), build_contact(), build_peer(), build_reply_digest(), build_rpid(), build_via(), check_access(), check_peer_ok(), check_via(), copy_via_headers(), create_addr_from_peer(), create_client(), dnsmgr_refresh(), dump_addr(), dump_ipaddr(), dundi_rexmit(), dundi_show_peer(), dundi_show_peers(), dundi_show_trans(), dundi_showframe(), dundi_xmit(), external_rtp_create(), find_command(), find_peer(), find_subchannel_and_lock(), find_tpeer(), function_iaxpeer(), function_sipchaninfo_read(), function_sippeer(), get_input(), gtalk_create_candidates(), gtalk_update_stun(), handle_cli_iax2_show_channels(), handle_cli_iax2_show_peer(), handle_cli_iax2_show_registry(), handle_cli_udptl_debug_deprecated(), handle_cli_udptl_set_debug(), handle_command_response(), handle_error(), handle_incoming(), handle_mgcp_show_endpoints(), handle_open_receive_channel_ack_message(), handle_request(), handle_request_bye(), handle_request_do(), handle_request_register(), handle_request_subscribe(), handle_response(), handle_response_refer(), handle_show_http(), handle_showmanconn(), handle_skinny_show_device(), handle_skinny_show_devices(), handle_skinny_show_settings(), httpstatus_callback(), iax2_ack_registry(), iax2_prov_app(), iax2_trunk_queue(), iax_server(), iax_showframe(), initreqprep(), jingle_create_candidates(), load_module(), manager_iax2_show_peer_list(), mgcpsock_read(), oh323_addrcmp_str(), oh323_call(), oh323_set_rtp_peer(), parse_register_contact(), parsing(), phoneprov_callback(), process_request(), process_rfc3389(), process_sdp(), purge_sessions(), raw_hangup(), realtime_peer(), realtime_update_peer(), realtime_user(), reg_source_db(), register_verify(), registry_rerequest(), reload_config(), resend_response(), retrans_pkt(), rtcp_do_debug_ip(), rtp_do_debug_ip(), score_address(), send_dtmf(), send_packet(), send_raw_client(), send_request(), send_response(), send_trunk(), session_do(), set_config(), set_destination(), setup_incoming_call(), show_channels_cb(), show_main_page(), sip_do_debug_ip(), sip_do_debug_peer(), sip_poke_peer(), sip_set_rtp_peer(), sip_set_udptl_peer(), sip_show_channel(), sip_show_settings(), sip_show_tcp(), skinny_session(), skinny_set_rtp_peer(), socket_process(), socket_process_meta(), start_rtp(), timing_read(), transmit_notify_with_mwi(), unistim_info(), unistimsock_read(), and update_registry().
00429 { 00430 char *buf; 00431 00432 if (!(buf = ast_threadstorage_get(&inet_ntoa_buf, INET_ADDRSTRLEN))) 00433 return ""; 00434 00435 return inet_ntop(AF_INET, &ia, buf, INET_ADDRSTRLEN); 00436 }
static force_inline int inaddrcmp | ( | const struct sockaddr_in * | sin1, | |
const struct sockaddr_in * | sin2 | |||
) | [static] |
Compares the source address and port of two sockaddr_in.
Definition at line 88 of file network.h.
Referenced by ast_netsock_find(), ast_udptl_bridge(), bridge_native_loop(), find_tpeer(), find_transaction(), handle_command_response(), iax2_ack_registry(), oh323_addrcmp(), parse_register_contact(), registry_rerequest(), sip_addrcmp(), socket_process(), socket_read(), and update_registry().
00089 { 00090 return ((sin1->sin_addr.s_addr != sin2->sin_addr.s_addr) 00091 || (sin1->sin_port != sin2->sin_port)); 00092 }
int inet_aton | ( | const char * | cp, | |
struct in_addr * | pin | |||
) |