static void run_test_mode(struct md_exporter *mde, uint32_t packets)
{
    pthread_t thread;
    pthread_attr_t attr;

    pthread_attr_init(&attr);
    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);

    pthread_create(&thread, &attr, mde_run, mde);

    test_netlink(packets);

    pthread_join(thread, NULL);

    META_PRINT_SYSLOG(mde, LOG_ERR, "Threads should NEVER exit\n");
}
Beispiel #2
0
static int __init sample_init(void) 
{
	test_netlink();
	nf_register_hook(&sample_ops);
	return 0;
}
Beispiel #3
0
int init_module()
{
  test_netlink();
  return 0;
}