require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NAMESER_H_)) {
    eval 'sub _NAMESER_H_ () {1;}' unless defined(&_NAMESER_H_);
    require 'sys/cdefs.ph';
    require 'sys/param.ph';
    eval 'sub __BIND () {19960801;}' unless defined(&__BIND);
    eval 'sub PACKETSZ () {512;}' unless defined(&PACKETSZ);
    eval 'sub MAXDNAME () {1025;}' unless defined(&MAXDNAME);
    eval 'sub MAXCDNAME () {255;}' unless defined(&MAXCDNAME);
    eval 'sub MAXLABEL () {63;}' unless defined(&MAXLABEL);
    eval 'sub HFIXEDSZ () {12;}' unless defined(&HFIXEDSZ);
    eval 'sub QFIXEDSZ () {4;}' unless defined(&QFIXEDSZ);
    eval 'sub RRFIXEDSZ () {10;}' unless defined(&RRFIXEDSZ);
    eval 'sub INT32SZ () {4;}' unless defined(&INT32SZ);
    eval 'sub INT16SZ () {2;}' unless defined(&INT16SZ);
    eval 'sub INADDRSZ () {4;}' unless defined(&INADDRSZ);
    eval 'sub IN6ADDRSZ () {16;}' unless defined(&IN6ADDRSZ);
    eval 'sub NAMESERVER_PORT () {53;}' unless defined(&NAMESERVER_PORT);
    eval 'sub QUERY () {0x;}' unless defined(&QUERY);
    eval 'sub IQUERY () {0x1;}' unless defined(&IQUERY);
    eval 'sub STATUS () {0x2;}' unless defined(&STATUS);
    eval 'sub NS_NOTIFY_OP () {0x4;}' unless defined(&NS_NOTIFY_OP);
    eval 'sub NOERROR () {0;}' unless defined(&NOERROR);
    eval 'sub FORMERR () {1;}' unless defined(&FORMERR);
    eval 'sub SERVFAIL () {2;}' unless defined(&SERVFAIL);
    eval 'sub NXDOMAIN () {3;}' unless defined(&NXDOMAIN);
    eval 'sub NOTIMP () {4;}' unless defined(&NOTIMP);
    eval 'sub REFUSED () {5;}' unless defined(&REFUSED);
    eval 'sub T_A () {1;}' unless defined(&T_A);
    eval 'sub T_NS () {2;}' unless defined(&T_NS);
    eval 'sub T_MD () {3;}' unless defined(&T_MD);
    eval 'sub T_MF () {4;}' unless defined(&T_MF);
    eval 'sub T_CNAME () {5;}' unless defined(&T_CNAME);
    eval 'sub T_SOA () {6;}' unless defined(&T_SOA);
    eval 'sub T_MB () {7;}' unless defined(&T_MB);
    eval 'sub T_MG () {8;}' unless defined(&T_MG);
    eval 'sub T_MR () {9;}' unless defined(&T_MR);
    eval 'sub T_NULL () {10;}' unless defined(&T_NULL);
    eval 'sub T_WKS () {11;}' unless defined(&T_WKS);
    eval 'sub T_PTR () {12;}' unless defined(&T_PTR);
    eval 'sub T_HINFO () {13;}' unless defined(&T_HINFO);
    eval 'sub T_MINFO () {14;}' unless defined(&T_MINFO);
    eval 'sub T_MX () {15;}' unless defined(&T_MX);
    eval 'sub T_TXT () {16;}' unless defined(&T_TXT);
    eval 'sub T_RP () {17;}' unless defined(&T_RP);
    eval 'sub T_AFSDB () {18;}' unless defined(&T_AFSDB);
    eval 'sub T_X25 () {19;}' unless defined(&T_X25);
    eval 'sub T_ISDN () {20;}' unless defined(&T_ISDN);
    eval 'sub T_RT () {21;}' unless defined(&T_RT);
    eval 'sub T_NSAP () {22;}' unless defined(&T_NSAP);
    eval 'sub T_NSAP_PTR () {23;}' unless defined(&T_NSAP_PTR);
    eval 'sub T_SIG () {24;}' unless defined(&T_SIG);
    eval 'sub T_KEY () {25;}' unless defined(&T_KEY);
    eval 'sub T_PX () {26;}' unless defined(&T_PX);
    eval 'sub T_GPOS () {27;}' unless defined(&T_GPOS);
    eval 'sub T_AAAA () {28;}' unless defined(&T_AAAA);
    eval 'sub T_LOC () {29;}' unless defined(&T_LOC);
    eval 'sub T_NXT () {30;}' unless defined(&T_NXT);
    eval 'sub T_EID () {31;}' unless defined(&T_EID);
    eval 'sub T_NIMLOC () {32;}' unless defined(&T_NIMLOC);
    eval 'sub T_SRV () {33;}' unless defined(&T_SRV);
    eval 'sub T_ATMA () {34;}' unless defined(&T_ATMA);
    eval 'sub T_NAPTR () {35;}' unless defined(&T_NAPTR);
    eval 'sub T_KX () {36;}' unless defined(&T_KX);
    eval 'sub T_CERT () {37;}' unless defined(&T_CERT);
    eval 'sub T_A6 () {38;}' unless defined(&T_A6);
    eval 'sub T_DNAME () {39;}' unless defined(&T_DNAME);
    eval 'sub T_SINK () {40;}' unless defined(&T_SINK);
    eval 'sub T_OPT () {41;}' unless defined(&T_OPT);
    eval 'sub T_APL () {42;}' unless defined(&T_APL);
    eval 'sub T_DS () {43;}' unless defined(&T_DS);
    eval 'sub T_SSHFP () {44;}' unless defined(&T_SSHFP);
    eval 'sub T_RRSIG () {46;}' unless defined(&T_RRSIG);
    eval 'sub T_NSEC () {47;}' unless defined(&T_NSEC);
    eval 'sub T_DNSKEY () {48;}' unless defined(&T_DNSKEY);
    eval 'sub T_UINFO () {100;}' unless defined(&T_UINFO);
    eval 'sub T_UID () {101;}' unless defined(&T_UID);
    eval 'sub T_GID () {102;}' unless defined(&T_GID);
    eval 'sub T_UNSPEC () {103;}' unless defined(&T_UNSPEC);
    eval 'sub T_TKEY () {249;}' unless defined(&T_TKEY);
    eval 'sub T_TSIG () {250;}' unless defined(&T_TSIG);
    eval 'sub T_IXFR () {251;}' unless defined(&T_IXFR);
    eval 'sub T_AXFR () {252;}' unless defined(&T_AXFR);
    eval 'sub T_MAILB () {253;}' unless defined(&T_MAILB);
    eval 'sub T_MAILA () {254;}' unless defined(&T_MAILA);
    eval 'sub T_ANY () {255;}' unless defined(&T_ANY);
    eval 'sub C_IN () {1;}' unless defined(&C_IN);
    eval 'sub C_CHAOS () {3;}' unless defined(&C_CHAOS);
    eval 'sub C_HS () {4;}' unless defined(&C_HS);
    eval 'sub C_ANY () {255;}' unless defined(&C_ANY);
    eval 'sub KEYFLAG_TYPEMASK () {0xc000;}' unless defined(&KEYFLAG_TYPEMASK);
    eval 'sub KEYFLAG_TYPE_AUTH_CONF () {0x;}' unless defined(&KEYFLAG_TYPE_AUTH_CONF);
    eval 'sub KEYFLAG_TYPE_CONF_ONLY () {0x8000;}' unless defined(&KEYFLAG_TYPE_CONF_ONLY);
    eval 'sub KEYFLAG_TYPE_AUTH_ONLY () {0x4000;}' unless defined(&KEYFLAG_TYPE_AUTH_ONLY);
    eval 'sub KEYFLAG_TYPE_NO_KEY () {0xc000;}' unless defined(&KEYFLAG_TYPE_NO_KEY);
    eval 'sub KEYFLAG_NO_AUTH () {0x8000;}' unless defined(&KEYFLAG_NO_AUTH);
    eval 'sub KEYFLAG_NO_CONF () {0x4000;}' unless defined(&KEYFLAG_NO_CONF);
    eval 'sub KEYFLAG_EXPERIMENTAL () {0x2000;}' unless defined(&KEYFLAG_EXPERIMENTAL);
    eval 'sub KEYFLAG_RESERVED3 () {0x1000;}' unless defined(&KEYFLAG_RESERVED3);
    eval 'sub KEYFLAG_RESERVED4 () {0x800;}' unless defined(&KEYFLAG_RESERVED4);
    eval 'sub KEYFLAG_USERACCOUNT () {0x400;}' unless defined(&KEYFLAG_USERACCOUNT);
    eval 'sub KEYFLAG_ENTITY () {0x200;}' unless defined(&KEYFLAG_ENTITY);
    eval 'sub KEYFLAG_ZONEKEY () {0x100;}' unless defined(&KEYFLAG_ZONEKEY);
    eval 'sub KEYFLAG_IPSEC () {0x80;}' unless defined(&KEYFLAG_IPSEC);
    eval 'sub KEYFLAG_EMAIL () {0x40;}' unless defined(&KEYFLAG_EMAIL);
    eval 'sub KEYFLAG_RESERVED10 () {0x20;}' unless defined(&KEYFLAG_RESERVED10);
    eval 'sub KEYFLAG_RESERVED11 () {0x10;}' unless defined(&KEYFLAG_RESERVED11);
    eval 'sub KEYFLAG_SIGNATORYMASK () {0xf;}' unless defined(&KEYFLAG_SIGNATORYMASK);
    eval 'sub KEYFLAG_RESERVED_BITMASK () {(  &KEYFLAG_RESERVED3 |  &KEYFLAG_RESERVED4 |  &KEYFLAG_RESERVED10|  &KEYFLAG_RESERVED11);}' unless defined(&KEYFLAG_RESERVED_BITMASK);
    eval 'sub ALGORITHM_MD5RSA () {1;}' unless defined(&ALGORITHM_MD5RSA);
    eval 'sub ALGORITHM_EXPIRE_ONLY () {253;}' unless defined(&ALGORITHM_EXPIRE_ONLY);
    eval 'sub ALGORITHM_PRIVATE_OID () {254;}' unless defined(&ALGORITHM_PRIVATE_OID);
    eval 'sub MIN_MD5RSA_KEY_PART_BITS () {512;}' unless defined(&MIN_MD5RSA_KEY_PART_BITS);
    eval 'sub MAX_MD5RSA_KEY_PART_BITS () {2552;}' unless defined(&MAX_MD5RSA_KEY_PART_BITS);
    eval 'sub MAX_MD5RSA_KEY_BYTES () {(( &MAX_MD5RSA_KEY_PART_BITS+7/8)*2+3);}' unless defined(&MAX_MD5RSA_KEY_BYTES);
    eval 'sub MAX_KEY_BASE64 () {((( &MAX_MD5RSA_KEY_BYTES+2)/3)*4);}' unless defined(&MAX_KEY_BASE64);
    eval 'sub DNS_MESSAGEEXTFLAG_DO () {0x8000;}' unless defined(&DNS_MESSAGEEXTFLAG_DO);
    eval 'sub CONV_SUCCESS () {0;}' unless defined(&CONV_SUCCESS);
    eval 'sub CONV_OVERFLOW () {(-1);}' unless defined(&CONV_OVERFLOW);
    eval 'sub CONV_BADFMT () {(-2);}' unless defined(&CONV_BADFMT);
    eval 'sub CONV_BADCKSUM () {(-3);}' unless defined(&CONV_BADCKSUM);
    eval 'sub CONV_BADBUFLEN () {(-4);}' unless defined(&CONV_BADBUFLEN);
    if(!defined( &_BYTE_ORDER) || ((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) != (defined(&_BIG_ENDIAN) ? &_BIG_ENDIAN : 0)  && (defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) != (defined(&_LITTLE_ENDIAN) ? &_LITTLE_ENDIAN : 0)  && (defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) != (defined(&_PDP_ENDIAN) ? &_PDP_ENDIAN : 0))) {
	die("Undefined or invalid _BYTE_ORDER");
    }
    if((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) == (defined(&_BIG_ENDIAN) ? &_BIG_ENDIAN : 0)) {
    }
    if((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) == (defined(&_LITTLE_ENDIAN) ? &_LITTLE_ENDIAN : 0) || (defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) == (defined(&_PDP_ENDIAN) ? &_PDP_ENDIAN : 0)) {
    }
    eval 'sub INDIR_MASK () {0xc0;}' unless defined(&INDIR_MASK);
    eval 'sub GETSHORT {
        my($s, $cp) = @_;
	    eval q({ \'unsigned char\' * &t_cp = ($cp); ($s) = (( &u_int16_t) $t_cp[0] << 8) | (( &u_int16_t) $t_cp[1]) ; ($cp) +=  &INT16SZ; });
    }' unless defined(&GETSHORT);
    eval 'sub GETLONG {
        my($l, $cp) = @_;
	    eval q({ \'unsigned char\' * &t_cp = ($cp); ($l) = (( &u_int32_t) $t_cp[0] << 24) | (( &u_int32_t) $t_cp[1] << 16) | (( &u_int32_t) $t_cp[2] << 8) | (( &u_int32_t) $t_cp[3]) ; ($cp) +=  &INT32SZ; });
    }' unless defined(&GETLONG);
    eval 'sub PUTSHORT {
        my($s, $cp) = @_;
	    eval q({  &u_int16_t  &t_s = ( &u_int16_t)($s); \'unsigned char\' * &t_cp = ($cp); * &t_cp++ =  &t_s >> 8; * &t_cp =  &t_s; ($cp) +=  &INT16SZ; });
    }' unless defined(&PUTSHORT);
    eval 'sub PUTLONG {
        my($l, $cp) = @_;
	    eval q({  &u_int32_t  &t_l = ( &u_int32_t)($l); \'unsigned char\' * &t_cp = ($cp); * &t_cp++ =  &t_l >> 24; * &t_cp++ =  &t_l >> 16; * &t_cp++ =  &t_l >> 8; * &t_cp =  &t_l; ($cp) +=  &INT32SZ; });
    }' unless defined(&PUTLONG);
}
1;
