From owner-freebsd-hackers Tue Jan 27 11:10:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA14792 for hackers-outgoing; Tue, 27 Jan 1998 11:10:52 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from heron.doc.ic.ac.uk (cUdW1dblu63Mj3qKkd9VFBDkbX5a8hKj@heron.doc.ic.ac.uk [146.169.2.31]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id LAA14776 for ; Tue, 27 Jan 1998 11:10:47 -0800 (PST) (envelope-from njs3@doc.ic.ac.uk) Received: from oak67.doc.ic.ac.uk [146.169.33.67] ([/CofjvUJsA0E5F0wnnes+JPI+dsxvFrh]) by heron.doc.ic.ac.uk with smtp (Exim 1.62 #3) id 0xxGQU-0002eT-00; Tue, 27 Jan 1998 19:12:02 +0000 Received: from njs3 by oak67.doc.ic.ac.uk with local (Exim 1.62 #3) id 0xxGP8-0001dr-00; Tue, 27 Jan 1998 19:10:38 +0000 From: njs3@doc.ic.ac.uk (Niall Smart) Date: Tue, 27 Jan 1998 19:10:38 +0000 X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: hackers@FreeBSD.ORG Subject: TCP_MAXSEG and path MTU discovery Message-Id: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Hi folks, I've been playing with TCP/IP recently, and it looks like the TCP_MAXSEG option is broken or interacting with path MTU discovery in a non-intuitive way. Or maybe I'm way off track here. Anyway, I'm doing this: opt = atoi(argv[3]); optlen = sizeof(opt); if (setsockopt(fd, IPPROTO_TCP, TCP_MAXSEG, &opt, optlen) < 0) perror("setsockopt"), exit(1); if (connect(fd, (struct sockaddr*) &sin, sizeof(sin)) < 0) perror("connect"), exit(1); if (getsockopt(fd, IPPROTO_TCP, TCP_MAXSEG, &opt, &optlen) < 0) perror("getsockopt"), exit(1); else printf("%d\n", opt); With argv[3] == "300", I'm getting this, 146.169.50.56 being my host. 19:04:07.726242 146.169.50.56.1171 > 146.169.46.7.21: S 1185413053:1185413053(0) win 16384 (DF) 19:04:07.728505 146.169.46.7.21 > 146.169.50.56.1171: S 4095294624:4095294624(0) ack 1185413054 win 8760 (DF) 19:04:07.728603 146.169.50.56.1171 > 146.169.46.7.21: . ack 4095294625 win 17520 (DF) What happened to my maximum segment size?? (Yes, the program prints 1460) Regards, Niall