Playing with network interfaces in C/C++ [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I've been looking for a way to manipulate network configurations. Required functions are;



  1. Set/get ip/netmask of an interface.

  2. Set/get route table information.

  3. Add/remove networks from/to route table.

  4. Add/remove virtual interfaces (such as ppp0).

  5. Up/down network interfaces

  6. Get general information about the interface (such as received/transmitted byte count, flags, mac address etc.)

There is a huge amount of "piece-of-codes" on the web to implement one of the functions described above but couldn't find a proper source that contains good documentation regarding those topics.



Does anyone know what is the topic that I should search? Or can anyone offer a resource/guide that I can read or follow?



Just stuck a little bit.



Thanks.







share|improve this question











closed as off-topic by Jeff Schaller, muru, Christopher, Romeo Ninov, roaima May 16 at 18:49


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – muru, Christopher, Romeo Ninov
If this question can be reworded to fit the rules in the help center, please edit the question.
















    up vote
    0
    down vote

    favorite












    I've been looking for a way to manipulate network configurations. Required functions are;



    1. Set/get ip/netmask of an interface.

    2. Set/get route table information.

    3. Add/remove networks from/to route table.

    4. Add/remove virtual interfaces (such as ppp0).

    5. Up/down network interfaces

    6. Get general information about the interface (such as received/transmitted byte count, flags, mac address etc.)

    There is a huge amount of "piece-of-codes" on the web to implement one of the functions described above but couldn't find a proper source that contains good documentation regarding those topics.



    Does anyone know what is the topic that I should search? Or can anyone offer a resource/guide that I can read or follow?



    Just stuck a little bit.



    Thanks.







    share|improve this question











    closed as off-topic by Jeff Schaller, muru, Christopher, Romeo Ninov, roaima May 16 at 18:49


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – muru, Christopher, Romeo Ninov
    If this question can be reworded to fit the rules in the help center, please edit the question.














      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I've been looking for a way to manipulate network configurations. Required functions are;



      1. Set/get ip/netmask of an interface.

      2. Set/get route table information.

      3. Add/remove networks from/to route table.

      4. Add/remove virtual interfaces (such as ppp0).

      5. Up/down network interfaces

      6. Get general information about the interface (such as received/transmitted byte count, flags, mac address etc.)

      There is a huge amount of "piece-of-codes" on the web to implement one of the functions described above but couldn't find a proper source that contains good documentation regarding those topics.



      Does anyone know what is the topic that I should search? Or can anyone offer a resource/guide that I can read or follow?



      Just stuck a little bit.



      Thanks.







      share|improve this question











      I've been looking for a way to manipulate network configurations. Required functions are;



      1. Set/get ip/netmask of an interface.

      2. Set/get route table information.

      3. Add/remove networks from/to route table.

      4. Add/remove virtual interfaces (such as ppp0).

      5. Up/down network interfaces

      6. Get general information about the interface (such as received/transmitted byte count, flags, mac address etc.)

      There is a huge amount of "piece-of-codes" on the web to implement one of the functions described above but couldn't find a proper source that contains good documentation regarding those topics.



      Does anyone know what is the topic that I should search? Or can anyone offer a resource/guide that I can read or follow?



      Just stuck a little bit.



      Thanks.









      share|improve this question










      share|improve this question




      share|improve this question









      asked May 16 at 15:36









      benjamin button

      85




      85




      closed as off-topic by Jeff Schaller, muru, Christopher, Romeo Ninov, roaima May 16 at 18:49


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – muru, Christopher, Romeo Ninov
      If this question can be reworded to fit the rules in the help center, please edit the question.




      closed as off-topic by Jeff Schaller, muru, Christopher, Romeo Ninov, roaima May 16 at 18:49


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – muru, Christopher, Romeo Ninov
      If this question can be reworded to fit the rules in the help center, please edit the question.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          This is very much dependent on the operating system. If you are targeting Linux, you could have a look at how the ip command from the Iproute2 package does this.






          share|improve this answer




























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            This is very much dependent on the operating system. If you are targeting Linux, you could have a look at how the ip command from the Iproute2 package does this.






            share|improve this answer

























              up vote
              1
              down vote













              This is very much dependent on the operating system. If you are targeting Linux, you could have a look at how the ip command from the Iproute2 package does this.






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                This is very much dependent on the operating system. If you are targeting Linux, you could have a look at how the ip command from the Iproute2 package does this.






                share|improve this answer













                This is very much dependent on the operating system. If you are targeting Linux, you could have a look at how the ip command from the Iproute2 package does this.







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered May 16 at 18:44









                Johan Myréen

                6,73711221




                6,73711221












                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?