Classes | Defines | Functions | Variables
ws_ssl.c File Reference
#include "net_skeleton.h"
#include "mongoose.h"
#include "ssl_wrapper.h"
Include dependency graph for ws_ssl.c:

Go to the source code of this file.

Classes

struct  config

Defines

#define C1_PEM   "certs/ws1_client.pem"
#define C2_PEM   "certs/ws2_client.pem"
#define CA1_PEM   "certs/ws1_ca.pem"
#define CA2_PEM   "certs/ws2_ca.pem"
#define S1_PEM   "certs/ws1_server.pem"
#define S2_PEM   "certs/ws2_server.pem"

Functions

static int ev_handler (struct mg_connection *conn, enum mg_event ev)
int main (void)
static void * serve_thread_func (void *param)
static void signal_handler (int sig_num)
static void * wrapper_thread_func (void *param)
static int ws_handler (struct mg_connection *conn, enum mg_event ev)

Variables

static int s_received_signal = 0
static struct config s_wrappers []

Define Documentation

#define C1_PEM   "certs/ws1_client.pem"

Definition at line 19 of file ws_ssl.c.

#define C2_PEM   "certs/ws2_client.pem"

Definition at line 22 of file ws_ssl.c.

#define CA1_PEM   "certs/ws1_ca.pem"

Definition at line 20 of file ws_ssl.c.

#define CA2_PEM   "certs/ws2_ca.pem"

Definition at line 23 of file ws_ssl.c.

#define S1_PEM   "certs/ws1_server.pem"

Definition at line 18 of file ws_ssl.c.

#define S2_PEM   "certs/ws2_server.pem"

Definition at line 21 of file ws_ssl.c.


Function Documentation

static int ev_handler ( struct mg_connection conn,
enum mg_event  ev 
) [static]

Definition at line 66 of file ws_ssl.c.

int main ( void  )

Definition at line 143 of file ws_ssl.c.

static void* serve_thread_func ( void *  param) [static]

Definition at line 117 of file ws_ssl.c.

static void signal_handler ( int  sig_num) [static]

Definition at line 61 of file ws_ssl.c.

static void* wrapper_thread_func ( void *  param) [static]

Definition at line 127 of file ws_ssl.c.

static int ws_handler ( struct mg_connection conn,
enum mg_event  ev 
) [static]

Definition at line 99 of file ws_ssl.c.


Variable Documentation

int s_received_signal = 0 [static]

Definition at line 59 of file ws_ssl.c.

struct config s_wrappers[] [static]
Initial value:
 {
  {
    "ws1:80",
    "tcp://127.0.0.1:7001",
    "tcp://127.0.0.1:7001",
    "tcp://127.0.0.1:9001"
  },
  {
    "ws1:443",
    "ssl://127.0.0.1:7002:" S1_PEM,
    "tcp://127.0.0.1:7002",
    "tcp://127.0.0.1:9001"
  },
  {
    "ws2:80",
    "tcp://127.0.0.1:7003",
    "tcp://127.0.0.1:7003",
    "ssl://127.0.0.1:9002:" C2_PEM ":" CA2_PEM
  },
  {
    "ws2:443",
    "ssl://127.0.0.1:7004:" S2_PEM,
    "tcp://127.0.0.1:7004",
    "ssl://127.0.0.1:9002:" C2_PEM ":" CA2_PEM
  },
}

Definition at line 32 of file ws_ssl.c.



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:09