Functions

eurephiadb_session.h File Reference

Handles creating user sessions, which is unique per openvpn connection. More...

#include <eurephiadb_session_struct.h>
Include dependency graph for eurephiadb_session.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

eurephiaSESSIONeDBopen_session_seed (eurephiaCTX *ctx, const char *digest, const char *cname, const char *username, const char *vpnipaddr, const char *vpnipmask, const char *remipaddr, const char *remport)
eurephiaSESSIONeDBopen_session_macaddr (eurephiaCTX *ctx, const char *macaddr)

Detailed Description

Handles creating user sessions, which is unique per openvpn connection.

Author:
David Sommerseth <dazo@users.sourceforge.net>
Date:
2008-08-06

Definition in file eurephiadb_session.h.


Function Documentation

eurephiaSESSION* eDBopen_session_macaddr ( eurephiaCTX ctx,
const char *  macaddr 
)

Open an existing eurephia session based on a MAC address. This function is only used when there is not enough information to generate a session seed and when the MAC address is available. Usually this only happens when the client has disconnected and the session is about to be marked as closed.

Parameters:
ctx eurephiaCTX
macaddr MAC address of the client
Returns:
returns a eurephiaSESSION pointer on success, otherwise NULL.

< Messages intended when debugging. Only for log level > 10

< Alias for LOG_CRITICAL

< Operation failed and might have been aborted. Log level always 0

< Messages intended when debugging. Only for log level > 10

Definition at line 255 of file eurephiadb_session.c.

Here is the caller graph for this function:

eurephiaSESSION* eDBopen_session_seed ( eurephiaCTX ctx,
const char *  digest,
const char *  cname,
const char *  username,
const char *  vpnipaddr,
const char *  vpnipmask,
const char *  remipaddr,
const char *  remport 
)

Generates a new eurephia session. Session key will be created if session seed (input params) are not known. If session seed is known, the already generated session key will be used.

Parameters:
ctx eurephiaCTX
digest Contains the clients SHA1 fingerprint / digest
cname Contains the clients X.509 Common Name field
username The user name of the client
vpnipaddr The IP address of the VPN connection of the client
vpnipmask The IP address' network mask
remipaddr The public IP address the client is connecting from
remport The remote port of the client connection
Returns:
returns a eurephiaSESSION pointer on success, otherwise NULL.

< Messages intended when debugging. Only for log level > 10

< Maximum allowed length of the certificate digest/fingerprint

< Maximum allowed length of X.509 Common Name field

< Maximum allowed length of the username

< Maximum allowed length of the clients VPN IP address

< Maximum allowed length of the clients VPN netmask

< Maximum allowed length of the trusted public IP of the client

< Maximum allowed length of the clients OpenVPN port

< Messages intended when debugging. Only for log level > 10

< Messages intended when debugging. Only for log level > 10

< Alias for LOG_PANIC

< Action failed an program could not continue to run. Log level always 0

< Alias for LOG_FATAL

< Operation failed and cannot continue. Log level always < 2

< Alias for LOG_FATAL

< Operation failed and cannot continue. Log level always < 2

< The session is newly created

< The session is reloaded from a previously saved session

< Messages intended when debugging. Only for log level > 10

Definition at line 74 of file eurephiadb_session.c.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines