require '_h2ph_pre.ph';

unless(defined(&_NET_BPF_H_)) {
    eval 'sub _NET_BPF_H_ () {1;}' unless defined(&_NET_BPF_H_);
    eval 'sub BPF_RELEASE () {199606;}' unless defined(&BPF_RELEASE);
    eval 'sub BPF_ALIGNMENT () {$sizeof{\'long\'};}' unless defined(&BPF_ALIGNMENT);
    eval 'sub BPF_WORDALIGN {
        local($x) = @_;
	    eval q(((($x) + ( &BPF_ALIGNMENT - 1)) & ~( &BPF_ALIGNMENT - 1)));
    }' unless defined(&BPF_WORDALIGN);
    eval 'sub BPF_MAXINSNS () {512;}' unless defined(&BPF_MAXINSNS);
    eval 'sub BPF_MAXBUFSIZE () {0x80000;}' unless defined(&BPF_MAXBUFSIZE);
    eval 'sub BPF_MINBUFSIZE () {32;}' unless defined(&BPF_MINBUFSIZE);
    eval 'sub BPF_MAJOR_VERSION () {1;}' unless defined(&BPF_MAJOR_VERSION);
    eval 'sub BPF_MINOR_VERSION () {1;}' unless defined(&BPF_MINOR_VERSION);
    if((defined( &sun) || defined( &ibm032))  && !defined( &__GNUC__)) {
	eval 'sub BIOCGBLEN () { &_IOR("B",102, \'u_int\');}' unless defined(&BIOCGBLEN);
	eval 'sub BIOCSBLEN () { &_IOWR("B",102, \'u_int\');}' unless defined(&BIOCSBLEN);
	eval 'sub BIOCSETF () { &_IOW("B",103, \'struct bpf_program\');}' unless defined(&BIOCSETF);
	eval 'sub BIOCFLUSH () { &_IO("B",104);}' unless defined(&BIOCFLUSH);
	eval 'sub BIOCPROMISC () { &_IO("B",105);}' unless defined(&BIOCPROMISC);
	eval 'sub BIOCGDLT () { &_IOR("B",106, \'u_int\');}' unless defined(&BIOCGDLT);
	eval 'sub BIOCGETIF () { &_IOR("B",107, \'struct ifreq\');}' unless defined(&BIOCGETIF);
	eval 'sub BIOCSETIF () { &_IOW("B",108, \'struct ifreq\');}' unless defined(&BIOCSETIF);
	eval 'sub BIOCSRTIMEOUT () { &_IOW("B",109, \'struct timeval\');}' unless defined(&BIOCSRTIMEOUT);
	eval 'sub BIOCGRTIMEOUT () { &_IOR("B",110, \'struct timeval\');}' unless defined(&BIOCGRTIMEOUT);
	eval 'sub BIOCGSTATS () { &_IOR("B",111, \'struct bpf_stat\');}' unless defined(&BIOCGSTATS);
	eval 'sub BIOCIMMEDIATE () { &_IOW("B",112, \'u_int\');}' unless defined(&BIOCIMMEDIATE);
	eval 'sub BIOCVERSION () { &_IOR("B",113, \'struct bpf_version\');}' unless defined(&BIOCVERSION);
	eval 'sub BIOCSRSIG () { &_IOW("B",114, \'u_int\');}' unless defined(&BIOCSRSIG);
	eval 'sub BIOCGRSIG () { &_IOR("B",115, \'u_int\');}' unless defined(&BIOCGRSIG);
    } else {
	eval 'sub BIOCGBLEN () { &_IOR(ord(\'B\'),102, \'u_int\');}' unless defined(&BIOCGBLEN);
	eval 'sub BIOCSBLEN () { &_IOWR(ord(\'B\'),102, \'u_int\');}' unless defined(&BIOCSBLEN);
	eval 'sub BIOCSETF () { &_IOW(ord(\'B\'),103, \'struct bpf_program\');}' unless defined(&BIOCSETF);
	eval 'sub BIOCFLUSH () { &_IO(ord(\'B\'),104);}' unless defined(&BIOCFLUSH);
	eval 'sub BIOCPROMISC () { &_IO(ord(\'B\'),105);}' unless defined(&BIOCPROMISC);
	eval 'sub BIOCGDLT () { &_IOR(ord(\'B\'),106, \'u_int\');}' unless defined(&BIOCGDLT);
	eval 'sub BIOCGETIF () { &_IOR(ord(\'B\'),107, \'struct ifreq\');}' unless defined(&BIOCGETIF);
	eval 'sub BIOCSETIF () { &_IOW(ord(\'B\'),108, \'struct ifreq\');}' unless defined(&BIOCSETIF);
	eval 'sub BIOCSRTIMEOUT () { &_IOW(ord(\'B\'),109, \'struct timeval\');}' unless defined(&BIOCSRTIMEOUT);
	eval 'sub BIOCGRTIMEOUT () { &_IOR(ord(\'B\'),110, \'struct timeval\');}' unless defined(&BIOCGRTIMEOUT);
	eval 'sub BIOCGSTATS () { &_IOR(ord(\'B\'),111, \'struct bpf_stat\');}' unless defined(&BIOCGSTATS);
	eval 'sub BIOCIMMEDIATE () { &_IOW(ord(\'B\'),112, \'u_int\');}' unless defined(&BIOCIMMEDIATE);
	eval 'sub BIOCVERSION () { &_IOR(ord(\'B\'),113, \'struct bpf_version\');}' unless defined(&BIOCVERSION);
	eval 'sub BIOCSRSIG () { &_IOW(ord(\'B\'),114, \'u_int\');}' unless defined(&BIOCSRSIG);
	eval 'sub BIOCGRSIG () { &_IOR(ord(\'B\'),115, \'u_int\');}' unless defined(&BIOCGRSIG);
    }
    if(defined(&_KERNEL)) {
	if(defined( &__arm32__) || defined( &__i386__) || defined( &__m68k__) || defined( &__mips__) || defined( &__ns32k__) || defined( &__sparc__) || defined( &__vax__)) {
	    eval 'sub SIZEOF_BPF_HDR () {18;}' unless defined(&SIZEOF_BPF_HDR);
	} else {
	    eval 'sub SIZEOF_BPF_HDR () {$sizeof{\'struct bpf_hdr\'};}' unless defined(&SIZEOF_BPF_HDR);
	}
    }
    eval 'sub DLT_NULL () {0;}' unless defined(&DLT_NULL);
    eval 'sub DLT_EN10MB () {1;}' unless defined(&DLT_EN10MB);
    eval 'sub DLT_EN3MB () {2;}' unless defined(&DLT_EN3MB);
    eval 'sub DLT_AX25 () {3;}' unless defined(&DLT_AX25);
    eval 'sub DLT_PRONET () {4;}' unless defined(&DLT_PRONET);
    eval 'sub DLT_CHAOS () {5;}' unless defined(&DLT_CHAOS);
    eval 'sub DLT_IEEE802 () {6;}' unless defined(&DLT_IEEE802);
    eval 'sub DLT_ARCNET () {7;}' unless defined(&DLT_ARCNET);
    eval 'sub DLT_SLIP () {8;}' unless defined(&DLT_SLIP);
    eval 'sub DLT_PPP () {9;}' unless defined(&DLT_PPP);
    eval 'sub DLT_FDDI () {10;}' unless defined(&DLT_FDDI);
    eval 'sub DLT_ATM_RFC1483 () {11;}' unless defined(&DLT_ATM_RFC1483);
    eval 'sub DLT_LOOP () {12;}' unless defined(&DLT_LOOP);
    eval 'sub DLT_ENC () {13;}' unless defined(&DLT_ENC);
    eval 'sub DLT_RAW () {14;}' unless defined(&DLT_RAW);
    eval 'sub DLT_SLIP_BSDOS () {15;}' unless defined(&DLT_SLIP_BSDOS);
    eval 'sub DLT_PPP_BSDOS () {16;}' unless defined(&DLT_PPP_BSDOS);
    eval 'sub BPF_CLASS {
        local($code) = @_;
	    eval q((($code) & 0x07));
    }' unless defined(&BPF_CLASS);
    eval 'sub BPF_LD () {0x00;}' unless defined(&BPF_LD);
    eval 'sub BPF_LDX () {0x01;}' unless defined(&BPF_LDX);
    eval 'sub BPF_ST () {0x02;}' unless defined(&BPF_ST);
    eval 'sub BPF_STX () {0x03;}' unless defined(&BPF_STX);
    eval 'sub BPF_ALU () {0x04;}' unless defined(&BPF_ALU);
    eval 'sub BPF_JMP () {0x05;}' unless defined(&BPF_JMP);
    eval 'sub BPF_RET () {0x06;}' unless defined(&BPF_RET);
    eval 'sub BPF_MISC () {0x07;}' unless defined(&BPF_MISC);
    eval 'sub BPF_SIZE {
        local($code) = @_;
	    eval q((($code) & 0x18));
    }' unless defined(&BPF_SIZE);
    eval 'sub BPF_W () {0x00;}' unless defined(&BPF_W);
    eval 'sub BPF_H () {0x08;}' unless defined(&BPF_H);
    eval 'sub BPF_B () {0x10;}' unless defined(&BPF_B);
    eval 'sub BPF_MODE {
        local($code) = @_;
	    eval q((($code) & 0xe0));
    }' unless defined(&BPF_MODE);
    eval 'sub BPF_IMM () {0x00;}' unless defined(&BPF_IMM);
    eval 'sub BPF_ABS () {0x20;}' unless defined(&BPF_ABS);
    eval 'sub BPF_IND () {0x40;}' unless defined(&BPF_IND);
    eval 'sub BPF_MEM () {0x60;}' unless defined(&BPF_MEM);
    eval 'sub BPF_LEN () {0x80;}' unless defined(&BPF_LEN);
    eval 'sub BPF_MSH () {0xa0;}' unless defined(&BPF_MSH);
    eval 'sub BPF_OP {
        local($code) = @_;
	    eval q((($code) & 0xf0));
    }' unless defined(&BPF_OP);
    eval 'sub BPF_ADD () {0x00;}' unless defined(&BPF_ADD);
    eval 'sub BPF_SUB () {0x10;}' unless defined(&BPF_SUB);
    eval 'sub BPF_MUL () {0x20;}' unless defined(&BPF_MUL);
    eval 'sub BPF_DIV () {0x30;}' unless defined(&BPF_DIV);
    eval 'sub BPF_OR () {0x40;}' unless defined(&BPF_OR);
    eval 'sub BPF_AND () {0x50;}' unless defined(&BPF_AND);
    eval 'sub BPF_LSH () {0x60;}' unless defined(&BPF_LSH);
    eval 'sub BPF_RSH () {0x70;}' unless defined(&BPF_RSH);
    eval 'sub BPF_NEG () {0x80;}' unless defined(&BPF_NEG);
    eval 'sub BPF_JA () {0x00;}' unless defined(&BPF_JA);
    eval 'sub BPF_JEQ () {0x10;}' unless defined(&BPF_JEQ);
    eval 'sub BPF_JGT () {0x20;}' unless defined(&BPF_JGT);
    eval 'sub BPF_JGE () {0x30;}' unless defined(&BPF_JGE);
    eval 'sub BPF_JSET () {0x40;}' unless defined(&BPF_JSET);
    eval 'sub BPF_SRC {
        local($code) = @_;
	    eval q((($code) & 0x08));
    }' unless defined(&BPF_SRC);
    eval 'sub BPF_K () {0x00;}' unless defined(&BPF_K);
    eval 'sub BPF_X () {0x08;}' unless defined(&BPF_X);
    eval 'sub BPF_RVAL {
        local($code) = @_;
	    eval q((($code) & 0x18));
    }' unless defined(&BPF_RVAL);
    eval 'sub BPF_A () {0x10;}' unless defined(&BPF_A);
    eval 'sub BPF_MISCOP {
        local($code) = @_;
	    eval q((($code) & 0xf8));
    }' unless defined(&BPF_MISCOP);
    eval 'sub BPF_TAX () {0x00;}' unless defined(&BPF_TAX);
    eval 'sub BPF_TXA () {0x80;}' unless defined(&BPF_TXA);
    eval 'sub BPF_STMT {
        local($code, $k) = @_;
	    eval q({ ($code), 0, 0, $k });
    }' unless defined(&BPF_STMT);
    eval 'sub BPF_JUMP {
        local($code, $k, $jt, $jf) = @_;
	    eval q({ ($code), $jt, $jf, $k });
    }' unless defined(&BPF_JUMP);
    if(defined(&_KERNEL)) {
    }
    eval 'sub BPF_MEMWORDS () {16;}' unless defined(&BPF_MEMWORDS);
}
1;
