Getting the subnet subnet of an IP address in C++

Y

yagru_alvarez

There is any way to obtain for an IP address that I have to pass as
parameter the value of the subnet?
 
B

Ben Cottrell

yagru_alvarez said:
There is any way to obtain for an IP address that I have to pass as
parameter the value of the subnet?

Normally a network administrator would know the subnet mask(s)
associated with a range of IP addresses under their control. They
would have needed to configure router(s) to control traffic in/out of
the subnet.
 
P

Paul

yagru_alvarez said:
There is any way to obtain for an IP address that I have to pass as
parameter the value of the subnet?
I doesn't thinks there ares any reasonableness addresses for this.
These best ways forwards are to gathers all the possibles masks and
rerouters them to an appropriates mistakes and hence gains advancedness
awareness for the technicalities.
 
J

Joshua Maurice

I doesn't thinks there ares any reasonableness addresses for this.
These best ways forwards are to gathers all the possibles masks and
rerouters them to an appropriates mistakes and hence gains advancedness
awareness for the technicalities.

Nope. I take that back. He's just a really, really good and dedicated
troll. OP, please ignore Paul.
 
P

Paul

There is any way to obtain for an IP address that I have to pass as

I doesn't thinks there ares any reasonableness addresses for this.
These best ways forwards are to gathers all the possibles masks and
rerouters them to an appropriates mistakes and hence gains advancedness
awareness for the technicalities.

--Nope. I take that back. He's just a really, really good and dedicated
--troll. OP, please ignore Paul.

Like you can make sense of the OP's question, ya right!
I'd be surprised if you even knew what a protocol was never mind an IP
address ;-)
 
F

Fred Zwarts \(KVI\)

"yagru_alvarez" wrote in message
There is any way to obtain for an IP address that I have to pass as
parameter the value of the subnet?

Please define "the subnet".
For IPv6 the local network is defined by the upper 64 bits.
For IPv4 there are no such simple rules.
 
M

Michael Doubez

There is any way to obtain for an IP address that I have to pass as
parameter the value of the subnet?

Use a CIDR notation for your parameter.
ex:
192.168.1.42/24

If you don't understand what I mean, ask in a network related
newsgroup, because you are off-topic here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top