Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Run ICMP ping tests on Windows as long as we have adminprivs

    2 answers - 1734 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Jan Dubois wrote:
    Tue, 19 Apr 2005, Steve Hay wrote:

    >
    >>Excellent idea, and it works a treat for me (on WinXP). I've forwarded
    >>your patch to Rob Brown, the maintainer of Net-Ping. Hopefully he'll
    >>release a new version for inclusion on perl sometime soon.

    >
    >>

    >
    >I see. In that case the patch needs to be a bit more robust since
    >Win32::IsAdminUser() is only available in the core since Perl 5.8.4.

    it may be available if libwin32 is installed. You may want to
    >define a local IsAdminUser() function in the tests like this:
    >
    >sub IsAdminUser {

    return unless $^ eq "MSWin32";
    return unless eval { require Win32 };
    return unless defined &Win32::IsAdminUser;
    return Win32::IsAdminUser();
    >}

    Thanks, committed to blead as change 24688.
    Radan Computational Ltd.
    The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.
  • No.1 | | 1354 bytes | |

    Steve Hay <steve.hay (AT) uk (DOT) radan.comwrites:

    Thanks, committed to blead as change 24688.

    Since you have started to patch Net::Ping, I have another patch to
    Net::Ping that we have applied to ActivePerl that I think should be
    applied to blead as well. This patch was sent to Rob Brown some
    months ago, but I have not received a reply.

    of our customers experienced problems because Net::Ping would time
    out early if it received a source quench reply. This patch make sure
    we only time out early if we actually receive a unreachable reply.

    diff -ru perl-5.8.7/lib/Net/Ping.pm main/lib/Net/Ping.pm
    perl-5.8.7/lib/Net/Ping.pm2003-08-03 21:38:04.000000000 +0200
    main/lib/Net/Ping.pm2005-04-30 12:58:45.000000000 +0200
    @@ -396,6 +396,7 @@
    }

    use constant ICMP_ECHREPLY =0; # ICMP packet types
    +use constant ICMP_UNREACHABLE =3;
    use constant ICMP_ECH =8;
    use constant ICMP_STRUCT ="C2 n3 A"; # Structure of a minimal ICMP packet
    use constant SUBCDE =0; # No ICMP subcode for ECH and ECHREPLY
    @@ -480,8 +481,11 @@
    ($from_seq == $self->{"seq"})) {
    if ($from_type == ICMP_ECHREPLY){
    $ret = 1;
    + $done = 1;
    + }
    +elsif ($from_type == ICMP_UNREACHABLE) {
    + $done = 1;
    }
    - $done = 1;
    }
    } else { # , timed out
    $done = 1;
  • No.2 | | 598 bytes | |

    03 Jun 2005 09:17:44 -0700, Gisle Aas <gisle (AT) activestate (DOT) comwrote:
    Since you have started to patch Net::Ping, I have another patch to
    Net::Ping that we have applied to ActivePerl that I think should be
    applied to blead as well. This patch was sent to Rob Brown some
    months ago, but I have not received a reply.

    of our customers experienced problems because Net::Ping would time
    out early if it received a source quench reply. This patch make sure
    we only time out early if we actually receive a unreachable reply.

    Thanks, applied as #24699.

Re: Run ICMP ping tests on Windows as long as we have adminprivs


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Perl"

EMSDN.COM