Skip to content

Instantly share code, notes, and snippets.

@takscape
Created February 28, 2013 12:01
Show Gist options
  • Select an option

  • Save takscape/5056279 to your computer and use it in GitHub Desktop.

Select an option

Save takscape/5056279 to your computer and use it in GitHub Desktop.
libnids, printall.c
static struct nids_chksum_ctl chksum_ctl;
int
main ()
{
chksum_ctl.netaddr = 0;
chksum_ctl.mask = 0;
chksum_ctl.action = NIDS_DONT_CHKSUM;
nids_register_chksum_ctl(&chksum_ctl, 1);
nids_params.scan_num_hosts = 0;
nids_params.multiproc = 1;
nids_params.pcap_filter = "tcp";
if (!nids_init ())
{
fprintf(stderr,"%s\n",nids_errbuf);
exit(1);
}
nids_register_tcp (tcp_callback);
nids_run ();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment