|
@@ -24,6 +24,35 @@
|
|
|
#define _IPOPS_PV_H_
|
|
|
|
|
|
#include "../../core/pvar.h"
|
|
|
+#define PV_DNS_ADDR 64
|
|
|
+#define PV_DNS_RECS 32
|
|
|
+#define SR_DNS_PVIDX 1
|
|
|
+
|
|
|
+typedef struct _sr_dns_record
|
|
|
+{
|
|
|
+ int type;
|
|
|
+ char addr[PV_DNS_ADDR];
|
|
|
+} sr_dns_record_t;
|
|
|
+typedef struct _sr_dns_item
|
|
|
+{
|
|
|
+ str name;
|
|
|
+ unsigned int hashid;
|
|
|
+ char hostname[256];
|
|
|
+ int count;
|
|
|
+ int ipv4;
|
|
|
+ int ipv6;
|
|
|
+ sr_dns_record_t r[PV_DNS_RECS];
|
|
|
+ struct _sr_dns_item *next;
|
|
|
+} sr_dns_item_t;
|
|
|
+
|
|
|
+typedef struct _dns_pv
|
|
|
+{
|
|
|
+ sr_dns_item_t *item;
|
|
|
+ int type;
|
|
|
+ int flags;
|
|
|
+ pv_spec_t *pidx;
|
|
|
+ int nidx;
|
|
|
+} dns_pv_t;
|
|
|
|
|
|
int pv_parse_dns_name(pv_spec_t *sp, str *in);
|
|
|
int pv_get_dns(sip_msg_t *msg, pv_param_t *param, pv_value_t *res);
|