public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ajit <ajitsa_bes@yahoo.com>
Cc: netdev@vger.kernel.org
Subject: Re: Maximum no of bytes Ethernet can transfer at a time ??
Date: Thu, 28 Apr 2011 08:40:25 +0200	[thread overview]
Message-ID: <1303972825.2587.684.camel@edumazet-laptop> (raw)
In-Reply-To: <loom.20110428T083015-693@post.gmane.org>

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)




  reply	other threads:[~2011-04-28  6:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 12:11 Maximum no of bytes Ethernet can transfer at a time ?? Ajit
2011-04-27 12:21 ` Eric Dumazet
2011-04-27 12:27   ` Ajit
2011-04-28  6:36     ` Ajit
2011-04-28  6:40       ` Eric Dumazet [this message]
2011-04-28 21:24       ` Rick Jones
2011-04-27 13:01 ` Neil Horman
2011-04-28  5:49   ` Ajit
2011-04-28 11:06     ` Neil Horman
2011-04-29  8:39       ` Ajit
2011-04-29 19:06         ` Neil Horman
2011-04-29  8:53       ` Ajit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1303972825.2587.684.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=ajitsa_bes@yahoo.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox