require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NETGRAPH_BTSOCKET_RFCOMM_H_)) {
    eval 'sub _NETGRAPH_BTSOCKET_RFCOMM_H_ () {1;}' unless defined(&_NETGRAPH_BTSOCKET_RFCOMM_H_);
    eval 'sub RFCOMM_DEFAULT_MTU () {127;}' unless defined(&RFCOMM_DEFAULT_MTU);
    eval 'sub RFCOMM_MAX_MTU () {1024;}' unless defined(&RFCOMM_MAX_MTU);
    eval 'sub RFCOMM_DEFAULT_CREDITS () {7;}' unless defined(&RFCOMM_DEFAULT_CREDITS);
    eval 'sub RFCOMM_MAX_CREDITS () {40;}' unless defined(&RFCOMM_MAX_CREDITS);
    eval 'sub RFCOMM_FRAME_SABM () {0x2f;}' unless defined(&RFCOMM_FRAME_SABM);
    eval 'sub RFCOMM_FRAME_DISC () {0x43;}' unless defined(&RFCOMM_FRAME_DISC);
    eval 'sub RFCOMM_FRAME_UA () {0x63;}' unless defined(&RFCOMM_FRAME_UA);
    eval 'sub RFCOMM_FRAME_DM () {0xf;}' unless defined(&RFCOMM_FRAME_DM);
    eval 'sub RFCOMM_FRAME_UIH () {0xef;}' unless defined(&RFCOMM_FRAME_UIH);
    eval 'sub RFCOMM_MCC_TEST () {0x8;}' unless defined(&RFCOMM_MCC_TEST);
    eval 'sub RFCOMM_MCC_FCON () {0x28;}' unless defined(&RFCOMM_MCC_FCON);
    eval 'sub RFCOMM_MCC_FCOFF () {0x18;}' unless defined(&RFCOMM_MCC_FCOFF);
    eval 'sub RFCOMM_MCC_MSC () {0x38;}' unless defined(&RFCOMM_MCC_MSC);
    eval 'sub RFCOMM_MCC_RPN () {0x24;}' unless defined(&RFCOMM_MCC_RPN);
    eval 'sub RFCOMM_MCC_RLS () {0x14;}' unless defined(&RFCOMM_MCC_RLS);
    eval 'sub RFCOMM_MCC_PN () {0x20;}' unless defined(&RFCOMM_MCC_PN);
    eval 'sub RFCOMM_MCC_NSC () {0x4;}' unless defined(&RFCOMM_MCC_NSC);
    eval 'sub RFCOMM_MODEM_FC () {0x2;}' unless defined(&RFCOMM_MODEM_FC);
    eval 'sub RFCOMM_MODEM_RTC () {0x4;}' unless defined(&RFCOMM_MODEM_RTC);
    eval 'sub RFCOMM_MODEM_RTR () {0x8;}' unless defined(&RFCOMM_MODEM_RTR);
    eval 'sub RFCOMM_MODEM_IC () {0x40;}' unless defined(&RFCOMM_MODEM_IC);
    eval 'sub RFCOMM_MODEM_DV () {0x80;}' unless defined(&RFCOMM_MODEM_DV);
    eval 'sub RFCOMM_RPN_BR_2400 () {0x;}' unless defined(&RFCOMM_RPN_BR_2400);
    eval 'sub RFCOMM_RPN_BR_4800 () {0x1;}' unless defined(&RFCOMM_RPN_BR_4800);
    eval 'sub RFCOMM_RPN_BR_7200 () {0x2;}' unless defined(&RFCOMM_RPN_BR_7200);
    eval 'sub RFCOMM_RPN_BR_9600 () {0x3;}' unless defined(&RFCOMM_RPN_BR_9600);
    eval 'sub RFCOMM_RPN_BR_19200 () {0x4;}' unless defined(&RFCOMM_RPN_BR_19200);
    eval 'sub RFCOMM_RPN_BR_38400 () {0x5;}' unless defined(&RFCOMM_RPN_BR_38400);
    eval 'sub RFCOMM_RPN_BR_57600 () {0x6;}' unless defined(&RFCOMM_RPN_BR_57600);
    eval 'sub RFCOMM_RPN_BR_115200 () {0x7;}' unless defined(&RFCOMM_RPN_BR_115200);
    eval 'sub RFCOMM_RPN_BR_230400 () {0x8;}' unless defined(&RFCOMM_RPN_BR_230400);
    eval 'sub RFCOMM_RPN_DATA_5 () {0x;}' unless defined(&RFCOMM_RPN_DATA_5);
    eval 'sub RFCOMM_RPN_DATA_6 () {0x1;}' unless defined(&RFCOMM_RPN_DATA_6);
    eval 'sub RFCOMM_RPN_DATA_7 () {0x2;}' unless defined(&RFCOMM_RPN_DATA_7);
    eval 'sub RFCOMM_RPN_DATA_8 () {0x3;}' unless defined(&RFCOMM_RPN_DATA_8);
    eval 'sub RFCOMM_RPN_STOP_1 () {0;}' unless defined(&RFCOMM_RPN_STOP_1);
    eval 'sub RFCOMM_RPN_STOP_15 () {1;}' unless defined(&RFCOMM_RPN_STOP_15);
    eval 'sub RFCOMM_RPN_PARITY_NONE () {0x;}' unless defined(&RFCOMM_RPN_PARITY_NONE);
    eval 'sub RFCOMM_RPN_PARITY_ODD () {0x4;}' unless defined(&RFCOMM_RPN_PARITY_ODD);
    eval 'sub RFCOMM_RPN_PARITY_EVEN () {0x5;}' unless defined(&RFCOMM_RPN_PARITY_EVEN);
    eval 'sub RFCOMM_RPN_PARITY_MARK () {0x6;}' unless defined(&RFCOMM_RPN_PARITY_MARK);
    eval 'sub RFCOMM_RPN_PARITY_SPACE () {0x7;}' unless defined(&RFCOMM_RPN_PARITY_SPACE);
    eval 'sub RFCOMM_RPN_FLOW_NONE () {0x;}' unless defined(&RFCOMM_RPN_FLOW_NONE);
    eval 'sub RFCOMM_RPN_XON_CHAR () {0x11;}' unless defined(&RFCOMM_RPN_XON_CHAR);
    eval 'sub RFCOMM_RPN_XOFF_CHAR () {0x13;}' unless defined(&RFCOMM_RPN_XOFF_CHAR);
    eval 'sub RFCOMM_RPN_PM_BITRATE () {0x1;}' unless defined(&RFCOMM_RPN_PM_BITRATE);
    eval 'sub RFCOMM_RPN_PM_DATA () {0x2;}' unless defined(&RFCOMM_RPN_PM_DATA);
    eval 'sub RFCOMM_RPN_PM_STOP () {0x4;}' unless defined(&RFCOMM_RPN_PM_STOP);
    eval 'sub RFCOMM_RPN_PM_PARITY () {0x8;}' unless defined(&RFCOMM_RPN_PM_PARITY);
    eval 'sub RFCOMM_RPN_PM_PARITY_TYPE () {0x10;}' unless defined(&RFCOMM_RPN_PM_PARITY_TYPE);
    eval 'sub RFCOMM_RPN_PM_XON () {0x20;}' unless defined(&RFCOMM_RPN_PM_XON);
    eval 'sub RFCOMM_RPN_PM_XOFF () {0x40;}' unless defined(&RFCOMM_RPN_PM_XOFF);
    eval 'sub RFCOMM_RPN_PM_FLOW () {0x3f00;}' unless defined(&RFCOMM_RPN_PM_FLOW);
    eval 'sub RFCOMM_RPN_PM_ALL () {0x3f7f;}' unless defined(&RFCOMM_RPN_PM_ALL);
    eval 'sub RFCOMM_DLCI {
        my($b) = @_;
	    eval q(((($b) & 0xfc) >> 2));
    }' unless defined(&RFCOMM_DLCI);
    eval 'sub RFCOMM_CHANNEL {
        my($b) = @_;
	    eval q(((($b) & 0xf8) >> 3));
    }' unless defined(&RFCOMM_CHANNEL);
    eval 'sub RFCOMM_DIRECTION {
        my($b) = @_;
	    eval q(((($b) & 0x4) >> 2));
    }' unless defined(&RFCOMM_DIRECTION);
    eval 'sub RFCOMM_TYPE {
        my($b) = @_;
	    eval q(((($b) & 0xef)));
    }' unless defined(&RFCOMM_TYPE);
    eval 'sub RFCOMM_EA {
        my($b) = @_;
	    eval q(((($b) & 0x1)));
    }' unless defined(&RFCOMM_EA);
    eval 'sub RFCOMM_CR {
        my($b) = @_;
	    eval q(((($b) & 0x2) >> 1));
    }' unless defined(&RFCOMM_CR);
    eval 'sub RFCOMM_PF {
        my($b) = @_;
	    eval q(((($b) & 0x10) >> 4));
    }' unless defined(&RFCOMM_PF);
    eval 'sub RFCOMM_SRVCHANNEL {
        my($dlci) = @_;
	    eval q((($dlci) >> 1));
    }' unless defined(&RFCOMM_SRVCHANNEL);
    eval 'sub RFCOMM_MKADDRESS {
        my($cr, $dlci) = @_;
	    eval q((((($dlci) & 0x3f) << 2) | (($cr) << 1) | 0x1));
    }' unless defined(&RFCOMM_MKADDRESS);
    eval 'sub RFCOMM_MKCONTROL {
        my($type, $pf) = @_;
	    eval q((((($type) & 0xef) | (($pf) << 4))));
    }' unless defined(&RFCOMM_MKCONTROL);
    eval 'sub RFCOMM_MKDLCI {
        my($dir, $channel) = @_;
	    eval q((((($channel) & 0x1f) << 1) | ($dir)));
    }' unless defined(&RFCOMM_MKDLCI);
    eval 'sub RFCOMM_MKLEN8 {
        my($len) = @_;
	    eval q(((($len) << 1) | 1));
    }' unless defined(&RFCOMM_MKLEN8);
    eval 'sub RFCOMM_MKLEN16 {
        my($len) = @_;
	    eval q((($len) << 1));
    }' unless defined(&RFCOMM_MKLEN16);
    eval 'sub RFCOMM_MCC_TYPE {
        my($b) = @_;
	    eval q(((($b) & 0xfc) >> 2));
    }' unless defined(&RFCOMM_MCC_TYPE);
    eval 'sub RFCOMM_MCC_LENGTH {
        my($b) = @_;
	    eval q(((($b) & 0xfe) >> 1));
    }' unless defined(&RFCOMM_MCC_LENGTH);
    eval 'sub RFCOMM_MKMCC_TYPE {
        my($cr, $type) = @_;
	    eval q((((($type) << 2) | (($cr) << 1) | 0x1)));
    }' unless defined(&RFCOMM_MKMCC_TYPE);
    eval 'sub RFCOMM_RPN_DATA_BITS {
        my($line) = @_;
	    eval q((($line) & 0x3));
    }' unless defined(&RFCOMM_RPN_DATA_BITS);
    eval 'sub RFCOMM_RPN_STOP_BITS {
        my($line) = @_;
	    eval q(((($line) >> 2) & 0x1));
    }' unless defined(&RFCOMM_RPN_STOP_BITS);
    eval 'sub RFCOMM_RPN_PARITY {
        my($line) = @_;
	    eval q(((($line) >> 3) & 0x3));
    }' unless defined(&RFCOMM_RPN_PARITY);
    eval 'sub RFCOMM_MKRPN_LINE_SETTINGS {
        my($data, $stop, $parity) = @_;
	    eval q(((($data) & 0x3) | ((($stop) & 0x1) << 2) | ((($parity) & 0x3) << 3)));
    }' unless defined(&RFCOMM_MKRPN_LINE_SETTINGS);
    eval 'sub NG_BTSOCKET_RFCOMM_SENDSPACE () {( &RFCOMM_MAX_CREDITS *  &RFCOMM_DEFAULT_MTU * 10);}' unless defined(&NG_BTSOCKET_RFCOMM_SENDSPACE);
    eval 'sub NG_BTSOCKET_RFCOMM_RECVSPACE () {( &RFCOMM_MAX_CREDITS *  &RFCOMM_DEFAULT_MTU * 10);}' unless defined(&NG_BTSOCKET_RFCOMM_RECVSPACE);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_CLOSED () {0;}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_CLOSED);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_LISTENING () {1;}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_LISTENING);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_CONNECTING () {2;}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_CONNECTING);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_CONNECTED () {3;}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_CONNECTED);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_OPEN () {4;}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_OPEN);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_DISCONNECTING () {5;}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_DISCONNECTING);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_INITIATOR () {(1<< 0);}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_INITIATOR);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_LFC () {(1<< 1);}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_LFC);
    eval 'sub NG_BTSOCKET_RFCOMM_SESSION_RFC () {(1<< 2);}' unless defined(&NG_BTSOCKET_RFCOMM_SESSION_RFC);
    eval 'sub INITIATOR {
        my($s) = @_;
	    eval q(((($s)-> &flags &  &NG_BTSOCKET_RFCOMM_SESSION_INITIATOR)? 1: 0));
    }' unless defined(&INITIATOR);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_TIMO () {(1<< 0);}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_TIMO);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_CFC () {(1<< 1);}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_CFC);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_TIMEDOUT () {(1<< 2);}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_TIMEDOUT);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_DETACHED () {(1<< 3);}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_DETACHED);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_SENDING () {(1<< 4);}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_SENDING);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_CLOSED () {0;}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_CLOSED);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_W4_CONNECT () {1;}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_W4_CONNECT);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_CONFIGURING () {2;}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_CONFIGURING);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_CONNECTING () {3;}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_CONNECTING);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_CONNECTED () {4;}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_CONNECTED);
    eval 'sub NG_BTSOCKET_RFCOMM_DLC_DISCONNECTING () {5;}' unless defined(&NG_BTSOCKET_RFCOMM_DLC_DISCONNECTING);
    eval 'sub so2rfcomm_pcb {
        my($so) = @_;
	    eval q(((($so)-> &so_pcb)));
    }' unless defined(&so2rfcomm_pcb);
    if(defined(&_KERNEL)) {
    }
}
1;
