Operating System - HP-UX
1833757 Members
2888 Online
110063 Solutions
New Discussion

Re: Connld functionality on HP-UX

 
R. Sri Ram Kishore_1
Respected Contributor

Connld functionality on HP-UX

Hello,

I have a situation where a customer is migrating from SUN to HP-UX and is struck with porting the functionality of "connld" streams module onto HP-UX.

Since, HP-UX doesnt support "connld" module, is there any workaround or a solution to address this scenario.

Basically the application is like this...
---
int ServListen( const char *name)
{
int tempfd, fd[2] ;

unlink(name);

if( (tempfd = creat(name, FIFOMODE)) <0 ) return(-1);
if( close(tempfd) <0 ) return(-2);
if( pipe(fd) <0 ) return(-3);
if( ioctl(fd[1], I_PUSH,"connld") < 0 ){
printf("errno %d",errno);
return(-4);
}
if( fattach(fd[1], name) <0 ) return(-5) ;

return(fd[0]);
}

*************
Server waiting to connect:
*************

int ServAccept(int listenfd)
{
struct strrecvfd recvfd ;

if( ioctl(listenfd, I_RECVFD, &recvfd)
<0 ) return(-1);

return( recvfd.fd);

}

Thanks in advance.

Regards,
Sri Ram
"What goes up must come down. Ask any system administrator."
3 REPLIES 3
Robert-Jan Goossens
Honored Contributor

Re: Connld functionality on HP-UX

Hi Sri,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=701680

Manish had the same question a few weeks ago, unfortunatly no answer.

Regards,
Robert-Jan
Shine_5
Frequent Advisor

Re: Connld functionality on HP-UX

Hello Ram,

It is still true that connld is not on any HPUX release.

Regarding the support of connld in HPUX, this functionality is currently not included in the STREAMS product J2237A, nor is it planned in any future release at this time.

A Streams-based substitute for connld would be for you to write the program using Unix Domain Sockets instead of stream-based pipes. With Unix Domain Sockets, you can have connection oriented behavior
and Unix Domain Sockets does provide a mechanism to send files to the other side of a socket pair.

In this case changing your program to use UNIX domain socket for process data communication was the best solution.

Regards
Shine
Hemanth Gurunath Basrur
Honored Contributor

Re: Connld functionality on HP-UX

Hi Sri Ram,

The "Porting UNIX Software" book may have answer to your question on connld.

http://www.oreilly.com/catalog/port/inx.html#C

Regards,
Hemanth