* [Q] ioctl arguments with XTI_SOSETOPT?
@ 1994-07-29 12:20 Philip Shearer @ZUO-DC EBS-Team
1994-07-29 15:02 ` Matt Thomas
0 siblings, 1 reply; 3+ messages in thread
From: Philip Shearer @ZUO-DC EBS-Team @ 1994-07-29 12:20 UTC (permalink / raw)
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)) ;
}
I guessed that the the equivelent was:
{
struct xtisoioctl options ;
int sendbuf = 1 ;
options.level = SOL_SOCKET;
options.optname = SO_KEEPALIVE;
options.opt.maxlen = sizeof(int) ;
options.opt.len = sizeof(int) ;
options.opt.buf = (char *) &sendbuf;
ioctl(fd,XTI_SOSETOPT,&options )
}
But isn't! perror reports "Invalid argument"
Does any one know what is correct?
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Q] ioctl arguments with XTI_SOSETOPT?
1994-07-29 12:20 [Q] ioctl arguments with XTI_SOSETOPT? Philip Shearer @ZUO-DC EBS-Team
@ 1994-07-29 15:02 ` Matt Thomas
1994-07-29 15:34 ` Mary Walker
0 siblings, 1 reply; 3+ messages in thread
From: Matt Thomas @ 1994-07-29 15:02 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Q] ioctl arguments with XTI_SOSETOPT?
1994-07-29 15:02 ` Matt Thomas
@ 1994-07-29 15:34 ` Mary Walker
0 siblings, 0 replies; 3+ messages in thread
From: Mary Walker @ 1994-07-29 15:34 UTC (permalink / raw)
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
|>
a word of warning... The ioctl command mentioned in /usr/include/xtiext.h
is not a supported ioctl (hence it is not documented).
It will probably be removed when XPG4 XTI is implemeneted.
mary walker
DEC/OSF1 engineering group
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1994-07-29 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-07-29 12:20 [Q] ioctl arguments with XTI_SOSETOPT? Philip Shearer @ZUO-DC EBS-Team
1994-07-29 15:02 ` Matt Thomas
1994-07-29 15:34 ` Mary Walker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox