#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h>#include "str.h"#include "compiler_opt.h"#include "ut.h"#include "dprint.h"Go to the source code of this file.
Data Structures | |
| struct | ip_addr |
| struct | net |
| union | sockaddr_union |
| struct | addr_info |
| struct | socket_info |
| struct | receive_info |
| struct | dest_info |
| struct | name_lst |
| struct | socket_id |
Defines | |
| #define | PROTO_LAST PROTO_SCTP |
| #define | sockaddru_len(su) sizeof(struct sockaddr_in) |
| #define | hostent2ip_addr(ip, he, addr_no) |
| #define | AF2PF(af) (((af)==AF_INET)?PF_INET:(af)) |
| #define | ip_addr_cmp(ip1, ip2) |
| #define | ip_addr2su init_su |
| #define | IP6_MAX_STR_SIZE 39 |
| #define | IP4_MAX_STR_SIZE 15 |
| #define | IP_ADDR_MAX_STR_SIZE (IP6_MAX_STR_SIZE+1) |
| #define | SU2A_MAX_STR_SIZE |
| #define | init_dest_info(dst) |
Enumerations | |
| enum | sip_protos { PROTO_NONE, PROTO_UDP, PROTO_TCP, PROTO_TLS, PROTO_SCTP } |
| enum | si_flags { SI_NONE = 0, SI_IS_IP = 1, SI_IS_LO = 2, SI_IS_MCAST = 4, SI_IS_ANY = 8, SI_IS_MHOMED = 16 } |
Functions | |
| net * | mk_net (struct ip_addr *ip, struct ip_addr *mask) |
| net * | mk_net_bitlen (struct ip_addr *ip, unsigned int bitlen) |
| void | print_ip (char *prefix, struct ip_addr *ip, char *suffix) |
| void | stdout_print_ip (struct ip_addr *ip) |
| void | print_net (struct net *net) |
| int | ip_addr_any (struct ip_addr *ip) |
| int | ip_addr_loopback (struct ip_addr *ip) |
| void | ip_addr_mk_any (int af, struct ip_addr *ip) |
| int | matchnet (struct ip_addr *ip, struct net *net) |
| void | sockaddr2ip_addr (struct ip_addr *ip, struct sockaddr *sa) |
| int | su_cmp (union sockaddr_union *s1, union sockaddr_union *s2) |
| unsigned short | su_getport (union sockaddr_union *su) |
| void | su_setport (union sockaddr_union *su, unsigned short port) |
| void | su2ip_addr (struct ip_addr *ip, union sockaddr_union *su) |
| int | init_su (union sockaddr_union *su, struct ip_addr *ip, unsigned short port) |
| int | hostent2su (union sockaddr_union *su, struct hostent *he, unsigned int idx, unsigned short port) |
| int | ip4tosbuf (unsigned char *ip4, char *buff, int len) |
| int | ip_addr2sbuf (struct ip_addr *ip, char *buff, int len) |
| char * | ip_addr2a (struct ip_addr *ip) |
| char * | su2a (union sockaddr_union *su, int su_len) |
| hostent * | ip_addr2he (str *name, struct ip_addr *ip) |
| void | init_dst_from_rcv (struct dest_info *dst, struct receive_info *rcv) |
|
|
Definition at line 203 of file ip_addr.h. Referenced by init_tcpudp_sock(). |
|
|
Value: do{ \ (ip)->af=(he)->h_addrtype; \ (ip)->len=(he)->h_length; \ memcpy((ip)->u.addr, (he)->h_addr_list[(addr_no)], (ip)->len); \ }while(0) Definition at line 187 of file ip_addr.h. Referenced by find_socket(), fix_actions(), and fix_hostname(). |
|
|
Value: do{ \ memset((dst), 0, sizeof(struct dest_info)); \ } while(0) Definition at line 735 of file ip_addr.h. Referenced by add_uac(), do_action(), forward_reply(), natping(), ping_contact_f(), pingClients(), sl_send_reply(), t_forward_cancel(), t_relay_to(), and uri2dst(). |
|
|
Definition at line 492 of file ip_addr.h. Referenced by ip4tosbuf(). |
|
|
|
|
|
|
|
|
Value: (((ip1)->af==(ip2)->af)&& \
(memcmp((ip1)->u.addr, (ip2)->u.addr, (ip1)->len)==0))
Definition at line 324 of file ip_addr.h. Referenced by domain_exists(), find_si(), ipmatch(), lump_check_opt(), si_hname_cmp(), and tls_lookup_cfg(). |
|
|
Definition at line 655 of file ip_addr.h. Referenced by parse_ipv6(). |
|
|
|
|
|
Definition at line 179 of file ip_addr.h. Referenced by get_out_socket(), handle_ctrl_dgram(), handle_new_connect(), init_tcpudp_sock(), udp_rcv_loop(), and udp_send(). |
|
|
Value: (IP6_MAX_STR_SIZE + 2 /* [] */+\ 1 /* : */ + USHORT2SBUF_MAX_LEN + 1 /* \0 */) |
|
|
Definition at line 91 of file ip_addr.h. Referenced by add_interfaces(). |
|
|
Definition at line 54 of file ip_addr.h. Referenced by get_proto(), get_uri_send_info(), uri2dst(), and uri2proxy(). |
|
||||||||||||||||||||
|
Definition at line 456 of file ip_addr.h. References idx, L_CRIT, LOG, sockaddr_union::s, and sockaddr_union::sin. Referenced by init_tcpudp_sock(), natping_contact(), pingClients(), proxy2su(), sip_hostport2su(), and update_sock_struct_from_via(). |
|
||||||||||||
|
Definition at line 743 of file ip_addr.h. References receive_info::bind_address, dest_info::id, receive_info::proto, dest_info::proto, receive_info::proto_reserved1, dest_info::send_sock, receive_info::src_su, and dest_info::to. Referenced by create_via(), and http_xmlrpc2sip(). |
|
||||||||||||||||
|
Definition at line 420 of file ip_addr.h. References ip_addr::addr, ip_addr::af, L_CRIT, ip_addr::len, LOG, sockaddr_union::s, sockaddr_union::sin, and ip_addr::u. Referenced by dns_sip_resolve2su(), and nhop_type(). |
|
||||||||||||||||
|
Definition at line 572 of file ip_addr.h. References IP4_MAX_STR_SIZE, len, and unlikely. Referenced by ip_addr2sbuf(), and su2a(). |
|
|
||||||||||||
|
Definition at line 709 of file ip_addr.h. References ip_addr::addr, ip_addr::af, ip_addr::len, _str::len, _str::s, str, and ip_addr::u. Referenced by _resolvehost(), and srv_sip_resolvehost(). |
|
||||||||||||||||
|
Definition at line 633 of file ip_addr.h. References ip_addr::addr, ip_addr::af, ip4tosbuf(), L_CRIT, len, LOG, and ip_addr::u. Referenced by ip_addr2a(). |
|
|
Definition at line 223 of file ip_addr.h. References ip_addr::addr32, ip_addr::len, and ip_addr::u. Referenced by fix_hostname(). |
|
|
Definition at line 239 of file ip_addr.h. References ip_addr::addr32, ip_addr::af, and ip_addr::u. Referenced by fix_hostname(). |
|
||||||||||||
|
Definition at line 253 of file ip_addr.h. References ip_addr::addr32, ip_addr::addrl, ip_addr::af, ip_addr::len, likely, and ip_addr::u. |
|
||||||||||||
|
Definition at line 279 of file ip_addr.h. References ip_addr::addr32, ip_addr::af, net::ip, ip_addr::len, net::mask, and ip_addr::u. Referenced by comp_ip(). |
|
||||||||||||
|
Definition at line 46 of file ip_addr.c. References ip_addr::addr32, ip_addr::af, net::ip, L_CRIT, L_WARN, ip_addr::len, LOG, net::mask, mask, pkg_malloc, print_ip(), and ip_addr::u. Referenced by mk_net_bitlen(), and yyparse(). |
|
||||||||||||
|
Definition at line 84 of file ip_addr.c. References ip_addr::addr, ip_addr::af, L_CRIT, ip_addr::len, LOG, mask, mk_net(), and ip_addr::u. Referenced by yyparse(). |
|
||||||||||||||||
|
Definition at line 106 of file ip_addr.c. References ip_addr::addr, ip_addr::addr16, ip_addr::af, DBG, s, and ip_addr::u. Referenced by mk_net(), print_action(), print_expr(), and print_net(). |
|
|
Definition at line 169 of file ip_addr.c. References net::ip, L_WARN, LOG, net::mask, and print_ip(). Referenced by print_expr(). |
|
||||||||||||
|
Definition at line 300 of file ip_addr.h. References ip_addr::addr, ip_addr::af, L_CRIT, ip_addr::len, LOG, and ip_addr::u. Referenced by add_interfaces(). |
|
|
Definition at line 140 of file ip_addr.c. References ip_addr::addr, ip_addr::addr16, ip_addr::af, DBG, and ip_addr::u. |
|
||||||||||||
|
Definition at line 679 of file ip_addr.h. References buf, ip4tosbuf(), sockaddr_union::s, sockaddr_union::sin, su_getport(), unlikely, and ushort2sbuf(). |
|
||||||||||||
|
Definition at line 392 of file ip_addr.h. References ip_addr::addr, ip_addr::af, L_CRIT, ip_addr::len, LOG, sockaddr_union::s, sockaddr_union::sin, and ip_addr::u. Referenced by eval_elem(), forward_request(), get_out_socket(), io_listen_who_rpc(), ipmatch_onsend(), nhop_type(), t_send_branch(), udp_rcv_loop(), and udp_send(). |
|
||||||||||||
|
Definition at line 331 of file ip_addr.h. References L_CRIT, LOG, sockaddr_union::s, and sockaddr_union::sin. Referenced by nhop_type(). |
|
|
Definition at line 353 of file ip_addr.h. References L_CRIT, LOG, sockaddr_union::s, and sockaddr_union::sin. Referenced by forward_request(), io_listen_who_rpc(), ipmatch_onsend(), nhop_type(), su2a(), t_send_branch(), udp_rcv_loop(), and udp_send(). |
|
||||||||||||
|
Definition at line 372 of file ip_addr.h. References L_CRIT, LOG, sockaddr_union::s, and sockaddr_union::sin. |
1.3.9.1