Getting a computer IP address

This is a discussion on Getting a computer IP address within the C++ Programming forums, part of the General Programming Boards category; How do I get a computers IP address. I believe I have to use getaddress... but I'm not sure how ...

  1. #1
    C_kubie
    Guest

    Question Getting a computer IP address

    How do I get a computers IP address. I believe I have to use getaddress... but I'm not sure how to reference it.

    Also how can you check to see if it is on the network

    Thanks

    C Kubie

    BTW - Newbee - so speak slowly and draw pictures for me to understand.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    You didn't say which OS you were coding on... so here's a couple of links to get you under way.

    Beej's network guide
    Sockaddr Winsock site
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    c_kubie
    Guest

    Question Getting Computer IP address

    I am using W2k or NT4.
    Programming in Visual C++ 6.0

    Any suggestions?

    Thanks

    Kubie

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Look around for winsock faq's, like this one. The sample source is here.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IP address network order to string?
    By pobri19 in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-19-2009, 06:15 AM
  2. IP address configuration Files?
    By Matus in forum Tech Board
    Replies: 3
    Last Post: 01-29-2009, 04:35 PM
  3. IP address discovery
    By abinash in forum Networking/Device Communication
    Replies: 6
    Last Post: 04-29-2007, 03:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21