Date: Fri, 20 Dec 1996 13:38:50 +0000 () From: hans@brandinnovators.com (Hans Zuidam) To: freebsd-hackers@freebsd.org Subject: FIONREAD on tunnel device? Message-ID: <199612201338.NAA00973@truk.brandinnovators.com>
next in thread | raw e-mail | index | archive | help
Hi, While playing with a proprietary TCP/IP stack connected to FreeBSD-2.1.5R I think I stumbled into a bug. When I do: ioctl(fd, FIONREAD, &len); read(fs, buf, len); buf ends up with less data than when I do: len = read(fs, buf, MAXINT); /* or some other large number... */ The problem (as far as I can see) is that (in if_tun.c) FIONREAD returns: tp->tun_if.if_snd.ifq_head->m_len while it should probably be: tp->tun_if.if_snd.ifq_head->m_pkthdr.len Regards, Hans -- H. Zuidam E-Mail: hans@brandinnovators.com Brand Innovators B.V. P-Mail: P.O. Box 1377 de Pinckart 54 5602 BJ Eindhoven, The Netherlands 5674 CC Nuenen Tel. +31 40 2631134, Fax. +31 40 2831138
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612201338.NAA00973>