lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303972825.2587.684.camel@edumazet-laptop>
Date:	Thu, 28 Apr 2011 08:40:25 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Ajit <ajitsa_bes@...oo.com>
Cc:	netdev@...r.kernel.org
Subject: Re: Maximum no of bytes Ethernet can transfer at a time ??

Le jeudi 28 avril 2011 à 06:36 +0000, Ajit a écrit :
> Ajit <ajitsa_bes <at> yahoo.com> writes:
> 
> > 
> > Eric Dumazet <eric.dumazet <at> gmail.com> writes:
> > 
> > > Sure, check your syscall returns values, and search for SO_RCVBUF &
> > > SO_SNDBUF   (man 7 socket)
> > > 
> > > --
> > 
> > okies..I dont know exactly how to use those but I will google and try it..
> > will post my result after some time.
> > 
> > Thank you
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo <at> vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> 
> 
> hi sir,
> I tried out something as you said.
> 
> I introduces this lines in my code,
> 
> getsockopt(s,SOL_SOCKET,SO_RCVBUF,&optval,&optlen);
> printf("The value of optlen is %d\n",optlen);
> 

Oh well, netdev is really not the place to discussion like that.

int optval;
socklen_t optlen = sizeof(optval);
getsockopt(s,SOL_SOCKET,SO_RCVBUF, &optval, &optlen);
printf("The value of optval is %d\n", optval);

> It always displays 4.
> 
> I really have no idea about it. Do I need to use setsockopt options in my
> receiver code ??
> If so, what difference will it make ??

It makes sure your socket can really receive enough messages (or kernel
drops them)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