Re: nm-openswan - update

Nice to hear others had use for the code (if it actually worked ;) ).

When I started, I developed in Anjuta on fedora 6.

I was mainly interested in the symbol browser and debugging features of Anjuta. Especially when I started experimenting with libwhack integration.

It wasn't long into that experiment when I realized a problem that prevented me from proceeding down that path, and so I backed off those code mods and went back to calling whack from my app (see the version magic #define in libwhack.h from the openswan src tarball ). The problem, simply, was that it introduced a version dependancy between nm-os and openswan that I felt was unacceptable.

It was then that I started re-factoring the code to clean up the mess and sort out some logic bugs. Once the logic was fixed my code compiled, and that's when I ran into the type-casting issues with my gui objects, and that problem stalled the entire project -- there's only so much GUI api doc u can read and with my new job, very little time to do any actual debugging.

I eventually moved my dev environment to a new laptop, and it took some time before I could get NM-OS compiling again (Even though the laptop was also running fedora 6). My bad. This wasn't a dist code tar ball that would simply "compile". this was a snapshot of my development workspace as it stood at that time.

I've continued to work on the code in my limited spare time under anjuta with mixed results. I'm also new to GTK coding and I suck at it which is why is so slow going.

Since starting my new job, I've been forced to learn Java, and specifically J2EE programming in a hurry.

As with most Java coders, Eclipse is my IDE of choice for many reasons. In fact, I use Redhat developer studio beta2 (you can guess which j2ee server I'm learning).

Now I just recently discovered that Eclipse has a plugin to support C/C++ development.

I'm working on getting nm-openswan building under eclipse, and my reason is simple: it's got a killer debugger and awesome ide tools. the symbols browser alone chews anjuta. If I succeed, then I'll package up my workspace and mail that out. In the mean time, all I can say is keep plugging away at anjuta.

Once I get back to code that actually runs (at least some of the time) I'll send another tarball out, one I'm not ashamed to put my name on. I haven't forgotten the project, other priorities just 'butted' in line. Sorry.

Things to try under anjuta:

- don't use anjuta to compile. I use it for editing and debugging only. I usually run make from the cmd line. - run `make clean && make && make install ` from the top-level of the src dir. - explore the src dir to /usr/local/src (that's the path I used to store my dev src).

if you're not familiar with the inner workings of NetworkManager, get the source and start reading the code / api docs. Certain files have to be visible in specific locations for the NetworkManager to "see" the new vpn service. One in particular that comes to mind is in /etc/NetworkManager/vpn (or something to that effect).

My install script settings place my service configuration file in /usr/local/etc/NetworkManager/vpn/<blahbah>. As of NetowrkManager0.6.x it didn't scan that folder automatically, so after 'make install' on a new system, I would have to symlink my file to /etc/NetworkManager/vpn/.... before restarting NetworkManager daemon to have it pickup the service. The logs of the daemon will tell you if it knows about the new vpn service on a restart if you turn up the logging.

Not sure if the same is true for the 0.7 code branch. Maybe in a few months (when things finally settle down at work), I'll port my code to 0.7 code base and get it compiling again. I know some of the stuff I wanted to do wasn't possible until planned changes to the vpn api were implemented (to manage multiple concurrent vpn connections, etc...). Maybe others on the list can update you on the status of that change.

For now, I tinker with my debugger from time to time on Fedora 6, still using the old 0.6.x code base that I started with, just until I get the GUI bugs worked out.

To debug in anjuta, there's a process to be followed. Remember, this is shared library, not a binary executable, that executable is Nm daemon itself which listens on the DBUS for vpn service request messages (amongst many other things). So, first you need to get nm "aware" of the nm-openswan vpn service (see above). You'll know it's working, when you can add the "IPsec" type of vpn connection through the vpn manager interface. Selecting this will start a wizard which eventually calls out to my shared library to configure the connection details. If you're debugging the shared library, it's at this point, you're debugger will go active (when nm tries to load my library and call the factory method to instantiate the configuration window). This is where the library tries to build a GUI and crashes.

I Just recently I realized that I may be creating my config window entirely wrong. I'm buidling a top-level window when I should be adding elements to the wizard window (I think). I'm going to revisit that code soon to verify this. Again, I'm new to coding these, more obscure api's, so these are clearly beginner style mistakes.

Anyway, I hope there's some good info in here for you and anyone else that tried to compile the code I released. I'll send another update to the mailing list when I've got something good to report.



Turbo Fredriksson wrote:
Quoting steve <keyhman gmail com>:


i've received a few emails lately asking for "what i have". What I
have is a mess right now.

My job just hasn't given me any time to work on the code so it's
pretty much been idle for months now. I guess it's time to let others
take a whack at it (no pun intended).

I rewrote the service handler code and the UI implementation, but my
ui implementation is very buggy, and segfaults when nm-vpn-manager
tries to load the library and generate the UI which is where the
project stalled while I took on a new job.

I've attached the 0.1a tarball to this email. Enjoy.

Hi, I'm one of those that had been bugging you about this. As usual,
time (or the availability of it :) is not what it used to...

I've had a couple of stabs at trying to understand the code and get
it working, but I've never coded GTK before, so...

Have you had any more time to take a look at it?

Have any idea how to debug it? Trying to run nm-applet through gdb
don't seem to help and since the properties window is a library,
that makes it even more difficult...

Also, I installed Anjuta (v1.2.4a) but that doesn't seem to be able
to open the project file (nm-openswan.anjuta)...

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