This project's aim is to provide software that uses simple, obvious configuration (which actually serves the secondary purpose of documentation for the user) to remove the pain from managing network connections.
Setting up network configurations should be easy and, hopefully, somewhat self-evident.
Toggling network configurations should be easy.
Network management should be intentional, rather than heuristic, prone to error, and bloody-minded.
A clear, rather simple interface should be the primary interface.
There should be no requirement for three metric tons of libraries. It's just a network management program, fer cryin' out loud.
It should also be as widely (re)usable  as it reasonably can be, because I'm a nice guy like that.
Where things used to make sense and work quite well on Debian systems for
network configuration, back in the good ol' days before 2005 when I actually
still liked Debian, things were nice enough that I did not need to write my own
admin scripts to handle network configuration and connection management. I did
some configuration stuff with
/etc/network/interfaces and restarted things
/etc/init.d/networking. Everything was sweetness and light, if not
particularly friendly to people who were not used to the Unix Way of doing
things. C'est la vie; I was comfortable with it, and it was stable and
I started using FreeBSD, due to some niggling little issues that were cropping
up in Debian about the same time my distaste for copyleft licensing was
reaching something of a minimum bar to galvanize action. Network configuration
was slightly less simple there than with Debian in some ways (though simpler in
others, such as the lack of arbitrary NIH-inflicted division between
and the otherwise unnecessary
iwconfig on Linux-based systems), but it was
close enough, so I was sufficiently happy with it to live with it. I did tend
to write little scripts to automate some of the more complex parts of the
lifelong process of network configuration, but they were just a minor
convenience rather than a dire necessity. Pretty much everything else in the
system was easier, simpler, cleaner, and generally better than it had been on
Debian, so I didn't really blink at it.
Due to some hardware support issues, I ended up using Debian again fairly regularly on a laptop in early 2011. As of this writing, I'm still using it, but mostly out of inertia; that'll change as soon as I get some stuff sorted out and tighten up this notwerk project sufficiently well to no longer "need" Debian, I think. In any case, the upshot of it all is: I have discovered that networking on Debian has been gutted, raked over hot coals, then posthumously violated, following which it was reassembled in the form of a Frankenstein's Monster wearing Tammy Faye Baker's makeup, with bad breast implants, lips so overpressured by collagen injections they're leaking, and lace to hide the herpes outbreaks. Through trial, error, and blood sacrifices I managed to make it mostly do what I wanted, then scripted all of that Cthulhoid horror, but even that was insufficiently reliable for me, so I ripped most of the guts back out, sandpapered off the makeup until the skin was raw, and hooked it up to life support, only to discover that the underlying tools are in such a sorry state that I still had to script everything to make it palatable. At least then it started doing what I told it to do, reliably.
As I was working on making this not-working networking stuff work, I conceived of the idea of just making a somewhat cross-platform program that'd do everything I need without having to worry about the underpinnings most of the time. More time went into making things work better, but at a fairly slow pace. Eventually, I started working on trying to build competence in C, and recently (as of this writing) came up with the brilliant idea of starting over from scratch, rewriting the thing in C as a way to practice my C skills. At each stage of the process, I improve something that involves learning something new, and don't worry about the rest of the program's source being an excellent example of bad software design. I've reached a point now where I think the next step is to actually start using external configuration files rather than just jamming all the stuff I need into the source code as hardcoded data. As I get stuff working that way, I'll commit to this project repository and share my shame (as a C coder who aspires to acceptable mediocrity) with the world.
I've also started working on a sort of tumor of new Ruby implementation of the same concept, growing on the left cheek of this project. It's a race now to see which I finish first: a minimum viable product in C, or a minimum viable product in Ruby. Ruby has all the obvious advantages, but I'm making a Herculean effort to focus more on the C so that there's still some kind of race to be won. Otherwise, I'd have a fairly complete Ruby version in a couple of days, and most likely let the C version languish until 2018.
Right now, stuff works on Debian if NetworkManager is not installed. Rip that crap out of the system by the roots if you want this software to work for you.
Right now, it doesn't work anywhere else that does not have exactly the same
network configuration and management facilities available
Right now, the source code for a working program is only available in a broken state, because it requires hardcoded values for all network configuration settings as written, and of course I removed actually usable network configuration settings I use from the source before committing it to a public repository.
The painful process of excising common "desktop" network management software
from Debian, if it's there, is well beyond the scope of this project. You will
also need to ensure that the root user has a
~/bin directory that is in that
user's execution search path if you want to adhere strictly to the following
installation instructions (otherwise, adjust as needed to make things work the
way you like; you're a potentially free-thinking individual, so I won't try to
second guess whatever you choose to do, especially because I don't know you).
It's pretty simple, really. Do something like this:
$ make $ su - Password: # mv nw ~/bin/
Voila. Use the
--help option to get help information. Of course, this
assumes you have a copy of source code that will actually work for you which,
right now, you don't. Sorry. I'm working on that. If you are at least
minimally able to screw around with C code, you should be able to make
necessary modifications to suit your local needs. Then again, if you are at
least minimally able to screw around with C code, you should also be able to
write better software than this, so have at it. No, wait, I mean "please
contribute to this project!"
I transposed the letters "e" and "o" in "network", as a play on the kind of problem I'm trying to fix (a network that does notwerk -- err, "not work", I mean), and a self-deprecating joke of sorts as well. The short version of the name is nw, and for now that's what I'm planning to use as the command name. Amazingly, Debian doesn't have anything in APT called nw, so maybe it'll make it into the APT archives under that very short name some day.
It was originally called cnet, when it was a Ruby script. That was a boring name, and reminiscent of the name of a former business client's (I'm at least nominally a consultant, y'know).
The Debian project deserves a lot of credit for being such a bloody mess these days that it finally induced me to act. The amazing thing about it is that it's still better than other distributions I've tried recently, though clearly far worse than FreeBSD (which actually improves over time, oddly enough, instead of pursuing a screaming ride down greased razorblades into the flaming pits of some monotheistic religion's underworld).
Additional credit is due the Copyfree Initiative community  some of whom have been helpful in putting up with my shit and giving me help figuring out the undocumented or maldocumented expanses of the C language in a Unix-like environment (though "Unix-like" is an increasingly laughable term to use in relation to anything Linuxy, I'm afraid), others of whom have been good at critiquing my thinking in ways that helped push me toward doing this better, still others of whom make excellent gadflies, and more who just help keep me motivated to write code and do other fun stuff. They're good folks.
Thanks as well to my Significant Other for helping me hunt typos in my README. She found the one I didn't, and also made some really good crockpot turkey burritos for me. While she hasn't particularly inspired me specifically in relation to this project, I do find she is an inspiration in general, so I should probably thank her too -- especially considering she's sitting beside me as I type this.
I, Chad Perrin, wrote this craptastic program. The copyright is mine -- all mine. If you don't like the program, I commend you on your taste, though I hope to improve it substantially as I learn to not suck at C.
You may use, modify, redistribute, strip-mine, and otherwise deal in the software under the terms of the Open Works License v0.9.2  or any later version. If you want some other license, ask; I'm pretty flexible. If you want a more-restrictive license, cram my code sideways into your umbrella project and keep the OWL attached, because it's compatible with all kindsa other licenses.