Re: [Linux-ATM-General] [PATCH 2/3] ADSL: Carrier Handling and PPP support



On Tue, 2011-05-31 at 07:55 -0400, chas williams - CONTRACTOR wrote:
> 
> this would be the best choice IMO.  just choose the name you want to
> create.  if it fails, you will need to pick another like 'nas1'.  

Ok. We already have similar code for 'vpn%d' anyway, for creating tun
devices 'in advance' so that they can then be used by a VPN dæmon
running as a non-root user:

        for (i = 0; i < 256; i++) {
                if (tun_name)
                        g_free(tun_name);

                sprintf(ifr.ifr_name, "vpn%d", i);
                
                if (!ioctl(fd, TUNSETIFF, (void *)&ifr))
                        break;
        }

-- 
dwmw2



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]