From owner-freebsd-net Thu Jun 7 3:22:32 2001 Delivered-To: freebsd-net@freebsd.org Received: from alacran.it.uc3m.es (alacran.it.uc3m.es [163.117.139.44]) by hub.freebsd.org (Postfix) with ESMTP id 913F937B403 for ; Thu, 7 Jun 2001 03:22:26 -0700 (PDT) (envelope-from jrh@it.uc3m.es) Received: from it.uc3m.es (localhost [127.0.0.1]) by alacran.it.uc3m.es (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) with ESMTP id f57ANKc00908 for ; Thu, 7 Jun 2001 12:23:29 +0200 X-Authentication-Warning: alacran.it.uc3m.es: Host localhost [127.0.0.1] claimed to be it.uc3m.es Message-ID: <3B1F5618.4924F64C@it.uc3m.es> Date: Thu, 07 Jun 2001 12:23:20 +0200 From: Juan Fco Rodriguez Hervella X-Mailer: Mozilla 4.74 [es] (X11; U; Linux 2.4.3 i686) X-Accept-Language: en MIME-Version: 1.0 To: Lista Subject: How to count frames transmitted through the ethernet card. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello: I am doing a program that sends udp packets. I have a counter and each time I send a packet with "sendto()", I increment the value of this variable. But I would like to count the frames that are being actually transmitted, through the ethernet card, some like the ifconfig/netstat. I would not like to run this commands with popen() or similar because I would have to parse the output, and this output have not always the same format. Does anyone knows some easy-function or an easy method to do this ? Best Regards. ***** JFRH ***** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message