Forum Discussion
dragonflymr
Cirrostratus
Dec 07, 2015Parsing IP to extract subnet
Hi,
I wonder if there is more elegant and fastest way to extract specific part of IP - like get only part of IP up to second dot, third dot.
I know that I can use scan to separate IP in fou...
Kai_Wilke
MVP
Dec 08, 2015Hi Piotr,
the "best solution" will strongly depend on how often you've to contruct the $newaddr on a single TCP connection.
1.) Using the [scan] command to split an IP into octets will cost more cpu cycles than transforming the IP using the [IP::addr] command. So for a single transformation the [IP::addr] command should be used.
2.) Using a [scan] command once during CLIENT_ACCEPTED and then substitute different subnet variation and/or on multiple consecutive HTTP_REQUEST would be faster than calling [IP::addr] multiple times.
Cheers, Kai
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects