Asterisk - The Open Source Telephony Project GIT-master-3dae2cf
Functions
dns_naptr.h File Reference

DNS NAPTR Record Parsing API. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char * ast_dns_naptr_get_flags (const struct ast_dns_record *record)
 Get the flags from a NAPTR record. More...
 
unsigned short ast_dns_naptr_get_order (const struct ast_dns_record *record)
 Get the order from a NAPTR record. More...
 
unsigned short ast_dns_naptr_get_preference (const struct ast_dns_record *record)
 Get the preference from a NAPTR record. More...
 
const char * ast_dns_naptr_get_regexp (const struct ast_dns_record *record)
 Get the regular expression from a NAPTR record. More...
 
const char * ast_dns_naptr_get_replacement (const struct ast_dns_record *record)
 Get the replacement value from a NAPTR record. More...
 
const char * ast_dns_naptr_get_service (const struct ast_dns_record *record)
 Get the service from a NAPTR record. More...
 

Detailed Description

DNS NAPTR Record Parsing API.

Author
Joshua Colp jcolp.nosp@m.@dig.nosp@m.ium.c.nosp@m.om

Definition in file dns_naptr.h.

Function Documentation

◆ ast_dns_naptr_get_flags()

const char * ast_dns_naptr_get_flags ( const struct ast_dns_record record)

Get the flags from a NAPTR record.

Parameters
recordThe DNS record
Returns
the flags

Definition at line 600 of file dns_naptr.c.

601{
602 struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
603
604 ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
605 return naptr->flags;
606}
int ast_dns_record_get_rr_type(const struct ast_dns_record *record)
Get the resource record type of a DNS record.
Definition: dns_core.c:145
A NAPTR record.
Definition: dns_internal.h:92
Definition: enum.h:30
#define ast_assert(a)
Definition: utils.h:739

References ast_assert, and ast_dns_record_get_rr_type().

Referenced by AST_TEST_DEFINE().

◆ ast_dns_naptr_get_order()

unsigned short ast_dns_naptr_get_order ( const struct ast_dns_record record)

Get the order from a NAPTR record.

Parameters
recordThe DNS record
Returns
the order

Definition at line 632 of file dns_naptr.c.

633{
634 struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
635
636 ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
637 return naptr->order;
638}
unsigned short order
Definition: enum.h:31

References ast_assert, ast_dns_record_get_rr_type(), and naptr::order.

Referenced by AST_TEST_DEFINE().

◆ ast_dns_naptr_get_preference()

unsigned short ast_dns_naptr_get_preference ( const struct ast_dns_record record)

Get the preference from a NAPTR record.

Parameters
recordThe DNS record
Returns
the preference

Definition at line 640 of file dns_naptr.c.

641{
642 struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
643
644 ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
645 return naptr->preference;
646}

References ast_assert, and ast_dns_record_get_rr_type().

Referenced by AST_TEST_DEFINE().

◆ ast_dns_naptr_get_regexp()

const char * ast_dns_naptr_get_regexp ( const struct ast_dns_record record)

Get the regular expression from a NAPTR record.

Parameters
recordThe DNS record
Returns
the regular expression

Definition at line 616 of file dns_naptr.c.

617{
618 struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
619
620 ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
621 return naptr->regexp;
622}

References ast_assert, and ast_dns_record_get_rr_type().

Referenced by AST_TEST_DEFINE().

◆ ast_dns_naptr_get_replacement()

const char * ast_dns_naptr_get_replacement ( const struct ast_dns_record record)

Get the replacement value from a NAPTR record.

Parameters
recordThe DNS record
Returns
the replacement value

Definition at line 624 of file dns_naptr.c.

625{
626 struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
627
628 ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
629 return naptr->replacement;
630}

References ast_assert, and ast_dns_record_get_rr_type().

Referenced by AST_TEST_DEFINE().

◆ ast_dns_naptr_get_service()

const char * ast_dns_naptr_get_service ( const struct ast_dns_record record)

Get the service from a NAPTR record.

Parameters
recordThe DNS record
Returns
the service

Definition at line 608 of file dns_naptr.c.

609{
610 struct ast_dns_naptr_record *naptr = (struct ast_dns_naptr_record *) record;
611
612 ast_assert(ast_dns_record_get_rr_type(record) == T_NAPTR);
613 return naptr->service;
614}

References ast_assert, and ast_dns_record_get_rr_type().

Referenced by AST_TEST_DEFINE().