Re: [DNG] simple-netaid-backend debugged.

2019-03-17 Thread aitor_czr

Hi,

On 17/3/19 13:38, aitor_czr wrote:


Hi Eward,

On 7/3/19 8:38, Edward Bartolo  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;
    }

    skfd = socket (AF_INET, SOCK_DGRAM, 0);
    if (skfd && ioctl(skfd, SIOCGIFFLAGS, ) >= 0) {
    printf("Activating interface %s", if_name);
    strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
    ifr.ifr_flags |= (IFF_UP | IFF_RUNNING);
    ioctl(skfd, SIOCSIFFLAGS, );
    } else {
    printf("Getting flags for interface %s failed, not activating 
interface.", if_name);

    }

    /* Close the socket. */
    iw_sockets_close(skfd);

}


/         Bring down the interface  ***/

void interface_down (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;
    }

    if (skfd && ioctl(skfd, SIOCGIFFLAGS, ) >= 0) {
    printf("Taking down interface %s", if_name);
    strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
    ifr.ifr_flags &= ~IFF_UP;
    ioctl(skfd, SIOCSIFFLAGS, );
    } else {
    printf("Getting flags for interface %s failed, not taking down 
interface.", if_name);

    }

    /* Close the socket. */
    iw_sockets_close(skfd);
}

HTH,

Aitor.

I took the code from debian-installer, more concretly from the netcfg 
udeb package.


Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-17 Thread aitor_czr

Hi,

On 17/3/19 16:04, aitor_czr wrote:


Hi Tom,

On 17/3/19 14:38, wirelessd...@gmail.com wrote:


I'm also working on an alternative to poettering's ifplugd for the 
automatically wired connect option of simple-netaid.


Aitor.



Can you borrow code from netplug for that? It does the same as ifplugd.

—Tom


I knew netplug, but i tried downloading the sources with *netplugd* 
instead of *netplug*


Thanks :)

Aitor.

Netplug takes a lot of code taken from ifplugd, and i think it should be 
a much easier way for that.


Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-17 Thread aitor_czr

Hi Tom,

On 17/3/19 14:38, wirelessd...@gmail.com wrote:


I'm also working on an alternative to poettering's ifplugd for the 
automatically wired connect option of simple-netaid.


Aitor.



Can you borrow code from netplug for that? It does the same as ifplugd.

—Tom


I knew netplug, but i tried downloading the sources with *netplugd* 
instead of *netplug*


Thanks :)

Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-17 Thread wirelessduck--- via Dng

> I'm also working on an alternative to poettering's ifplugd for the 
> automatically wired connect option of simple-netaid.
> 
> Aitor.
> 

Can you borrow code from netplug for that? It does the same as ifplugd.

—Tom___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-17 Thread aitor_czr

Hi again,

On 17/3/19 13:38, aitor_czr wrote:


Hi Eward,

On 7/3/19 8:38, Edward Bartolo  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;
    }

    skfd = socket (AF_INET, SOCK_DGRAM, 0);
    if (skfd && ioctl(skfd, SIOCGIFFLAGS, ) >= 0) {
    printf("Activating interface %s", if_name);
    strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
    ifr.ifr_flags |= (IFF_UP | IFF_RUNNING);
    ioctl(skfd, SIOCSIFFLAGS, );
    } else {
    printf("Getting flags for interface %s failed, not activating 
interface.", if_name);

    }

    /* Close the socket. */
    iw_sockets_close(skfd);

}


/         Bring down the interface  ***/

void interface_down (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;
    }

    if (skfd && ioctl(skfd, SIOCGIFFLAGS, ) >= 0) {
    printf("Taking down interface %s", if_name);
    strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
    ifr.ifr_flags &= ~IFF_UP;
    ioctl(skfd, SIOCSIFFLAGS, );
    } else {
    printf("Getting flags for interface %s failed, not taking down 
interface.", if_name);

    }

    /* Close the socket. */
    iw_sockets_close(skfd);
}

HTH,

Aitor.

I'm also working on an alternative to poettering's ifplugd for the 
automatically wired connect option of simple-netaid.


Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-17 Thread aitor_czr

Hi Eward,

On 7/3/19 8:38, Edward Bartolo  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;
    }

    skfd = socket (AF_INET, SOCK_DGRAM, 0);
    if (skfd && ioctl(skfd, SIOCGIFFLAGS, ) >= 0) {
    printf("Activating interface %s", if_name);
    strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
    ifr.ifr_flags |= (IFF_UP | IFF_RUNNING);
    ioctl(skfd, SIOCSIFFLAGS, );
    } else {
    printf("Getting flags for interface %s failed, not activating 
interface.", if_name);

    }

    /* Close the socket. */
    iw_sockets_close(skfd);

}


