C/C++ program to monitor/track inet connections

macktronics

New Member


Messages: 2

I was curious if there was an API which provides similar information to what you get when running "netstat -an"; specifically I want to efficiently monitor connections as they come and go into FreeBSD servers. I saw that netstat provides the --libxo json option which is one approach (i.e. run netstat shell commands in a tight loop) but that seems heavy weight if the data is easily extracted from a available system function etc...

Anyone want to share any ideas for such a thing?

Dan
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

Hi, I dont know is there any API
but with tcpdump,netflow for start
and other tools I never need other tools
but if you write some program please share it, good luck!
 

wolffnx

Aspiring Daemon

Reaction score: 230
Messages: 675

debguy

Well-Known Member

Reaction score: 24
Messages: 275

tcpdump is an old standby

there are packet sniffers out there, like "wireshark" that know how to interpret many more kinds of headers than tcpdump can

there are professional units, ie by Tektronics, which have electronic recognition and display of signal monitoring as their main purpose, a small subfunction of which is internet signals.



so. there are all levels of options "already very completed" to think about. the simplest and most widely already installed in unix; tcpdump
 
Top