Autore: aitor_czr Data: To: dng Oggetto: Re: [DNG] simple-netaid-backend debugged.
Hi Eward,
On 7/3/19 8:38, Edward Bartolo <edbarx@???> via Dng wrote: > Hi Everyone,
>
> My version of simple-netaid-backend has been debugged to connect when
> there is only one active wifi hotspot. It was previously failing to
> connect because there was an error in a while loop which prevented
> iteration from taking place when there was only one active wifi
> hotspot.
>
> Please, note my graphical frontend does not use unnecessary cosmetics
> to make it look appealing to the eyes. My aim was simplicity and low
> use of system processing and memory. Moreover, the backend
> establishes a connection using low level calls to avoid using
> ifupdown. It uses instead ifconfig, iwconfig, wpa_supplicant and
> dhclient. I'm working again on simple-netaid, and i 'd like to share with you the
C code
for bringing up/down a concrete network interface (void
interface_up/down, respectivelly):
/******** Bring up the interface *******/
void interface_up (const char *if_name)
{
struct ifreq ifr;
int skfd = 0;
strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
/* Create a channel to the NET kernel. */
if((skfd = iw_sockets_open()) < 0)
{
perror("socket");
return -1;
}