require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&__IP_SCAN_H__)) {
    eval 'sub __IP_SCAN_H__ () {1;}' unless defined(&__IP_SCAN_H__);
    if(defined(&sun)) {
	require 'sys/ioccom.ph';
    }
    eval 'sub IPSCAN_NAME () {"/dev/ipscan";}' unless defined(&IPSCAN_NAME);
    eval 'sub IPL_SCAN () { &IPSCAN_NAME;}' unless defined(&IPL_SCAN);
    eval 'sub ISC_TLEN () {16;}' unless defined(&ISC_TLEN);
    if(defined(&__STDC__) || defined(&__GNUC__) || defined(&_AIX51)) {
	eval 'sub SIOCADSCA () { &_IOWR(ord(\'r\'), 60, \'struct ipscan\' *);}' unless defined(&SIOCADSCA);
	eval 'sub SIOCRMSCA () { &_IOWR(ord(\'r\'), 61, \'struct ipscan\' *);}' unless defined(&SIOCRMSCA);
	eval 'sub SIOCGSCST () { &_IOWR(ord(\'r\'), 62, \'struct ipscan\' *);}' unless defined(&SIOCGSCST);
    } else {
	eval 'sub SIOCADSCA () { &_IOWR("r", 60, \'struct ipscan\' *);}' unless defined(&SIOCADSCA);
	eval 'sub SIOCRMSCA () { &_IOWR("r", 61, \'struct ipscan\' *);}' unless defined(&SIOCRMSCA);
	eval 'sub SIOCGSCST () { &_IOWR("r", 62, \'struct ipscan\' *);}' unless defined(&SIOCGSCST);
    }
    eval 'sub ipsc_cl () { $ipsc_si[0];}' unless defined(&ipsc_cl);
    eval 'sub ipsc_sl () { $ipsc_si[1];}' unless defined(&ipsc_sl);
    eval 'sub ipsc_ctxt () { ($ipsc_cl->{s_txt});}' unless defined(&ipsc_ctxt);
    eval 'sub ipsc_cmsk () { ($ipsc_cl->{s_msk});}' unless defined(&ipsc_cmsk);
    eval 'sub ipsc_clen () { ($ipsc_cl->{s_len});}' unless defined(&ipsc_clen);
    eval 'sub ipsc_stxt () { ($ipsc_sl->{s_txt});}' unless defined(&ipsc_stxt);
    eval 'sub ipsc_smsk () { ($ipsc_sl->{s_msk});}' unless defined(&ipsc_smsk);
    eval 'sub ipsc_slen () { ($ipsc_sl->{s_len});}' unless defined(&ipsc_slen);
    eval 'sub ipsc_action () { ($ipsc_act->{act_val});}' unless defined(&ipsc_action);
    eval 'sub ipsc_ip () { ($ipsc_act->{act_ip});}' unless defined(&ipsc_ip);
    eval 'sub ipsc_port () { ($ipsc_act->{act_port});}' unless defined(&ipsc_port);
    eval 'sub ipsc_else () { ($ipsc_act->{act_else});}' unless defined(&ipsc_else);
    eval 'sub ipsc_eip () { ($ipsc_act->{act_eip});}' unless defined(&ipsc_eip);
    eval 'sub ipsc_eport () { ($ipsc_act->{act_eport});}' unless defined(&ipsc_eport);
    eval 'sub ISC_A_NONE () {0;}' unless defined(&ISC_A_NONE);
    eval 'sub ISC_A_TRACK () {1;}' unless defined(&ISC_A_TRACK);
    eval 'sub ISC_A_CLOSE () {2;}' unless defined(&ISC_A_CLOSE);
    eval 'sub ISC_A_REDIRECT () {3;}' unless defined(&ISC_A_REDIRECT);
}
1;
