From owner-freebsd-net Thu Jun 7 4:37:16 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 E2FA637B407 for ; Thu, 7 Jun 2001 04:37:11 -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 f57BcGc01038 for ; Thu, 7 Jun 2001 13:38:19 +0200 X-Authentication-Warning: alacran.it.uc3m.es: Host localhost [127.0.0.1] claimed to be it.uc3m.es Message-ID: <3B1F67A8.2676289D@it.uc3m.es> Date: Thu, 07 Jun 2001 13:38:16 +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: freebsd-net@FreeBSD.ORG Subject: Re: 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 That is my problem, If sendto() *not* always returns ENOBUFS, I need to know the packets what are actually transmited... >> 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 ********************************* Juan F. Rodriguez Hervella Universidad Carlos III de Madrid ******************************** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message