Convert old-style function definitions

This commit is contained in:
William Robinet 2023-08-14 10:57:16 +02:00
parent 4799524de1
commit 00a631a28d
No known key found for this signature in database
GPG key ID: 003FA3DF74C7A949
25 changed files with 440 additions and 878 deletions

View file

@ -68,9 +68,8 @@ struct network_handler_ {
proto_ctx *ctx;
};
int network_handler_create(mod,handlerp)
proto_mod *mod;
n_handler **handlerp;
int
network_handler_create (proto_mod *mod, n_handler **handlerp)
{
int r,_status;
n_handler *handler=0;
@ -91,9 +90,8 @@ int network_handler_create(mod,handlerp)
return(_status);
}
int network_handler_destroy(mod,handlerp)
proto_mod *mod;
n_handler **handlerp;
int
network_handler_destroy (proto_mod *mod, n_handler **handlerp)
{
n_handler *handler=0;
if(!handlerp || !*handlerp)
@ -107,12 +105,8 @@ int network_handler_destroy(mod,handlerp)
return(0);
}
int network_process_packet(handler,timestamp,data,length,af)
n_handler *handler;
struct timeval *timestamp;
UCHAR *data;
int length;
int af;
int
network_process_packet (n_handler *handler, struct timeval *timestamp, UCHAR *data, int length, int af)
{
int r;
int hlen;
@ -208,9 +202,8 @@ int network_process_packet(handler,timestamp,data,length,af)
return(0);
}
int packet_copy(in,out)
packet *in;
packet **out;
int
packet_copy (packet *in, packet **out)
{
int _status;
@ -240,8 +233,8 @@ int packet_copy(in,out)
return(_status);
}
int packet_destroy(p)
packet *p;
int
packet_destroy (packet *p)
{
if(!p)
return(0);
@ -251,10 +244,8 @@ int packet_destroy(p)
return(0);
}
int timestamp_diff(t1,t0,diff)
struct timeval *t1;
struct timeval *t0;
struct timeval *diff;
int
timestamp_diff (struct timeval *t1, struct timeval *t0, struct timeval *diff)
{
long d;
@ -280,9 +271,8 @@ int timestamp_diff(t1,t0,diff)
int lookuphostname(so_st,namep)
struct sockaddr_storage *so_st;
char **namep;
int
lookuphostname (struct sockaddr_storage *so_st, char **namep)
{
int r = 1;
*namep = calloc(1, NI_MAXHOST);
@ -304,9 +294,8 @@ int lookuphostname(so_st,namep)
return(0);
}
int addrtotext(so_st,namep)
struct sockaddr_storage *so_st;
char **namep;
int
addrtotext (struct sockaddr_storage *so_st, char **namep)
{
*namep = calloc(1, NI_MAXHOST);
void *addr = NULL;

View file

@ -47,12 +47,8 @@
#include "network.h"
int create_proto_handler(mod,ctx,handlerp,conn,first_packet)
proto_mod *mod;
proto_ctx *ctx;
proto_handler **handlerp;
tcp_conn *conn;
struct timeval *first_packet;
int
create_proto_handler (proto_mod *mod, proto_ctx *ctx, proto_handler **handlerp, tcp_conn *conn, struct timeval *first_packet)
{
int r,_status;
proto_handler *handler=0;
@ -74,8 +70,8 @@ int create_proto_handler(mod,ctx,handlerp,conn,first_packet)
return(_status);
}
int destroy_proto_handler(handlerp)
proto_handler **handlerp;
int
destroy_proto_handler (proto_handler **handlerp)
{
if(!handlerp || !*handlerp)
return(0);

View file

@ -63,8 +63,8 @@ extern int conn_ttl;
static int zero_conn PROTO_LIST((tcp_conn *conn));
static int zero_conn(conn)
tcp_conn *conn;
static int
zero_conn (tcp_conn *conn)
{
memset(conn,0,sizeof(tcp_conn));
return(0);
@ -131,8 +131,8 @@ int tcp_create_conn(tcp_conn **connp,struct sockaddr_storage *i_addr,
return(0);
}
int tcp_destroy_conn(conn)
tcp_conn *conn;
int
tcp_destroy_conn (tcp_conn *conn)
{
conn_struct *c=conn->backptr;
@ -161,7 +161,8 @@ int tcp_destroy_conn(conn)
return(0);
}
int clean_old_conn() {
int
clean_old_conn (void) {
conn_struct *conn;
tcp_conn *tcpconn;
struct timeval dt;
@ -184,7 +185,8 @@ int clean_old_conn() {
return i;
}
int destroy_all_conn() {
int
destroy_all_conn (void) {
int i = 0;
while(first_conn) {
i++;
@ -193,8 +195,8 @@ int destroy_all_conn() {
return i;
}
int free_tcp_segment_queue(seg)
segment *seg;
int
free_tcp_segment_queue (segment *seg)
{
segment *tmp;
@ -208,9 +210,8 @@ int free_tcp_segment_queue(seg)
return(0);
}
int copy_tcp_segment_queue(out,in)
segment **out;
segment *in;
int
copy_tcp_segment_queue (segment **out, segment *in)
{
int r,_status;
segment *base=0;

View file

@ -71,10 +71,8 @@ static int new_connection PROTO_LIST((proto_mod *handler,proto_ctx *ctx,
static int print_tcp_packet PROTO_LIST((packet *p));
int STRIM PROTO_LIST((UINT4 _seq,segment *s));
int process_tcp_packet(handler,ctx,p)
proto_mod *handler;
proto_ctx *ctx;
packet *p;
int
process_tcp_packet (proto_mod *handler, proto_ctx *ctx, packet *p)
{
int r,_status;
int direction;
@ -165,11 +163,8 @@ int process_tcp_packet(handler,ctx,p)
return(_status);
}
static int new_connection(handler,ctx,p,connp)
proto_mod *handler;
proto_ctx *ctx;
packet *p;
tcp_conn **connp;
static int
new_connection (proto_mod *handler, proto_ctx *ctx, packet *p, tcp_conn **connp)
{
int r,_status;
tcp_conn *conn=0;
@ -227,12 +222,8 @@ static int new_connection(handler,ctx,p,connp)
}
*/
static int process_data_segment(conn,handler,p,stream,direction)
tcp_conn *conn;
proto_mod *handler;
packet *p;
stream_data *stream;
int direction;
static int
process_data_segment (tcp_conn *conn, proto_mod *handler, packet *p, stream_data *stream, int direction)
{
int r,_status;
tcp_seq seq,right_edge;
@ -393,8 +384,8 @@ static int process_data_segment(conn,handler,p,stream,direction)
return(_status);
}
static int print_tcp_packet(p)
packet *p;
static int
print_tcp_packet (packet *p)
{
char *src=0,*dst=0;
@ -441,9 +432,8 @@ static int print_tcp_packet(p)
return(0);
}
int STRIM(_seq,s)
UINT4 _seq;
segment *s;
int
STRIM (UINT4 _seq, segment *s)
{
int l;
int off;

View file

@ -62,10 +62,8 @@ int debug(int class,char *format,...)
return(0);
}
int xdump(name,data,len)
char *name;
UCHAR *data;
int len;
int
xdump (char *name, UCHAR *data, int len)
{
int i;

View file

@ -83,8 +83,8 @@ UINT4 hash_compute PROTO_LIST((char *key,int len,int size));
static int copy_assoc_chain PROTO_LIST((r_assoc_el **newp,
r_assoc_el *old));
int r_assoc_create(assocp)
r_assoc **assocp;
int
r_assoc_create (r_assoc **assocp)
{
r_assoc *assoc=0;
int _status;
@ -108,8 +108,8 @@ int r_assoc_create(assocp)
return(_status);
}
int r_assoc_destroy(assocp)
r_assoc **assocp;
int
r_assoc_destroy (r_assoc **assocp)
{
r_assoc *assoc;
int i;
@ -127,8 +127,8 @@ int r_assoc_destroy(assocp)
return(0);
}
static int destroy_assoc_chain(chain)
r_assoc_el *chain;
static int
destroy_assoc_chain (r_assoc_el *chain)
{
r_assoc_el *nxt;
@ -147,9 +147,8 @@ static int destroy_assoc_chain(chain)
return(0);
}
static int copy_assoc_chain(newp,old)
r_assoc_el **newp;
r_assoc_el *old;
static int
copy_assoc_chain (r_assoc_el **newp, r_assoc_el *old)
{
r_assoc_el *new=0,*ptr,*tmp;
int r,_status;
@ -197,11 +196,8 @@ static int copy_assoc_chain(newp,old)
return(_status);
}
static int r_assoc_fetch_bucket(assoc,key,len,bucketp)
r_assoc *assoc;
char *key;
int len;
r_assoc_el **bucketp;
static int
r_assoc_fetch_bucket (r_assoc *assoc, char *key, int len, r_assoc_el **bucketp)
{
UINT4 hash_value;
r_assoc_el *bucket;
@ -218,11 +214,8 @@ static int r_assoc_fetch_bucket(assoc,key,len,bucketp)
return(R_NOT_FOUND);
}
int r_assoc_fetch(assoc,key,len,datap)
r_assoc *assoc;
char *key;
int len;
void **datap;
int
r_assoc_fetch (r_assoc *assoc, char *key, int len, void **datap)
{
r_assoc_el *bucket;
int r;
@ -292,9 +285,8 @@ int r_assoc_insert(assoc,key,len,data,copy,destroy,how)
return(_status);
}
int r_assoc_copy(newp,old)
r_assoc **newp;
r_assoc *old;
int
r_assoc_copy (r_assoc **newp, r_assoc *old)
{
int r,_status,i;
r_assoc *new;
@ -320,9 +312,8 @@ int r_assoc_copy(newp,old)
return(_status);
}
int r_assoc_init_iter(assoc,iter)
r_assoc *assoc;
r_assoc_iterator *iter;
int
r_assoc_init_iter (r_assoc *assoc, r_assoc_iterator *iter)
{
int i;
@ -344,11 +335,8 @@ int r_assoc_init_iter(assoc,iter)
return(0);
}
int r_assoc_iter(iter,key,keyl,val)
r_assoc_iterator *iter;
void **key;
int *keyl;
void **val;
int
r_assoc_iter (r_assoc_iterator *iter, void **key, int *keyl, void **val)
{
int i;
r_assoc_el *ret;
@ -386,8 +374,8 @@ int r_assoc_iter(iter,key,keyl,val)
}
/* Delete the last returned value*/
int r_assoc_iter_delete(iter)
r_assoc_iterator *iter;
int
r_assoc_iter_delete (r_assoc_iterator *iter)
{
/* First unhook it from the list*/
if(!iter->prev->prev){
@ -411,10 +399,8 @@ int r_assoc_iter_delete(iter)
/*This is a hack from AMS. Supposedly, it's pretty good for strings, even
though it doesn't take into account all the data*/
UINT4 hash_compute(key,len,bits)
char *key;
int len;
int bits;
UINT4
hash_compute (char *key, int len, int bits)
{
UINT4 h=0;

View file

@ -48,7 +48,8 @@
#include <r_common.h>
#include <r_assoc.h>
int main()
int
main (void)
{
char test_vector[1024],*v;
int rnd,ct,r;
@ -94,8 +95,8 @@ int main()
exit(0);
}
int fetch_test(assoc)
r_assoc *assoc;
int
fetch_test (r_assoc *assoc)
{
int ct;
char vec[4],*v;

View file

@ -12,9 +12,8 @@
#include <r_common.h>
#include "r_bitfield.h"
int r_bitfield_create(setp,size)
r_bitfield **setp;
UINT4 size;
int
r_bitfield_create (r_bitfield **setp, UINT4 size)
{
r_bitfield *set=0;
int _status;
@ -40,8 +39,8 @@ int r_bitfield_create(setp,size)
return(_status);
}
int r_bitfield_destroy(setp)
r_bitfield **setp;
int
r_bitfield_destroy (r_bitfield **setp)
{
r_bitfield *set;
@ -57,9 +56,8 @@ int r_bitfield_destroy(setp)
return(0);
}
int r_bitfield_set(set,bit)
r_bitfield *set;
int bit;
int
r_bitfield_set (r_bitfield *set, int bit)
{
int word=(bit-set->base)/32;
int bbit=(bit-set->base)%32;
@ -90,9 +88,8 @@ int r_bitfield_set(set,bit)
return(_status);
}
int r_bitfield_isset(set,bit)
r_bitfield *set;
int bit;
int
r_bitfield_isset (r_bitfield *set, int bit)
{
int word=(bit-set->base)/32;
int bbit=(bit-set->base)%32;

View file

@ -48,10 +48,8 @@
#include <r_common.h>
#include <r_data.h>
int r_data_create(dp,d,l)
Data **dp;
UCHAR *d;
int l;
int
r_data_create (Data **dp, UCHAR *d, int l)
{
Data *d_=0;
int _status;
@ -74,9 +72,8 @@ int r_data_create(dp,d,l)
return(_status);
}
int r_data_alloc(dp,l)
Data **dp;
int l;
int
r_data_alloc (Data **dp, int l)
{
Data *d_=0;
int _status;
@ -97,10 +94,8 @@ int r_data_alloc(dp,l)
return(_status);
}
int r_data_make(dp,d,l)
Data *dp;
UCHAR *d;
int l;
int
r_data_make (Data *dp, UCHAR *d, int l)
{
if(!(dp->data=(UCHAR *)malloc(l)))
ERETURN(R_NO_MEMORY);
@ -111,8 +106,8 @@ int r_data_make(dp,d,l)
return(0);
}
int r_data_destroy(dp)
Data **dp;
int
r_data_destroy (Data **dp)
{
if(!dp || !*dp)
return(0);
@ -126,9 +121,8 @@ int r_data_destroy(dp)
return(0);
}
int r_data_copy(dst,src)
Data *dst;
Data *src;
int
r_data_copy (Data *dst, Data *src)
{
if(!(dst->data=(UCHAR *)malloc(src->len)))
ERETURN(R_NO_MEMORY);
@ -136,8 +130,8 @@ int r_data_copy(dst,src)
return(0);
}
int r_data_zfree(d)
Data *d;
int
r_data_zfree (Data *d)
{
if(!d)
return(0);
@ -148,9 +142,8 @@ int r_data_zfree(d)
return(0);
}
int r_data_compare(d1,d2)
Data *d1;
Data *d2;
int
r_data_compare (Data *d1, Data *d2)
{
if(d1->len<d2->len)
return(-1);

View file

@ -61,8 +61,8 @@ struct r_list_ {
struct r_list_el_ *last;
};
int r_list_create(listp)
r_list **listp;
int
r_list_create (r_list **listp)
{
r_list *list=0;
int _status;
@ -79,8 +79,8 @@ int r_list_create(listp)
return(_status);
}
int r_list_destroy(listp)
r_list **listp;
int
r_list_destroy (r_list **listp)
{
r_list *list;
r_list_el *el;
@ -107,9 +107,8 @@ int r_list_destroy(listp)
return(0);
}
int r_list_copy(outp,in)
r_list**outp;
r_list *in;
int
r_list_copy (r_list **outp, r_list *in)
{
r_list *out=0;
r_list_el *el,*el2,*last=0;
@ -204,9 +203,8 @@ int r_list_append(list,value,copy,destroy)
return(_status);
}
int r_list_init_iter(list,iter)
r_list *list;
r_list_iterator *iter;
int
r_list_init_iter (r_list *list, r_list_iterator *iter)
{
iter->list=list;
iter->ptr=list->first;
@ -214,9 +212,8 @@ int r_list_init_iter(list,iter)
return(0);
}
int r_list_iter(iter,val)
r_list_iterator *iter;
void **val;
int
r_list_iter (r_list_iterator *iter, void **val)
{
if(!iter->ptr)
return(R_EOD);

View file

@ -49,8 +49,8 @@
#ifndef HAVE_STRDUP
char *strdup(str)
char *str;
char *
strdup (char *str)
{
int len=strlen(str);
char *n;

View file

@ -84,10 +84,8 @@ int gettimeofday(struct timeval *tv, struct timezone *tzp)
}
#endif
/*Note that t1 must be > t0 */
int r_timeval_diff(t1,t0,diff)
struct timeval *t1;
struct timeval *t0;
struct timeval *diff;
int
r_timeval_diff (struct timeval *t1, struct timeval *t0, struct timeval *diff)
{
long d;
@ -111,10 +109,8 @@ int r_timeval_diff(t1,t0,diff)
return(0);
}
int r_timeval_add(t1,t2,sum)
struct timeval *t1;
struct timeval *t2;
struct timeval *sum;
int
r_timeval_add (struct timeval *t1, struct timeval *t2, struct timeval *sum)
{
long tv_sec,tv_usec,d;
@ -135,8 +131,8 @@ int r_timeval_add(t1,t2,sum)
return(0);
}
UINT8 r_timeval2int(tv)
struct timeval *tv;
UINT8
r_timeval2int (struct timeval *tv)
{
UINT8 r=0;
@ -147,7 +143,8 @@ UINT8 r_timeval2int(tv)
return r;
}
UINT8 r_gettimeint()
UINT8
r_gettimeint (void)
{
struct timeval tv;

View file

@ -23,8 +23,8 @@ typedef struct {
static void *r_thread_real_create PROTO_LIST((void *arg));
static void *r_thread_real_create(arg)
void *arg;
static void *
r_thread_real_create (void *arg)
{
helper *h;
@ -61,19 +61,22 @@ int r_thread_fork(func,arg,id)
return(_status);
}
int r_thread_yield()
int
r_thread_yield (void)
{
pthread_yield();
}
int r_thread_exit()
int
r_thread_exit (void)
{
thread_count--;
pthread_exit(0);
return(0);
}
int r_thread_wait_last()
int
r_thread_wait_last (void)
{
do {
pthread_yield();
@ -84,8 +87,8 @@ int r_thread_wait_last()
return(0);
}
int r_rwlock_create(lockp)
r_rwlock **lockp;
int
r_rwlock_create (r_rwlock **lockp)
{
pthread_rwlock_t *lock;
int r;
@ -100,8 +103,8 @@ int r_rwlock_create(lockp)
return(0);
}
int r_rwlock_destroy(lock)
r_rwlock **lock;
int
r_rwlock_destroy (r_rwlock **lock)
{
pthread_rwlock_t *plock;
@ -115,9 +118,8 @@ int r_rwlock_destroy(lock)
return(0);
}
int r_rwlock_lock(lock,action)
r_rwlock *lock;
int action;
int
r_rwlock_lock (r_rwlock *lock, int action)
{
pthread_rwlock_t *plock;
int r,_status;

View file

@ -77,8 +77,8 @@ static int create_null_analyzer(void *handle, proto_ctx *ctx, tcp_conn *conn,
return(0);
}
int destroy_null_analyzer(objp)
proto_obj **objp;
int
destroy_null_analyzer (proto_obj **objp)
{
null_analyzer *obj;
@ -94,10 +94,8 @@ int destroy_null_analyzer(objp)
return(0);
}
int data_null_analyzer(_obj,seg,direction)
proto_obj *_obj;
segment *seg;
int direction;
int
data_null_analyzer (proto_obj *_obj, segment *seg, int direction)
{
#ifdef DEBUG
null_analyzer *obj=(null_analyzer *)_obj;
@ -124,10 +122,8 @@ int data_null_analyzer(_obj,seg,direction)
return(0);
}
int fin_null_analyzer(_obj,p,direction)
proto_obj *_obj;
packet *p;
int direction;
int
fin_null_analyzer (proto_obj *_obj, packet *p, int direction)
{
#ifdef DEBUG
null_analyzer *obj=(null_analyzer *)_obj;

View file

@ -29,8 +29,8 @@ int pcap_fd = -1;
static uint8_t content_pcap_src_ether[ETHER_ADDR_LEN] = {0x02, 0x00, 0x00, 0x11, 0x11, 0x11};
static uint8_t content_pcap_dst_ether[ETHER_ADDR_LEN] = {0x02, 0x00, 0x00, 0x22, 0x22, 0x22};
static int init_pcap_logger(data)
void *data;
static int
init_pcap_logger (void *data)
{
char *pcap_outfile = (char *) data;
pcap_fd = open(pcap_outfile, O_RDWR|O_CREAT, DFLT_FILEMODE);
@ -47,7 +47,8 @@ static int init_pcap_logger(data)
return 0;
}
static int deinit_pcap_logger()
static int
deinit_pcap_logger (void)
{
fdatasync(pcap_fd);
close(pcap_fd);
@ -85,8 +86,8 @@ static int create_pcap_logger(proto_obj **objp, struct sockaddr_storage *i_addr,
return(_status);
}
static int destroy_pcap_logger(objp)
proto_obj **objp;
static int
destroy_pcap_logger (proto_obj **objp)
{
logpkt_ctx_t *pcap_obj;
@ -101,11 +102,8 @@ static int destroy_pcap_logger(objp)
return(0);
}
static int data_pcap_logger(_obj,data,len,dir)
proto_obj *_obj;
unsigned char *data;
unsigned int len;
int dir;
static int
data_pcap_logger (proto_obj *_obj, unsigned char *data, unsigned int len, int dir)
{
logpkt_ctx_t *pcap_obj = (logpkt_ctx_t *)_obj;
int direction;
@ -119,11 +117,8 @@ static int data_pcap_logger(_obj,data,len,dir)
return status;
}
int close_pcap_logger(_obj,data,len,dir)
proto_obj *_obj;
unsigned char *data;
unsigned int len;
int dir;
int
close_pcap_logger (proto_obj *_obj, unsigned char *data, unsigned int len, int dir)
{
logpkt_ctx_t *pcap_obj = (logpkt_ctx_t *)_obj;
int direction;

View file

@ -1024,7 +1024,8 @@ ECHO;
* EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer()
static int
yy_get_next_buffer (void)
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
@ -1156,7 +1157,8 @@ static int yy_get_next_buffer()
/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state()
static yy_state_type
yy_get_previous_state (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
@ -1636,7 +1638,8 @@ int new_state;
#ifndef YY_NO_POP_STATE
static void yy_pop_state()
static void
yy_pop_state (void)
{
if ( --yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
@ -1647,7 +1650,8 @@ static void yy_pop_state()
#ifndef YY_NO_TOP_STATE
static int yy_top_state()
static int
yy_top_state (void)
{
return yy_start_stack[yy_start_stack_ptr - 1];
}
@ -1760,7 +1764,8 @@ void *ptr;
}
#if YY_MAIN
int main()
int
main (void)
{
yylex();
return 0;
@ -1768,7 +1773,8 @@ int main()
#endif
#line 60 "ssl.l"
int mkname()
int
mkname (void)
{
#if 0
printf("%s\n",yytext);

View file

@ -62,9 +62,8 @@ int verr_exit(char *fmt,...)
}
int main(argc,argv)
int argc;
char **argv;
int
main (int argc, char **argv)
{
char name[100];
FILE *in;
@ -86,12 +85,13 @@ int main(argc,argv)
extern int yylineno;
int yywrap()
int
yywrap (void)
{
;}
int yyerror(s)
char *s;
int
yyerror (char *s)
{
printf("Parse error %s at line %d\n",s,yylineno);
exit(1);

View file

@ -1,27 +1,18 @@
#include "network.h"
#include "ssl.h"
#include "sslprint.h"
static int decode_ContentType_change_cipher_spec(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_change_cipher_spec (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_ContentType_alert(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_alert (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_ContentType_handshake(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_handshake (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
@ -41,11 +32,8 @@ static int decode_ContentType_handshake(ssl,dir,seg,data)
ssl_decode_switch(ssl,HandshakeType_decoder,t,dir,seg,data);
}
static int decode_ContentType_application_data(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_application_data (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
@ -73,19 +61,13 @@ decoder ContentType_decoder[]={
{-1}
};
static int decode_HandshakeType_hello_request(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_hello_request (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_client_hello(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_client_hello (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
@ -128,11 +110,8 @@ static int decode_HandshakeType_client_hello(ssl,dir,seg,data)
return(0);
}
static int decode_HandshakeType_server_hello(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_server_hello (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
@ -153,59 +132,38 @@ static int decode_HandshakeType_server_hello(ssl,dir,seg,data)
return(0);
}
static int decode_HandshakeType_certificate(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_certificate (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_server_key_exchange(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_server_key_exchange (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_certificate_request(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_certificate_request (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_server_hello_done(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_server_hello_done (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_certificate_verify(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_certificate_verify (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_client_key_exchange(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_client_key_exchange (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}
static int decode_HandshakeType_finished(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_finished (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
return(0);
}

View file

@ -233,9 +233,8 @@ static SSL_CipherSuite CipherSuites[]={
{-1}
};
int ssl_find_cipher(num,cs)
int num;
SSL_CipherSuite **cs;
int
ssl_find_cipher (int num, SSL_CipherSuite **cs)
{
SSL_CipherSuite *c;

View file

<
@ -10,11 +10,8 @@
#include "ssl.enums.h"
static int decode_extension(ssl_obj *ssl, int dir, segment *seg, Data *data);
static int decode_server_name(ssl_obj *ssl, int dir, segment *seg, Data *data);
static int decode_ContentType_ChangeCipherSpec(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_ChangeCipherSpec (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
struct json_object *jobj;
@ -35,11 +32,8 @@ static int decode_ContentType_ChangeCipherSpec(ssl,dir,seg,data)
return(0);
}
static int decode_ContentType_Alert(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_Alert (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
int r;
@ -74,11 +68,8 @@ static int decode_ContentType_Alert(ssl,dir,seg,data)
return(0);
}
static int decode_ContentType_Handshake(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_Handshake (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
@ -122,11 +113,8 @@ static int decode_ContentType_Handshake(ssl,dir,seg,data)
return(0);
}
static int decode_ContentType_application_data(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_ContentType_application_data (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
@ -172,11 +160,8 @@ decoder ContentType_decoder[]={
{-1}
};
static int decode_HandshakeType_HelloRequest(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_HelloRequest (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
struct json_object *jobj;
jobj = ssl->cur_json_st;
@ -187,11 +172,8 @@ static int decode_HandshakeType_HelloRequest(ssl,dir,seg,data)
return(0);
}
static int decode_HandshakeType_ClientHello(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_ClientHello (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
struct json_object *jobj;
jobj = ssl->cur_json_st;
@ -375,11 +357,8 @@ static int decode_HandshakeType_ClientHello(ssl,dir,seg,data)
return(0);
}
static int decode_HandshakeType_ServerHello(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_ServerHello (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
int r;
@ -520,11 +499,8 @@ static int decode_HandshakeType_ServerHello(ssl,dir,seg,data)
return(0);
}
static int decode_HandshakeType_Certificate(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_Certificate (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
UINT4 len,exlen,ex;
Data cert;
@ -569,11 +545,8 @@ static int decode_HandshakeType_Certificate(ssl,dir,seg,data)
}
static int decode_HandshakeType_SessionTicket(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_SessionTicket (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
int r;
UINT4 exlen, ex, val;
@ -601,11 +574,8 @@ static int decode_HandshakeType_SessionTicket(ssl,dir,seg,data)
}
}
static int decode_HandshakeType_EncryptedExtensions(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_EncryptedExtensions (ssl_obj *ssl, int dir, segment *seg, Data *data)
{
int r;
UINT4 exlen, ex;
@ -626,11 +596,8 @@ static int decode_HandshakeType_EncryptedExtensions(ssl,dir,seg,data)
}
}
static int decode_HandshakeType_ServerKeyExchange(ssl,dir,seg,data)
ssl_obj *ssl;
int dir;
segment *seg;
Data *data;
static int
decode_HandshakeType_ServerKeyExchange (ssl_obj *ssl, int dir, segment *seg, Data *data)
{