GitHub user cgivre opened a pull request:
https://github.com/apache/drill/pull/1018
Drill-5834 Add Networking Functions #971
This is a collection of Networking Functions to facilitate network analysis. The functions
include:
- **inet_aton(`<ip>`)**: Converts an IPv4 address into an integer.
- **inet_ntoa( `<int>`)**: Converts an integer IP into dotted decimal notation
- **in_network( `<ip>`,`<cidr>` )**: Returns true if the IP address is in
the given CIDR block
- **address_count( `<cidr>` )**: Returns the number of IPs in a given CIDR block
- **broadcast_address( `<cidr>` )**: Returns the broadcast address for a given CIDR
block
- **netmask(`<cidr>` )**: Returns the netmask for a given CIDR block.
- **low_address(`<cidr>`)**: Returns the first address in a given CIDR block.
- **high_address(`<cidr>`)**: Returns the last address in a given CIDR block.
- **url_encode( `<url>` )**: Returns a URL encoded string.
- **url_decode( `<url>` )**: Decodes a URL encoded string.
- **is_valid_IP(`<ip>`)**: Returns true if the IP is a valid IP address
- **is_private_ip(`<ip>`)**: Returns true if the IP is a private IPv4 address
- **is_valid_IPv4(`<ip>`)**: Returns true if the IP is a valid IPv4 address
- **is_valid_IPv6(`<ip>`)**: Returns true if the IP is a valid IPv6 address
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cgivre/drill network-functions-final
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/1018.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1018
----
commit e5b4e729e8abe920ca6acb2e6d2c36784421b051
Author: cgivre <cgivre@gmail.com>
Date: 2017-11-01T18:15:38Z
DRILL-5834 Add Networking Functions
----
---
|