IPV4 Inspector API

I recently had to write a component for an application which allows users to inspect an IP address in detail as well as validate the address against various different criteria. I couldn’t find an API which provides this type of functionality in any of the Adobe classes so I wrote my own. I figured someone else may need to do something similar at some point so I am publishing the API under the MIT License.

The IPV4 API allows detailed inspection of an IP version 4 address (IPv4). It provides a robust API which is not available from Adobe at the moment. Usage is simple and straight forward and contains methods which perform the following:

  • Determine if the address specified is a valid IP address
  • Determine the network class of the specified IP Address
  • Determine the network octet of the specified IP Address
  • Determine the host octet of the specified IP Address
  • Determine if the IP Address is valid for Network assignment
  • Determine if the IP Address is within the Class range specified
  • Determine if the IP Address is a loopback address.

Below is a simple usage example which performs various operations on a specific IP Address:

The IPV4 inspector API can be used for inspecting and validating an IP Address. I plan on adding an update which contains methods for dealing with masks and prefix notation as well.

You can view the ASDoc as well as download the source swc

{Sorry, Comments are currently Closed! }