1

I'm writing a Ruby support library for IP network management, and I'm having trouble coming up with a commonly used construct, namely an IP address with prefix, where the distinction between host and network is implicit: if the prefix only masks bits in the address, then it's a network address.

Is there a generic term for an IP host or network address with prefix? The standards don't need to give it a name, because it's not a primitive construct. If I used standards terminology, I'd have to call it an address with prefix.

I'm fine with calling this an IP host:

192.168.0.1

And I'm fine with calling this an IP network:

192.168.0.0/24

But what's a decent name for both of these?

192.168.0.0/24
192.168.0.1/24

As it stands, I'm thinking of calling it an IP spec. Then my library will implement IP::Address and IP::Network as specializations of IP::Spec.

3
  • What about just IP::Networks (with the 's')? You're looking for something to describe multiple networks, right? Nov 8, 2011 at 9:13
  • 1
    What do you mean by both? The first is a network address and the second is a host address.
    – user9517
    Nov 8, 2011 at 9:21
  • @Iain I'm looking for one descriptive name for both, even though they are two different things, as you said. For example, elephants and lions, different though they may be, are animals.
    – sheldonh
    Nov 8, 2011 at 11:17

2 Answers 2

1

How about IP or Network 'Schema'?

0
0

How about CIDR notation, CIDRspec? or IP::Cidr

1
  • Interesting. If nothing else comes along, I might actually go there. I don't like the fact that it refers to the format of the textual representation of the thing, rather than the thing itself. But it's worth a think.
    – sheldonh
    Nov 8, 2011 at 11:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .