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
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
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
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
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
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
___
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/
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
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