We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If we have implemented #1 and #2, we can have anysniff initialize the modules as needed and call them all from a loop:
sniff_loop() will be implemented once, and will call incoming_packet on all sniff-modules.
sniff_loop()
incoming_packet
static void sniff_got_packet(u_char *args, const struct pcap_pkthdr *header, const u_char *packet) { ... for (i = 0; i < MAX_MODULES && sniff_modules[i]; ++i) { /* fixme: fetch his_storage */ sniff_modules[i]->incoming_packet(his_storage, args, header, packet); }
out_write() will be implemented once (called from the timer module) and will call print_summary() on all enabled sniff-modules:
out_write()
print_summary()
void write_summary() { /* out_write */ ... FILE **fps[MAX_MODULES+1] = {0,}; int i, j; for (i = 0; i < MAX_MODULES && output_modules[i]; ++i) fps[i] = output_modules[i]->begin_summary(); for (i = 0; i < MAX_MODULES && sniff_modules[i]; ++i) { /* fixme: fetch his_storage */ for (j = 0; fps[j]; ++j) sniff_modules[i]->print_summary(fps[j], his_storage); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If we have implemented #1 and #2, we can have anysniff initialize the modules as needed and call them all from a loop:
sniff_loop()
will be implemented once, and will callincoming_packet
on all sniff-modules.out_write()
will be implemented once (called from the timer module) and will callprint_summary()
on all enabled sniff-modules:The text was updated successfully, but these errors were encountered: