Date: Thu, 7 Jun 2001 14:32:41 +0200 (CEST) From: Luigi Rizzo <luigi@info.iet.unipi.it> To: Juan Fco Rodriguez Hervella <jrh@it.uc3m.es> Cc: freebsd-net@FreeBSD.ORG Subject: Re: How to count frames transmitted through the ethernet card. Message-ID: <200106071232.OAA41296@info.iet.unipi.it> In-Reply-To: <3B1F67A8.2676289D@it.uc3m.es> from Juan Fco Rodriguez Hervella at "Jun 7, 2001 01:38:16 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> That is my problem, If sendto() *not* always returns ENOBUFS, I > need to know the packets what are actually transmited... you don't have a way to know. The transmission can fail in the device driver (e.g. because of excessive collisions) and you only know it at a later time. cheers luigi > > >> 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106071232.OAA41296>