25#ifndef TPORT_PLUGINS_H
27#define TPORT_PLUGINS_H
39#ifndef TPORT_STUN_SERVER_T
40#define TPORT_STUN_SERVER_T struct tport_stun_server_s
52 void *msg, ssize_t msglen,
53 void *addr, socklen_t addrlen);
54} tport_stun_server_vtable_t;
64struct sigcomp_compartment;
66typedef struct tport_comp_vtable_s tport_comp_vtable_t;
68struct tport_comp_vtable_s {
72 char const *vsc_compname;
73 size_t vsc_sizeof_context;
78 char const *comp_name,
83 tport_compressor_t *);
85 char const *(*vsc_comp_name)(tport_compressor_t
const *master_sc,
86 char const *compression,
91 int (*vsc_can_send_comp)(tport_compressor_t
const *);
92 int (*vsc_can_recv_comp)(tport_compressor_t
const *);
94 int (*vsc_set_comp_name)(tport_t
const *self,
95 tport_compressor_t
const *return_sc,
98 int (*vsc_sigcomp_option)(tport_t
const *self,
99 struct sigcomp_compartment *cc,
102 struct sigcomp_compartment *
103 (*vsc_sigcomp_compartment)(tport_t *self,
104 char const *name,
int namelen,
105 int create_if_needed);
107 struct sigcomp_compartment *
108 (*vsc_compartment_incref)(
struct sigcomp_compartment *cc);
110 void (*vsc_compartment_decref)(
struct sigcomp_compartment **pointer_to_cc);
112 int (*vsc_set_compartment)(tport_t *self,
113 tport_compressor_t *,
114 struct sigcomp_compartment *);
116 struct sigcomp_compartment *
117 (*vsc_get_compartment)(tport_t
const *self,
118 tport_compressor_t
const *);
120 int (*vsc_has_sigcomp_assigned)(tport_compressor_t
const *comp);
122 int (*vsc_sigcomp_accept)(tport_t *self,
123 tport_compressor_t
const *comp,
124 struct sigcomp_compartment *cc,
127 int (*vsc_delivered_using_udvm)(tport_t *tp,
129 struct sigcomp_udvm **return_pointer_to_udvm,
132 int (*vsc_sigcomp_close)(tport_t *self,
133 struct sigcomp_compartment *cc,
136 int (*vsc_sigcomp_lifetime)(tport_t *self,
137 struct sigcomp_compartment *,
138 unsigned lifetime_in_ms,
143 struct sigcomp_udvm **(*vsc_get_udvm_slot)(tport_t *self);
145 struct sigcomp_compartment *
146 (*vsc_sigcomp_assign_if_needed)(tport_t *self,
147 struct sigcomp_compartment *cc);
149 void (*vsc_accept_incomplete)(tport_t
const *self,
150 tport_compressor_t *sc,
153 int (*vsc_recv_comp)(tport_t
const *self,
154 tport_compressor_t *sc,
159 ssize_t (*vsc_send_comp)(tport_t
const *self,
163 struct sigcomp_compartment *cc,
164 tport_compressor_t *sc);
169SOFIAPUBFUN int tport_plug_in_comp(tport_comp_vtable_t
const *);
struct su_root_t su_root_t
TP_STACK_T tp_stack_t
Type of stack object.
Definition tport.h:71
TPORT_STUN_SERVER_T tport_stun_server_t
Safe type for tport server object.
Definition tport_plugins.h:43
int tport_plug_in_stun_server(tport_stun_server_vtable_t const *)
Plug in stun server.
Definition tport_stub_stun.c:274