Thread: Network Interface Card Traffic

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    So what's wrong with ifconfig, which was suggested in post #2?

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:E0:4D:89:B5:73  
              inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:5792 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6309 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:4451227 (4.2 MiB)  TX bytes:1435602 (1.3 MiB)
              Interrupt:23 Base address:0x8000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:354 errors:0 dropped:0 overruns:0 frame:0
              TX packets:354 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:180029 (175.8 KiB)  TX bytes:180029 (175.8 KiB)
    I believe RX is short for "received" and TX is short for "transmitted".
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  2. #2
    Registered User
    Join Date
    Jul 2009
    Posts
    61
    yes, but isn't there any function or library that can be used in C or C++ ?!

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by hosseinyounesi View Post
    yes, but isn't there any function or library that can be used in C or C++ ?!
    I think pcap() will provide you with that info too, but really I look at that and see that it will take about 10 lines of code to parse, so why bother using a library?

    There are probably a cazillion little GUI apps around for this stuff, eg, it is one thing that the incredibly awesome gkrellm covers, if you learn to use one of those new "search engines" everyone talks about, such as "google.com" you might find something...
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bitwise Unwanted Output
    By pobri19 in forum C++ Programming
    Replies: 4
    Last Post: 09-15-2008, 04:07 AM
  2. Vector out of range program crash.
    By Shamino in forum C++ Programming
    Replies: 11
    Last Post: 01-18-2008, 05:37 PM
  3. Segmentation Fault - aaaaaaaah!
    By yogibear in forum C Programming
    Replies: 6
    Last Post: 10-01-2007, 03:21 AM
  4. Blackjack
    By Tommo in forum C Programming
    Replies: 10
    Last Post: 06-20-2007, 08:07 PM
  5. How can I access a struct (from a header file)?
    By loxslay in forum C++ Programming
    Replies: 3
    Last Post: 10-07-2006, 01:25 PM

Tags for this Thread