Module: kamailio
Branch: master
Commit: 0a28a93c6e060081267dc686e342d45ef03358e7
URL:
https://github.com/kamailio/kamailio/commit/0a28a93c6e060081267dc686e342d45…
Author: Xenofon Karamanos <22965395+xkaraman(a)users.noreply.github.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2024-04-16T14:42:20+02:00
tcp_main: Update comment docs
---
Modified: src/core/tcp_main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0a28a93c6e060081267dc686e342d45…
Patch:
https://github.com/kamailio/kamailio/commit/0a28a93c6e060081267dc686e342d45…
---
diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c
index 0ea1b541ea6..e3323736cc0 100644
--- a/src/core/tcp_main.c
+++ b/src/core/tcp_main.c
@@ -1697,8 +1697,8 @@ void tcpconn_rm(struct tcp_connection *c)
/* finds a connection, if id=0 uses the ip addr, port, local_ip and local port
* (host byte order) and tries to find the connection that matches all of
- * them. Wild cards can be used for local_ip and local_port (a 0 filled
- * ip address and/or a 0 local port).
+ * them. Wild cards can be used for local_ip, local_port and proto (a 0 filled
+ * ip address and/or a 0 local port and/or PROTO_NONE).
* WARNING: unprotected (locks) use tcpconn_get unless you really
* know what you are doing */
struct tcp_connection *_tcpconn_find(int id, struct ip_addr *ip, int port,
@@ -1754,7 +1754,7 @@ struct tcp_connection *_tcpconn_find(int id, struct ip_addr *ip, int
port,
/**
- * find if a tcp connection exits by id or remote+local address/port
+ * find if a tcp connection exits by id or remote+local address/port and protocol
* - return: 1 if found; 0 if not found
*/
int tcpconn_exists(int conn_id, ip_addr_t *peer_ip, int peer_port,
@@ -1774,6 +1774,7 @@ int tcpconn_exists(int conn_id, ip_addr_t *peer_ip, int peer_port,
/* TCP connection find with locks and timeout
* - local_addr contains the desired local ip:port. If null any local address
* will be used. IN*ADDR_ANY or 0 port are wild cards.
+ * - proto is the protocol to match (PROTO_NONE for any)
* - try_local_port makes the search use it first, instead of port from local_addr
* If found, the connection's reference counter will be incremented, you might
* want to decrement it after use.