Permalink
Browse files

modify dpi_demo

  • Loading branch information...
1 parent fb5fc58 commit 80cf33fc509d6888f2124459441b77e3092f3397 hyun@sd5 committed Jun 8, 2011
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -17,15 +17,15 @@ LIBS = ${PCAP_PATH}/libpcap.a
CFLAGS = -I. -I../include -I../lib/dataplane -I$(PCAP_INCLUDE) -DNLM_HW_FMS -DNO_COMPILER
-
-
default:
gcc -I. -I../include fms_compiler.c -o fms_compiler -lfms_compiler -L../lib/
$(CC) -I. -I../include -DNO_COMPILER -DNLM_HW_FMS demo.c -o demo -lpacket_api_fms -L../lib/
- $(CC) -I. -I../include -I../lib/dataplane -DNO_COMPILER -DNLM_HW_FMS -D_GNU_SOURCE mtdemo.c -o demo_mt -lpacket_api_fms -L../lib/ -lpthread
+ $(CC) -I. -I../include -I../lib/dataplane -DNO_COMPILER -DNLM_HW_FMS -D_GNU_SOURCE ringdemo.c -o demo_ring -lpacket_api_fms -L../lib/ -lpthread
+ $(CC) -I. -I../include -I../lib/dataplane -DNO_COMPILER -DNLM_HW_FMS -D_GNU_SOURCE mtdemo.c -o mtdemo -lpacket_api_fms -L../lib/ -lpthread
+
$(CC) $(CFLAGS) dpi_demo.c -o dpi_demo $(LIBS) -lpacket_api_fms -L../lib/ -lpthread
-# $(CC) -I. -I../include -I$(PCAP_INCLUDE) -DNO_COMPILER -DNLM_HW_FMS dpi_demo.c -o dpi_demo $(LIBS) -lpacket_api_fms -L../lib/
- cp driver/netl7driver.ko demo dpi_demo ../pkg
+ $(CC) $(CFLAGS) dpi_loop.c -o dpi_loop $(LIBS) -lpacket_api_fms -L../lib/ -lpthread
+ cp driver/netl7driver.ko demo dpi_demo demo_ring mtdemo dpi_loop ../pkg
clean:
rm -f rxc demo demo_mt demo_ring
View
Binary file not shown.
View
@@ -486,11 +486,19 @@ init_packet_memory (char *packet_memory, uint32_t mem_size)
input_data_file);
}
}
- else if (db_file == NULL)
+ // else if (db_file == NULL)
+ else {
for (i = 0; i < mem_size - sizeof (eval_str); i += sizeof (eval_str))
{
memcpy (packet_memory + i, eval_str, sizeof (eval_str));
}
+ }
+
+#if 0
+ for (i = 0; i < mem_size - sizeof (eval_str); i += sizeof (eval_str))
+ printf("[%s] %s\n", __FUNCTION__, packet_memory + i);
+#endif
+
return NLM_OK;
}
@@ -943,6 +951,7 @@ run_abcd_on_famos (uint32_t packet_size, char *packet_memory, uint32_t input_fif
DDPRINT ("\nStarting run...\n");
TRY (init_packet_memory (packet_memory, mem_size));
+ // printf("packet_memory:%s\n", packet_memory);
if (ring_mode == RING_MODE_MASTER_ONLY)
{
@@ -1711,6 +1720,8 @@ main (int ac, char **av)
num_of_flows = 0;
}
+ printf("num_of_flows:%d, device_cnt:%d\n", num_of_flows, device_cnt);
+
if (num_of_flows == 1)
{
if (device_cnt == 1)
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 80cf33f

Please sign in to comment.