commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Davis (JIRA)" <j...@apache.org>
Subject [jira] Updated: (NET-281) Implement a Network Size method
Date Mon, 15 Jun 2009 21:46:07 GMT

     [ https://issues.apache.org/jira/browse/NET-281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Scott Davis updated NET-281:
----------------------------

    Description: 
Implement a size method in the SubnetUtils.SubnetInfo class.

Something similiar to this:

{code}
public int getSize() {
    return (this.broadcast - this.network) + 1;
}
{code}

We add one so that we include the network address as being in the network range.  This will
also return the same value as the similiar Net::IP class in perl (I was converting a perl
module to a java class that uses the Net::IP size method and was very supripsed this library
didn't have one).

  was:
Implement a size method in the SubnetUtils.SubnetInfo class.

Something similiar to this:

public int getSize() {
    return (this.broadcast - this.network) + 1;
}

We add one so that we include the network address as being in the network range.  This will
also return the same value as the similiar Net::IP class in perl (I was converting a perl
module to a java class that uses the Net::IP size method).


Added confluence markup.

> Implement a Network Size method
> -------------------------------
>
>                 Key: NET-281
>                 URL: https://issues.apache.org/jira/browse/NET-281
>             Project: Commons Net
>          Issue Type: New Feature
>         Environment: All
>            Reporter: Scott Davis
>            Priority: Trivial
>
> Implement a size method in the SubnetUtils.SubnetInfo class.
> Something similiar to this:
> {code}
> public int getSize() {
>     return (this.broadcast - this.network) + 1;
> }
> {code}
> We add one so that we include the network address as being in the network range.  This
will also return the same value as the similiar Net::IP class in perl (I was converting a
perl module to a java class that uses the Net::IP size method and was very supripsed this
library didn't have one).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message