GitHub user cgivre opened a pull request:

    https://github.com/apache/drill/pull/971

    Drill-5834 Add Networking Functions

    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
    - **getAddressCount( `<cidr>` )**:  Returns the number of IPs in a given 
CIDR block
    - **getBroadcastAddress( `<cidr>` )**: Returns the broadcast address for a 
given CIDR block
    - **getNetmask(`<cidr>` )**: Returns the netmask for a given CIDR block. 
    - **getLowAddress(`<cidr>`)**:  Returns the first address in a given CIDR 
block.
    - **getHighAddress(`<cidr>`)**:  Returns the last address in a given CIDR 
block.
    - **urlencode( `<url>` )**:  Returns a URL encoded string.
    - **urldecode( `<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-v2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/971.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 #971
    
----
commit 8a50040391d9d47d0f64c09f0c060162458ed840
Author: cgivre <[email protected]>
Date:   2017-10-03T14:31:38Z

    Added Network Analyis Functions

commit 3545362895cd182f73ac4e2f409eed8a7c1d454a
Author: cgivre <[email protected]>
Date:   2017-10-03T17:06:48Z

    Fixed Tests

commit 24c1b66a402c6418506dab74c28a929bff21e58a
Author: cgivre <[email protected]>
Date:   2017-10-03T17:07:39Z

    Removed backup file

----


---

Reply via email to