Thanks brian -----Original Message----- From: shrike-list-bounces@xxxxxxxxxx [mailto:shrike-list-bounces@xxxxxxxxxx] On Behalf Of Brian T. Brunner Sent: Friday, September 24, 2004 9:28 AM To: shrike-list@xxxxxxxxxx Subject: Re: Disabling algorithms Nagle Algorithm disable: setsockopt(fd,IPPROTO_TCP,TCP_NODELAY,&x,sizeof(x)); For other opt(s), man 7 tcp man 7 ip man 7 socket man setsockopt To make setting options fairly painless (once I figured out what they were and what values I wanted for them) I wrote a macro #define MAYBEDO(a,b,c,d,e,f,g) { if ((a) == 0) {(a) |= setsockopt(c,d,e,f,g); b++;}} and used it thus: int val = 1; int step = 0; int errval = 0; struct linger myLinger = {1,1}; errno=0; MAYBEDO(errval,step,fd,SOL_SOCKET,SO_LINGER,&myLinger,sizeof(myLinger)); MAYBEDO(errval,step,fd,SOL_SOCKET,SO_REUSEADDR,&val,sizeof(val)); MAYBEDO(errval,step,fd,SOL_SOCKET,SO_KEEPALIVE,&val,sizeof(val)); val = 4; MAYBEDO(errval,step,fd,SOL_TCP,TCP_KEEPINTVL,&val,sizeof(val)); MAYBEDO(errval,step,fd,SOL_TCP,TCP_KEEPIDLE,&val,sizeof(val)); MAYBEDO(errval,step,fd,SOL_TCP,TCP_KEEPCNT,&val,sizeof(val)); MAYBEDO(errval,step,fd,IPPROTO_TCP, TCP_NODELAY,&val,sizeof(val)); Then I check errval, step, and errno. Brian Brunner brian.t.brunner@xxxxxxxxxxxxxxx (610)796-5838 >>> smeag0l@xxxxxxxxxxx 09/23/04 10:18PM >>> Hello, does anyone know how to disable the "Nagle Algorithm " and the "Delayed Acknowledgement algorithm" in RedHat 9? Thanks Ryan -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list ******************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. www.hubbell.com - Hubbell Incorporated -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list