require '_h2ph_pre.ph';

unless(defined(&LINUX_SONET_H)) {
    eval 'sub LINUX_SONET_H () {1;}' unless defined(&LINUX_SONET_H);
    eval 'sub __SONET_ITEMS () { &__HANDLE_ITEM( &section_bip);  &__HANDLE_ITEM( &line_bip);  &__HANDLE_ITEM( &path_bip);  &__HANDLE_ITEM( &line_febe);  &__HANDLE_ITEM( &path_febe);  &__HANDLE_ITEM( &corr_hcs);  &__HANDLE_ITEM( &uncorr_hcs);  &__HANDLE_ITEM( &tx_cells);  &__HANDLE_ITEM( &rx_cells);;}' unless defined(&__SONET_ITEMS);
    eval 'sub __HANDLE_ITEM {
        local($i) = @_;
	    eval q(\'int\' $i);
    }' unless defined(&__HANDLE_ITEM);
    undef(&__HANDLE_ITEM) if defined(&__HANDLE_ITEM);
    eval 'sub SONET_GETSTAT () { &_IOR(ord(\'a\'), &ATMIOC_PHYTYP,\'struct sonet_stats\');}' unless defined(&SONET_GETSTAT);
    eval 'sub SONET_GETSTATZ () { &_IOR(ord(\'a\'), &ATMIOC_PHYTYP+1,\'struct sonet_stats\');}' unless defined(&SONET_GETSTATZ);
    eval 'sub SONET_SETDIAG () { &_IOWR(ord(\'a\'), &ATMIOC_PHYTYP+2,\'int\');}' unless defined(&SONET_SETDIAG);
    eval 'sub SONET_CLRDIAG () { &_IOWR(ord(\'a\'), &ATMIOC_PHYTYP+3,\'int\');}' unless defined(&SONET_CLRDIAG);
    eval 'sub SONET_GETDIAG () { &_IOR(ord(\'a\'), &ATMIOC_PHYTYP+4,\'int\');}' unless defined(&SONET_GETDIAG);
    eval 'sub SONET_SETFRAMING () { &_IO(ord(\'a\'), &ATMIOC_PHYTYP+5);}' unless defined(&SONET_SETFRAMING);
    eval 'sub SONET_GETFRAMING () { &_IOR(ord(\'a\'), &ATMIOC_PHYTYP+6,\'int\');}' unless defined(&SONET_GETFRAMING);
    eval 'sub SONET_GETFRSENSE () { &_IOR(ord(\'a\'), &ATMIOC_PHYTYP+7, \'unsigned char\'[ &SONET_FRSENSE_SIZE]);}' unless defined(&SONET_GETFRSENSE);
    eval 'sub SONET_INS_SBIP () {1;}' unless defined(&SONET_INS_SBIP);
    eval 'sub SONET_INS_LBIP () {2;}' unless defined(&SONET_INS_LBIP);
    eval 'sub SONET_INS_PBIP () {4;}' unless defined(&SONET_INS_PBIP);
    eval 'sub SONET_INS_FRAME () {8;}' unless defined(&SONET_INS_FRAME);
    eval 'sub SONET_INS_LOS () {16;}' unless defined(&SONET_INS_LOS);
    eval 'sub SONET_INS_LAIS () {32;}' unless defined(&SONET_INS_LAIS);
    eval 'sub SONET_INS_PAIS () {64;}' unless defined(&SONET_INS_PAIS);
    eval 'sub SONET_INS_HCS () {128;}' unless defined(&SONET_INS_HCS);
    eval 'sub SONET_FRAME_SONET () {0;}' unless defined(&SONET_FRAME_SONET);
    eval 'sub SONET_FRAME_SDH () {1;}' unless defined(&SONET_FRAME_SDH);
    eval 'sub SONET_FRSENSE_SIZE () {6;}' unless defined(&SONET_FRSENSE_SIZE);
    undef(&__SONET_ITEMS) if defined(&__SONET_ITEMS);
    require 'asm/atomic.ph';
    eval 'sub __HANDLE_ITEM {
        local($i) = @_;
	    eval q( &atomic_t $i);
    }' unless defined(&__HANDLE_ITEM);
    undef(&__HANDLE_ITEM) if defined(&__HANDLE_ITEM);
}
    }
1;
