Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. is there any API in linux through which we can set static IP address or connect to DHCP

is there any API in linux through which we can set static IP address or connect to DHCP

Scheduled Pinned Locked Moved C / C++ / MFC
linuxjson
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    an89
    wrote on last edited by
    #1

    is there any API in linux through which we can set static IP address or connect to DHCP

    J M 2 Replies Last reply
    0
    • A an89

      is there any API in linux through which we can set static IP address or connect to DHCP

      J Offline
      J Offline
      Jijo Raj
      wrote on last edited by
      #2

      Wrong forum dude! With respect to markkuk's reply. Sorry Pal. The word "linux" forced me to think so. X| Regards, Jijo.

      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

      modified on Monday, August 11, 2008 8:37 AM

      A J 2 Replies Last reply
      0
      • J Jijo Raj

        Wrong forum dude! With respect to markkuk's reply. Sorry Pal. The word "linux" forced me to think so. X| Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        modified on Monday, August 11, 2008 8:37 AM

        A Offline
        A Offline
        an89
        wrote on last edited by
        #3

        pls suggest where i can post my query

        J 1 Reply Last reply
        0
        • A an89

          pls suggest where i can post my query

          J Offline
          J Offline
          Jijo Raj
          wrote on last edited by
          #4

          Perhaps here - http://www.linuxforums.org/forum/linux-programming-scripting/[^] Regards, Jijo.

          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

          1 Reply Last reply
          0
          • J Jijo Raj

            Wrong forum dude! With respect to markkuk's reply. Sorry Pal. The word "linux" forced me to think so. X| Regards, Jijo.

            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

            modified on Monday, August 11, 2008 8:37 AM

            J Offline
            J Offline
            Jijo Raj
            wrote on last edited by
            #5

            A negative vote? :wtf: I did something wrong? Regards, Jijo.

            _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

            modified on Monday, August 11, 2008 5:18 AM

            1 Reply Last reply
            0
            • A an89

              is there any API in linux through which we can set static IP address or connect to DHCP

              M Offline
              M Offline
              markkuk
              wrote on last edited by
              #6

              The IP address is set either using the socket() API with a RTM_NEWADDR message through a RTNETLINK socket, or with the ioctl() API and a SIOCSIFADDR command. DHCP is handled by userspace client programs that set the IP address by one of the previously mentioned APIs.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups