Re: ioctl always returns 0
Re: ioctl always returns 0
- Subject: Re: ioctl always returns 0
- From: Jim Matthews <email@hidden>
- Date: Wed, 13 Apr 2005 17:18:36 -0400
I'm trying to set a TCP keepalive timeout with this code (which asks
for a 1 minute timeout for ease of testing, but I'd use a longer one
in practice):
struct TOptionKeepalive {
ByteCount len;
OTXTILevel level;
OTXTIName name;
UInt32 status;
UInt32 kp_onoff;
UInt32 kp_timeout;
} option;
option.len = sizeof(struct TOptionKeepalive);
option.level = INET_TCP;
option.name = TCP_KEEPALIVE ;
option.status = 0;
option.kp_onoff = 1;
option.kp_timeout = 1;
reqopt.flags = T_NEGOTIATE;
reqopt.opt.len = option.len;
reqopt.opt.buf = (UInt8*) &option;
retopt.opt.len = 0;
retopt.opt.maxlen = option.len;
retopt.opt.buf = (UInt8*) &option;
osstat = OTOptionManagement((EndpointRef) id, &reqopt, &retopt);
The call returns noErr, but on return the kp_timeout field has been
set to 120 (minutes) rather than the 1 requested (and the status
field is set to T_PARTSUCCESS). This is on 10.3.8.
Is it possible to set a shorter-than-120-minute TCP keepalive timeout on OS X?
Is it possible to do it from Open Transport?
--
Jim Matthews
Fetch Softworks
http://fetchsoftworks.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden