If I want to write a script that uses Wireshark\'s functionality, I use tshark. I hear there is also a libwireshark that can be used when writing a program in C but, for the lif
It's certainly possible to use libwireshark outside of Wireshark itself, as I know netexpect does just that. You might try looking on that project's website for information or you could try contacting Eloy Paris, the author of netexpect, for further help/pointers.