All of lore.kernel.org
 help / color / mirror / Atom feed
* How peek at tcp socket data w/o reading it
@ 2005-01-31 10:45 Kiniger, Karl (GE Healthcare)
  2005-01-31 11:16 ` Martin Zwickel
  0 siblings, 1 reply; 3+ messages in thread
From: Kiniger, Karl (GE Healthcare) @ 2005-01-31 10:45 UTC (permalink / raw)
  To: linux-kernel

Hi,

hack wanted:

is it possible to peek a few bytes from a tcp socket which is
ready to read without actually reading the data? (or some
means to push already read data back similar to ungetc)

Any creative ideas welcome.

Karl
-- 
Karl Kiniger   mailto:karl.kiniger@med.ge.com
GE Medical Systems Kretztechnik GmbH & Co OHG
Tiefenbach 15       Tel: (++43) 7682-3800-710
A-4871 Zipf Austria Fax: (++43) 7682-3800-47

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How peek at tcp socket data w/o reading it
  2005-01-31 10:45 How peek at tcp socket data w/o reading it Kiniger, Karl (GE Healthcare)
@ 2005-01-31 11:16 ` Martin Zwickel
  2005-01-31 11:36   ` Kiniger
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Zwickel @ 2005-01-31 11:16 UTC (permalink / raw)
  To: Kiniger, Karl (GE Healthcare); +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

On Mon, 31 Jan 2005 11:45:32 +0100
"Kiniger, Karl (GE Healthcare)" <karl.kiniger@med.ge.com> bubbled:

> Hi,
> 
> hack wanted:
> 
> is it possible to peek a few bytes from a tcp socket which is
> ready to read without actually reading the data? (or some
> means to push already read data back similar to ungetc)

ret = recv(fd, buf, len, MSG_PEEK);


-- 
MyExcuse:
telnet: Unable to connect to remote host: Connection refused

Martin Zwickel <martin.zwickel@technotrend.de>
Research & Development

TechnoTrend AG <http://www.technotrend.de>

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How peek at tcp socket data w/o reading it
  2005-01-31 11:16 ` Martin Zwickel
@ 2005-01-31 11:36   ` Kiniger
  0 siblings, 0 replies; 3+ messages in thread
From: Kiniger @ 2005-01-31 11:36 UTC (permalink / raw)
  To: Martin Zwickel; +Cc: linux-kernel

Thanks very much,

thats exactly what I needed.

Karl

On Mon, Jan 31, 2005 at 12:16:16PM +0100, Martin Zwickel wrote:
> 
>    On Mon, 31 Jan 2005 11:45:32 +0100
>    "Kiniger, Karl (GE Healthcare)" <karl.kiniger@med.ge.com> bubbled:
> 
>    > Hi,
>    >
>    > hack wanted:
>    >
>    > is it possible to peek a few bytes from a tcp socket which is
>    > ready to read without actually reading the data? (or some
>    > means to push already read data back similar to ungetc)
> 
>    ret = recv(fd, buf, len, MSG_PEEK);
> 
>    --
>    MyExcuse:
>    telnet: Unable to connect to remote host: Connection refused
> 
>    Martin Zwickel <martin.zwickel@technotrend.de>
>    Research & Development
> 
>    TechnoTrend AG <[1]http://www.technotrend.de>
>    )
> 
> References
> 
>    1. http://www.technotrend.de/

-- 
Karl Kiniger   mailto:karl.kiniger@med.ge.com
GE Medical Systems Kretztechnik GmbH & Co OHG
Tiefenbach 15       Tel: (++43) 7682-3800-710
A-4871 Zipf Austria Fax: (++43) 7682-3800-47

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-31 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 10:45 How peek at tcp socket data w/o reading it Kiniger, Karl (GE Healthcare)
2005-01-31 11:16 ` Martin Zwickel
2005-01-31 11:36   ` Kiniger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.