Amanda-Users

Re: HP/UX?

2008-05-15 16:33:05
Subject: Re: HP/UX?
From: John E Hein <jhein AT timing DOT com>
To: "Dustin J. Mitchell" <dustin AT zmanda DOT com>
Date: Thu, 15 May 2008 14:28:14 -0600
Dustin J. Mitchell wrote at 15:12 -0400 on May 15, 2008:
 > On #amanda, I've been working with Scott Bender, who's trying to build
 > Amanda-2.6.0 on HP/UX 11.11.  He's gotten all of the prereqs
 > installed, but is having some trouble with network communication.
 > 
 > We've boiled the problem down to recvfrom(..) not returning an address
 > for incoming UDP packets.  I built the attached C "server" to
 > duplicate this; the perl script acts as a client.  Scott runs the C
 > app on the HP/UX machine, and then runs
 >  perl client.pl $HPUX_IP
 > on another box.  Here's what he sees:
 > 
 > (sockaddr_in *)800003ffff7f2fa0 = { 2, 1234, 0.0.0.0 }
 > Got 2 bytes; return addrlen is 16; sizeof ss is 16
 > (sockaddr_in *)800003ffff7f2fa0 = { 2, 1234, 0.0.0.0 }
 > 
 > the second one of those *should* contain the IP address of the box on
 > which client.pl was run, and a randomly assigned port.  That port 1234
 > still appears implies recvfrom() isn't overwriting the address at all.
 >  The manpage 
 > (http://www.informatik.uni-frankfurt.de/doc/man/hpux/recv.2.html)
 > doesn't mention anything of the sort.
 > 
 > At this point, I'm pretty much stumped.  Can you help out with any of
 >  - thoughts on what I'm doing wrong here
 >  - pointers to an HP/UX forum or mailing list where I could ask this question
 >  - an HP/UX box I can play around on for a little while

--- 36203.c     2008-05-15 14:26:51.000000000 -0600
+++ 36203.c.new 2008-05-15 14:26:59.000000000 -0600
@@ -39,7 +39,7 @@
 
     port = SS_GET_PORT(sa);
     {   
-        inet_ntop(AF_INET, &((struct sockaddr_in *)sa)->sin_addr, ipstr,
+        inet_ntop(AF_INET, &((struct sockaddr_in *)sa)->sin_addr.s_addr, ipstr,
                   sizeof(ipstr));
         printf("(sockaddr_in *)%p = { %d, %d, %s }\n",
                  sa, 


<Prev in Thread] Current Thread [Next in Thread>