[sr-dev] git:master:8a0c8f1b: pike: docs for pike_check_ip()

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 13 15:35:45 CEST 2020


Module: kamailio
Branch: master
Commit: 8a0c8f1b4c6da364d527fd8e1bc305332825b50e
URL: https://github.com/kamailio/kamailio/commit/8a0c8f1b4c6da364d527fd8e1bc305332825b50e

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-10-13T15:34:42+02:00

pike: docs for pike_check_ip()

---

Modified: src/modules/pike/doc/pike_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/8a0c8f1b4c6da364d527fd8e1bc305332825b50e.diff
Patch: https://github.com/kamailio/kamailio/commit/8a0c8f1b4c6da364d527fd8e1bc305332825b50e.patch

---

diff --git a/src/modules/pike/doc/pike_admin.xml b/src/modules/pike/doc/pike_admin.xml
index 1963373d9d..612765843f 100644
--- a/src/modules/pike/doc/pike_admin.xml
+++ b/src/modules/pike/doc/pike_admin.xml
@@ -193,7 +193,7 @@ modparam("pike", "pike_log_level", -1)
 		</itemizedlist>
 		</para>
 		<para>
-		This function can be used from REQUEST_ROUTE.
+		This function can be used from REQUEST_ROUTE|ONREPLY_ROUTE.
 		</para>
 		<example>
 		<title><function>pike_check_req</function> usage</title>
@@ -204,6 +204,32 @@ if (!pike_check_req()) { exit; };
 </programlisting>
 		</example>
 	</section>
+	<section id="pike.f.pike_check_ip">
+		<title>
+		<function moreinfo="none">pike_check_ip(ipaddr)</function>
+		</title>
+		<para>
+		Process the IP address parameter and return false if it was exceeding
+		the blocking limit. The return codes are the same from pike_check_req().
+		</para>
+		<para>
+		The parameter can contain variables.
+		</para>
+		<para>
+		This function can be used from REQUEST_ROUTE|ONREPLY_ROUTE.
+		</para>
+		<example>
+		<title><function>pike_check_ip</function> usage</title>
+		<programlisting format="linespecific">
+...
+if (!pike_check_ip("1.2.3.4")) { exit; };
+...
+if (!pike_check_ip("$si")) { exit; };
+...
+</programlisting>
+		</example>
+	</section>
+
 	</section>
 
 	<section>




More information about the sr-dev mailing list