• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ioctl always returns 0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: ioctl always returns 0
      • From: Quinn <email@hidden>
References: 
 >RE: ioctl always returns 0 (From: "Mahesh Vyas" <email@hidden>)
 >Re: ioctl always returns 0 (From: Vincent Lubet <email@hidden>)

  • Prev by Date: Re: Appending to files with CFFTP
  • Next by Date: Newbie question about receiving raw ethernet packet
  • Previous by thread: Re: ioctl always returns 0
  • Next by thread: Re: ioctl always returns 0
  • Index(es):
    • Date
    • Thread