maybe because of big Indian small Indian problem ?? just a though I never pack'd it my 
self. 

Mark G

----- Original Message -----
From: "Kipp, James" <[EMAIL PROTECTED]>
Date: Tuesday, July 1, 2003 9:24 am
Subject: sockets: packing an inet sructure

> I am trying to hand pack an net addr. On the server end (linux - 
> i386) it
> works fine.:
> $addr = pack($template,AF_INET,$port,$iaddr);
> bind(MY_SOCKET, $addr) || die "$0: Cannot bind .. $!\n";
> --
> on the client end (win2k - i386) it fails.
> --
> $template = 'S n C4 x8';
> $port = 6668;
> $proto   = getprotobyname('tcp');
> $addr = (gethostbyname("10.1.101.12"))[4];
> $remote = pack($template,AF_INET,$port,$addr);
> socket(SOCK,AF_INET,SOCK_STREAM,$proto) ||
>     die "$0: Cannot open socket\n";
> connect(SOCK, $remote) or die "can't connect: $!\n";
> --
> the only error i get is:
> Argument "\n^Ae\f" isn't numeric in pack at client.pl line 17.
> can't connect: Unknown error.
> which doesn't tell me anything. i get a similar warning about the non
> numeric on the server end but it works fine. It works if use 
> 'inet_aton' and
> 'sockaddr_in' on the addr/port, but just curious why the pack is not
> working..
> 
> Thanks
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to