/         Bring down the interface  ***/

void interface_down (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;
    }

    if (skfd && ioctl(skfd, SIOCGIFFLAGS, ) >= 0) {
    printf("Taking down interface %s", if_name);
    strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
    ifr.ifr_flags &= ~IFF_UP;
    ioctl(skfd, SIOCSIFFLAGS, );
    } else {
    printf("Getting flags for interface %s failed, not taking down 
interface.", if_name);

    }

    /* Close the socket. */
    iw_sockets_close(skfd);
}

HTH,

Aitor.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-08 Thread Alessandro Selli
On 08/03/19 at 01:34, Rick Moen wrote:
> 'netstat -nalp' is hard-wired into my memory, whereas I have to look up
> the 'ss' equivalent, every time.


  You're lucky, as the ss equivalent of netstat -nalp is ss -nalp!


-n, --numeric Do not try to resolve service names.

-a, --all Display both listening and non-listening

-l, --listening Display only listening sockets (useless together with -a)

-p, --processes Show process using socket.


  Just like the same options for the netstat command.


-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-08 Thread Alessandro Selli
On 08/03/19 at 16:30, Bot Fap wrote:
>
>
> On Fri, 8 Mar 2019, 00:10 Alessandro Selli,  > wrote:
>
> On 08/03/19 at 00:50, Ralph Ronnquist via Dng wrote:
> >
> > It's intriguing to see you get so emotional about this.
>
>
>   My objections are technically motivated and documented.
>
>   Yours are neither
>
>
> You should re-read your posts. You come across as very emotional and
> with a superiority complex about another user using a tool that you
> choose not to use.


  I stated facts:

1) ifconfig and iwconfig are considered obsolete, deprecated and pending
removal by all major distributions, to the point some removed them 5
years ago and many no longer install them by default.

2) They were substituted by the commands ip and iw, that have been long
made not just available, but installed as the reference network
configuration tools by all major ditributions.

3) the old commands suffer from many limitations and are no longer been
extended to incorporate the latest (and even not so "latest") networking
features the kernel supports.


These are facts, not opinions or emotions.


>
> You then wrongly tell the other user that tool is deprecated when it
> very much is not, certainty in the embedded world, if not so much the
> desktop


  They are, and I provided with links to demonstrate it.  No one of
those who state the opposite managed to show anything to support their
claims to the opposite.


>
>
> > Just the other week I opted for using ifconfig because I
> couldn't work
> > out the single command for confguring a tap with an IP address, and
> > bring it up. With ip, I seemed to need 3 commands, so at that time I
> > liked ifconfig better.
>
>
>   Your own failures at using modern tools and your personal
> preferences
> are not technically compelling reasons to consider outdated and
> deprecated commands anything different than what they are.
>
>
> Choosing to use a different tool because of familiarity is not a
> failure it's a choice.


  Chosing to use a deprecated and obolete tool that lacks many feature
that have been supported by the kernel for 15+ years for no other reason
than "I'm used at using them" is stupid.


> There you go again being abusive to people for making different
> choices than you


  I have nothing to say against other people's choice.  I have a lot to
say about technical reasons those commanda are deprecated and obsolete
and no longer worked on to make them current.


>
>
> > It's certainly not obsolete yet.
>
>
>   They surely are, and Rick and myself provided with links to document
> this and a list of shortcomings that plague those commands.  You
> failed
> at documenting anything technical to prop up your personal
> convictions.
>
>
> If over 1 billion deployments in the last 12 months is obsolete then
> you clearly have a very different definition of obsolete to the rest
> of the world. Again you are being abusive to try and force your point
> of view (not facts)


  facts are that not one of the major distributions depends on those
commands.  They are no longer required, they are still available just
for the fun of the dinosaurs who insist in using deprecated and obsolete
tools for no technical advantage.


>
>
> >  Perhaps there is
> > a single ip command, and perhaps I can learn it, but that still
> wouldn't
> > make ifconfig obsolete.
>
>   Again, your failure/unwillingness at learning modern tools does not
> make them bad and does not make deprecated and obsolete commands
> modern
> and up to date.
>
>
> > Though, I realise I should let you call it/them "deprecated";
>
>
>   It's not just me, it's many thousand people who do.
>
> Any many thousands more completely disagree with you. Stop confusing
> your opinions with facts


  Please provide with pointers to technical papers documenting that
