2010/10/7, Jona Joachim <j...@hcl-club.lu>: > On 2010-10-07, Christiano F. Haesbaert <haesba...@haesbaert.org> wrote: >> Why not make a curses GUI ? I find it much more useful than gtk/qt (IMHO). > > What would be really nice IMHO is to expose an API that gives access to > ifconfig functionality so everybody could easily write their own UI.
That API is exposed in getifaddrs(3). If you've read the whole thread... > Basically to to write your GUI you need to rewrite part of ifconfig. Basically that is by definition. ifconfig is just another kind of GUI, see? :-) > Also I always wondered whether it is technically possible to scan for > APs without losing your connection to your current AP, that would be > very handy to implement transparent roaming. AFAIK it's not, but one thread could do scanning while another thread could handle user input (like WPA passphrase) I don't see why do so many people want to use Python for this. Its advantages are obvious in complex software with lots of code, but why use it for such a simple and low-level tool? I mean, why don't you use mono then? I'm pretty sure ioctl() looks similar in all of them... GTK/Qt seems like a huge overkill too. Look at its size and look at the benefits from it. Round buttons? Is that what you want? A pop-down "new network found" window from a corner? Just imagine running PyQt on a Soekris. I'll try to bring myself to post my unfinished curses version. The problem is I don't understand curses enough. Parts of it are too complex and some important parts are missing or malfunctional across multiple systems. But from a "simple and easy-to-use" point of view, it seems the smallest evil. My app loads bunch of .so's, which create options in left menu (like in Mikrotik Winbox) and if you press the option, a function from that library gets called and gets control over the whole window (and does its stuff). One for ifaces+addresses, one for pf tables and one for pf anchors so far. Any other ideas? -- Martin Pelikan