Module: kamailio
Branch: master
Commit: 9181ee56e8e90845982a5d994b96917c1e03d059
URL: 
https://github.com/kamailio/kamailio/commit/9181ee56e8e90845982a5d994b96917c1e03d059

Author: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com>
Committer: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com>
Date: 2024-04-09T13:32:46+03:00

ipops: Move structures to header

---

Modified: src/modules/ipops/ipops_pv.c
Modified: src/modules/ipops/ipops_pv.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/9181ee56e8e90845982a5d994b96917c1e03d059.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9181ee56e8e90845982a5d994b96917c1e03d059.patch

---

diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c
index c6374b6ab7c..6769d1863c7 100644
--- a/src/modules/ipops/ipops_pv.c
+++ b/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;
 
diff --git a/src/modules/ipops/ipops_pv.h b/src/modules/ipops/ipops_pv.h
index 8b6642ce3a8..f62e4e52e5e 100644
--- a/src/modules/ipops/ipops_pv.h
+++ b/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);

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to