From owner-freebsd-net Tue Mar 16 21: 9:38 1999 Delivered-To: freebsd-net@freebsd.org Received: from web704.mail.yahoo.com (web704.mail.yahoo.com [128.11.23.24]) by hub.freebsd.org (Postfix) with SMTP id 17AB4152AE for ; Tue, 16 Mar 1999 21:09:20 -0800 (PST) (envelope-from boardyan@yahoo.com) Message-ID: <19990317050858.7049.rocketmail@web704.mail.yahoo.com> Received: from [131.228.20.19] by web704.mail.yahoo.com; Tue, 16 Mar 1999 21:08:58 PST Date: Tue, 16 Mar 1999 21:08:58 -0800 (PST) From: boards yan Subject: exhausted To: freebsd-net@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I tried to set the tcp socket Option(SO_RCV,TCP_MAXSEG), but failed all the time. The program seems quite normal. However, the supervision using tcpdump shows that the option is unchanged. :-( Can anybody give me a reason? B.R. ------------------------------------------------- { int number=512,n,optlen; struct protoent *p; p = getprotobyname("tcp"); if( p && setsockopt(fd, p->p_proto, TCP_MAXSEG, &number, sizeof(one)) < 0) err("setsockopt: MAXSEG"); optlen=sizeof(n); if (getsockopt(fd, p->p_proto, TCP_MAXSEG, (char*) &n, &optlen)<0) err("getsockopt: MAXSEG-getsockopt"); fprintf(stderr,"\n MAXSEG set to %d",n); } ---------------------------------------------------- if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*) &sockbufsize, sizeof(sockbufsize)) < 0) perror("setsockopt: rcvbuf"); { int n; int optlen; optlen=sizeof(n); if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char*) &n, &optlen)<0) perror("getsockopt"); if (n!=sockbufsize) printf("\n revbuff not set correctly"); else printf("\n buffer set to %d",n); } ---------------------------------------------------- _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message