Sunday, 15 July 2012

Getting active TCP/UDP connections in c++ on linux -



Getting active TCP/UDP connections in c++ on linux -

i making programme require getting active tcp/udp connections in c++ ? . know can on windows using ip helper api want know how active connections in c++ on linux . using popen() function , netstat command selection or ? sorry bad english language :)

you read next files:

/proc/net/udp /proc/net/tcp

content of files next kind of text:

sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: 00000000:5aa0 00000000:0000 0a 00000000:00000000 00:00000000 00000000 0 0 237373 1 cf0bc900 100 0 0 10 -1 1: 00000000:5aa1 00000000:0000 0a 00000000:00000000 00:00000000 00000000 0 0 237409 1 cf0be880 100 0 0 10 -1 2: 00000000:5aa2 00000000:0000 0a 00000000:00000000 00:00000000 00000000 0 0 237435 1 cf0bdf80 100 0 0 10 -1

man page proc(5) gives more information.

c++ linux tcp

No comments:

Post a Comment