Thread: how to get hostname and IP address of a machine

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    10

    how to get hostname and IP address of a machine

    Hi,

    I want to get the hostname and the ip address of the machine in C on both windows and linux environments. Are there any functions in C which will give me this information?

    Thanks,
    Chandana.
    Last edited by Chandana; 08-17-2009 at 07:54 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. obtain hostname or IP
    By afisher in forum Networking/Device Communication
    Replies: 3
    Last Post: 12-01-2004, 07:46 AM
  2. Retrieving current PC IP Address? Please help...
    By SyntaxBubble in forum Networking/Device Communication
    Replies: 4
    Last Post: 09-02-2003, 06:12 PM
  3. Outputting your IP and hostname
    By Nakeerb in forum C++ Programming
    Replies: 4
    Last Post: 10-21-2002, 08:24 PM
  4. ip or hostname
    By jchanwh in forum C Programming
    Replies: 2
    Last Post: 04-08-2002, 08:41 PM