require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NETINET6_IP6_MROUTE_H_)) {
    eval 'sub _NETINET6_IP6_MROUTE_H_ () {1;}' unless defined(&_NETINET6_IP6_MROUTE_H_);
    if(defined(&_KERNEL)) {
	eval 'sub MRT6_OINIT () {100;}' unless defined(&MRT6_OINIT);
    }
    eval 'sub MRT6_DONE () {101;}' unless defined(&MRT6_DONE);
    eval 'sub MRT6_ADD_MIF () {102;}' unless defined(&MRT6_ADD_MIF);
    eval 'sub MRT6_DEL_MIF () {103;}' unless defined(&MRT6_DEL_MIF);
    eval 'sub MRT6_ADD_MFC () {104;}' unless defined(&MRT6_ADD_MFC);
    eval 'sub MRT6_DEL_MFC () {105;}' unless defined(&MRT6_DEL_MFC);
    eval 'sub MRT6_PIM () {107;}' unless defined(&MRT6_PIM);
    eval 'sub MRT6_INIT () {108;}' unless defined(&MRT6_INIT);
    if((defined(&BSD) ? &BSD : 0) >= 199103) {
	eval 'sub GET_TIME {
	    my($t) = @_;
    	    eval q( &microtime($t));
	}' unless defined(&GET_TIME);
    }
 elsif(defined( &sun)) {
	eval 'sub GET_TIME {
	    my($t) = @_;
    	    eval q( &uniqtime($t));
	}' unless defined(&GET_TIME);
    } else {
	eval 'sub GET_TIME {
	    my($t) = @_;
    	    eval q((($t) =  &time));
	}' unless defined(&GET_TIME);
    }
    eval 'sub MAXMIFS () {64;}' unless defined(&MAXMIFS);
    unless(defined(&IF_SETSIZE)) {
	eval 'sub IF_SETSIZE () {256;}' unless defined(&IF_SETSIZE);
    }
    eval 'sub NIFBITS () {($sizeof{ &if_mask} *  &NBBY);}' unless defined(&NIFBITS);
    unless(defined(&howmany)) {
	eval 'sub howmany {
	    my($x, $y) = @_;
    	    eval q(((($x) + (($y) - 1)) / ($y)));
	}' unless defined(&howmany);
    }
    eval 'sub IF_SET {
        my($n, $p) = @_;
	    eval q((($p)-> $ifs_bits[($n)/ &NIFBITS] |= (1<< (($n) %  &NIFBITS))));
    }' unless defined(&IF_SET);
    eval 'sub IF_CLR {
        my($n, $p) = @_;
	    eval q((($p)-> $ifs_bits[($n)/ &NIFBITS] &= ~(1<< (($n) %  &NIFBITS))));
    }' unless defined(&IF_CLR);
    eval 'sub IF_ISSET {
        my($n, $p) = @_;
	    eval q((($p)-> $ifs_bits[($n)/ &NIFBITS] & (1<< (($n) %  &NIFBITS))));
    }' unless defined(&IF_ISSET);
    eval 'sub IF_COPY {
        my($f, $t) = @_;
	    eval q( &bcopy($f, $t, $sizeof{($f)}));
    }' unless defined(&IF_COPY);
    eval 'sub IF_ZERO {
        my($p) = @_;
	    eval q( &bzero($p, $sizeof{($p)}));
    }' unless defined(&IF_ZERO);
    if(defined(&notyet)) {
    }
    eval 'sub MIFF_REGISTER () {0x1;}' unless defined(&MIFF_REGISTER);
    if(defined(&MRT6_OINIT)) {
	if(0) {
	    eval 'sub MRT6MSG_NOCACHE () {1;}' unless defined(&MRT6MSG_NOCACHE);
	    eval 'sub MRT6MSG_WRONGMIF () {2;}' unless defined(&MRT6MSG_WRONGMIF);
	    eval 'sub MRT6MSG_WHOLEPKT () {3;}' unless defined(&MRT6MSG_WHOLEPKT);
	}
    }
    eval 'sub MRT6MSG_NOCACHE () {1;}' unless defined(&MRT6MSG_NOCACHE);
    eval 'sub MRT6MSG_WRONGMIF () {2;}' unless defined(&MRT6MSG_WRONGMIF);
    eval 'sub MRT6MSG_WHOLEPKT () {3;}' unless defined(&MRT6MSG_WHOLEPKT);
    if(defined( &_KERNEL) || defined( &KERNEL)) {
	if(defined(&notyet)) {
	}
	if(defined(&notyet)) {
	}
	eval 'sub MF6C_INCOMPLETE_PARENT () {(( &mifi_t)-1);}' unless defined(&MF6C_INCOMPLETE_PARENT);
	unless(defined(&_NETINET_IP_MROUTE_H_)) {
	    if(defined(&UPCALL_TIMING)) {
	    }
	}
	eval 'sub MF6CTBLSIZ () {256;}' unless defined(&MF6CTBLSIZ);
	if(((defined(&MF6CTBLSIZ) ? &MF6CTBLSIZ : 0) & ((defined(&MF6CTBLSIZ) ? &MF6CTBLSIZ : 0) - 1)) == 0) {
	    eval 'sub MF6CHASHMOD {
	        my($h) = @_;
    		eval q((($h) & ( &MF6CTBLSIZ - 1)));
	    }' unless defined(&MF6CHASHMOD);
	} else {
	    eval 'sub MF6CHASHMOD {
	        my($h) = @_;
    		eval q((($h) %  &MF6CTBLSIZ));
	    }' unless defined(&MF6CHASHMOD);
	}
	eval 'sub MAX_UPQ6 () {4;}' unless defined(&MAX_UPQ6);
    }
}
1;
