Date: Mon, 27 Aug 2007 16:05:26 -0700 (PDT) From: Weiguang Shi <wgshizz@yahoo.com> To: freebsd-net@freebsd.org Subject: nc captures 1024 bytes Message-ID: <954767.6972.qm@web43139.mail.sp1.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hi,=0A=0AMy system is FreeBSD 6.2. I sent a UDP datagram of 1464 bytes to p= ort =0A1234 where nc was waiting=0A % nc -n -u -l 1234 >tt=0A=0AAfterwar= ds, the size of tt, however, was only 1024 bytes.=0A=0AI noticed this piec= e of code in nc=0A=0A341 if (uflag) {=0A342 = int rv, plen;=0A343 = char buf[8192];=0A344 struct sockaddr_sto= rage z;=0A345 =0A346 len =3D sizeof(z);=0A3= 47 plen =3D jflag ? 8192 : 1024;=0A348 = rv =3D recvfrom(s, buf, plen, MSG_PEEK,=0A349 = (struct sockaddr *)&z, &len);=0A350 = if (rv < 0)=0A351 = err(1, "recvfrom");=0A=0AWhy 1024 instead of something like 1500= -20-8=3D1472?=0A=0AThanks.=0AWei=0A=0A=0A=0A=0A =0A__________________= __________________________________________________________________=0AMoody = friends. Drama queens. Your life? Nope! - their life, your story. Play Sims= Stories at Yahoo! Games.=0Ahttp://sims.yahoo.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?954767.6972.qm>