OpenVPN
Functions
dco_win.c File Reference
#include "syshead.h"
#include "dco.h"
#include "tun.h"
#include "crypto.h"
#include "ssl_common.h"
#include "openvpn.h"
#include <bcrypt.h>
#include <winsock2.h>
#include <ws2tcpip.h>
Include dependency graph for dco_win.c:

Go to the source code of this file.

Functions

struct tuntap create_dco_handle (const char *devname, struct gc_arena *gc)
 
bool ovpn_dco_init (int mode, dco_context_t *dco)
 
int open_tun_dco (struct tuntap *tt, openvpn_net_ctx_t *ctx, const char *dev)
 
static void dco_wait_ready (DWORD idx)
 
void dco_start_tun (struct tuntap *tt)
 
static void dco_connect_wait (HANDLE handle, OVERLAPPED *ov, int timeout, struct signal_info *sig_info)
 
void dco_create_socket (HANDLE handle, struct addrinfo *remoteaddr, bool bind_local, struct addrinfo *bind, int timeout, struct signal_info *sig_info)
 
int dco_new_peer (dco_context_t *dco, unsigned int peerid, int sd, struct sockaddr *localaddr, struct sockaddr *remoteaddr, struct in_addr *remote_in4, struct in6_addr *remote_in6)
 
int dco_del_peer (dco_context_t *dco, unsigned int peerid)
 
int dco_set_peer (dco_context_t *dco, unsigned int peerid, int keepalive_interval, int keepalive_timeout, int mss)
 
int dco_new_key (dco_context_t *dco, unsigned int peerid, int keyid, dco_key_slot_t slot, const uint8_t *encrypt_key, const uint8_t *encrypt_iv, const uint8_t *decrypt_key, const uint8_t *decrypt_iv, const char *ciphername)
 
int dco_del_key (dco_context_t *dco, unsigned int peerid, dco_key_slot_t slot)
 
int dco_swap_keys (dco_context_t *dco, unsigned int peer_id)
 
bool dco_available (int msglevel)
 
const char * dco_version_string (struct gc_arena *gc)
 
int dco_do_read (dco_context_t *dco)
 
int dco_get_peer_stats_multi (dco_context_t *dco, struct multi_context *m)
 
int dco_get_peer_stats (struct context *c)
 
void dco_event_set (dco_context_t *dco, struct event_set *es, void *arg)
 
const char * dco_get_supported_ciphers ()
 

Function Documentation

◆ create_dco_handle()

struct tuntap create_dco_handle ( const char *  devname,
struct gc_arena gc 
)

Definition at line 45 of file dco_win.c.

References tun_open_device(), tuntap::windows_driver, and WINDOWS_DRIVER_DCO.

Referenced by create_socket_dco_win().

◆ dco_available()

bool dco_available ( int  msglevel)

Definition at line 360 of file dco_win.c.

References msg.

◆ dco_connect_wait()

static void dco_connect_wait ( HANDLE  handle,
OVERLAPPED *  ov,
int  timeout,
struct signal_info sig_info 
)
static

◆ dco_create_socket()

void dco_create_socket ( HANDLE  handle,
struct addrinfo *  remoteaddr,
bool  bind_local,
struct addrinfo *  bind,
int  timeout,
struct signal_info sig_info 
)

◆ dco_del_key()

int dco_del_key ( dco_context_t dco,
unsigned int  peerid,
dco_key_slot_t  slot 
)

Definition at line 336 of file dco_win.c.

References D_DCO, and msg.

◆ dco_del_peer()

int dco_del_peer ( dco_context_t dco,
unsigned int  peerid 
)

Definition at line 257 of file dco_win.c.

References D_DCO_DEBUG, M_ERRNO, M_WARN, msg, and OVPN_IOCTL_DEL_PEER.

◆ dco_do_read()

int dco_do_read ( dco_context_t dco)

Definition at line 418 of file dco_win.c.

References ASSERT.

Referenced by process_incoming_dco().

◆ dco_event_set()

void dco_event_set ( dco_context_t dco,
struct event_set es,
void *  arg 
)

Definition at line 462 of file dco_win.c.

References ASSERT.

Referenced by io_wait_dowork(), and multi_tcp_wait().

◆ dco_get_peer_stats()

int dco_get_peer_stats ( struct context c)

◆ dco_get_peer_stats_multi()

int dco_get_peer_stats_multi ( dco_context_t dco,
struct multi_context m 
)

Definition at line 426 of file dco_win.c.

Referenced by multi_print_status(), and setenv_stats().

◆ dco_get_supported_ciphers()

const char* dco_get_supported_ciphers ( )

Definition at line 469 of file dco_win.c.

References status.

Referenced by options_postprocess_setdefault_ncpciphers().

◆ dco_new_key()

int dco_new_key ( dco_context_t dco,
unsigned int  peerid,
int  keyid,
dco_key_slot_t  slot,
const uint8_t *  encrypt_key,
const uint8_t *  encrypt_iv,
const uint8_t *  decrypt_key,
const uint8_t *  decrypt_iv,
const char *  ciphername 
)

◆ dco_new_peer()

int dco_new_peer ( dco_context_t dco,
unsigned int  peerid,
int  sd,
struct sockaddr *  localaddr,
struct sockaddr *  remoteaddr,
struct in_addr *  remote_in4,
struct in6_addr *  remote_in6 
)

Definition at line 248 of file dco_win.c.

References D_DCO_DEBUG, and msg.

◆ dco_set_peer()

int dco_set_peer ( dco_context_t dco,
unsigned int  peerid,
int  keepalive_interval,
int  keepalive_timeout,
int  mss 
)

◆ dco_start_tun()

void dco_start_tun ( struct tuntap tt)

◆ dco_swap_keys()

int dco_swap_keys ( dco_context_t dco,
unsigned int  peer_id 
)

Definition at line 345 of file dco_win.c.

References D_DCO_DEBUG, M_ERR, msg, and OVPN_IOCTL_SWAP_KEYS.

◆ dco_version_string()

const char* dco_version_string ( struct gc_arena gc)

◆ dco_wait_ready()

static void dco_wait_ready ( DWORD  idx)
static

Definition at line 69 of file dco_win.c.

References D_DCO_DEBUG, and msg.

Referenced by dco_start_tun().

◆ open_tun_dco()

int open_tun_dco ( struct tuntap tt,
openvpn_net_ctx_t ctx,
const char *  dev 
)

Definition at line 62 of file dco_win.c.

References ASSERT.

◆ ovpn_dco_init()

bool ovpn_dco_init ( int  mode,
dco_context_t dco 
)

Definition at line 56 of file dco_win.c.

Referenced by do_open_tun().