Esempio n. 1
0
int main(int argc, char **argv)
{
    frame_data fd;
    char src[] = {1,2,3,4}, dst[] = {5,6,7,8};
    unsigned int i;
    void (*tests[])(void) = {
        test_simple_fragment_add_seq,
        test_fragment_add_seq_partial_reassembly,
        test_fragment_add_dcerpc_dg,
        test_fragment_add_seq_check,
        test_fragment_add_seq_check_1,
        test_fragment_add_seq_802_11_0,
        test_fragment_add_seq_802_11_1,
        test_simple_fragment_add_seq_next,
        test_missing_data_fragment_add_seq_next,
        test_missing_data_fragment_add_seq_next_2,
        test_missing_data_fragment_add_seq_next_3
    };

    /* we don't use our params */
    argc=argc;
    argv=argv;

    /* initialise stuff */
    ep_init_chunk();
    tvbuff_init();
    reassemble_init();

    /* a tvbuff for testing with */
    data = g_malloc(DATA_LEN);
    /* make sure it's full of stuff */
    for(i=0; i<DATA_LEN; i++) {
        data[i]=i & 0xFF;
    }
    tvb = tvb_new_real_data(data, DATA_LEN, DATA_LEN*2);

    /* other test stuff */
    pinfo.fd = &fd;
    fd.flags.visited = 0;
    SET_ADDRESS(&pinfo.src,AT_IPv4,4,src);
    SET_ADDRESS(&pinfo.dst,AT_IPv4,4,dst);

    /*************************************************************************/
    for(i=0; i < sizeof(tests)/sizeof(tests[0]); i++ ) {
        /* re-init the fragment tables */
        fragment_table_init(&fragment_table);
        ASSERT(fragment_table != NULL);

        reassembled_table_init(&reassembled_table);
        ASSERT(reassembled_table != NULL);

        pinfo.fd->flags.visited = FALSE;

        tests[i]();
    }

    printf(failure?"FAILURE\n":"SUCCESS\n");
    return failure;
}
Esempio n. 2
0
/* initialise the stream routines */
void stream_init( void )
{
    init_stream_hash();
    init_fragment_hash();
    stream_init_pdu_data();

    fragment_table_init(&stream_fragment_table);
    reassembled_table_init(&stream_reassembled_table);
}
Esempio n. 3
0
static void rtse_reassemble_init (void)
{
	fragment_table_init (&rtse_segment_table);
	reassembled_table_init (&rtse_reassembled_table);
}
Esempio n. 4
0
static void pop_data_reassemble_init (void)
{
  fragment_table_init (&pop_data_segment_table);
  reassembled_table_init (&pop_data_reassembled_table);
}
Esempio n. 5
0
static void
midi_data_reassemble_init(void)
{
    fragment_table_init(&midi_data_segment_table);
    reassembled_table_init(&midi_data_reassembled_table);
}
Esempio n. 6
0
/** initialise the DCP protocol. Details follow
 *  here.
 */
static void
dcp_init_protocol(void)
{
  fragment_table_init (&dcp_fragment_table);
  reassembled_table_init (&dcp_reassembled_table);
}
static void gsm_cbs_message_reassembly_init(void)
{
  fragment_table_init(&gsm_cbs_page_table);
  reassembled_table_init(&gsm_cbs_message_table);
}
Esempio n. 8
0
static void
lapsat_defragment_init(void)
{
	fragment_table_init(&lapsat_fragment_table);
	reassembled_table_init(&lapsat_reassembled_table);
}
static void t38_defragment_init(void)
{
	/* Init reassemble tables */
	fragment_table_init(&data_fragment_table);
	reassembled_table_init(&data_reassembled_table);
}
Esempio n. 10
0
static void ts2_init(void)
{
	fragment_table_init(&msg_fragment_table);
	reassembled_table_init(&msg_reassembled_table);
}
Esempio n. 11
0
static void wai_reassemble_init (void)
{
    fragment_table_init(&wai_fragment_table);
    reassembled_table_init(&wai_reassembled_table);
}
Esempio n. 12
0
static void
defragment_init(void)
{
    fragment_table_init(&fragment_table);
    reassembled_table_init(&reassembled_table);
}
Esempio n. 13
0
static void
clnp_reassemble_init(void)
{
  fragment_table_init(&clnp_segment_table);
  reassembled_table_init(&clnp_reassembled_table);
}
static void
gsm_sms_ud_defragment_init (void)
{
	fragment_table_init (&sm_fragment_table);
	reassembled_table_init(&sm_reassembled_table);
}
Esempio n. 15
0
static void
sndcp_defragment_init(void)
{
  fragment_table_init(&npdu_fragment_table);
  reassembled_table_init(&sndcp_reassembled_table);
}
Esempio n. 16
0
static void
ltp_defragment_init(void) {
    fragment_table_init(&ltp_fragment_table);
    reassembled_table_init(&ltp_reassembled_table);
}
Esempio n. 17
0
static void ses_reassemble_init (void)
{
	fragment_table_init (&ses_fragment_table);
	reassembled_table_init (&ses_reassembled_table);
}