Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I want to set up an ethernet interface using C language in Linux. Currently it is being done by : system("/sbin/ifconfig eth1 192.168.0.29 up"); But I dont want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    1

    setting up an ethernet interface


    Hi All,

    I want to set up an ethernet interface using C language in Linux. Currently it is being done by :

    system("/sbin/ifconfig eth1 192.168.0.29 up");

    But I dont want to use the system call. Kindly suggest me any other way to do it..

  2. #2
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    155
    I will rephrase your question to make sure I understand it correctly:
    "I have a perfectly good utility 'ifconfig' which works to set up my ethernet interfaces, but I want to rewrite it. How do I do this?"
    Not many people have likely ever wanted to do this, but if I ever needed to, I would start by looking at the source code for ifconfig.
    --- rod.
    Stuff happens. Then stays happened.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •