require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&UEAGLE_NISOREQS)) {
    sub UEAGLE_NISOREQS () {	6;}
}
unless(defined(&UEAGLE_NISOFRMS)) {
    sub UEAGLE_NISOFRMS () {	4;}
}
unless(defined(&UEAGLE_INTR_INTERVAL)) {
    eval 'sub UEAGLE_INTR_INTERVAL () {10;}' unless defined(&UEAGLE_INTR_INTERVAL);
}
unless(defined(&UEAGLE_TX_LIST_CNT)) {
    sub UEAGLE_TX_LIST_CNT () {	1;}
}
unless(defined(&UEAGLE_IDMA_TIMEOUT)) {
    sub UEAGLE_IDMA_TIMEOUT () {	1000;}
}
unless(defined(&UEAGLE_TX_TIMEOUT)) {
    sub UEAGLE_TX_TIMEOUT () {	10000;}
}
unless(defined(&CRC_INITIAL)) {
    sub CRC_INITIAL () {	0xffffffff;}
}
unless(defined(&CRC_MAGIC)) {
    sub CRC_MAGIC () {	0xc704dd7b;}
}
unless(defined(&ATM_CELL_SIZE)) {
    sub ATM_CELL_SIZE () {	53;}
}
unless(defined(&ATM_CELL_HEADER_SIZE)) {
    sub ATM_CELL_HEADER_SIZE () {	5;}
}
unless(defined(&ATM_CELL_PAYLOAD_SIZE)) {
    sub ATM_CELL_PAYLOAD_SIZE () {	( &ATM_CELL_SIZE -  &ATM_CELL_HEADER_SIZE);}
}
unless(defined(&AAL5_TRAILER_SIZE)) {
    sub AAL5_TRAILER_SIZE () {	8;}
}
unless(defined(&ATM_CH_FILL)) {
    sub ATM_CH_FILL {
	my($x, $gfc, $vpi, $vci, $pt, $clp, $hec) = @_;
	eval q( &do { ($x)[0] = (($gfc) & 0xf) << 4| (($vpi) & 0xf0) >> 4; ($x)[1] = (($vpi) & 0xf) << 4| (($vci) & 0xf000) >> 12; ($x)[2] = (($vci) & 0xff0) >> 4; ($x)[3] = (($vci) & 0xf) << 4| (($pt) & 0x7) << 1| (($clp) & 0x1); ($x)[4] = ( &uint8_t)($hec); }  &while ( 0));
    }
}
unless(defined(&ATM_CH_SETPTFLAGS)) {
    sub ATM_CH_SETPTFLAGS {
	my($x, $v) = @_;
	eval q((($x)[3] |= (($v) & 0x7) << 1));
    }
}
unless(defined(&ATM_CH_GETPTFLAGS)) {
    sub ATM_CH_GETPTFLAGS {
	my($x) = @_;
	eval q(((($x)[3] >> 1) & 0x7));
    }
}
unless(defined(&ATM_CH_GETVPI)) {
    sub ATM_CH_GETVPI {
	my($x) = @_;
	eval q((($x)[0] << 4| ($x)[1] >> 4));
    }
}
unless(defined(&ATM_CH_GETVCI)) {
    sub ATM_CH_GETVCI {
	my($x) = @_;
	eval q(((($x)[1] & 0xf) << 12| ($x)[2] << 4| (($x)[3] & 0xf0) >> 4));
    }
}
unless(defined(&ATM_CH_ISLASTCELL)) {
    sub ATM_CH_ISLASTCELL {
	my($x) = @_;
	eval q((($x)[3] & 0x2));
    }
}
unless(defined(&AAL5_TR_SETCPSUU)) {
    sub AAL5_TR_SETCPSUU {
	my($x, $v) = @_;
	eval q((($x)[45] = ( &uint8_t)($v)));
    }
}
unless(defined(&AAL5_TR_SETCPI)) {
    sub AAL5_TR_SETCPI {
	my($x, $v) = @_;
	eval q((($x)[46] = ( &uint8_t)($v)));
    }
}
unless(defined(&AAL5_TR_SETPDULEN)) {
    sub AAL5_TR_SETPDULEN {
	my($x, $v) = @_;
	eval q( &do { ($x)[47] = ( &uint8_t)(($v) >> 8); ($x)[48] = ( &uint8_t)($v); }  &while ( 0));
    }
}
unless(defined(&AAL5_TR_GETPDULEN)) {
    sub AAL5_TR_GETPDULEN {
	my($x) = @_;
	eval q(( &uint16_t)(($x)[47] << 8| ($x)[48]));
    }
}
unless(defined(&AAL5_TR_SETCRC)) {
    sub AAL5_TR_SETCRC {
	my($x, $v) = @_;
	eval q( &do { ($x)[49] = ( &uint8_t)(($v) >> 24); ($x)[50] = ( &uint8_t)(($v) >> 16); ($x)[51] = ( &uint8_t)(($v) >> 8); ($x)[52] = ( &uint8_t)($v); }  &while ( 0));
    }
}
unless(defined(&UEAGLE_IFMTU)) {
    sub UEAGLE_IFMTU () {	1500;}
}
unless(defined(&UEAGLE_TXBUFLEN)) {
    sub UEAGLE_TXBUFLEN () {	((( &UEAGLE_IFMTU /  &ATM_CELL_PAYLOAD_SIZE) + 2) *  &ATM_CELL_SIZE);}
}
unless(defined(&UEAGLE_VCC_ACTIVE)) {
    sub UEAGLE_VCC_ACTIVE () {	(1<< 0);}
}
unless(defined(&UEAGLE_VCC_DROP)) {
    sub UEAGLE_VCC_DROP () {	(1<< 1);}
}
unless(defined(&UEAGLE_COND_CMV)) {
    sub UEAGLE_COND_CMV {
	my($sc) = @_;
	eval q((($sc) + 1));
    }
}
unless(defined(&UEAGLE_COND_READY)) {
    sub UEAGLE_COND_READY {
	my($sc) = @_;
	eval q((($sc) + 2));
    }
}
unless(defined(&UEAGLE_COND_SYNC)) {
    sub UEAGLE_COND_SYNC {
	my($sc) = @_;
	eval q((($sc) + 3));
    }
}
1;