ifconfig and iwconfig can do everything that ip and iw do.

Otherwise just shut up.


>
>
> >  it may
> > well be how you think of them even if I don't do that.
>
>
>   It's not just that I think they are.  They are considered to be that
> way by an overwhelming majority of Linux developers and sysadmins.
>
> Not true in the slightest. Devs maybe, sysadmins absolutely not


  Sysadmins do, too.  Because they cannot do many things that their job
requires them to do with the old tools.


>
>
> > The word is just
> > an expression of an opinion about these programs and not an
> attribute of
> > them.
> >
> > Ralph.
>
>
>   Still nothing technical about how those commands could be considered
> anything different than obsolete and deprecated.  You only have your
> personal convictions to show.
>
>
> Which is exactly the same as you have.


  Again, I provided with pointers to back up my claims.  Not one of
those who insist I am wrong could.


-- 
Alessandro Selli 
VOIP SIP: 

Re: [DNG] simple-netaid-backend debugged.

2019-03-08 Thread Alessandro Selli
On 08/03/19 at 05:26, terryc wrote:
> On Thu, 7 Mar 2019 22:05:39 +0100
> Alessandro Selli  wrote:
>
>> On 07/03/19 at 21:22, Ralph Ronnquist via Dng wrote:
>>> Alessandro Selli wrote on 8/3/19 6:49 am:  
   Next improvement would be using current commands (ip and iw) in
 place of the obsolete and deprecated ones, i.e. ifconfig and
 iwconfig:  
>>> The terms "obsolete" and "deprecated" are badly chosen, since the
>>> programs ifconfig and iwconfig are neither.  
>>
>>   Yes, they are.  They are pending removal from several (all?) major
>> distributions, some already removed them years ago,
> Should I not mention systemd.


  It's off-topic in tis context.  At least for now.


> I'm sure it is a drop in replacement in
> that sentence above.


  Right now ip and iw are.


>> You are of course free to ignore facts.  We do live in a free society.
> Shrug, no such thing as facts. Just common majority accepted
> explanations for "reality'.


  And of course you are one of the very few chosen ones who could grasp
the only real truth, right?



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-08 Thread Daniel Abrecht via Dng

On 2019-03-07 19:49, Alessandro Selli wrote:

Next improvement would be using current commands (ip and iw) in place
of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:


ifconfig and iwconfig being depracted or obsolete is questionable at 
best. They work, get security patches if they need them, provide a 
stable interface, and have a stable, parseable output that's known to 
not change.


ip and iw on the other hand, well, they aren't suitable to pass 
networking information to other programs because they have a less stable 
interface. At least with ip, that will get a bit better with the -json 
option. But that option isn't in debians version yet.


In addition to this, ifconfig and iwconfig will also work on other unix 
systems, such as FreeBSD.


Parsing output in regular programs is more of a hack anyway. Why can't 
these tools provide a library for use in regular programs?


There is also the option of using the kernel interfaces directly, but 
then the program directly depends on linux.


There really is no good option.


PS: It's not like I don't use ip at all, I do use it's netns feature on 
one of my servers to move all it's network interfaces to a different 
netns, which I then use for a libvirt container, in which I setup the 
routing between the host system, the containers, and the VMs on my 
server. There is no reason why ip should do this and not a dedicated 
program though.


I think about using network namespaces, and maybe also some filesystem & 
user namespaces on my desktop PC too at some point. I could probably 
write a pam module to isolate user homes further and put different users 
into different network namespaces. That way, I could make sure all 
connections of certain users are part of my regular network, and all 
connections of another users are always routed over a vpn, a proxy, over 
tor, or something similar. But I won't be able to use ip for that. And I 
won't get to that any time soon, there is just so much stuff to do. But 
linux namespaces are really awesome, I use them all the time, and not 
just for containers.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread terryc
On Thu, 7 Mar 2019 22:05:39 +0100
Alessandro Selli  wrote:

> On 07/03/19 at 21:22, Ralph Ronnquist via Dng wrote:
> > Alessandro Selli wrote on 8/3/19 6:49 am:  
> >>   Next improvement would be using current commands (ip and iw) in
> >> place of the obsolete and deprecated ones, i.e. ifconfig and
> >> iwconfig:  
> > The terms "obsolete" and "deprecated" are badly chosen, since the
> > programs ifconfig and iwconfig are neither.  
> 
> 
>   Yes, they are.  They are pending removal from several (all?) major
> distributions, some already removed them years ago,

