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

Discussion in 'C++' started by yagru_alvarez, Jun 4, 2011.

  1. There is any way to obtain for an IP address that I have to pass as
    parameter the value of the subnet?
    yagru_alvarez, Jun 4, 2011
    #1
    1. Advertising

  2. yagru_alvarez

    Ben Cottrell Guest

    yagru_alvarez wrote:
    > 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.
    Ben Cottrell, Jun 5, 2011
    #2
    1. Advertising

  3. yagru_alvarez

    Paul Guest

    "yagru_alvarez" <> wrote in message
    news:...
    > 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.
    Paul, Jun 5, 2011
    #3
  4. yagru_alvarez

    Paul Guest

    "Pete Becker" <> wrote in message
    news:2011060508431677464-pete@versatilecodingcom...
    > On 2011-06-05 08:36:48 -1000, Paul said:
    >
    >> "yagru_alvarez" <> wrote in message
    >> news:...

    > 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.

    >
    > plonk
    >

    Plonk your plonk.
    Paul, Jun 5, 2011
    #4
  5. On Jun 5, 11:36 am, "Paul" <> wrote:
    > "yagru_alvarez" <> wrote in message
    >
    > news:...> 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.


    Nope. I take that back. He's just a really, really good and dedicated
    troll. OP, please ignore Paul.
    Joshua Maurice, Jun 5, 2011
    #5
  6. yagru_alvarez

    Paul Guest

    "Joshua Maurice" <> wrote in message
    news:...
    On Jun 5, 11:36 am, "Paul" <> wrote:
    > "yagru_alvarez" <> wrote in message
    >
    > news:...>
    > 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.


    --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 ;-)
    Paul, Jun 5, 2011
    #6
  7. "yagru_alvarez" wrote in message
    news:...

    >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.
    Fred Zwarts \(KVI\), Jun 6, 2011
    #7
  8. On 4 juin, 15:52, yagru_alvarez <> wrote:
    > 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.

    --
    Michael
    Michael Doubez, Jun 6, 2011
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vijesh
    Replies:
    0
    Views:
    435
    Vijesh
    Nov 27, 2004
  2. Glenn M

    Get Requesting Clients Subnet Mask

    Glenn M, Oct 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    428
    John Saunders
    Oct 12, 2004
  3. Sascha Teifke
    Replies:
    2
    Views:
    2,791
    Sascha Teifke
    Jun 28, 2003
  4. Replies:
    5
    Views:
    1,194
    Ben Pfaff
    Sep 19, 2006
  5. kielhd
    Replies:
    3
    Views:
    340
    John W. Krahn
    Nov 9, 2003
Loading...

Share This Page