1832934 Members
2966 Online
110048 Solutions
New Discussion

TLI

 
Arun_3
New Member

TLI

We are migrating from SVR4 to HP-UX 11.0. We have the following issues and request for clarification.

1. According to FAQ in http://hpux.cs.utah.edu/hppd/FAQ/7-43.html, TLI socket calls are not supported by HP-UX 10.0 onwards. It is recommended to use XTI instead of TLI. As the APIs are same, will the behaviour of the call be similar?

2.On UNIX (SVR4) we are having a structure opthdr(sys/socket.h), which is used in the tli call t_optmgmt.

On HP UX we do not have an equivalent for opthdr.

opthdr structure in SVR:

struct opthdr {
long level; /* protocol level affected */
long name; /* option to modify */
long len; /* length of option value */
};


3.The code on SVR4 is as follows:

struct t_optmgmt req;
struct opthdr *opt;
int ret;
char buf[sizeof(struct opthdr)];


memset((char*)buf, '\0',sizeof(buf));
opt=(struct opthdr *) buf;
opt->level=level;
opt->name=optname;
opt->len=OPTLEN(optlen);
memcpy(optval,(char *)(opt+1), optlen);

req.flags=T_NEGOTIATE;
req.opt.maxlen=req.opt.len=OPTLEN(sizeof(struct opthdr) + optlen);
req.opt.buf=buf;

ret=t_optmgmt(s, &req, &req);


The above code is not getting compiled on HP-UX 11.0 with aCC compiler.

4.If there exists a server using TLI calls, can a client on another node connect to it using XTI calls. We are getting this doubt because we will be porting a client program to XTI from TLI but our server is going to remain using TLI calls.


Thanks,
1 REPLY 1
Brian Hackley
Honored Contributor

Re: TLI

Arun,

Look in /usr/include/sys/xti.h for the
t_opthdr structure definition. This is
outlined in the t_optmgmt(3) man page.
Also examine xopen_networking(7).

HP provides the TLI API "as is"; most developers I have spoken with ported to XTI instead of taking risks with TLI. The differences are subtle, however any issues should be answered by the man pages.

Hope this helps in some way to resolve the issue,

-> Brian Hackley

Ask me about telecommuting!