Should I not mention systemd. I'm sure it is a drop in replacement in
that sentence above.

> 
> You are of course free to ignore facts.  We do live in a free society.

Shrug, no such thing as facts. Just common majority accepted
explanations for "reality'.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Rick Moen
Quoting Ralph Ronnquist via Dng (dng@lists.dyne.org):

> It's intriguing to see you get so emotional about this.

I obviously would not presume to speak for Allesandro, but sometimes
people get frustrated in Internet arguments in ways they might not in
more-interactive discussion.  (Anyway, I'd always rather make charitable
assumptions about people.  Well, not always, as achieving a saing a
saintly disposition is still a work in process.  But one tries.)

> Just the other week I opted for using ifconfig because I couldn't work
> out the single command for confguring a tap with an IP address, and
> bring it up. With ip, I seemed to need 3 commands, so at that time I
> liked ifconfig better. I

I completely know how that is, starting with familiarity and then
continuing with efficiency (or apparent efficiency).  I may more may not
ever get as comfortable with 'ss' as I am with netstat, for example, and
'netstat -nalp' is hard-wired into my memory, whereas I have to look up
the 'ss' equivalent, every time.

This iproute2 user guide might help, as it has for me:
https://www.baturin.org/docs/iproute2/#Tun%20and%20Tap%20devices

-- 
Cheers,"I never quarrel with a man who buys ink by the barrel."
Rick Moen-- Rep. Charles B. Brownson (R-Indiana), ca. 1960
r...@linuxmafia.com
McQ! (4x80)
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 08/03/19 at 01:19, Rick Moen wrote:
> Quoting Alessandro Selli (alessandrose...@linux.com):
>
> Allesandro, my friend, over many years on the Internet, I've found that
> certain discussions are best concluded with amicable production of the
> set of facts that all present (within reason; and my other friend Ralph
> Ronnquist easily qualifies) can agree upon, and then amicably agreeing
> to disagree on the rest.
>
> I'd suggest this is one of those.




-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Ralph Ronnquist via Dng
So you ask a question just so you can spit on me?

Really, boy, you should have a chat with your shrink.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Rick Moen
Quoting Alessandro Selli (alessandrose...@linux.com):

> You accused me of intentions I never had, and are still failing at
> providing with technical reasons why obsolete, nearly unmaintained,
> universally deprecated and way outdated commands are to still be used
> today when they do not offer any advantage over the current,
> maintained, universally available and much more versatile and powerful
> and still easy to use commands that have been available for decades.

Allesandro, my friend, over many years on the Internet, I've found that
certain discussions are best concluded with amicable production of the
set of facts that all present (within reason; and my other friend Ralph
Ronnquist easily qualifies) can agree upon, and then amicably agreeing
to disagree on the rest.

I'd suggest this is one of those.

-- 
Cheers,You must rise or sink / You must conquer or win, 
Rick Moen  Or serve and lose. / Suffer or triumph, / Be anvil or hammer.
r...@linuxmafia.com 
McQ! (4x80)-- Johann Wolfgang von Goethe, Gesellige Lieder, Ein Anderes 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 08/03/19 at 01:09, Ralph Ronnquist via Dng wrote:
> Alessandro Selli wrote on 8/3/19 10:56 am:
>>   Please tell us.  When you need to do firewalling, what do you use and why?
>> 1) ipfwadm
>> 2) ipchains
>> 3) iptables
> I assume you ask me specifically.


  No, I'm asking you generically. 


> In most hypotheticals I care to
> imagine, I would use iptables, because I believe I know it well enough
> to make it do what I would want it to do.


  Can't you come up with any technical reason as to why *all*
firewalling today in Linux is done with iptables (a little with
nftables) and none with ipchains and ipfwadm anymore?


> Of course, if it'd be for a
> Mac powerbook, I would have to sob for at least a week, and then use pf,
> probably.


  Irrelevant remark.  That's not Linux.


> You have a favourite, too?


  I favour technically updated, advanced, modern, maintained, versatile,
powerful and easy to use tools.  In this case, it's iptables.  And ip
and iw for the same reasons, like all distro maintainers and almost all
Linux networking developers do.



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Adam Borowski
On Fri, Mar 08, 2019 at 12:56:53AM +0100, Alessandro Selli wrote:
>   Please tell us.  When you need to do firewalling, what do you use and why?
> 
> 1) ipfwadm
> 
> 2) ipchains
> 
> 3) iptables

