Nathan Jennings
2005-06-29 19:11:52 UTC
Hello,
I've attached "sniffex.c", which is intended to be libpcap example code.
It's based on Tim Carstens "sniffer.c" source.
I hope "sniffex" will serve as a decent working example of libpcap code
and provide basic documentation via comments for beginners. I also hope
this can serve as a template or "starting point" and be modified and
refined in the future.
I've added a "Tcpdump Group" copyright notice and terms while complying
(I think) with Tim Carstens terms. Please take a look at this copyright
and license and let me know what you think. Or go ahead and change it so
everyone agrees.
There's one issue I've run into: after displaying certain packets (see
function print_payload), my xterm/bash shell loses the ability to
display newlines (i.e scroll lines). I suppose this is due to the
display of a certain sequence of characters to my xterm/shell. Any ideas?
Any comments, suggestions or ideas are welcome.
-Nathan
-----------------------------------------
This e-mail and any attachments may contain CONFIDENTIAL information,
including PROTECTED HEALTH INFORMATION. If you are not the intended
recipient, any use or disclosure of this information is STRICTLY
PROHIBITED; you are requested to delete this e-mail and any
attachments, notify the sender immediately, and notify the LabCorp
Privacy Officer at ***@labcorp.com or call (877) 23-HIPAA /
(877) 234-4722.
I've attached "sniffex.c", which is intended to be libpcap example code.
It's based on Tim Carstens "sniffer.c" source.
I hope "sniffex" will serve as a decent working example of libpcap code
and provide basic documentation via comments for beginners. I also hope
this can serve as a template or "starting point" and be modified and
refined in the future.
I've added a "Tcpdump Group" copyright notice and terms while complying
(I think) with Tim Carstens terms. Please take a look at this copyright
and license and let me know what you think. Or go ahead and change it so
everyone agrees.
There's one issue I've run into: after displaying certain packets (see
function print_payload), my xterm/bash shell loses the ability to
display newlines (i.e scroll lines). I suppose this is due to the
display of a certain sequence of characters to my xterm/shell. Any ideas?
Any comments, suggestions or ideas are welcome.
-Nathan
-----------------------------------------
This e-mail and any attachments may contain CONFIDENTIAL information,
including PROTECTED HEALTH INFORMATION. If you are not the intended
recipient, any use or disclosure of this information is STRICTLY
PROHIBITED; you are requested to delete this e-mail and any
attachments, notify the sender immediately, and notify the LabCorp
Privacy Officer at ***@labcorp.com or call (877) 23-HIPAA /
(877) 234-4722.