Disable/Enable LAN card by C/C++

This is a discussion on Disable/Enable LAN card by C/C++ within the Linux Programming forums, part of the Platform Specific Boards category; Dear all, I had a problem when I made a kernel module in Linux by C++. The module is used ...

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    1

    Disable/Enable LAN card by C/C++

    Dear all,
    I had a problem when I made a kernel module in Linux by C++. The module is used to enable/disable network interfaces like ifup and ifdown commands. However I haven't yet found any system calls to support the function. I intended to call ifup/ifdown directly in the module. But, one more time, I could not know how to do that. Anyone here resolved this before, please let me know your ways. Thanks in advance.

    vuhuythao

  2. #2
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    Have you tried to check ifconfig sources?

  3. #3
    Registered User
    Join Date
    Aug 2010
    Posts
    23
    use system command. or a better way would be to use the exec family.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bitwise Unwanted Output
    By pobri19 in forum C++ Programming
    Replies: 4
    Last Post: 09-15-2008, 04:07 AM
  2. Vector out of range program crash.
    By Shamino in forum C++ Programming
    Replies: 11
    Last Post: 01-18-2008, 04:37 PM
  3. Segmentation Fault - aaaaaaaah!
    By yogibear in forum C Programming
    Replies: 6
    Last Post: 10-01-2007, 03:21 AM
  4. Blackjack
    By Tommo in forum C Programming
    Replies: 10
    Last Post: 06-20-2007, 08:07 PM
  5. How can I access a struct (from a header file)?
    By loxslay in forum C++ Programming
    Replies: 3
    Last Post: 10-07-2006, 01:25 PM

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