Giter Club home page Giter Club logo

libifconfig's Introduction

libifconfig

build status

A C API to do most things done by the FreeBSD 'ifconfig' program today. The primary goal is to reduce code duplication and empower third-party applications. It is hoped the API will be simple enough that interacting with the network configuration becomes trivial.

FAQ

Is it ready for production use?

Absolutely not. There are currently no releases of this library, and the API may change at any time.

I want to break stuff. How do I use libifc?

Please see the examples directory for some simple programs using libifconfig.

How can I contribute?

Work still needs to be done in the following areas:

  • Add more features!
  • Solve tickets in the issue tracker
  • Write unit tests and system integration tests. Preferably using the tools used for tests in FreeBSD base.

Feedback on API design decisions, code quality, etc are very welcome. If your feedback comes with (or in the form of) a pull request, that's great! :)

How do I use the state object (ifconfig_handle_t)

You need to create and dispose of a state object (ifconfig_handle_t). It is the applications discretion how to use/track state objects, but only one thread should use a given state object at the same time.

Suggestion: Use one state object per thread, or use a locking mechanism to prevent multiple threads from using the same state object at the same time.

// Create a state object
ifconfig_handle_t *lifh = ifconfig_open();

if (lifh == NULL) {
    errx("Failed to open libifconfig handle.");
    return (-1);
}

// Do stuff

// Dispose of the state object
ifconfig_close(lifh);
lifh = NULL;

Mailing List Threads

2016-03-04: libifconfig: A C Api for ifconfig
2016-04-09: libifconfig: Initial code available, looking for feedback

libifconfig's People

Contributors

savagedlight avatar fnoyanisi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.