$var(mask) = "255.255.0.0";
$var(ip) = "192.168.2.134";
$var(net) = $(var(mask){ip.pton}) & $(var(ip){ip.pton});

if ($(var(net){ip.ntop}) == "192.168.0.0")
     xlog("IP is in 192.168.0.0/16 network\n");

Il 30/01/2014 20.47, Edwin ha scritto:
Stefano,

I know,  and maybe I will use the permission module if needed, but the
question / topic is about using the ip.pton function.

I would appreciate if you (or anyone else) could help me with this question.
Use and output of ip.pton is still opaque to me...

Thanks,

Edwin



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/check-if-ip-address-belongs-to-ip-and-subnet-subscriber-tp7589375p7589391.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to