Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread Seemanto Barua
Hi Gisle, I tried truss. The manual says getprotobyname should search in the file /etc/protocols. The following line of output from truss indicates its looking for the file through NIS ??? open("/etc/nsswitch.conf", O_RDONLY)= 3 On 08 Sep 2004 06:13:42 -0700, Gisle Aas <[EMAIL PROTE

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread $Bill Luebkert
Seemanto Barua wrote: > Hi Gisle, > > I tried truss. The manual says getprotobyname should search in the > file /etc/protocols. The following line of output from truss indicates > its looking for the file through NIS ??? > > open("/etc/nsswitch.conf", O_RDONLY)= 3 Most NIX's give yo

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread Seemanto Barua
Hi Gisle, I tried truss. The manual says getprotobyname should search in the file /etc/protocols. The following line of output from truss indicates its looking for the file through NIS ??? open("/etc/nsswitch.conf", O_RDONLY)= 3 On 08 Sep 2004 06:13:42 -0700, Gisle Aas <[EMAIL PROTE

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread $Bill Luebkert
of system calls and BIND probably wouldn't be needed in getprotobyname unless maybe it's using NIS or some other name service. > From: Seemanto Barua [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 08, 2004 8:25 AM > To: [EMAIL PROTECTED] > Subject: [Perl-unix-users] g

RE: [Perl-unix-users] getprotobyname

2004-09-08 Thread Chris Botka
ECTED] Sent: Wednesday, September 08, 2004 8:25 AM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] getprotobyname Hi All, I have perl version 5.00503 installed on sunos machine. Do i need to add aditional module to use the function getprotobyname ? #!/usr/bin/env perl

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread Gisle Aas
Jeff D <[EMAIL PROTECTED]> writes: > Have you tried your code with other comm protocols? > Ie substitute the udp with tcp? I suggest you try to run your program with 'truss'. That should show you what system calls fail. The Linux program 'strace' is similar. Regards, Gisle ___

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread $Bill Luebkert
Seemanto Barua wrote: > Hi All, > > I have perl version 5.00503 installed on sunos machine. Do i need to > add aditional module to use the function getprotobyname ? > > #!/usr/bin/env perl Are you sure that shebang line is right ? #!/usr/bin/perl or #!/usr/local/bin/

Re: [Perl-unix-users] getprotobyname

2004-09-08 Thread Jeff D
According to O'Reilly's Programming Perl book, getprotobyname is a perl built in function, so no additional modules are required. I've tried your code on both SunOS 5.6 and SunOS5.8 with perl 5.00503 and receive no errors. Have you tried your code with other comm protocols? Ie substitute the udp

[Perl-unix-users] getprotobyname

2004-09-08 Thread Seemanto Barua
Hi All, I have perl version 5.00503 installed on sunos machine. Do i need to add aditional module to use the function getprotobyname ? #!/usr/bin/env perl print("Name " . (getprotobyname('udp'))[2] . "\n" ); The above code when run gives the error: "Error Bad file num