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

Portability issues...



Paul asked me to give a brief summary about my finding thus far.

I have been working on getting the onion router ported to various OSes. So far I have been successful in getting the code ported to the following platforms:

1) FreeBSD 4.8
2) Solaris 8.0 (intel)
3) Windows (w/cygwin)

I was using the pre-topic code-base on these ports, but I don't expect there to be any surprises with the most current code-base. Here are the major portability issues which I have discovered thus far:

1) Not all platforms have the stdint.h include file.

The solution I have found for this problem is to download the gstdint.h project from http://freshmeat.net/projects/gstdint/?topic_id=46 and use gstdint.h on those platforms that do not have an stdint.h file.


2) The most recent OpenSSL library returns an error when you attempt to use the PRNG that has not been sufficiently seeded. Our code does not seed the PRNG before using it and therefore will not run with the latest OpenSSL library.

The solution to this problem is seed the PRNG of course. I found the following snippet of code taken from the stunnel project: http://www.onsight.com/faq/stunnel/sup/prng-pk.txt
It is their random_init() function we can use to properly seed the PRNG.

3) Solaris did not have a inet_aton() function available!

The simple solution here was to use the deprecated inet_addr() function instead on Solaris.

-------

I have only done tests with FreeBSD so far. For Solaris and Windows, I merely got it to compile. I attempted to run the Onion Router under Solaris and that is when I discovered issue #2 above. Basically while I was waiting for software downloads and installs for the Solaris box I managed to get the onion router to compile under Windows with Cygwin (the only problem here was the missing stdint.h file). All in all, I'd say the onion router code is extremely portable and after the above issues have been incorporated into our code base I would expect it to compile under most UNIX platforms.