From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,645b6d8870a133f9,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-29 08:50:47 PST Path: bga.com!news.sprintlink.net!hookup!swrinde!howland.reston.ans.net!gatech!nntp.msstate.edu!olivea!decwrl!pa.dec.com!nntpd.lkg.dec.com!lkg.dec.com!thomas From: thomas@lkg.dec.com (Matt Thomas) Newsgroups: comp.unix.osf.osf1 Subject: Re: [Q] ioctl arguments with XTI_SOSETOPT? Date: 29 Jul 1994 15:02:35 GMT Organization: Digital Equipment Corporation Sender: thomas@netrix.lkg.dec.com (Matt Thomas) Distribution: world Message-ID: <31b5mb$9s6@nntpd.lkg.dec.com> References: <31as70$2te@mrnews.mro.dec.com> Reply-To: thomas@lkg.dec.com NNTP-Posting-Host: netrix.lkg.dec.com X-Newsreader: mxrn 6.18-16 In article <31as70$2te@mrnews.mro.dec.com>, pbs@zuunix.zuo.dec.com (Philip Shearer @ZUO-DC EBS-Team) writes: |>What is the structure and the content of the ioctl command mentioned in |>/usr/include/xtiext.h |> |>For example if I was using sockets: |>{ |> int sendbuf = 1 ; |> int option = SO_KEEPALIVE ; |> setsockopt(fd,SOL_SOCKET,option,&sendbuf,sizeof(sendbuf)) ; |>} |> [...] |> |>Suplementry questions: Is it true that one can not set TCP/IP options |>using t_optmgmt and if so why was it not implemented? |> |>TTFN Philip |> You guessed wrong. But you were close. These are done through a streams (I_STR) ioctl. For example: struct xtisoioctl xti_ioc; struct strioctl ioc; ioc.ic_cmd = XTI_SOSETOPT; ioc.ic_timout = 0; ioc.ic_len = sizeof(xti_ioc); ioc.ic_dp = (caddr_t) &xti_ioc; xti_ioc.level = SOL_SOCKET; xti_ioc.opt.len = sizeof(int); xti_ioc.opt.maxlen = sizeof(int); xti_ioc.optname = SO_KEEPALIVE; xti_ioc.opt.buf = (caddr_t) ((flags & RL_KEEPALIVE) ? &on : &off); if (ioctl(fd, I_STR, &ioc) < 0) { syslog(LOG_DEBUG, "fatal: can't %s SO_KEEPALIVE: %s\n", (flags & RL_KEEPALIVE) ? "enable" : "disable", strerror(errno)); if (debug) fprintf(stderr, "%s: fatal: can't %s SO_KEEPALIVE: %s\n", PROGNAME, (flags & RL_KEEPALIVE) ? "enable" : "disable", strerror(errno)); exit(EX_OSERR); } |>Suplementry questions: Is it true that one can not set TCP/IP options |>using t_optmgmt and if so why was it not implemented? You can't use t_optmgmt for TCP/IP. And that's because the XPG3 options defined for TCP/IP are basicly useless. XPG4 is much better but DEC OSF/1 does not a XPG4 compliant XTI yet. -- Matt Thomas Internet: thomas@lkg.dec.com U*X Networking WWW URL: http://ftp.dec.com/%7Ethomas/ Digital Equipment Corporation Disclaimer: This message reflects my Littleton, MA own warped views, etc.