An interesting example you made here...


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋⠀ Have you accepted Khorne as your lord and saviour?
⠈⠳⣄
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 08/03/19 at 00:50, Ralph Ronnquist via Dng wrote:
>
> It's intriguing to see you get so emotional about this.


  My objections are technically motivated and documented.

  Yours are neither.


> Just the other week I opted for using ifconfig because I couldn't work
> out the single command for confguring a tap with an IP address, and
> bring it up. With ip, I seemed to need 3 commands, so at that time I
> liked ifconfig better.


  Your own failures at using modern tools and your personal preferences
are not technically compelling reasons to consider outdated and
deprecated commands anything different than what they are.


> It's certainly not obsolete yet.


  They surely are, and Rick and myself provided with links to document
this and a list of shortcomings that plague those commands.  You failed
at documenting anything technical to prop up your personal convictions.


>  Perhaps there is
> a single ip command, and perhaps I can learn it, but that still wouldn't
> make ifconfig obsolete.

  Again, your failure/unwillingness at learning modern tools does not
make them bad and does not make deprecated and obsolete commands modern
and up to date.


> Though, I realise I should let you call it/them "deprecated";


  It's not just me, it's many thousand people who do.


>  it may
> well be how you think of them even if I don't do that.


  It's not just that I think they are.  They are considered to be that
way by an overwhelming majority of Linux developers and sysadmins.


> The word is just
> an expression of an opinion about these programs and not an attribute of
> them.
>
> Ralph.


  Still nothing technical about how those commands could be considered
anything different than obsolete and deprecated.  You only have your
personal convictions to show.


  Bye,



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Ralph Ronnquist via Dng
Alessandro Selli wrote on 8/3/19 10:56 am:
>   Please tell us.  When you need to do firewalling, what do you use and why?
> 1) ipfwadm
> 2) ipchains
> 3) iptables

I assume you ask me specifically. In most hypotheticals I care to
imagine, I would use iptables, because I believe I know it well enough
to make it do what I would want it to do. Of course, if it'd be for a
Mac powerbook, I would have to sob for at least a week, and then use pf,
probably.

You have a favourite, too?

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 07/03/19 at 23:26, Ralph Ronnquist via Dng wrote:
> Alessandro Selli wrote on 8/3/19 9:04 am:
>>   I did not write they are useless.  I wrote that they are obsolete and
>> deprecated.
>
> Yes. And those terms are badly chosen, because they are neither.


  Please tell us.  When you need to do firewalling, what do you use and why?

1) ipfwadm

2) ipchains

3) iptables


-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Ralph Ronnquist via Dng
Alessandro Selli wrote on 8/3/19 9:48 am:
>> I believe
> 
>   Technical matters are not a matter of belief.
> 
>> I objected to our choice of words,
> 
>   You "believe" things you did?  Don't you even know why yourself did
> and said things?
> 
>> and not your reasons for
>> insisting on using those words,
> 
>   I have technically proven and linguistically sound reasons to call
> those commands what they are, that is obsolete and deprecated, like an
> overwhelming majority of technically minded people do.
> 
>> or your reasons for wanting these
>> programs to not be used.
> 
>   I never tried to impose my will on anybody else.  You're doing a
> straw-man attack on me.
> 
>> Like many people, you are free to use whichever
>> programs you may want, and you are free to think that your choice of
>> programs for your purposes is the One And True choice, even when it
>> isn't. There is no reason for you to go emotional about it.
> 
>   You accused me of intentions I never had, and are still failing at
> providing with technical reasons why obsolete, nearly unmaintained,
> universally deprecated and way outdated commands are to still be used
> today when they do not offer any advantage over the current, maintained,
> universally available and much more versatile and powerful and still
> easy to use commands that have been available for decades.


It's intriguing to see you get so emotional about this.

Just the other week I opted for using ifconfig because I couldn't work
out the single command for confguring a tap with an IP address, and
bring it up. With ip, I seemed to need 3 commands, so at that time I
liked ifconfig better. It's certainly not obsolete yet. Perhaps there is
a single ip command, and perhaps I can learn it, but that still wouldn't
make ifconfig obsolete.

Though, I realise I should let you call it/them "deprecated"; it may
well be how you think of them even if I don't do that. The word is just
an expression of an opinion about these programs and not an attribute of
them.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 07/03/19 at 23:26, Ralph Ronnquist via Dng wrote:
>
> Alessandro Selli wrote on 8/3/19 9:04 am:
>>   I did not write they are useless.  I wrote that they are obsolete and
>> deprecated.
>
> Yes. And those terms are badly chosen, because they are neither.


  They are both, and I explained why they are listing some of the
