-Tue Jun 23 14:48:51 CDT 2009
+Thu Jun 25 13:42:28 CDT 2009
tport_vtable_t const tport_threadpool_vtable =
{
- "udp", tport_type_local,
- sizeof (tport_threadpool_t),
- tport_threadpool_init_primary,
- tport_threadpool_deinit_primary,
- NULL,
- NULL,
- 0, /* No secondary transports! */
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_dgram,
- tport_send_dgram,
- NULL,
- tport_thread_send
+ /* vtp_name */ "udp",
+ /* vtp_public */ tport_type_local,
+ /* vtp_pri_size */ sizeof (tport_threadpool_t),
+ /* vtp_init_primary */ tport_threadpool_init_primary,
+ /* vtp_deinit_primary */ tport_threadpool_deinit_primary,
+ /* vtp_wakeup_pri */ NULL,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ 0, /* No secondary transports! */
+ /* vtp_init_secondary */ NULL,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_dgram,
+ /* vtp_send */ tport_send_dgram,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ tport_thread_send,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ NULL,
+ /* vtp_secondary_timer */ NULL,
};
static int thrp_udp_init(su_root_t *, threadpool_t *);
tport_error_report(tp, tpd->tpd_errorcode, msg_addr(tpd->tpd_msg));
msg_ref_destroy(tpd->tpd_msg);
+
}
tport_vtable_t const tport_http_connect_vtable =
{
- "TCP", tport_type_connect,
- sizeof (tport_http_connect_t),
- tport_http_connect_init_primary,
- tport_http_connect_deinit_primary,
- NULL,
- tport_http_connect,
- sizeof (tport_http_connect_instance_t),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_stream,
- tport_send_stream,
- tport_http_deliver,
+ /* vtp_name */ "TCP",
+ /* vtp_public */ tport_type_connect,
+ /* vtp_pri_size */ sizeof (tport_http_connect_t),
+ /* vtp_init_primary */ tport_http_connect_init_primary,
+ /* vtp_deinit_primary */ tport_http_connect_deinit_primary,
+ /* vtp_wakeup_pri */ NULL,
+ /* vtp_connect */ tport_http_connect,
+ /* vtp_secondary_size */ sizeof (tport_http_connect_instance_t),
+ /* vtp_init_secondary */ NULL,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_stream,
+ /* vtp_send */ tport_send_stream,
+ /* vtp_deliver */ tport_http_deliver,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ NULL,
+ /* vtp_secondary_timer */ NULL,
};
static int tport_http_connect_init_primary(tport_primary_t *pri,
tport_vtable_t const tport_sctp_client_vtable =
{
- "sctp", tport_type_client,
- sizeof (tport_primary_t),
- tport_sctp_init_client,
- NULL,
- tport_accept,
- NULL,
- sizeof (tport_t),
- tport_sctp_init_secondary,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_sctp,
- tport_send_sctp,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_sctp_next_timer,
- tport_sctp_timer,
+ /* vtp_name */ "sctp",
+ /* vtp_public */ tport_type_client,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_sctp_init_client,
+ /* vtp_deinit_primary */ NULL,
+ /* vtp_wakeup_pri */ tport_accept,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ tport_sctp_init_secondary,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_sctp,
+ /* vtp_send */ tport_send_sctp,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ tport_sctp_next_timer,
+ /* vtp_secondary_timer */ tport_sctp_timer,
};
tport_vtable_t const tport_sctp_vtable =
{
- "sctp", tport_type_local,
- sizeof (tport_primary_t),
- tport_sctp_init_primary,
- NULL,
- tport_accept,
- NULL,
- sizeof (tport_t),
- tport_sctp_init_secondary,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_sctp,
- tport_send_sctp,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_sctp_next_timer,
- tport_sctp_timer,
+ /* vtp_name */ "sctp",
+ /* vtp_public */ tport_type_local,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_sctp_init_primary,
+ /* vtp_deinit_primary */ NULL,
+ /* vtp_wakeup_pri */ tport_accept,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ tport_sctp_init_secondary,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_sctp,
+ /* vtp_send */ tport_send_sctp,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ tport_sctp_next_timer,
+ /* vtp_secondary_timer */ tport_sctp_timer,
};
static int tport_sctp_init_primary(tport_primary_t *pri,
tport_vtable_t const tport_stun_vtable =
{
- "UDP", tport_type_stun,
- sizeof (tport_primary_t),
- tport_udp_init_stun,
- tport_udp_deinit_stun,
- NULL,
- NULL,
- sizeof (tport_t),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_dgram,
- tport_send_dgram,
- NULL,
- NULL,
- tport_stun_keepalive,
- tport_stun_response
+ /* vtp_name */ "UDP",
+ /* vtp_public */ tport_type_stun,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_udp_init_stun,
+ /* vtp_deinit_primary */ tport_udp_deinit_stun,
+ /* vtp_wakeup_pri */ NULL,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ NULL,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_dgram,
+ /* vtp_send */ tport_send_dgram,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ tport_stun_keepalive,
+ /* vtp_stun_response */ tport_stun_response,
+ /* vtp_next_secondary_timer*/ NULL,
+ /* vtp_secondary_timer */ NULL,
};
static int tport_udp_init_stun(tport_primary_t *pri,
tport_vtable_t const tport_tcp_vtable =
{
- "tcp", tport_type_local,
- sizeof (tport_primary_t),
- tport_tcp_init_primary,
- NULL,
- tport_accept,
- NULL,
- sizeof (tport_t),
- tport_tcp_init_secondary,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_stream,
- tport_send_stream,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_tcp_next_timer,
- tport_tcp_timer,
+ /* vtp_name */ "tcp",
+ /* vtp_public */ tport_type_local,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_tcp_init_primary,
+ /* vtp_deinit_primary */ NULL,
+ /* vtp_wakeup_pri */ tport_accept,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ tport_tcp_init_secondary,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_stream,
+ /* vtp_send */ tport_send_stream,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ tport_tcp_next_timer,
+ /* vtp_secondary_timer */ tport_tcp_timer,
};
tport_vtable_t const tport_tcp_client_vtable =
{
- "tcp", tport_type_client,
- sizeof (tport_primary_t),
- tport_tcp_init_client,
- NULL,
- NULL,
- NULL,
- sizeof (tport_t),
- tport_tcp_init_secondary,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_stream,
- tport_send_stream,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_tcp_next_timer,
- tport_tcp_timer,
+ /* vtp_name */ "tcp",
+ /* vtp_public */ tport_type_client,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_tcp_init_client,
+ /* vtp_deinit_primary */ NULL,
+ /* vtp_wakeup_pri */ NULL,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ tport_tcp_init_secondary,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_stream,
+ /* vtp_send */ tport_send_stream,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ tport_tcp_next_timer,
+ /* vtp_secondary_timer */ tport_tcp_timer,
};
static int tport_tcp_setsndbuf(int socket, int atleast);
tport_vtable_t const tport_udp_client_vtable =
{
- "udp", tport_type_client,
- sizeof (tport_primary_t),
- tport_udp_init_client,
- NULL,
- NULL,
- NULL,
- sizeof (tport_t),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_dgram,
- tport_send_dgram,
+ /* vtp_name */ "udp",
+ /* vtp_public */ tport_type_client,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_udp_init_client,
+ /* vtp_deinit_primary */ NULL,
+ /* vtp_wakeup_pri */ NULL,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ NULL,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_dgram,
+ /* vtp_send */ tport_send_dgram,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ NULL,
+ /* vtp_secondary_timer */ NULL,
};
tport_vtable_t const tport_udp_vtable =
{
- "udp", tport_type_local,
- sizeof (tport_primary_t),
- tport_udp_init_primary,
- NULL,
- NULL,
- NULL,
- sizeof (tport_t),
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- tport_recv_dgram,
- tport_send_dgram,
+ /* vtp_name */ "udp",
+ /* vtp_public */ tport_type_local,
+ /* vtp_pri_size */ sizeof (tport_primary_t),
+ /* vtp_init_primary */ tport_udp_init_primary,
+ /* vtp_deinit_primary */ NULL,
+ /* vtp_wakeup_pri */ NULL,
+ /* vtp_connect */ NULL,
+ /* vtp_secondary_size */ sizeof (tport_t),
+ /* vtp_init_secondary */ NULL,
+ /* vtp_deinit_secondary */ NULL,
+ /* vtp_shutdown */ NULL,
+ /* vtp_set_events */ NULL,
+ /* vtp_wakeup */ NULL,
+ /* vtp_recv */ tport_recv_dgram,
+ /* vtp_send */ tport_send_dgram,
+ /* vtp_deliver */ NULL,
+ /* vtp_prepare */ NULL,
+ /* vtp_keepalive */ NULL,
+ /* vtp_stun_response */ NULL,
+ /* vtp_next_secondary_timer*/ NULL,
+ /* vtp_secondary_timer */ NULL,
};
static void tport_check_trunc(tport_t *tp, su_addrinfo_t *ai);