Annotation of embedaddon/php/ext/snmp/tests/ipv6.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--                                 
                      2: IPv6 support
                      3: --CREDITS--
                      4: Boris Lytochkin
                      5: --SKIPIF--
                      6: <?php
                      7: require_once(dirname(__FILE__).'/skipif.inc');
                      8: 
                      9: $packed = str_repeat(chr(0), 15) . chr(1);
                     10: if (@inet_ntop($packed) === false) {
                     11:        die("skip no IPv6 support");
                     12: }
                     13: ?>
                     14: --FILE--
                     15: <?php
                     16: require_once(dirname(__FILE__).'/snmp_include.inc');
                     17: 
                     18: //EXPECTF format is quickprint OFF
                     19: snmp_set_quick_print(false);
                     20: snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
                     21: 
                     22: var_dump(snmpget($hostname6_port, $community, '.1.3.6.1.2.1.1.1.0'));
1.1.1.2 ! misho      23: var_dump(snmpget('[dead:beef::', $community, '.1.3.6.1.2.1.1.1.0'));
1.1       misho      24: ?>
                     25: --EXPECTF--
                     26: %unicode|string%(%d) "%s"
1.1.1.2 ! misho      27: 
        !            28: Warning: snmpget(): malformed IPv6 address, closing square bracket missing in %s on line %d
        !            29: bool(false)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>