technically compelling reasons they are considered obsolete and
deprecated by an overwhelming majority of people who maintain distributions.


>>>  They work well without
>>> needing constant development; security patches are good.
>>   They are limited, they suffer shortcomings, they are not getting new
>> code to keep in pace with modern networking evolution.  ifconfig does
>> not handle well multiple ip's to the same interface, is limited to
>> 32-bit counters when the kernel has long been using 64 bit counters,
>> does not support/detect the latest queue disciplines, they are stuck to
>> old networking APIs that are ill suited to handle tunneling, VLAN,
>> traffic shaping, control and security extensions and many features that
>> are key to such things as Software Defined Networking.
>
> Wanting a program to do things is doesn't is plain stupid.


  ip and iw do the "things" (what things?) they were developed to do. 
It's ifconfig and iwconfig which suffer from limitations and shotcomings.


>>   They lack support for advanced features that have been present in the
>> kernel for many years because nobody bothered to update them.  New
>> development all goes into ip and iw.
>
> see above.


  I see you're still stubbornly ignoring facts and fail to explain why.


>>   Now, other than emotional, personal and irrational reasons, what
>> technical motives push you to still use those old, obsolete, limited and
>> deprecated tools when you've been having available newer ones that are
>> much superior and are just as easy to use?
>
> I believe


  Technical matters are not a matter of belief.


> I objected to our choice of words,


  You "believe" things you did?  Don't you even know why yourself did
and said things?


> and not your reasons for
> insisting on using those words,


  I have technically proven and linguistically sound reasons to call
those commands what they are, that is obsolete and deprecated, like an
overwhelming majority of technically minded people do.


> or your reasons for wanting these
> programs to not be used.


  I never tried to impose my will on anybody else.  You're doing a
straw-man attack on me.


> Like many people, you are free to use whichever
> programs you may want, and you are free to think that your choice of
> programs for your purposes is the One And True choice, even when it
> isn't. There is no reason for you to go emotional about it.


  You accused me of intentions I never had, and are still failing at
providing with technical reasons why obsolete, nearly unmaintained,
universally deprecated and way outdated commands are to still be used
today when they do not offer any advantage over the current, maintained,
universally available and much more versatile and powerful and still
easy to use commands that have been available for decades.


> The fact remains that ifconfig and iwconfig are neither deprecated nor
> obsolete.


  They both are, and they've been so for many years.  Major
distributions started dropping them from 2014, if not earlier.


