bug-httptunnel
[Top][All Lists]
Advanced

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

GNU HTTPTUNNEL porting


From: makeit quick
Subject: GNU HTTPTUNNEL porting
Date: Tue, 9 Nov 2004 23:19:29 -0800 (PST)

Lars,
thank you for publishing the source of GNU HTTPTUNNEL.
It's a great starter code for other ideas I have
(tunneling L2 packets)
I'm trying to port your code to MS environement and
improve it (addin OpenSSL support), however I found
some major issues whe the way the code was written and
i would like to give you some feedback.

- as a general note - your code is arch dependent.
  I know MS is a mess, but it should be easier to port
the code if socket specifics and stuff could be
quarenteen in a small section.

- no function documentation, it is hard to understand
return values...

- "errno" is not a very good idea for propogating
error codes within your source, it is bad when using
threads, and it is best if the internal function which
is being wrapped will return a status code that is
finite and all conclusions could be based on it.

- if a socket returns 0 (peer closed connection) or
"-1", its practically the same thing. I found lots of
confusions in your code and had a very hard time
dealing with that. I cahnged the code to have a return
status of '0' if read returns no significant data (and
this solves the 'errno' problem).

- "ssize_t" is not a MS type, furthermore, i beleive
it is unsigned and can not be checed as "<0", so there
are some bugs that needs to be taken care...
also I beleive you should use 'int' unless dealing
with socket specific calls.

- "inline" is not a C standard and should be removed
unless your code becomes C++ (major problems compiling
the code). I also do not think code should be
inline...

- "const" is a C++ thing, and C misuses it, so either
the const should be removed of the code should be C++


it will be hard for me to send you a code because my
patches are mess. if you are not working on your code
at the moment i can try and make a complete refining
and send you my code. but this is only in the case you
are not working and modifying it at the same time.

also, it will be nice to know if you have a specific
test environement (Linux ?) so i can see if i can
install one (need time ... ;) )

regards
Moshe




                
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]