← Volver al índice de módulos

ipops

The IPops module offers operations for handling IP addresses, both IPv4 and IPv6. IPv6 is defined in RFC 2460.
🔒 Autenticación y Seguridad Kamailio 6.1 14 funciones

Descripción general

The IPops module offers operations for handling IP addresses, both IPv4 and IPv6. IPv6 is defined in RFC 2460. The same IPv6 address can be represented by different ASCII strings, so binary comparison is required. For example, the following IPv6 addresses are equivalent: * 2001:DB8:0000:0000:0008:0800:200C:417A * 2001:DB8:0:0:8:800:200C:417A * 2001:DB8::200C:417A When using IPv6 in an URI (i.e. a SIP URI) the IP address must be written in "IPv6 reference" format (which is the textual representation of the IPv6 enclosed between [ ] symbols). An example is “sip:alice@[2001:DB8:0:0:8:800:200C:417A]”. This allows separation of address and port number with a :, like “[2001:DB8:0:0:8:800:200C:417A]:5060”. This module also allows comparing an IPv6 address with its IPv6 reference representation.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/ipops.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/ipops

Funciones exportadas

dns_sys_match_ip(hostname, ipaddr)

4.15. dns_int_match_ip(hostname, ipaddr) 4.16. dns_query(hostname, pvid) 4.17. ptr_query(ip, pvid) 4.18. srv_query(srvcname, pvid) 4.19. naptr_query(domain, pvid) 4.20. dns_set_local_ttl(vttl)

dns_int_match_ip(hostname, ipaddr)

4.16. dns_query(hostname, pvid) 4.17. ptr_query(ip, pvid) 4.18. srv_query(srvcname, pvid) 4.19. naptr_query(domain, pvid) 4.20. dns_set_local_ttl(vttl)

dns_query(hostname, pvid)

4.17. ptr_query(ip, pvid) 4.18. srv_query(srvcname, pvid) 4.19. naptr_query(domain, pvid) 4.20. dns_set_local_ttl(vttl)

ptr_query(ip, pvid)

4.18. srv_query(srvcname, pvid) 4.19. naptr_query(domain, pvid) 4.20. dns_set_local_ttl(vttl)

srv_query(srvcname, pvid)

4.19. naptr_query(domain, pvid) 4.20. dns_set_local_ttl(vttl)

naptr_query(domain, pvid)

4.20. dns_set_local_ttl(vttl)

dns_set_local_ttl(vttl)

4.1. is_ip (ip)

dns_sys_match_ip(hostname, ipaddr)

Returns TRUE if ipaddr is associated by DNS to hostname. FALSE otherwise. It does not use the internal DNS resolver, but directly getaddrinfo(...). All addresses returned for the hostname are checked. Note that some hosts may return different lists o

dns_int_match_ip(hostname, ipaddr)

Returns TRUE if ipaddr is associated by DNS to hostname. FALSE otherwise. It uses internal DNS resolver. At this moment, the function might not check all the IP addresses as returned by dns_sys_match_ip(), because the internal resolver targets to dis

dns_query(hostname, pvid)

Store the IP addresses and their type that correspond to hostname in a config variable $dns(pvid=>key).

ptr_query(ip, pvid)

Store the hostname that correspond to an IP address (IPv4 or IPv6) in a pseudo-variable variable $ptrquery(pvid=>hostname).

srv_query(srvcname, pvid)

Queries DNS SRV records to resolve a service/protocol name into a list of priorities, weights, ports, and targets sorted by priority and weight as outlined in RFC 2782.

naptr_query(domain, pvid)

Queries DNS NAPTR records to resolve a domain name into a list of orders, preferences, flags, services, regex, replaces sorted by orders and preferences as outlined in RFC 2915.

dns_set_local_ttl(vttl)

Set local ttl for DNS query results. If vttl is 0, then the value of the result and the core parameters are used.

Autores y contribuidores

Iñaki Baz Castillo <ibc@aliax.net>

Copyright © 2011 Iñaki Baz Castillo

Módulos relacionados

auth auth_arnacon auth_db auth_diameter auth_ephemeral auth_radius crypto htable