From owner-freebsd-net Thu Jun 7 4: 1:50 2001 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 4E6BB37B401 for ; Thu, 7 Jun 2001 04:01:48 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id MAA40954; Thu, 7 Jun 2001 12:57:45 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200106071057.MAA40954@info.iet.unipi.it> Subject: Re: How to count frames transmitted through the ethernet card. In-Reply-To: <3B1F5618.4924F64C@it.uc3m.es> from Juan Fco Rodriguez Hervella at "Jun 7, 2001 12:23:20 pm" To: Juan Fco Rodriguez Hervella Date: Thu, 7 Jun 2001 12:57:45 +0200 (CEST) Cc: Lista X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 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. In principle sendto() can return you an ENOBUFS error when the interface queue is full, but not always (depending on how the firewall plays with the packet). cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message