On Sat, 3 Jul 2004, James Yonan wrote:
On Saturday 03 July 2004 15:13, Brandon Knitter wrote:Where do I start? Are the namedpipe hooks into the OpenVPN service built? I'm not too familiar with named pipes on Windows (done a bit on *nix), but I'm sure it can't be too hard. I guess what I'd need to know are the command to send to the named pipe, and also what I can get from the named pipe in regards to status and such.
This sounds good to me, and will allow us to start with a basic set of "commands", and add more as we find the need for a specific function.
One little wonder though, is it good to have a bi-directional protocol over a single socket. Ofcource replys to command can go over the same channel, but if both the server and the client is allowed to "start the conversation", how do we handle the case when both the server and client
sends a command at the same time.
How will we know if what we recieve is an answer to our command, or a command from the server?
In addition to the information given by SIGUSR2 I'd would like to be able to get current state of the the link. We should be able to define several STATEs during the establishing of the connection. Like:
STATE_WAIT_FIRST_RESPONE - When we have tried to connect to the remote peer but still not recieved any answer.
STATE_WAIT_AUTH - We have recieved some answer from the remove peer, but not yet fully authenticated. (This state will never happend when using static keys.)
STATE_WAIT_PUSH - We wait for options to be pushed from the server.
STATE_WAIT_SETIP - We are waiting for the system to set the ip address.
STATE_WAIT_APPLY_SETTINGS - We are waiting for the system to set other pushed parameters like routes.
STATE_CONNECTED - We are fully connected!
I have not though through the absolute meaing of those states or if the names are any good, but it gives you an idea of what kind of information I'd like to get.
The reason for several states during the init is ofcource that it will allow me to set timeout values for every step and report to the user at what step the connection failed.
I suppose it will be best if the gui client query the server for the current state.
-- _____________________________________________________________ Mathias Sundman (^) ASCII Ribbon Campaign NILINGS AB X NO HTML/RTF in e-mail Tel: +46-(0)8-666 32 28 / \ NO Word docs in e-mail