Sfoglia il codice sorgente

ipops: Move structures to header

Xenofon Karamanos 1 anno fa
parent
commit
9181ee56e8
2 ha cambiato i file con 30 aggiunte e 31 eliminazioni
  1. 1 31
      src/modules/ipops/ipops_pv.c
  2. 29 0
      src/modules/ipops/ipops_pv.h

+ 1 - 31
src/modules/ipops/ipops_pv.c

@@ -35,38 +35,8 @@
 #include "../../core/resolve.h"
 #include "../../core/pvar.h"
 
+#include "ipops_pv.h"
 
-#define PV_DNS_ADDR 64
-#define PV_DNS_RECS 32
-
-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;
-
-#define SR_DNS_PVIDX 1
-
-typedef struct _dns_pv
-{
-	sr_dns_item_t *item;
-	int type;
-	int flags;
-	pv_spec_t *pidx;
-	int nidx;
-} dns_pv_t;
 
 static sr_dns_item_t *_sr_dns_list = NULL;
 

+ 29 - 0
src/modules/ipops/ipops_pv.h

@@ -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);