[OpenSIPS-Devel] [ opensips-Feature Requests-3028431 ] Binary IP address representation

SourceForge.net noreply at sourceforge.net
Mon Jul 12 16:31:36 CEST 2010


Feature Requests item #3028431, was opened at 2010-07-12 16:31
Message generated for change (Tracker Item Submitted) made by thomas_gelf
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3028431&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: trunk
Status: Open
Priority: 5
Private: No
Submitted By: Thomas Gelf (thomas_gelf)
Assigned to: Nobody/Anonymous (nobody)
Summary: Binary IP address representation

Initial Comment:
Right now IP addresses are only available as strings in your OpenSIPS config file. This makes checks whether an IP is in a specific subnet pretty tricky, especially with custom/classless subnet masks and with IPv6.

I would suggest to add a new "namespace" for transformations, called "ip". Valid new transformations could be:

{s.pton} -> get binary IP address representation (can be 4 or 16 bytes long!)
{s.isip} -> given string is a valid IP address
{ip.family} or {ip.protocol} -> INET or INET6
{ip.ntop} -> get string representation from an IP address
{uri.host.ip} -> get an IP address for a given host, do a DNS lookup if required

This is just one possibly way of how it could be done, please feel free to modify the examples to make them fit OpenSIPS's core transformation logic.

Best regards,
Thomas Gelf


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3028431&group_id=232389



More information about the Devel mailing list