require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NETINET6_ND6_H_)) {
    eval 'sub _NETINET6_ND6_H_ () {1;}' unless defined(&_NETINET6_ND6_H_);
    require 'sys/queue.ph';
    require 'sys/callout.ph';
    unless(defined(&_KERNEL)) {
	require 'net/nd.ph';
	eval 'sub ND6_LLINFO_PURGE () { &ND_LLINFO_PURGE;}' unless defined(&ND6_LLINFO_PURGE);
	eval 'sub ND6_LLINFO_NOSTATE () { &ND_LLINFO_NOSTATE;}' unless defined(&ND6_LLINFO_NOSTATE);
	eval 'sub ND6_LLINFO_WAITDELETE () { &ND_LLINFO_WAITDELETE;}' unless defined(&ND6_LLINFO_WAITDELETE);
	eval 'sub ND6_LLINFO_INCOMPLETE () { &ND_LLINFO_INCOMPLETE;}' unless defined(&ND6_LLINFO_INCOMPLETE);
	eval 'sub ND6_LLINFO_REACHABLE () { &ND_LLINFO_REACHABLE;}' unless defined(&ND6_LLINFO_REACHABLE);
	eval 'sub ND6_LLINFO_STALE () { &ND_LLINFO_STALE;}' unless defined(&ND6_LLINFO_STALE);
	eval 'sub ND6_LLINFO_DELAY () { &ND_LLINFO_DELAY;}' unless defined(&ND6_LLINFO_DELAY);
	eval 'sub ND6_LLINFO_PROBE () { &ND_LLINFO_PROBE;}' unless defined(&ND6_LLINFO_PROBE);
    }
    if(defined(&_KERNEL)) {
    }
    eval 'sub ND6_IFF_PERFORMNUD () {0x1;}' unless defined(&ND6_IFF_PERFORMNUD);
    eval 'sub ND6_IFF_PREFER_SOURCE () {0x4;}' unless defined(&ND6_IFF_PREFER_SOURCE);
    eval 'sub ND6_IFF_IFDISABLED () {0x8;}' unless defined(&ND6_IFF_IFDISABLED);
    eval 'sub ND6_IFF_AUTO_LINKLOCAL () {0x20;}' unless defined(&ND6_IFF_AUTO_LINKLOCAL);
    if(defined(&_KERNEL)) {
	eval 'sub ND_IFINFO {
	    my($ifp) = @_;
    	    eval q(((($ifp)-> $if_afdata[ &AF_INET6])-> &nd_ifinfo));
	}' unless defined(&ND_IFINFO);
    }
    eval 'sub MAX_RTR_SOLICITATION_DELAY () {1;}' unless defined(&MAX_RTR_SOLICITATION_DELAY);
    eval 'sub ND6_INFINITE_LIFETIME () {(( &u_int32_t)~0);}' unless defined(&ND6_INFINITE_LIFETIME);
    if(defined(&_KERNEL)) {
	require 'sys/mallocvar.ph';
	eval 'sub nd6log () {( &level,  &fmt,  &args...)  &do {  &if ( &nd6_debug)  &log( &level, "%s: "  &fmt,  &__func__,  &args);}  &while (0);}' unless defined(&nd6log);
	eval 'sub ND6_RLOCK () {
	    eval q( &rw_enter( &nd6_lock,  &RW_READER));
	}' unless defined(&ND6_RLOCK);
	eval 'sub ND6_WLOCK () {
	    eval q( &rw_enter( &nd6_lock,  &RW_WRITER));
	}' unless defined(&ND6_WLOCK);
	eval 'sub ND6_UNLOCK () {
	    eval q( &rw_exit( &nd6_lock));
	}' unless defined(&ND6_UNLOCK);
	eval 'sub ND6_ASSERT_WLOCK () {
	    eval q( &KASSERT( &rw_write_held( &nd6_lock)));
	}' unless defined(&ND6_ASSERT_WLOCK);
	eval 'sub ND6_ASSERT_LOCK () {
	    eval q( &KASSERT( &rw_lock_held( &nd6_lock)));
	}' unless defined(&ND6_ASSERT_LOCK);
	eval 'sub nd_opts_src_lladdr () { ($nd_opt_each->{src_lladdr});}' unless defined(&nd_opts_src_lladdr);
	eval 'sub nd_opts_tgt_lladdr () { ($nd_opt_each->{tgt_lladdr});}' unless defined(&nd_opts_tgt_lladdr);
	eval 'sub nd_opts_pi () { ($nd_opt_each->{pi_beg});}' unless defined(&nd_opts_pi);
	eval 'sub nd_opts_pi_end () { ($nd_opt_each->{pi_end});}' unless defined(&nd_opts_pi_end);
	eval 'sub nd_opts_rh () { ($nd_opt_each->{rh});}' unless defined(&nd_opts_rh);
	eval 'sub nd_opts_mtu () { ($nd_opt_each->{mtu});}' unless defined(&nd_opts_mtu);
	eval 'sub nd_opts_nonce () { ($nd_opt_each->{nonce});}' unless defined(&nd_opts_nonce);
	eval 'sub nd_opts_search () { ($nd_opt_each->{search});}' unless defined(&nd_opts_search);
	eval 'sub nd_opts_last () { ($nd_opt_each->{last});}' unless defined(&nd_opts_last);
	eval 'sub nd_opts_done () { ($nd_opt_each->{done});}' unless defined(&nd_opts_done);
	require 'net/if_llatbl.ph';
    }
}
1;
