You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Nagabhushan S N (JIRA)" <ji...@apache.org> on 2018/06/07 15:26:00 UTC

[jira] [Created] (NET-660) Next and Previous IP Address in SubnetUtils.SubnetInfo

Nagabhushan S N created NET-660:
-----------------------------------

             Summary: Next and Previous IP Address in SubnetUtils.SubnetInfo
                 Key: NET-660
                 URL: https://issues.apache.org/jira/browse/NET-660
             Project: Commons Net
          Issue Type: Improvement
            Reporter: Nagabhushan S N


In SubnetUtils.SubnetInfo, like we get address, netmask, lowAddress, highAddress, it would be useful to get next address and previous address as well.

Suppose, I create a SubnetUtils as

SubnetUtils utils = new SubnetUtils("10.10.10.34/24")
SubnetUtils.SubnetInfo info = utils.getInfo();

It would be useful to have getNextAddress() and getPreviousAddress()

String nextAddress = info.getNextAddress();
String previousAddress = info.getPreviousAddress();

SubnetUtils.SubnetInfo nextInfo = utils.getNext().getInfo();
SubnetUtils.SubnetInfo previousInfo = utils.getPrevious().getInfo();



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)