DCCP protocol discussions
 help / color / mirror / Atom feed
From: "Arnaldo Carvalho de Melo" <acme@redhat.com>
To: dccp@vger.kernel.org
Subject: Re: How much is available for reading on the socket?
Date: Fri, 09 Nov 2007 14:30:00 +0000	[thread overview]
Message-ID: <20071109143000.GB12019@ghostprotocols.net> (raw)
In-Reply-To: <5bc4c4570710211900o6ccbc9belf2cc904c1b3af0c6@mail.gmail.com>

Em Fri, Nov 09, 2007 at 01:51:27PM +0000, Gerrit Renker escreveu:
> | > using "ioctl (socket, FIONREAD, &readsize)" I can get how much is
> | > available to read from the socket using TCP. Is there a equivalent
> | > option for DCCP?
> | 
> | Looks like dccp_ioctl() happily returns -ENOIOCTLCMD (for now). If you
> | have IO and memory to waste, you can always recv(..., MSG_PEEK) to work
> | around this.
> | 
> Arnaldo wrote a patch which realises SIOCINQ (it is in 2.6.24-rc1/2).

And, on Linux:

include/linux/sockios.h

/* Linux-specific socket ioctls */
#define SIOCINQ         FIONREAD

- Arnaldo

  parent reply	other threads:[~2007-11-09 14:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22  2:00 How much is available for reading on the socket? Łeandro Sales
2007-11-09 13:39 ` Tommi Saviranta
2007-11-09 13:51 ` Gerrit Renker
2007-11-09 14:15 ` Tommi Saviranta
2007-11-09 14:30 ` Arnaldo Carvalho de Melo [this message]
2007-11-13 16:51 ` Łeandro Sales
2007-11-15  7:02 ` Gerrit Renker
2007-11-15  7:04 ` Gerrit Renker
2007-11-15  7:52 ` Ian McDonald

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=20071109143000.GB12019@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=dccp@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