tls_ct_wrq.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (C) 2010 iptelorg GmbH
00003  *
00004  * Permission to use, copy, modify, and distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
00011  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00013  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00014  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 
00026 /*
00027  * History:
00028  * --------
00029  *  2010-03-31  initial version (andrei)
00030 */
00031 
00032 #ifndef __tls_ct_wrq_h
00033 #define __tls_ct_wrq_h
00034 
00035 #include "tls_ct_q.h"
00036 #include "tls_server.h"
00037 #include "../../tcp_conn.h"
00038 
00039 
00040 
00045 int tls_ct_wq_init();
00046 
00050 void tls_ct_wq_destroy();
00051 
00052 
00057 unsigned int tls_ct_wq_total_bytes();
00058 
00059 #define tls_ct_wq_empty(tc_q) (*(tc_q)==0 || (*(tc_q))->first==0)
00060 #define tls_ct_wq_non_empty(bq) (*(tc_q) && (*(tc_q))->first!=0)
00061 
00074 int tls_ct_wq_flush(struct tcp_connection* c, tls_ct_q** tc_q,
00075                                         int* flags, int* ssl_err);
00076 
00089 int tls_ct_wq_add(tls_ct_q** ct_q, const void* data, unsigned int size);
00090 
00098 unsigned int tls_ct_wq_free(tls_ct_q** ct_q);
00099 
00100 #endif /*__tls_ct_wrq_h*/
00101 
00102 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */