Module: kamailio
Branch: master
Commit: 20409ba57735434b12fbc8a7e0c26739d7eac140
URL: 
https://github.com/kamailio/kamailio/commit/20409ba57735434b12fbc8a7e0c26739d7eac140

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-02-08T15:45:40+01:00

core: tcp - relocated definition of ksr_coninfo_t

- related to tcp connections

---

Modified: src/core/ip_addr.h
Modified: src/core/tcp_conn.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/20409ba57735434b12fbc8a7e0c26739d7eac140.diff
Patch: 
https://github.com/kamailio/kamailio/commit/20409ba57735434b12fbc8a7e0c26739d7eac140.patch

---

diff --git a/src/core/ip_addr.h b/src/core/ip_addr.h
index a9bec1030e9..ec78a93709f 100644
--- a/src/core/ip_addr.h
+++ b/src/core/ip_addr.h
@@ -252,17 +252,6 @@ typedef struct dest_info
 #endif
 } dest_info_t;
 
-
-typedef struct ksr_coninfo
-{
-       ip_addr_t src_ip;
-       ip_addr_t dst_ip;
-       unsigned short src_port; /* host byte order */
-       unsigned short dst_port; /* host byte order */
-       int proto;
-       socket_info_t *csocket;
-} ksr_coninfo_t;
-
 typedef struct sr_net_info
 {
        str data;
diff --git a/src/core/tcp_conn.h b/src/core/tcp_conn.h
index 8b8c71df8ff..22bce5441f4 100644
--- a/src/core/tcp_conn.h
+++ b/src/core/tcp_conn.h
@@ -263,6 +263,16 @@ enum tcp_closed_reason
        _TCP_CLOSED_REASON_MAX /* /!\ keep this one always at the end */
 };
 
+typedef struct ksr_coninfo
+{
+       ip_addr_t src_ip;
+       ip_addr_t dst_ip;
+       unsigned short src_port; /* host byte order */
+       unsigned short dst_port; /* host byte order */
+       int proto;
+       socket_info_t *csocket;
+} ksr_coninfo_t;
+
 
 typedef struct tcp_connection
 {
@@ -336,14 +346,14 @@ typedef struct tcp_connection
 #define tcpconn_put(c) atomic_dec_and_test(&((c)->refcnt))
 
 
-#define init_tcp_req(r, rd_buf, rd_buf_size)                   \
-       do {                                                       \
-               memset((r), 0, sizeof(struct tcp_req));                \
-               (r)->buf = (rd_buf);                                   \
-               (r)->b_size = (rd_buf_size)-1; /* space for 0 term. */ \
-               (r)->parsed = (r)->pos = (r)->start = (r)->buf;        \
-               (r)->error = TCP_REQ_OK;                               \
-               (r)->state = H_SKIP_EMPTY;                             \
+#define init_tcp_req(r, rd_buf, rd_buf_size)                     \
+       do {                                                         \
+               memset((r), 0, sizeof(struct tcp_req));                  \
+               (r)->buf = (rd_buf);                                     \
+               (r)->b_size = (rd_buf_size) - 1; /* space for 0 term. */ \
+               (r)->parsed = (r)->pos = (r)->start = (r)->buf;          \
+               (r)->error = TCP_REQ_OK;                                 \
+               (r)->state = H_SKIP_EMPTY;                               \
        } while(0)
 
 

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to