37#ifdef HAVE_SYS_INOTIFY_H
38#include <sys/inotify.h>
71 msg(
D_MULTI_LOW,
"MULTI TCP: new incoming client address matches existing client address -- new client takes precedence");
162 dmsg(
D_MULTI_TCP,
"MULTI TCP: transmitting previously deferred packet");
static void buf_reset(struct buffer *buf)
static void gc_free(struct gc_arena *a)
static struct gc_arena gc_new(void)
static void event_del(struct event_set *es, event_t event)
Interface functions to the internal and external multiplexers.
struct hash_element * hash_lookup_fast(struct hash *hash, struct hash_bucket *bucket, const void *key, uint32_t hv)
static uint32_t hash_value(const struct hash *hash, const void *key)
static void hash_add_fast(struct hash *hash, struct hash_bucket *bucket, const void *key, uint32_t hv, void *value)
void mbuf_add_item(struct mbuf_set *ms, const struct mbuf_item *item)
struct mbuf_buffer * mbuf_alloc_buf(const struct buffer *buf)
void mbuf_free_buf(struct mbuf_buffer *mb)
bool mbuf_extract_item(struct mbuf_set *ms, struct mbuf_item *item)
void mbuf_free(struct mbuf_set *ms)
struct mbuf_set * mbuf_init(unsigned int size)
static bool mbuf_defined(const struct mbuf_set *ms)
bool mroute_extract_openvpn_sockaddr(struct mroute_addr *addr, const struct openvpn_sockaddr *osaddr, bool use_port)
const char * mroute_addr_print(const struct mroute_addr *ma, struct gc_arena *gc)
void multi_tcp_instance_specific_free(struct multi_instance *mi)
struct multi_instance * multi_create_instance_tcp(struct multi_context *m, struct link_socket *sock)
void multi_tcp_delete_event(struct multi_io *multi_io, event_t event)
bool multi_tcp_instance_specific_init(struct multi_context *m, struct multi_instance *mi)
bool multi_tcp_process_outgoing_link(struct multi_context *m, bool defer, const unsigned int mpp_flags)
bool multi_tcp_process_outgoing_link_ready(struct multi_context *m, struct multi_instance *mi, const unsigned int mpp_flags)
void multi_tcp_dereference_instance(struct multi_io *multi_io, struct multi_instance *mi)
struct multi_instance * multi_create_instance(struct multi_context *m, const struct mroute_addr *real, struct link_socket *sock)
bool multi_process_post(struct multi_context *m, struct multi_instance *mi, const unsigned int flags)
Perform postprocessing of a VPN tunnel instance.
void multi_close_instance(struct multi_context *m, struct multi_instance *mi, bool shutdown)
void multi_assign_peer_id(struct multi_context *m, struct multi_instance *mi)
Assigns a peer-id to a a client and adds the instance to the the instances array of the multi_context...
Header file for server-mode related structures and functions.
static void set_prefix(struct multi_instance *mi)
static void clear_prefix(void)
static struct multi_instance * multi_process_outgoing_link_pre(struct multi_context *m)
static bool multi_process_outgoing_link_dowork(struct multi_context *m, struct multi_instance *mi, const unsigned int mpp_flags)
static event_t socket_event_handle(const struct link_socket *sock)
#define LS_MODE_TCP_ACCEPT_FROM
Wrapper structure for dynamically allocated memory.
struct link_socket ** link_sockets
struct context_2 c2
Level 2 context.
struct options options
Options loaded from command line or configuration file.
Garbage collection arena used to keep track of dynamically allocated memory.
struct openvpn_sockaddr dest
struct link_socket_actual actual
struct link_socket_addr * lsa
struct link_socket_info info
struct mbuf_buffer * buffer
struct multi_instance * instance
Main OpenVPN server state structure.
struct hash * hash
VPN tunnel instances indexed by real address of the remote peer.
struct context top
Storage structure for process-wide configuration.
Server-mode state structure for one single VPN tunnel.
struct mbuf_set * tcp_link_out_deferred
struct mroute_addr real
External network address of the remote peer.
struct context context
The context structure storing state for this VPN tunnel.
union openvpn_sockaddr::@20 addr