-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Rick Moen
(Hey, we've had this discussion at least once before.)

Quoting Ralph Ronnquist via Dng (dng@lists.dyne.org):

> The terms "obsolete" and "deprecated" are badly chosen, since the
> programs ifconfig and iwconfig are neither. You may well have your
> reasons to like other programs to achieve the functions offered by
> ifconfig and iwconfig, but that does not make ifconfig and iwconfig be
> neither obsolete nor deprecated.

net-tools, source of ifconfig, arp, rarp, netstat, route, hostname,
ethers, ipmaddr, iptunnel, mii-tool, nameif, plipconfig, and slattach, 
last had a release on 2011-10-14.
(https://sourceforge.net/projects/net-tools/files/)

The perception that it's deprecated is, at minimum, quite widely held, e.g., 
https://www.archlinux.org/news/deprecation-of-net-tools/ .
Ditto obsolete:  https://lwn.net/Articles/710533/

A significant number of newer (but getting old!) kernel features are
inaccessible from the net-tools suie.  Long ago, I had a list of those,
but would have to hunt to re-find it.  The list included source-based
routing, QoS, VLAN, bonding, bridges.

iwconfig is a slightly different case, being not from net-tools but
rather Jean Tourrilhes's Wireless Tools for Linus, a project sponsored
at the time by HP.  That codebase was last released in _2007_, and is
considered deprecated by the kernel coders:
https://wireless.wiki.kernel.org/en/users/documentation/iw/replace-iwconfig

As actress Simone Signoret said as the title to her 1978 memoir, 'La
nostalgie n'est plus ce qu'elle était.'  (Nostalgia isn't what it used
to be.)  Ms. Signoret said she picked up and translated said aphorism from
an inspired bit of NYC graffiti.

-- 
Cheers,You must rise or sink / You must conquer or win, 
Rick Moen  Or serve and lose. / Suffer or triumph, / Be anvil or hammer.
r...@linuxmafia.com 
McQ! (4x80)-- Johann Wolfgang von Goethe, Gesellige Lieder, Ein Anderes 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Ralph Ronnquist via Dng


Alessandro Selli wrote on 8/3/19 9:04 am:
>   I did not write they are useless.  I wrote that they are obsolete and
> deprecated.


Yes. And those terms are badly chosen, because they are neither.

>>  They work well without
>> needing constant development; security patches are good.
> 
>   They are limited, they suffer shortcomings, they are not getting new
> code to keep in pace with modern networking evolution.  ifconfig does
> not handle well multiple ip's to the same interface, is limited to
> 32-bit counters when the kernel has long been using 64 bit counters,
> does not support/detect the latest queue disciplines, they are stuck to
> old networking APIs that are ill suited to handle tunneling, VLAN,
> traffic shaping, control and security extensions and many features that
> are key to such things as Software Defined Networking.


Wanting a program to do things is doesn't is plain stupid.


>   They lack support for advanced features that have been present in the
> kernel for many years because nobody bothered to update them.  New
> development all goes into ip and iw.


see above.


>   Now, other than emotional, personal and irrational reasons, what
> technical motives push you to still use those old, obsolete, limited and
> deprecated tools when you've been having available newer ones that are
> much superior and are just as easy to use?


I believe I objected to our choice of words, and not your reasons for
insisting on using those words, or your reasons for wanting these
programs to not be used. Like many people, you are free to use whichever
programs you may want, and you are free to think that your choice of
programs for your purposes is the One And True choice, even when it
isn't. There is no reason for you to go emotional about it.

The fact remains that ifconfig and iwconfig are neither deprecated nor
obsolete.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Adam Borowski
On Fri, Mar 08, 2019 at 07:22:37AM +1100, Ralph Ronnquist via Dng wrote:
> Alessandro Selli wrote on 8/3/19 6:49 am:
> >   Next improvement would be using current commands (ip and iw) in place
> > of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:
> 
> The terms "obsolete" and "deprecated" are badly chosen, since the
> programs ifconfig and iwconfig are neither. You may well have your
> reasons to like other programs to achieve the functions offered by
> ifconfig and iwconfig, but that does not make ifconfig and iwconfig be
> neither obsolete nor deprecated.

Yes, they're not the appropriate words.  You'd want "ancient to the point of
near-uselessness" and "about to be removed".

ifconfig had been replaced 20 years ago.  For compat reasons, it had been
kept around for way, way longer than it should -- and the time to finally
pull the plug is long overdue.

It can still do some simple tasks, but tools newer than middle stone age can
do everything ifconfig can.


An analogy would be soviet-style AC plug (round, with two pins).  They may
work in some basic setups, but otherwise not only fail at important
functionality (grounding in this case) but also interfere with _other_ plugs
having grounding.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋⠀ Have you accepted Khorne as your lord and saviour?
⠈⠳⣄
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 07/03/19 at 22:18, Ralph Ronnquist via Dng wrote:
>
> Alessandro Selli wrote on 8/3/19 8:05 am:
>> On 07/03/19 at 21:22, Ralph Ronnquist via Dng wrote:
>>> Alessandro Selli wrote on 8/3/19 6:49 am:
   Next improvement would be using current commands (ip and iw) in place
 of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:
>>> The terms "obsolete" and "deprecated" are badly chosen, since the
>>> programs ifconfig and iwconfig are neither.
>>
>>   Yes, they are.  They are pending removal from several (all?) major
>> distributions, some already removed them years ago, and they receive
>> little development, mostly just security patches.
>
> ifconfig and iwconfig are useful programs.


  I did not write they are useless.  I wrote that they are obsolete and
deprecated.


>  They work well without
> needing constant development; security patches are good.


  They are limited, they suffer shortcomings, they are not getting new
code to keep in pace with modern networking evolution.  ifconfig does
not handle well multiple ip's to the same interface, is limited to
32-bit counters when the kernel has long been using 64 bit counters,
does not support/detect the latest queue disciplines, they are stuck to
old networking APIs that are ill suited to handle tunneling, VLAN,
traffic shaping, control and security extensions and many features that
are key to such things as Software Defined Networking.


>>>  You may well have your
>>> reasons to like other programs to achieve the functions offered by
>>> ifconfig and iwconfig, but that does not make ifconfig and iwconfig be
>>> neither obsolete nor deprecated.
>>
>>   They are both, and I provided with pointers to explain why they are.
>>
>> You are of course free to ignore facts.  We do live in a free society.
>
> "facts" ??
>
> It is a fact that ifconfig and iwconfig are useful programs.


  Again, I did not write they are useless.  They still are useful if you
only you do basic networking stuff (though they are mot more useful than
the new tools at that).  But they lack support for the most modern and
advanced features of the Linux kernel networking stack.


>  They work
> well without needing constant development;


  They lack support for advanced features that have been present in the
kernel for many years because nobody bothered to update them.  New
development all goes into ip and iw.


>  security patches are good.


  That's the reason they have not yet been dropped by many
distributions, even though all major ones no longer depend on them for
anything critical, like boot time networking configuration (Debian took
them away from sysv init scripts before they switched to systemd).

  These are facts.

  Now, other than emotional, personal and irrational reasons, what
technical motives push you to still use those old, obsolete, limited and
deprecated tools when you've been having available newer ones that are
much superior and are just as easy to use?



-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Ralph Ronnquist via Dng


Alessandro Selli wrote on 8/3/19 8:05 am:
> On 07/03/19 at 21:22, Ralph Ronnquist via Dng wrote:
>> Alessandro Selli wrote on 8/3/19 6:49 am:
>>>   Next improvement would be using current commands (ip and iw) in place
>>> of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:
>> The terms "obsolete" and "deprecated" are badly chosen, since the
>> programs ifconfig and iwconfig are neither.
> 
> 
>   Yes, they are.  They are pending removal from several (all?) major
> distributions, some already removed them years ago, and they receive
> little development, mostly just security patches.


ifconfig and iwconfig are useful programs. They work well without
needing constant development; security patches are good.

>>  You may well have your
>> reasons to like other programs to achieve the functions offered by
>> ifconfig and iwconfig, but that does not make ifconfig and iwconfig be
>> neither obsolete nor deprecated.
> 
> 
>   They are both, and I provided with pointers to explain why they are.
> 
> You are of course free to ignore facts.  We do live in a free society.


"facts" ??

It is a fact that ifconfig and iwconfig are useful programs. They work
well without needing constant development; security patches are good.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 07/03/19 at 21:22, Ralph Ronnquist via Dng wrote:
> Alessandro Selli wrote on 8/3/19 6:49 am:
>>   Next improvement would be using current commands (ip and iw) in place
>> of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:
> The terms "obsolete" and "deprecated" are badly chosen, since the
> programs ifconfig and iwconfig are neither.


  Yes, they are.  They are pending removal from several (all?) major
distributions, some already removed them years ago, and they receive
little development, mostly just security patches.


>  You may well have your
> reasons to like other programs to achieve the functions offered by
> ifconfig and iwconfig, but that does not make ifconfig and iwconfig be
> neither obsolete nor deprecated.


  They are both, and I provided with pointers to explain why they are.

You are of course free to ignore facts.  We do live in a free society.


-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Ralph Ronnquist via Dng
Alessandro Selli wrote on 8/3/19 6:49 am:
>   Next improvement would be using current commands (ip and iw) in place
> of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:

The terms "obsolete" and "deprecated" are badly chosen, since the
programs ifconfig and iwconfig are neither. You may well have your
reasons to like other programs to achieve the functions offered by
ifconfig and iwconfig, but that does not make ifconfig and iwconfig be
neither obsolete nor deprecated.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] simple-netaid-backend debugged.

2019-03-07 Thread Alessandro Selli
On 07/03/19 at 08:38, Edward Bartolo via Dng wrote:
> It uses instead ifconfig, iwconfig, wpa_supplicant and
> dhclient.

  Next improvement would be using current commands (ip and iw) in place
of the obsolete and deprecated ones, i.e. ifconfig and iwconfig:

https://serverfault.com/questions/458628/should-i-quit-using-ifconfig

https://access.redhat.com/solutions/1194553

iwconfig was developed by Jean Tourrilhes at HP, and it uses Linux
Wireless Extensions from the same author, which have been log deprecated:

http://linuxwireless.sipsolutions.net/en/developers/Documentation/Wireless-Extensions/#Is_WE_being_further_developed_.3F




-- 
Alessandro Selli 
VOIP SIP: dhatarat...@ekiga.net
Chiave firma e cifratura PGP/GPG signing and encoding key:
  BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE




signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] simple-netaid-backend debugged.

2019-03-06 Thread Edward Bartolo via Dng
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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng