home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!cam-eng!tpl
- From: tpl@eng.cam.ac.uk (Tim Love)
- Newsgroups: comp.sys.hp
- Subject: SUN <-> HP and sockets
- Message-ID: <1992Nov19.141426.16824@eng.cam.ac.uk>
- Date: 19 Nov 92 14:14:26 GMT
- Organization: cam.eng
- Lines: 48
-
- We have been trying to get HP 9000/3xx machines running hpux8 and Suns
- to talk to each other using BSD datagram sockets over UDP/IP.
-
- HP client sockets are bound as -
- memset ((char *) &cli_addr, 0, sizeof(cli_addr));
- cli_addr.sin_family = AF_INET;
- cli_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- cli_addr.sin_port = htons(0);
-
- if (bind(sockfd, (struct sockaddr_in *) &cli_addr,
- sizeof(cli_addr)) < 0) {
- printf("\nCan't bind socket\n");
- return(-1);
- }
-
- Sun server addresses are specified by -
- serv_addr.sin_family = AF_INET;
- serv_addr.sin_addr.s_addr = inet_addr(SERV_HOST_ADDR);
- serv_addr.sin_port = htons((u_short) dstkey);
- where SERV_HOST_ADDR and dstkey are hardwired at present.
-
- Messages are sent and received using the sendto and recvfrom calls -
-
- if (sendto(sockfd, buf, nbytes, 0,
- (struct sockaddr *) &serv_addr, svrlen) != nbytes)
- syserr("Unable to send datagram to BB server");
- .
- .
- .
-
- n = recvfrom(sockfd, inbuf, nbytes, 0,
- (struct sockaddr *) 0, (int *) 0);
- if (n < 0) {
- .
- [retranmission code]
- .
-
- The problem is that the HP client can send to the Sun server o.k but does not
- receive acknowledgements. The Sun definitely receives HP messages and replies
- to them though.
-
- This code works fine when both client and server are Sun m/cs running SunOs
- 4.1.1. We haven't tried installing the server on an HP yet.
-
- Any known problems in this area?
-
-
- Tim Love (tpl@eng.cam.ac.uk)
-