![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Capturing bad packets | otheus | IP Networking | 1 | 10-15-2009 09:38 AM |
| using sed to replace a specific string on a specific line number using variables | todd.cutting | Shell Programming and Scripting | 2 | 08-13-2009 09:40 PM |
| tcpdump -w file is not capturing all the packets | radiatejava | IP Networking | 5 | 05-29-2009 08:36 AM |
| Reading and Manipulating captured packets (pflog file) | PenguinDevil | Security | 0 | 12-29-2004 12:40 AM |
| NAT Packets/Port Openine | MartinD | IP Networking | 3 | 08-21-2002 04:04 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help with capturing/reading total packets on specific port number
Hi guys,
I'm using a Linux system(Ubuntu) and I've been trying to find a method to read the total packets received/sent on a specific port (e.g port 80 or port 25) on a local machine. I can read the overall total packets received/sent from the /proc/net/dev file system. But what I can't do is read packets received/sent from a specific port. I don't think there is any information about total packets on a specific port in any of the /proc file system. So, what is the best way to get this information? I would like a way to do this so that I can display the activity on a specific port for my program I'm working on. Thanks ---------- Post updated at 02:46 AM ---------- Previous update was at 02:34 AM ---------- Okay, i've found out that I can use tcpdump to do this. This can be one of the many ways. I would prefer a different method where I do not need to install packet capture libraries like libpcap for my program to work. Besides, I need to have root privilege to use libpcap. Any other ideas? Last edited by lildee; 10-16-2009 at 08:59 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|