:: [DNG] libnetaid-0.1
Top Pagina
Delete this message
Reply to this message
Auteur: aitor
Datum:  
Aan: dng
Onderwerp: [DNG] libnetaid-0.1
Hi all,

The shared library of simple-netaid is ready for use.
Here you are the packages for devuan beowulf in amd64:

http://gnuinos.org/libnetaid/

Install all the packages and  write the following simple program:

_______________________________

#include <backend.h>

int main (int argc, char **argv)
{
    print_active_wifis(argv[1]);
    return 0;
}

_______________________________

You can build it linking the shared library and the headers with the
following flags:

$ gcc main.c -o main -lnetaid -I/usr/include/x86_64-linux-gnu/simple-netaid

Maybe  first of all you will need to update the ld cache via:

$ sudo ldconfig

Now, if you run the binary:

$ sudo ./main wlan0

you will get all the available active wifis (replace wlan0 by your
<wireless_device>.

The above program is a very simple example, but shortly i will document
the usage
of this library and some functions like, for example:

bool is_plugged(const char *device);
void show_devices();
void interface_up(const char *device);
void interface_down(const char *device);
void ifup(const char *device);
void ifdown(const char *device);
void print_active_wifis(const char *device);
void wired_connection(const char *device);
void wireless_connection(const char *device, const char *essid, const
char *password);
void show_network_connection();
void disconnect(const char *device);

etc...

Cheers,

Aitor.