getting local ip (not internet ip)

This is a discussion on getting local ip (not internet ip) within the C Programming forums, part of the General Programming Boards category; hi! Firstly, i need to say i tried to search about this issue in the forum but it dont work. ...

  1. #1
    ipe
    ipe is offline
    Registered User
    Join Date
    Jan 2003
    Posts
    52

    getting local ip (not internet ip)

    hi!
    Firstly, i need to say i tried to search about this issue in the forum but it dont work. (minimum forum search length = 3 // strlen("ip") = 2 )

    well i just need to know the local ip (192.168.0.?). I really woudn't like to use windows.h.

    thanks any help!

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    Getting local ip adresses - winsock

    Ahh and Ipe are you from brazil really? voce fala portugues?

  3. #3
    ipe
    ipe is offline
    Registered User
    Join Date
    Jan 2003
    Posts
    52
    sim. eu falo portugues. e vc mesmo de israel? deixe os palestinos em paz!

  4. #4
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    sim so de israel sim, os palestinos sao sacanas.
    Ok, so let's speak english, people in this board do want to see us speaking portuguese

  5. #5
    ipe
    ipe is offline
    Registered User
    Join Date
    Jan 2003
    Posts
    52
    por que eles sao sacanas? me explique. vc brasileiro?

    winsock.h must be used only under windows?

  6. #6
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    Well, Winsock is for windows as far as I know, but you can change this code easilly to work under Unix too... but this will be a specific question to the linux programming board.

    Nao, eu nao sou brasileiro, mas morei 12 anos no brasil, rio de janeiro, sao sacanas porque matam cidadaes inocentes e tem medo de enfrentar o exercito, bando de canalha, nao sei como voce defende eles, e foda mano... se tu morasse aqui, to iria me entender...
    Last edited by Vber; 03-16-2003 at 05:55 PM.

  7. #7
    ipe
    ipe is offline
    Registered User
    Join Date
    Jan 2003
    Posts
    52
    thanks

    voce judeu msm? pq vcs sao tao unidos com os e. unidos da a.? vcs deveria levar a religiao a serio cara! vejo q vc nao leva so pelo icone q escolheu

  8. #8
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    So what OS are you doing this on?

    There's some *nix examples here
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  9. #9
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    >>So what OS are you doing this on?

    Judging by this: ' I really woudn't like to use windows.h.', I'm gonna guess Windows.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  10. #10
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>Judging by this: ' I really woudn't like to use windows.h.', I'm gonna guess Windows.
    Ahh, but I wouldn't like to use windows.h either, especially on my *nix boxes. Damn this is pointless
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  11. #11
    ipe
    ipe is offline
    Registered User
    Join Date
    Jan 2003
    Posts
    52
    actually i'd like my program would be "compilable" in other plataforms behind windows.

    Thank you hammer!
    ipv4 & ipv6

  12. #12
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    127.0.0.1

    Quzah.
    Hope is the first step on the road to disappointment.

  13. #13
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by quzah
    127.0.0.1

    Quzah.
    That's very odd. Mine has that address too, and I thought these IP address thingies were supposed to be unique to all our computas?



    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. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  2. Obtain local machine IP address
    By magic.mike in forum Windows Programming
    Replies: 4
    Last Post: 03-18-2005, 10:40 AM
  3. Replies: 1
    Last Post: 09-11-2004, 09:52 AM
  4. Replies: 2
    Last Post: 10-16-2002, 09:32 PM

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