require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NETINET_PIM_H_)) {
    eval 'sub _NETINET_PIM_H_ () {1;}' unless defined(&_NETINET_PIM_H_);
    require 'sys/types.ph';
    unless(defined(&_PIM_VT)) {
	unless(defined(&_BYTE_ORDER)) {
	    die("_BYTE_ORDER\ is\ not\ defined\!");
	}
	if(((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) != (defined(&_BIG_ENDIAN) ? &_BIG_ENDIAN : 0))  && ((defined(&_BYTE_ORDER) ? &_BYTE_ORDER : 0) != (defined(&_LITTLE_ENDIAN) ? &_LITTLE_ENDIAN : 0))) {
	    die("_BYTE_ORDER\ must\ be\ defined\ to\ either\ _BIG_ENDIAN\ or\ _LITTLE_ENDIAN");
	}
    }
    if(defined(&_PIM_VT)) {
    } else {
	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)) {
	}
    }
    eval 'sub pim_ver () { &pim_vers;}' unless defined(&pim_ver);
    eval 'sub pim_rsv () { &pim_reserved;}' unless defined(&pim_rsv);
    if(defined(&_PIM_VT)) {
	eval 'sub PIM_MAKE_VT {
	    my($v, $t) = @_;
    	    eval q((0xff & ((($v) << 4) | (0xf & ($t)))));
	}' unless defined(&PIM_MAKE_VT);
	eval 'sub PIM_VT_V {
	    my($x) = @_;
    	    eval q(((($x) >> 4) & 0xf));
	}' unless defined(&PIM_VT_V);
	eval 'sub PIM_VT_T {
	    my($x) = @_;
    	    eval q((($x) & 0xf));
	}' unless defined(&PIM_VT_T);
    }
    eval 'sub PIM_VERSION () {2;}' unless defined(&PIM_VERSION);
    eval 'sub PIM_MINLEN () {8;}' unless defined(&PIM_MINLEN);
    eval 'sub PIM_REG_MINLEN () {( &PIM_MINLEN+20);}' unless defined(&PIM_REG_MINLEN);
    eval 'sub PIM6_REG_MINLEN () {( &PIM_MINLEN+40);}' unless defined(&PIM6_REG_MINLEN);
    eval 'sub PIM_HELLO () {0x;}' unless defined(&PIM_HELLO);
    eval 'sub PIM_REGISTER () {0x1;}' unless defined(&PIM_REGISTER);
    eval 'sub PIM_REGISTER_STOP () {0x2;}' unless defined(&PIM_REGISTER_STOP);
    eval 'sub PIM_JOIN_PRUNE () {0x3;}' unless defined(&PIM_JOIN_PRUNE);
    eval 'sub PIM_BOOTSTRAP () {0x4;}' unless defined(&PIM_BOOTSTRAP);
    eval 'sub PIM_ASSERT () {0x5;}' unless defined(&PIM_ASSERT);
    eval 'sub PIM_GRAFT () {0x6;}' unless defined(&PIM_GRAFT);
    eval 'sub PIM_GRAFT_ACK () {0x7;}' unless defined(&PIM_GRAFT_ACK);
    eval 'sub PIM_CAND_RP_ADV () {0x8;}' unless defined(&PIM_CAND_RP_ADV);
    eval 'sub PIM_ALL_DF_ELECTION () {0xa;}' unless defined(&PIM_ALL_DF_ELECTION);
    eval 'sub PIM_BORDER_REGISTER () {0x80000000;}' unless defined(&PIM_BORDER_REGISTER);
    eval 'sub PIM_NULL_REGISTER () {0x40000000;}' unless defined(&PIM_NULL_REGISTER);
    eval 'sub INADDR_ALLPIM_ROUTERS_GROUP () {( &uint32_t)0xe000000d;}' unless defined(&INADDR_ALLPIM_ROUTERS_GROUP);
    eval 'sub IN6ADDR_LINKLOCAL_ALLPIM_ROUTERS () {"ff02::d";}' unless defined(&IN6ADDR_LINKLOCAL_ALLPIM_ROUTERS);
    eval 'sub IN6ADDR_LINKLOCAL_ALLPIM_ROUTERS_INIT () {{{{ 0xff, 0x2, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0xd }}};}' unless defined(&IN6ADDR_LINKLOCAL_ALLPIM_ROUTERS_INIT);
}
1;
