lnk commit front code
This commit is contained in:
143
include/mmslite/CVS/Entries
Normal file
143
include/mmslite/CVS/Entries
Normal file
@@ -0,0 +1,143 @@
|
||||
D/mmsop_en////
|
||||
/ExceptionReport.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/Win32-Extensions.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/acse2.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/acse2log.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/acse2usr.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/acseauth.h/1.1/Fri Nov 2 05:56:50 2018//
|
||||
/adlc.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/adlc_dsm.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/adlc_log.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/adlc_sm.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/adlc_sts.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/adlc_usr.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/arg.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/asn1defs.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/asn1log.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/asn1r.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/bittypes.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/bucket_lookup.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/cfg_util.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/cfglog.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/checksum.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp_llc.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp_log.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp_sne.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp_sta.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp_tnt.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnp_usr.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/clnpport.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/conpack.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/copp.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/copp_log.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/copp_usr.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/cosp.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/cosp_log.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/cosp_usr.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/count_packets.h/1.1/Thu Sep 5 08:21:45 2013//
|
||||
/devioctl.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/dibmatch.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/ethertyp.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/ethsub.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/fkeydefs.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/gen_list.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/gensock2.h/1.1/Sat Mar 7 02:34:06 2015//
|
||||
/glberror.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/glbopt.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/glbsem.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/glbtypes.h/1.1/Wed Nov 7 06:14:59 2018//
|
||||
/gnuc.h/1.1/Sat Nov 24 06:54:50 2018//
|
||||
/goose.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/gse_mgmt.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/gvaldefs.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/ip6_misc.h/1.1/Sat Nov 24 06:54:50 2018//
|
||||
/lean_a.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/llcio.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/llcioctl.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mem_chk.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/memlog.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/memory_t.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mloguser.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_def2.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_dfun.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_err.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_log.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_mp.h/1.1/Tue Jun 16 08:57:02 2015//
|
||||
/mms_pcon.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pdom.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_perr.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pevn.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pfil.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pjou.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pocs.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pprg.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_psem.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pvar.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_pvmd.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mms_vvar.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mmsdefs.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mmsefun.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mmsintr2.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mmsldefs.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mmslog.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mmslusec.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/msjexhnd.h/1.1/Wed Jun 10 01:31:04 2009//
|
||||
/mvl_acse.h/1.1/Fri Sep 6 08:41:59 2013//
|
||||
/mvl_defs.h/1.1/Tue Jul 28 07:27:26 2015//
|
||||
/mvl_log.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/mvl_uca.h/1.1/Tue Apr 7 11:42:59 2015//
|
||||
/normal_lookup.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/ntddndis.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/ntddosi.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/ntddpack.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/osillc.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/packet32.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
/pcap-bpf.h/1.1/Sat Nov 24 06:54:50 2018//
|
||||
/pcap-int.h/1.1/Sat Nov 24 06:54:50 2018//
|
||||
/pcap-stdinc.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/pcap.h/1.1/Sat Nov 24 06:54:50 2018//
|
||||
/qmem.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/remote-ext.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/rs_a.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/rs_defs.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/scl.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/scrndefs.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/slog.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/smem.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/smp.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/smp_log.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/smp_usr.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/smpval.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/sock_log.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/ssec.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/ssec_int.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/sslelog.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_config.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_endian.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_enum_err.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_enum_func.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_mms_btime.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_mms_utctime.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_quadlib.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_stdint.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_timezone_csv.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_tzrules.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stdtime_w32.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/stime.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/str_util.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/suicacse.h/1.1/Wed Jun 10 01:31:04 2009//
|
||||
/sx_arb.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/sx_defs.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/sx_log.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/sysincs.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tcp_session.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/time_calls.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/time_str.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tme.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tp0_sock.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tp4.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tp4_encd.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tp4_log.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
/tp4api.h/1.1/Thu Sep 5 08:21:47 2013//
|
||||
143
include/mmslite/CVS/Entries.Extra
Normal file
143
include/mmslite/CVS/Entries.Extra
Normal file
@@ -0,0 +1,143 @@
|
||||
D/mmsop_en////////
|
||||
/ExceptionReport.h////*////
|
||||
/Win32-Extensions.h////*////
|
||||
/acse2.h////*////
|
||||
/acse2log.h////*////
|
||||
/acse2usr.h////*////
|
||||
/acseauth.h////*////
|
||||
/adlc.h////*////
|
||||
/adlc_dsm.h////*////
|
||||
/adlc_log.h////*////
|
||||
/adlc_sm.h////*////
|
||||
/adlc_sts.h////*////
|
||||
/adlc_usr.h////*////
|
||||
/arg.h////*////
|
||||
/asn1defs.h////*////
|
||||
/asn1log.h////*////
|
||||
/asn1r.h////*////
|
||||
/bittypes.h////*////
|
||||
/bucket_lookup.h////*////
|
||||
/cfg_util.h////*////
|
||||
/cfglog.h////*////
|
||||
/checksum.h////*////
|
||||
/clnp.h////*////
|
||||
/clnp_llc.h////*////
|
||||
/clnp_log.h////*////
|
||||
/clnp_sne.h////*////
|
||||
/clnp_sta.h////*////
|
||||
/clnp_tnt.h////*////
|
||||
/clnp_usr.h////*////
|
||||
/clnpport.h////*////
|
||||
/conpack.h////*////
|
||||
/copp.h////*////
|
||||
/copp_log.h////*////
|
||||
/copp_usr.h////*////
|
||||
/cosp.h////*////
|
||||
/cosp_log.h////*////
|
||||
/cosp_usr.h////*////
|
||||
/count_packets.h////*////
|
||||
/devioctl.h////*////
|
||||
/dibmatch.h////*////
|
||||
/ethertyp.h////*////
|
||||
/ethsub.h////*////
|
||||
/fkeydefs.h////*////
|
||||
/gen_list.h////*////
|
||||
/gensock2.h////*////
|
||||
/glberror.h////*////
|
||||
/glbopt.h////*////
|
||||
/glbsem.h////*////
|
||||
/glbtypes.h////*////
|
||||
/gnuc.h////*////
|
||||
/goose.h////*////
|
||||
/gse_mgmt.h////*////
|
||||
/gvaldefs.h////*////
|
||||
/ip6_misc.h////*////
|
||||
/lean_a.h////*////
|
||||
/llcio.h////*////
|
||||
/llcioctl.h////*////
|
||||
/mem_chk.h////*////
|
||||
/memlog.h////*////
|
||||
/memory_t.h////*////
|
||||
/mloguser.h////*////
|
||||
/mms_def2.h////*////
|
||||
/mms_dfun.h////*////
|
||||
/mms_err.h////*////
|
||||
/mms_log.h////*////
|
||||
/mms_mp.h////*////
|
||||
/mms_pcon.h////*////
|
||||
/mms_pdom.h////*////
|
||||
/mms_perr.h////*////
|
||||
/mms_pevn.h////*////
|
||||
/mms_pfil.h////*////
|
||||
/mms_pjou.h////*////
|
||||
/mms_pocs.h////*////
|
||||
/mms_pprg.h////*////
|
||||
/mms_psem.h////*////
|
||||
/mms_pvar.h////*////
|
||||
/mms_pvmd.h////*////
|
||||
/mms_vvar.h////*////
|
||||
/mmsdefs.h////*////
|
||||
/mmsefun.h////*////
|
||||
/mmsintr2.h////*////
|
||||
/mmsldefs.h////*////
|
||||
/mmslog.h////*////
|
||||
/mmslusec.h////*////
|
||||
/msjexhnd.h////*////
|
||||
/mvl_acse.h////*////
|
||||
/mvl_defs.h////*////
|
||||
/mvl_log.h////*////
|
||||
/mvl_uca.h////*////
|
||||
/normal_lookup.h////*////
|
||||
/ntddndis.h////*////
|
||||
/ntddosi.h////*////
|
||||
/ntddpack.h////*////
|
||||
/osillc.h////*////
|
||||
/packet32.h////*////
|
||||
/pcap-bpf.h////*////
|
||||
/pcap-int.h////*////
|
||||
/pcap-stdinc.h////*////
|
||||
/pcap.h////*////
|
||||
/qmem.h////*////
|
||||
/remote-ext.h////*////
|
||||
/rs_a.h////*////
|
||||
/rs_defs.h////*////
|
||||
/scl.h////*////
|
||||
/scrndefs.h////*////
|
||||
/slog.h////*////
|
||||
/smem.h////*////
|
||||
/smp.h////*////
|
||||
/smp_log.h////*////
|
||||
/smp_usr.h////*////
|
||||
/smpval.h////*////
|
||||
/sock_log.h////*////
|
||||
/ssec.h////*////
|
||||
/ssec_int.h////*////
|
||||
/sslelog.h////*////
|
||||
/stdtime.h////*////
|
||||
/stdtime_config.h////*////
|
||||
/stdtime_endian.h////*////
|
||||
/stdtime_enum_err.h////*////
|
||||
/stdtime_enum_func.h////*////
|
||||
/stdtime_mms_btime.h////*////
|
||||
/stdtime_mms_utctime.h////*////
|
||||
/stdtime_quadlib.h////*////
|
||||
/stdtime_stdint.h////*////
|
||||
/stdtime_timezone_csv.h////*////
|
||||
/stdtime_tzrules.h////*////
|
||||
/stdtime_w32.h////*////
|
||||
/stime.h////*////
|
||||
/str_util.h////*////
|
||||
/suicacse.h////*////
|
||||
/sx_arb.h////*////
|
||||
/sx_defs.h////*////
|
||||
/sx_log.h////*////
|
||||
/sysincs.h////*////
|
||||
/tcp_session.h////*////
|
||||
/time_calls.h////*////
|
||||
/time_str.h////*////
|
||||
/tme.h////*////
|
||||
/tp0_sock.h////*////
|
||||
/tp4.h////*////
|
||||
/tp4_encd.h////*////
|
||||
/tp4_log.h////*////
|
||||
/tp4api.h////*////
|
||||
143
include/mmslite/CVS/Entries.Extra.Old
Normal file
143
include/mmslite/CVS/Entries.Extra.Old
Normal file
@@ -0,0 +1,143 @@
|
||||
D/mmsop_en////////
|
||||
/acse2.h////*////
|
||||
/acse2log.h////*////
|
||||
/acse2usr.h////*////
|
||||
/acseauth.h////*////
|
||||
/adlc.h////*////
|
||||
/adlc_dsm.h////*////
|
||||
/adlc_log.h////*////
|
||||
/adlc_sm.h////*////
|
||||
/adlc_sts.h////*////
|
||||
/adlc_usr.h////*////
|
||||
/arg.h////*////
|
||||
/asn1defs.h////*////
|
||||
/asn1log.h////*////
|
||||
/asn1r.h////*////
|
||||
/bittypes.h////*////
|
||||
/bucket_lookup.h////*////
|
||||
/cfglog.h////*////
|
||||
/cfg_util.h////*////
|
||||
/checksum.h////*////
|
||||
/clnp.h////*////
|
||||
/clnpport.h////*////
|
||||
/clnp_llc.h////*////
|
||||
/clnp_log.h////*////
|
||||
/clnp_sne.h////*////
|
||||
/clnp_sta.h////*////
|
||||
/clnp_tnt.h////*////
|
||||
/clnp_usr.h////*////
|
||||
/conpack.h////*////
|
||||
/copp.h////*////
|
||||
/copp_log.h////*////
|
||||
/copp_usr.h////*////
|
||||
/cosp.h////*////
|
||||
/cosp_log.h////*////
|
||||
/cosp_usr.h////*////
|
||||
/count_packets.h////*////
|
||||
/devioctl.h////*////
|
||||
/dibmatch.h////*////
|
||||
/ethertyp.h////*////
|
||||
/ethsub.h////*////
|
||||
/ExceptionReport.h////*////
|
||||
/fkeydefs.h////*////
|
||||
/gensock2.h////*////
|
||||
/gen_list.h////*////
|
||||
/glberror.h////*////
|
||||
/glbopt.h////*////
|
||||
/glbsem.h////*////
|
||||
/glbtypes.h////*////
|
||||
/gnuc.h////*////
|
||||
/goose.h////*////
|
||||
/gse_mgmt.h////*////
|
||||
/gvaldefs.h////*////
|
||||
/ip6_misc.h////*////
|
||||
/lean_a.h////*////
|
||||
/llcio.h////*////
|
||||
/llcioctl.h////*////
|
||||
/memlog.h////*////
|
||||
/memory_t.h////*////
|
||||
/mem_chk.h////*////
|
||||
/mloguser.h////*////
|
||||
/mmsdefs.h////*////
|
||||
/mmsefun.h////*////
|
||||
/mmsintr2.h////*////
|
||||
/mmsldefs.h////*////
|
||||
/mmslog.h////*////
|
||||
/mmslusec.h////*////
|
||||
/mms_def2.h////*////
|
||||
/mms_dfun.h////*////
|
||||
/mms_err.h////*////
|
||||
/mms_log.h////*////
|
||||
/mms_mp.h////*////
|
||||
/mms_pcon.h////*////
|
||||
/mms_pdom.h////*////
|
||||
/mms_perr.h////*////
|
||||
/mms_pevn.h////*////
|
||||
/mms_pfil.h////*////
|
||||
/mms_pjou.h////*////
|
||||
/mms_pocs.h////*////
|
||||
/mms_pprg.h////*////
|
||||
/mms_psem.h////*////
|
||||
/mms_pvar.h////*////
|
||||
/mms_pvmd.h////*////
|
||||
/mms_vvar.h////*////
|
||||
/msjexhnd.h////*////
|
||||
/mvl_acse.h////*////
|
||||
/mvl_defs.h////*////
|
||||
/mvl_log.h////*////
|
||||
/mvl_uca.h////*////
|
||||
/normal_lookup.h////*////
|
||||
/ntddndis.h////*////
|
||||
/ntddosi.h////*////
|
||||
/ntddpack.h////*////
|
||||
/osillc.h////*////
|
||||
/packet32.h////*////
|
||||
/pcap-bpf.h////*////
|
||||
/pcap-int.h////*////
|
||||
/pcap-stdinc.h////*////
|
||||
/pcap.h////*////
|
||||
/qmem.h////*////
|
||||
/remote-ext.h////*////
|
||||
/rs_a.h////*////
|
||||
/rs_defs.h////*////
|
||||
/scl.h////*////
|
||||
/scrndefs.h////*////
|
||||
/slog.h////*////
|
||||
/smem.h////*////
|
||||
/smp.h////*////
|
||||
/smpval.h////*////
|
||||
/smp_log.h////*////
|
||||
/smp_usr.h////*////
|
||||
/sock_log.h////*////
|
||||
/ssec.h////*////
|
||||
/ssec_int.h////*////
|
||||
/sslelog.h////*////
|
||||
/stdtime.h////*////
|
||||
/stdtime_config.h////*////
|
||||
/stdtime_endian.h////*////
|
||||
/stdtime_enum_err.h////*////
|
||||
/stdtime_enum_func.h////*////
|
||||
/stdtime_mms_btime.h////*////
|
||||
/stdtime_mms_utctime.h////*////
|
||||
/stdtime_quadlib.h////*////
|
||||
/stdtime_stdint.h////*////
|
||||
/stdtime_timezone_csv.h////*////
|
||||
/stdtime_tzrules.h////*////
|
||||
/stdtime_w32.h////*////
|
||||
/stime.h////*////
|
||||
/str_util.h////*////
|
||||
/suicacse.h////*////
|
||||
/sx_arb.h////*////
|
||||
/sx_defs.h////*////
|
||||
/sx_log.h////*////
|
||||
/sysincs.h////*////
|
||||
/tcp_session.h////*////
|
||||
/time_calls.h////*////
|
||||
/time_str.h////*////
|
||||
/tme.h////*////
|
||||
/tp0_sock.h////*////
|
||||
/tp4.h////*////
|
||||
/tp4api.h////*////
|
||||
/tp4_encd.h////*////
|
||||
/tp4_log.h////*////
|
||||
/Win32-Extensions.h////*////
|
||||
143
include/mmslite/CVS/Entries.Old
Normal file
143
include/mmslite/CVS/Entries.Old
Normal file
@@ -0,0 +1,143 @@
|
||||
D/mmsop_en////
|
||||
/acse2.h/0/dummy timestamp//
|
||||
/acse2log.h/0/dummy timestamp//
|
||||
/acse2usr.h/0/dummy timestamp//
|
||||
/acseauth.h/0/dummy timestamp//
|
||||
/adlc.h/0/dummy timestamp//
|
||||
/adlc_dsm.h/0/dummy timestamp//
|
||||
/adlc_log.h/0/dummy timestamp//
|
||||
/adlc_sm.h/0/dummy timestamp//
|
||||
/adlc_sts.h/0/dummy timestamp//
|
||||
/adlc_usr.h/0/dummy timestamp//
|
||||
/arg.h/0/dummy timestamp//
|
||||
/asn1defs.h/0/dummy timestamp//
|
||||
/asn1log.h/0/dummy timestamp//
|
||||
/asn1r.h/0/dummy timestamp//
|
||||
/bittypes.h/0/dummy timestamp//
|
||||
/bucket_lookup.h/0/dummy timestamp//
|
||||
/cfglog.h/0/dummy timestamp//
|
||||
/cfg_util.h/0/dummy timestamp//
|
||||
/checksum.h/0/dummy timestamp//
|
||||
/clnp.h/0/dummy timestamp//
|
||||
/clnpport.h/0/dummy timestamp//
|
||||
/clnp_llc.h/0/dummy timestamp//
|
||||
/clnp_log.h/0/dummy timestamp//
|
||||
/clnp_sne.h/0/dummy timestamp//
|
||||
/clnp_sta.h/0/dummy timestamp//
|
||||
/clnp_tnt.h/0/dummy timestamp//
|
||||
/clnp_usr.h/0/dummy timestamp//
|
||||
/conpack.h/0/dummy timestamp//
|
||||
/copp.h/0/dummy timestamp//
|
||||
/copp_log.h/0/dummy timestamp//
|
||||
/copp_usr.h/0/dummy timestamp//
|
||||
/cosp.h/0/dummy timestamp//
|
||||
/cosp_log.h/0/dummy timestamp//
|
||||
/cosp_usr.h/0/dummy timestamp//
|
||||
/count_packets.h/0/dummy timestamp//
|
||||
/devioctl.h/0/dummy timestamp//
|
||||
/dibmatch.h/0/dummy timestamp//
|
||||
/ethertyp.h/0/dummy timestamp//
|
||||
/ethsub.h/0/dummy timestamp//
|
||||
/ExceptionReport.h/0/dummy timestamp//
|
||||
/fkeydefs.h/0/dummy timestamp//
|
||||
/gensock2.h/0/dummy timestamp//
|
||||
/gen_list.h/0/dummy timestamp//
|
||||
/glberror.h/0/dummy timestamp//
|
||||
/glbopt.h/0/dummy timestamp//
|
||||
/glbsem.h/0/dummy timestamp//
|
||||
/glbtypes.h/0/dummy timestamp//
|
||||
/gnuc.h/0/dummy timestamp//
|
||||
/goose.h/0/dummy timestamp//
|
||||
/gse_mgmt.h/0/dummy timestamp//
|
||||
/gvaldefs.h/0/dummy timestamp//
|
||||
/ip6_misc.h/0/dummy timestamp//
|
||||
/lean_a.h/0/dummy timestamp//
|
||||
/llcio.h/0/dummy timestamp//
|
||||
/llcioctl.h/0/dummy timestamp//
|
||||
/memlog.h/0/dummy timestamp//
|
||||
/memory_t.h/0/dummy timestamp//
|
||||
/mem_chk.h/0/dummy timestamp//
|
||||
/mloguser.h/0/dummy timestamp//
|
||||
/mmsdefs.h/0/dummy timestamp//
|
||||
/mmsefun.h/0/dummy timestamp//
|
||||
/mmsintr2.h/0/dummy timestamp//
|
||||
/mmsldefs.h/0/dummy timestamp//
|
||||
/mmslog.h/0/dummy timestamp//
|
||||
/mmslusec.h/0/dummy timestamp//
|
||||
/mms_def2.h/0/dummy timestamp//
|
||||
/mms_dfun.h/0/dummy timestamp//
|
||||
/mms_err.h/0/dummy timestamp//
|
||||
/mms_log.h/0/dummy timestamp//
|
||||
/mms_mp.h/0/dummy timestamp//
|
||||
/mms_pcon.h/0/dummy timestamp//
|
||||
/mms_pdom.h/0/dummy timestamp//
|
||||
/mms_perr.h/0/dummy timestamp//
|
||||
/mms_pevn.h/0/dummy timestamp//
|
||||
/mms_pfil.h/0/dummy timestamp//
|
||||
/mms_pjou.h/0/dummy timestamp//
|
||||
/mms_pocs.h/0/dummy timestamp//
|
||||
/mms_pprg.h/0/dummy timestamp//
|
||||
/mms_psem.h/0/dummy timestamp//
|
||||
/mms_pvar.h/0/dummy timestamp//
|
||||
/mms_pvmd.h/0/dummy timestamp//
|
||||
/mms_vvar.h/0/dummy timestamp//
|
||||
/msjexhnd.h/0/dummy timestamp//
|
||||
/mvl_acse.h/0/dummy timestamp//
|
||||
/mvl_defs.h/0/dummy timestamp//
|
||||
/mvl_log.h/0/dummy timestamp//
|
||||
/mvl_uca.h/0/dummy timestamp//
|
||||
/normal_lookup.h/0/dummy timestamp//
|
||||
/ntddndis.h/0/dummy timestamp//
|
||||
/ntddosi.h/0/dummy timestamp//
|
||||
/ntddpack.h/0/dummy timestamp//
|
||||
/osillc.h/0/dummy timestamp//
|
||||
/packet32.h/0/dummy timestamp//
|
||||
/pcap-bpf.h/0/dummy timestamp//
|
||||
/pcap-int.h/0/dummy timestamp//
|
||||
/pcap-stdinc.h/0/dummy timestamp//
|
||||
/pcap.h/0/dummy timestamp//
|
||||
/qmem.h/0/dummy timestamp//
|
||||
/remote-ext.h/0/dummy timestamp//
|
||||
/rs_a.h/0/dummy timestamp//
|
||||
/rs_defs.h/0/dummy timestamp//
|
||||
/scl.h/0/dummy timestamp//
|
||||
/scrndefs.h/0/dummy timestamp//
|
||||
/slog.h/0/dummy timestamp//
|
||||
/smem.h/0/dummy timestamp//
|
||||
/smp.h/0/dummy timestamp//
|
||||
/smpval.h/0/dummy timestamp//
|
||||
/smp_log.h/0/dummy timestamp//
|
||||
/smp_usr.h/0/dummy timestamp//
|
||||
/sock_log.h/0/dummy timestamp//
|
||||
/ssec.h/0/dummy timestamp//
|
||||
/ssec_int.h/0/dummy timestamp//
|
||||
/sslelog.h/0/dummy timestamp//
|
||||
/stdtime.h/0/dummy timestamp//
|
||||
/stdtime_config.h/0/dummy timestamp//
|
||||
/stdtime_endian.h/0/dummy timestamp//
|
||||
/stdtime_enum_err.h/0/dummy timestamp//
|
||||
/stdtime_enum_func.h/0/dummy timestamp//
|
||||
/stdtime_mms_btime.h/0/dummy timestamp//
|
||||
/stdtime_mms_utctime.h/0/dummy timestamp//
|
||||
/stdtime_quadlib.h/0/dummy timestamp//
|
||||
/stdtime_stdint.h/0/dummy timestamp//
|
||||
/stdtime_timezone_csv.h/0/dummy timestamp//
|
||||
/stdtime_tzrules.h/0/dummy timestamp//
|
||||
/stdtime_w32.h/0/dummy timestamp//
|
||||
/stime.h/0/dummy timestamp//
|
||||
/str_util.h/0/dummy timestamp//
|
||||
/suicacse.h/0/dummy timestamp//
|
||||
/sx_arb.h/0/dummy timestamp//
|
||||
/sx_defs.h/0/dummy timestamp//
|
||||
/sx_log.h/0/dummy timestamp//
|
||||
/sysincs.h/0/dummy timestamp//
|
||||
/tcp_session.h/0/dummy timestamp//
|
||||
/time_calls.h/0/dummy timestamp//
|
||||
/time_str.h/0/dummy timestamp//
|
||||
/tme.h/0/dummy timestamp//
|
||||
/tp0_sock.h/0/dummy timestamp//
|
||||
/tp4.h/0/dummy timestamp//
|
||||
/tp4api.h/0/dummy timestamp//
|
||||
/tp4_encd.h/0/dummy timestamp//
|
||||
/tp4_log.h/0/dummy timestamp//
|
||||
/Win32-Extensions.h/0/dummy timestamp//
|
||||
1
include/mmslite/CVS/Repository
Normal file
1
include/mmslite/CVS/Repository
Normal file
@@ -0,0 +1 @@
|
||||
jspqfe/src/pt61850netd_pqfe/source/include/mmslite
|
||||
1
include/mmslite/CVS/Root
Normal file
1
include/mmslite/CVS/Root
Normal file
@@ -0,0 +1 @@
|
||||
:ext:lizhongming@10.0.0.2:/JoyProject
|
||||
0
include/mmslite/CVS/Template
Normal file
0
include/mmslite/CVS/Template
Normal file
135
include/mmslite/ExceptionReport.h
Normal file
135
include/mmslite/ExceptionReport.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2003-2204, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : ExceptionReport.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : Unhandled Exception Handler */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 02/13/06 DSF 03 Migrate to VS.NET 2005 */
|
||||
/* 06/30/05 DSF 02 Generate a mini dump */
|
||||
/* 12/20/04 DSF 01 Minor usability changes */
|
||||
/* Stack State recorder */
|
||||
/************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
#include "slog.h"
|
||||
#include "mem_chk.h"
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <dbghelp.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
enum BasicType // Stolen from CVCONST.H in the DIA 2.0 SDK
|
||||
{
|
||||
btNoType = 0,
|
||||
btVoid = 1,
|
||||
btChar = 2,
|
||||
btWChar = 3,
|
||||
btInt = 6,
|
||||
btUInt = 7,
|
||||
btFloat = 8,
|
||||
btBCD = 9,
|
||||
btBool = 10,
|
||||
btLong = 13,
|
||||
btULong = 14,
|
||||
btCurrency = 25,
|
||||
btDate = 26,
|
||||
btVariant = 27,
|
||||
btComplex = 28,
|
||||
btBit = 29,
|
||||
btBSTR = 30,
|
||||
btHresult = 31
|
||||
};
|
||||
|
||||
class WheatyExceptionReport
|
||||
{
|
||||
public:
|
||||
|
||||
WheatyExceptionReport( );
|
||||
WheatyExceptionReport( bool terminate );
|
||||
~WheatyExceptionReport( );
|
||||
|
||||
void SetLogFileName( PTSTR pszLogFileName );
|
||||
|
||||
|
||||
// entry point where control comes on an unhandled exception
|
||||
static LONG WINAPI WheatyUnhandledExceptionFilter(
|
||||
PEXCEPTION_POINTERS pExceptionInfo );
|
||||
|
||||
static BOOL GetLogicalAddress( PVOID addr, PTSTR szModule, DWORD len,
|
||||
DWORD& section, DWORD& offset );
|
||||
|
||||
private:
|
||||
|
||||
// where report info is extracted and generated
|
||||
static void GenerateExceptionReport( PEXCEPTION_POINTERS pExceptionInfo );
|
||||
|
||||
// where mini dump is generated
|
||||
static void GenerateDumpFile( PEXCEPTION_POINTERS pExceptionInfo );
|
||||
|
||||
// Helper functions
|
||||
static LPTSTR GetExceptionString( DWORD dwCode );
|
||||
static void WriteStackDetails( PCONTEXT pContext, bool bWriteVariables );
|
||||
|
||||
static BOOL CALLBACK EnumerateSymbolsCallback(PSYMBOL_INFO,ULONG, PVOID);
|
||||
|
||||
static bool FormatSymbolValue( PSYMBOL_INFO, STACKFRAME *, char * pszBuffer, unsigned cbBuffer );
|
||||
|
||||
static char * DumpTypeIndex( char *, DWORD64, DWORD, unsigned, DWORD_PTR, bool & );
|
||||
|
||||
static char * FormatOutputValue( char * pszCurrBuffer, BasicType basicType, DWORD64 length, PVOID pAddress );
|
||||
|
||||
static BasicType GetBasicType( DWORD typeIndex, DWORD64 modBase );
|
||||
|
||||
static int __cdecl _tprintf(const TCHAR * format, ...);
|
||||
|
||||
// Variables used by the class
|
||||
static TCHAR m_szLogFileName[MAX_PATH];
|
||||
static TCHAR m_szDumpFileName[MAX_PATH];
|
||||
static LOG_CTRL m_logCtrl;
|
||||
static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter;
|
||||
static HANDLE m_hReportFile;
|
||||
static HANDLE m_hProcess;
|
||||
static bool m_bTerminate;
|
||||
};
|
||||
|
||||
|
||||
extern WheatyExceptionReport g_WheatyExceptionReport; // global instance of class
|
||||
|
||||
struct SourceInfo
|
||||
{
|
||||
string filename;
|
||||
long linenum;
|
||||
};
|
||||
|
||||
struct StackInfo
|
||||
{
|
||||
DWORD threadID;
|
||||
SYSTEMTIME timestamp;
|
||||
vector<SourceInfo> stack;
|
||||
|
||||
void Log ();
|
||||
};
|
||||
|
||||
void GetStackInfo (StackInfo& stackInfo);
|
||||
|
||||
extern "C" void ExpInit ();
|
||||
extern "C" void ExpRaiseDebugException ();
|
||||
extern "C" void ExpSetLogCtrl (LOG_CTRL *pLogCtrl);
|
||||
|
||||
|
||||
113
include/mmslite/Win32-Extensions.h
Normal file
113
include/mmslite/Win32-Extensions.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
|
||||
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Politecnico di Torino, CACE Technologies
|
||||
* nor the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __WIN32_EXTENSIONS_H__
|
||||
#define __WIN32_EXTENSIONS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Definitions */
|
||||
|
||||
/*!
|
||||
\brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
|
||||
*/
|
||||
struct pcap_send_queue
|
||||
{
|
||||
u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
|
||||
u_int len; ///< Current size of the queue, in bytes.
|
||||
char *buffer; ///< Buffer containing the packets to be sent.
|
||||
};
|
||||
|
||||
typedef struct pcap_send_queue pcap_send_queue;
|
||||
|
||||
/*!
|
||||
\brief This typedef is a support for the pcap_get_airpcap_handle() function
|
||||
*/
|
||||
#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
|
||||
#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
|
||||
typedef struct _AirpcapHandle *PAirpcapHandle;
|
||||
#endif
|
||||
|
||||
#define BPF_MEM_EX_IMM 0xc0
|
||||
#define BPF_MEM_EX_IND 0xe0
|
||||
|
||||
/*used for ST*/
|
||||
#define BPF_MEM_EX 0xc0
|
||||
#define BPF_TME 0x08
|
||||
|
||||
#define BPF_LOOKUP 0x90
|
||||
#define BPF_EXECUTE 0xa0
|
||||
#define BPF_INIT 0xb0
|
||||
#define BPF_VALIDATE 0xc0
|
||||
#define BPF_SET_ACTIVE 0xd0
|
||||
#define BPF_RESET 0xe0
|
||||
#define BPF_SET_MEMORY 0x80
|
||||
#define BPF_GET_REGISTER_VALUE 0x70
|
||||
#define BPF_SET_REGISTER_VALUE 0x60
|
||||
#define BPF_SET_WORKING 0x50
|
||||
#define BPF_SET_ACTIVE_READ 0x40
|
||||
#define BPF_SET_AUTODELETION 0x30
|
||||
#define BPF_SEPARATION 0xff
|
||||
|
||||
/* Prototypes */
|
||||
pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
|
||||
|
||||
void pcap_sendqueue_destroy(pcap_send_queue* queue);
|
||||
|
||||
int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
|
||||
|
||||
u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
|
||||
|
||||
HANDLE pcap_getevent(pcap_t *p);
|
||||
|
||||
struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);
|
||||
|
||||
int pcap_setuserbuffer(pcap_t *p, int size);
|
||||
|
||||
int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
|
||||
|
||||
int pcap_live_dump_ended(pcap_t *p, int sync);
|
||||
|
||||
int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);
|
||||
|
||||
int pcap_start_oem(char* err_str, int flags);
|
||||
|
||||
PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //__WIN32_EXTENSIONS_H__
|
||||
310
include/mmslite/acse2.h
Normal file
310
include/mmslite/acse2.h
Normal file
@@ -0,0 +1,310 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995 - 2004, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : acse2.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* ACSE main header file. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/27/04 EJV 16 ACSE_CONN (MAP30_ACSE): added initiator. */
|
||||
/* 08/25/03 EJV 15 Del old password auth (OBSOLETE_ACSE_AUTH) */
|
||||
/* ACSE_CONN: added part_auth_info, encrypt_ctrl*/
|
||||
/* Added security functions protos. */
|
||||
/* 08/01/03 JRB 14 Add lean_a.h for DIB_ENTRY. */
|
||||
/* 06/17/03 EJV 13 Moved DIB_MATCH... from m_match.h. */
|
||||
/* 10/14/02 ASK 12 Added abort diagnostic tag */
|
||||
/* 09/27/02 ASK 11 Added ASN.1 security tags to AARE APDU, moved*/
|
||||
/* bitstring defines from acse2dec.c */
|
||||
/* 06/20/02 JRB 10 Add TSELs & remote NSAP/IP to ACSE_CONN. */
|
||||
/* 12/11/01 JRB 09 Convert to use ASN1R. */
|
||||
/* 09/10/01 JRB 08 Put back cosp_cn_ptr, cosp_cn_len. */
|
||||
/* 08/01/01 JRB 07 Del cosp_cn_ptr, cosp_cn_len from ACSE_CONN. */
|
||||
/* 04/03/01 JRB 06 Add PSELs & SSELs to ACSE_CONN. */
|
||||
/* 01/05/01 EJV 05 Changes for use over Marben */
|
||||
/* 07/14/99 JRB 04 Add ACSE Password Authentication stuff. */
|
||||
/* 08/13/98 JRB 03 Lint cleanup. */
|
||||
/* 07/23/98 JRB 02 Delete Marben support. */
|
||||
/* 11/10/97 JRB 01 Chg cosp_buf to (ST_UCHAR *). */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 03/19/97 JRB 08 MOSI cleanup. */
|
||||
/* 03/07/97 JRB 07 Added MOSI support. */
|
||||
/* 01/02/97 EJV 06 Added ACSE2_INCLUDED and __cplusplus. */
|
||||
/* 06/25/96 JRB 05 Added 'LEAN_T' support. */
|
||||
/* 05/02/96 JRB 04 Add STATE_TP4CONN_WAIT. */
|
||||
/* 04/18/96 JRB 03 Add STATE_AARE_ABANDON. */
|
||||
/* 03/26/96 MDE 02 Added 'REDUCED_STACK' support */
|
||||
/* 10/30/95 JRB 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ACSE2_INCLUDED
|
||||
#define ACSE2_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "gen_list.h"
|
||||
#include "acse2log.h" /* slog macros for ACSE */
|
||||
#include "acse2usr.h"
|
||||
#if !defined(MAP30_ACSE)
|
||||
#include "lean_a.h" /* need DIB_ENTRY */
|
||||
#endif
|
||||
#include "dibmatch.h"
|
||||
|
||||
/* Defines for bits in bitstring encoded values. */
|
||||
#define BIT_VERSION1 0x80 /* AARQ, AARE protocol_version */
|
||||
#define BIT_AUTHENTICATION 0x80 /* AARQ, AARE acse_requirements */
|
||||
|
||||
/* ACPM states. */
|
||||
#define STATE_INVALID -1 /* So user cannot use freed struct*/
|
||||
#define STATE_IDLE 0
|
||||
#define STATE_AARE_WAIT 1
|
||||
#define STATE_AASCRSP_WAIT 2
|
||||
#define STATE_RLRE_WAIT 3
|
||||
#define STATE_ARLSRSP_WAIT 4
|
||||
#define STATE_ASSOCIATED 5
|
||||
#define STATE_INIT_COLL 6
|
||||
#define STATE_RESP_COLL 7
|
||||
#define STATE_AARE_ABANDON 8
|
||||
#define STATE_TP4CONN_WAIT 9
|
||||
|
||||
/* ASN.1 tags for ACSE APDUs */
|
||||
#define TAG_AARQ 0
|
||||
#define TAG_AARE 1
|
||||
#define TAG_RLRQ 2
|
||||
#define TAG_RLRE 3
|
||||
#define TAG_ABRT 4
|
||||
#define TAG_ADT 5
|
||||
/* ASN.1 tags for CONNECTIONLESS ACSE APDUs */
|
||||
#define TAG_AUDT 0
|
||||
|
||||
/* ASN.1 tags for elements of AARQ APDU */
|
||||
#define AARQ_protocol_version 0
|
||||
#define AARQ_ASO_context_name 1
|
||||
#define AARQ_CALLED_AP_title 2
|
||||
#define AARQ_CALLED_AE_qual 3
|
||||
#define AARQ_CALLED_AP_inv_id 4
|
||||
#define AARQ_CALLED_AE_inv_id 5
|
||||
#define AARQ_CALLING_AP_title 6
|
||||
#define AARQ_CALLING_AE_qual 7
|
||||
#define AARQ_CALLING_AP_inv_id 8
|
||||
#define AARQ_CALLING_AE_inv_id 9
|
||||
#define AARQ_acse_requirements 10
|
||||
#define AARQ_mechanism_name 11
|
||||
#define AARQ_CALLING_auth_value 12
|
||||
#define AARQ_user_info 30
|
||||
|
||||
/* ASN.1 tags for elements of AUDT APDU (same as AARQ) */
|
||||
#define AUDT_protocol_version AARQ_protocol_version
|
||||
#define AUDT_ASO_context_name AARQ_ASO_context_name
|
||||
#define AUDT_CALLED_AP_title AARQ_CALLED_AP_title
|
||||
#define AUDT_CALLED_AE_qual AARQ_CALLED_AE_qual
|
||||
#define AUDT_CALLED_AP_inv_id AARQ_CALLED_AP_inv_id
|
||||
#define AUDT_CALLED_AE_inv_id AARQ_CALLED_AE_inv_id
|
||||
#define AUDT_CALLING_AP_title AARQ_CALLING_AP_title
|
||||
#define AUDT_CALLING_AE_qual AARQ_CALLING_AE_qual
|
||||
#define AUDT_CALLING_AP_inv_id AARQ_CALLING_AP_inv_id
|
||||
#define AUDT_CALLING_AE_inv_id AARQ_CALLING_AE_inv_id
|
||||
#define AUDT_user_info AARQ_user_info
|
||||
|
||||
/* ASN.1 tags for elements of AARE APDU */
|
||||
#define AARE_protocol_version 0
|
||||
#define AARE_ASO_context_name 1
|
||||
#define AARE_result 2
|
||||
#define AARE_result_source_diagnostic 3
|
||||
#define AARE_RESPONDING_AP_title 4
|
||||
#define AARE_RESPONDING_AE_qual 5
|
||||
#define AARE_RESPONDING_AP_inv_id 6
|
||||
#define AARE_RESPONDING_AE_inv_id 7
|
||||
#define AARE_RESPONDER_acse_requirements 8 /* See the ACSE Spec for the strange name */
|
||||
#define AARE_mechanism_name 9
|
||||
#define AARE_RESPONDING_auth_value 10
|
||||
#define AARE_user_info 30
|
||||
|
||||
/* ASN.1 tags for elements of RLRQ APDU */
|
||||
#define RLRQ_reason 0
|
||||
#define RLRQ_user_info 30
|
||||
|
||||
/* ASN.1 tags for elements of RLRE APDU */
|
||||
#define RLRE_reason 0
|
||||
#define RLRE_user_info 30
|
||||
|
||||
/* ASN.1 tags for elements of ABRT APDU */
|
||||
#define ABRT_source 0
|
||||
#define ABRT_diagnostic 1
|
||||
#define ABRT_user_info 30
|
||||
|
||||
/* ASN.1 tags for elements of ADT APDU */
|
||||
#define ADT_user_info 30
|
||||
|
||||
#define ACSE_SERVICE_USER 0
|
||||
#define ACSE_SERVICE_PROVIDER 1
|
||||
|
||||
/************************************************************************/
|
||||
/* ACSE_CONN structure */
|
||||
/************************************************************************/
|
||||
#if defined (MOSI)
|
||||
#define MAX_COSP_COPP_HEADER (((MAX_PSEL_LEN+MAX_SSEL_LEN)*2)+200)
|
||||
typedef struct tagACSE_CONN
|
||||
{
|
||||
/* common part */
|
||||
ST_UINT apdu_len; /* len of a APDU (also PS-user data len)*/
|
||||
ST_UCHAR *apdu_ptr; /* pointer to start of APDU encoding */
|
||||
ST_UINT ppdu_len; /* len of a PPDU (also SS-user data len)*/
|
||||
ST_UCHAR *ppdu_ptr; /* pointer to start of PPDU encoding */
|
||||
ST_CHAR pcimms;
|
||||
ST_CHAR pciacse;
|
||||
/* ACSE part */
|
||||
ST_LONG user_conn_id; /* ACSE-user's connection ID. */
|
||||
ST_INT state; /* See "STATE_*" defines */
|
||||
ST_BOOLEAN initiator; /* Flag: did we initiate this connection? */
|
||||
/* COPP part */
|
||||
ST_INT num_ctxt;
|
||||
ST_INT copp_state; /* See "COPP_STATE_*" defines */
|
||||
/* cosp part */
|
||||
ST_INT cosp_state; /* See "COSP_CSTATE_*" defines */
|
||||
ST_UINT cosp_cn_len;
|
||||
char *cosp_cn_ptr; /* CONNECT SPDU saved until TCONN.cnf */
|
||||
ST_LONG cosp_bind_id; /* COSP bind id saved until CN arrive */
|
||||
ST_BOOLEAN cosp_vtca; /* SD_TRUE if transport connection acceptor*/
|
||||
ST_BOOLEAN cosp_vcoll; /* SD_TRUE if collision of FINISH SPDUs */
|
||||
ST_BOOLEAN cosp_vdnr; /* SD_TRUE if DISCONNECT SPDU has been */
|
||||
/* received in STA 09 (following */
|
||||
/* collision of FINISH SPDUs). */
|
||||
/* TP4 part */
|
||||
ST_LONG tp4_conn_id; /* TP4 connect id */
|
||||
ST_BOOLEAN cr; /* "collision of release" flag */
|
||||
ST_BOOLEAN rl; /* "release started" flag */
|
||||
BUFFER save_buf; /* buffer to save AARQ or RLRE to send later */
|
||||
ST_UCHAR loc_psel [MAX_PSEL_LEN+1]; /* Local PSEL (1st byte = len) */
|
||||
ST_UCHAR rem_psel [MAX_PSEL_LEN+1]; /* Remote PSEL (1st byte = len) */
|
||||
ST_UCHAR loc_ssel [MAX_SSEL_LEN+1]; /* Local SSEL (1st byte = len) */
|
||||
ST_UCHAR rem_ssel [MAX_SSEL_LEN+1]; /* Remote SSEL (1st byte = len) */
|
||||
ST_UCHAR loc_tsel [MAX_TSEL_LEN+1]; /* Local TSEL (1st byte = len) */
|
||||
ST_UCHAR rem_tsel [MAX_TSEL_LEN+1]; /* Remote TSEL (1st byte = len) */
|
||||
union
|
||||
{
|
||||
ST_UCHAR nsap [CLNP_MAX_LEN_NSAP+1];/* Remote NSAP (1st byte = len) */
|
||||
ST_ULONG ip; /* OR IP Addr (network byte order)*/
|
||||
}remNetAddr;
|
||||
/* authentication and security */
|
||||
ACSE_AUTH_INFO part_auth_info; /* partner authentication info */
|
||||
S_SEC_ENCRYPT_CTRL encrypt_ctrl; /* connection encryption info */
|
||||
} ACSE_CONN;
|
||||
#elif defined (MAP30_ACSE)
|
||||
typedef struct acse_bind_info_tag
|
||||
{
|
||||
ST_CHAR ar_name[MAX_NAME_LEN+1]; /* local AR Name to be bind */
|
||||
ST_LONG user_bind_id; /* Save User's bind ID */
|
||||
ST_INT suic_chan_base; /* start chan where we register AR Name */
|
||||
ST_INT num_calling; /* num of calling channels */
|
||||
ST_INT num_called; /* num of called channels */
|
||||
} ACSE_BIND_INFO;
|
||||
|
||||
typedef struct tagACSE_CONN
|
||||
{
|
||||
/* fields below are changed during binding */
|
||||
ACSE_BIND_INFO *bind_info; /* pointer to ACSE bind info */
|
||||
ST_LONG user_bind_id; /* user's bind ID */
|
||||
ST_INT chan; /* SUIC channel */
|
||||
/* fields below are changed during connection/disconnection */
|
||||
ST_INT state; /* See "STATE_*" defines */
|
||||
ST_LONG user_conn_id; /* user's connect ID */
|
||||
ST_BOOLEAN initiator; /* Flag: did we initiate this connection? */
|
||||
ST_UINT ap_context; /* SUIC AP context from associate ind */
|
||||
ST_INT num_pc_defs; /* pres context deflist count from aind */
|
||||
PC_DEF *pc_deflist; /* pres context deflist ptr from aind */
|
||||
} ACSE_CONN;
|
||||
#else /* !MOSI and !MAP30_ACSE */
|
||||
typedef struct tagACSE_CONN
|
||||
{
|
||||
ST_LONG user_bind_id; /* tp4_connect_ind saves for u_a_associate_ind */
|
||||
ST_LONG tp4_conn_id;
|
||||
ST_LONG user_conn_id;
|
||||
ST_INT state; /* See "STATE_*" defines */
|
||||
ST_BOOLEAN initiator; /* Flag: did we initiate this connection? */
|
||||
ST_UCHAR *rcv_data; /* buffer to reassembling TPDUs */
|
||||
ST_UINT rcv_data_len; /* Length of data in rcv_data. */
|
||||
BUFFER save_buf; /* buffer to save AARQ or RLRE to send later */
|
||||
} ACSE_CONN;
|
||||
#endif /* !MOSI */
|
||||
|
||||
/************************************************************************/
|
||||
/* PBIND structure */
|
||||
/************************************************************************/
|
||||
typedef struct tagPBIND
|
||||
{
|
||||
DBL_LNK link;
|
||||
ST_LONG user_bind_id; /* User-supplied Bind ID */
|
||||
ST_LONG clnp_bind_id; /* Register ID returned by OSIAM */
|
||||
ST_LONG real_clpp_bind_id; /* Used in real bind/unbind to Marben */
|
||||
ST_INT sap; /* SAP number this register is bound to */
|
||||
PRES_ADDR loc_addr;
|
||||
} PBIND;
|
||||
|
||||
/************************************************************************/
|
||||
/* General address matching defines, control, functions */
|
||||
/* */
|
||||
|
||||
#if !defined(MAP30_ACSE)
|
||||
/* Lean-T specific functions */
|
||||
ST_RET dib_match_remote_ar (DIB_MATCH_CTRL *matchCtrl, AARQ_APDU *aarq,
|
||||
DIB_ENTRY **dib_entry_out);
|
||||
ST_RET dib_match_local_ar (DIB_MATCH_CTRL *matchCtrl, AARQ_APDU *aarq,
|
||||
DIB_ENTRY **dib_entry_out);
|
||||
ST_INT dib_cmp_local_addr (DIB_MATCH_CTRL *matchCtrl, AARQ_APDU *aarq,
|
||||
DIB_ENTRY *dib_entry);
|
||||
ST_INT dib_cmp_remote_addr (DIB_MATCH_CTRL *matchCtrl, AARQ_APDU *aarq,
|
||||
DIB_ENTRY *dib_entry);
|
||||
#endif /* !defined(MAP30_ACSE) */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Security functions */
|
||||
ST_RET a_get_security_info (ST_LONG acse_conn_id, S_SEC_SPARAMS *secParams);
|
||||
ST_RET a_free_security_info (ACSE_AUTH_INFO *authInfo);
|
||||
ST_RET a_free_part_security_info (ST_LONG acse_conn_id);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Global variables. */
|
||||
/************************************************************************/
|
||||
extern ST_INT num_pbinds; /* Number of P-Address bindings.*/
|
||||
extern PBIND *pbind_list; /* Linked list of PBIND structs */
|
||||
extern ST_BOOLEAN nsap_bind_done; /* Don't allow 2nd bind until 1st done */
|
||||
extern MMS_OBJ_ID mms_obj_id; /* ISO MMS Object ID */
|
||||
extern MMS_OBJ_ID acse_obj_id; /* ACSE Object ID */
|
||||
extern MMS_OBJ_ID asn1_obj_id; /* ASN.1 Object ID */
|
||||
extern MMS_OBJ_ID a_auth_password_obj_id; /* Obj ID for ACSE Password*/
|
||||
/* Authentication mech. */
|
||||
|
||||
extern ST_UINT acse_msgsize;
|
||||
#ifdef MOSI
|
||||
extern ST_UINT cosp_msgsize;
|
||||
extern ST_UCHAR *cosp_buf;
|
||||
extern ACSE_CONN *decode_acse_conn; /* connection we're doing decode for. */
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Prototypes */
|
||||
/************************************************************************/
|
||||
ST_VOID clnp_unbind_cnf (PBIND *pbind);
|
||||
ST_VOID asn1_skip_elmnt (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID acse_free_con (ACSE_CONN *con);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ACSE2_INCLUDED */
|
||||
|
||||
144
include/mmslite/acse2log.h
Normal file
144
include/mmslite/acse2log.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-2003, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : acse2log.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* ACSE logging header file. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/02/05 JRB 07 Added acse2usr.h */
|
||||
/* 06/17/03 EJV 06 Converted to new log macros. */
|
||||
/* Deleted _audt_*_logstr. Added DIB logging. */
|
||||
/* 12/11/00 EJV 05 Added more log macros */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 12/16/96 JRB 04 Del "AUDTLOG_*" macros. Use "ACSELOG_*" for */
|
||||
/* CL ACSE as well as CO ACSE. */
|
||||
/* 10/08/98 MDE 08 Migrated to updated SLOG interface */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 03/20/97 JRB 07 Stop checking for sLogCtrl==NULL. */
|
||||
/* 02/20/97 JRB 06 Move *_debug_sel & logmasks from acse2log.h */
|
||||
/* to acse2usr.h. */
|
||||
/* 01/02/97 EJV 05 Added ACSE2LOG_INCLUDED */
|
||||
/* 12/16/96 JRB 04 Add "AUDTLOG_*" macros for CLACSE. */
|
||||
/* 07/19/96 JRB 03 Change DEBUG_MMS to DEBUG_SISCO. */
|
||||
/* 04/17/96 JRB 02 Del acse_sLogCtrl, use sLogCtrl (slog.c) now */
|
||||
/* 10/30/95 JRB 01 Created */
|
||||
/************************************************************************/
|
||||
#ifndef ACSE2LOG_INCLUDED
|
||||
#define ACSE2LOG_INCLUDED
|
||||
|
||||
#include "acse2usr.h" /* need acse_debug_sel & log mask defines */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG_SISCO
|
||||
/****************************************************************/
|
||||
/* Log Control macros */
|
||||
/****************************************************************/
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _acse_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _acse_enc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _acse_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _acse_dib_logstr;
|
||||
#endif /* DEBUG_SISCO */
|
||||
|
||||
/*--------------------------------------*/
|
||||
/* ACSELOG_DEC macros */
|
||||
/*--------------------------------------*/
|
||||
#define ACSELOG_DEC0(a) \
|
||||
SLOG_0 (acse_debug_sel & ACSE_LOG_DEC,_acse_dec_logstr,a)
|
||||
#define ACSELOG_DEC1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & ACSE_LOG_DEC,_acse_dec_logstr,a,b)
|
||||
#define ACSELOG_DEC2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & ACSE_LOG_DEC,_acse_dec_logstr,a,b,c)
|
||||
#define ACSELOG_DEC3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & ACSE_LOG_DEC,_acse_dec_logstr,a,b,c,d)
|
||||
|
||||
#define ACSELOG_DEC0C(a) SLOGC_0 (acse_debug_sel & ACSE_LOG_DEC,a)
|
||||
#define ACSELOG_DEC1C(a,b) SLOGC_1 (acse_debug_sel & ACSE_LOG_DEC,a,b)
|
||||
#define ACSELOG_DEC2C(a,b,c) SLOGC_2 (acse_debug_sel & ACSE_LOG_DEC,a,b,c)
|
||||
#define ACSELOG_DEC3C(a,b,c,d) SLOGC_3 (acse_debug_sel & ACSE_LOG_DEC,a,b,c,d)
|
||||
|
||||
#define ACSELOG_DECH(a,b) SLOGH (acse_debug_sel & ACSE_LOG_DEC,a,b)
|
||||
|
||||
/*--------------------------------------*/
|
||||
/* ACSELOG_ENC macros */
|
||||
/*--------------------------------------*/
|
||||
#define ACSELOG_ENC0(a) \
|
||||
SLOG_0 (acse_debug_sel & ACSE_LOG_ENC,_acse_enc_logstr,a)
|
||||
#define ACSELOG_ENC1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & ACSE_LOG_ENC,_acse_enc_logstr,a,b)
|
||||
#define ACSELOG_ENC2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & ACSE_LOG_ENC,_acse_enc_logstr,a,b,c)
|
||||
#define ACSELOG_ENC3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & ACSE_LOG_ENC,_acse_enc_logstr,a,b,c,d)
|
||||
|
||||
#define ACSELOG_ENC0C(a) SLOGC_0 (acse_debug_sel & ACSE_LOG_ENC,a)
|
||||
#define ACSELOG_ENC1C(a,b) SLOGC_1 (acse_debug_sel & ACSE_LOG_ENC,a,b)
|
||||
#define ACSELOG_ENC2C(a,b,c) SLOGC_2 (acse_debug_sel & ACSE_LOG_ENC,a,b,c)
|
||||
#define ACSELOG_ENC3C(a,b,c,d) SLOGC_3 (acse_debug_sel & ACSE_LOG_ENC,a,b,c,d)
|
||||
|
||||
#define ACSELOG_ENCH(a,b) SLOGH (acse_debug_sel & ACSE_LOG_ENC,a,b)
|
||||
|
||||
/*--------------------------------------*/
|
||||
/* ACSELOG_ERR macros */
|
||||
/*--------------------------------------*/
|
||||
#define ACSELOG_ERR0(a) \
|
||||
SLOG_0 (acse_debug_sel & ACSE_LOG_ERR,_acse_err_logstr,a)
|
||||
#define ACSELOG_ERR1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & ACSE_LOG_ERR,_acse_err_logstr,a,b)
|
||||
#define ACSELOG_ERR2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & ACSE_LOG_ERR,_acse_err_logstr,a,b,c)
|
||||
#define ACSELOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & ACSE_LOG_ERR,_acse_err_logstr,a,b,c,d)
|
||||
|
||||
#define ACSELOG_ERR0C(a) SLOGC_0 (acse_debug_sel & ACSE_LOG_ERR,a)
|
||||
#define ACSELOG_ERR1C(a,b) SLOGC_1 (acse_debug_sel & ACSE_LOG_ERR,a,b)
|
||||
#define ACSELOG_ERR2C(a,b,c) SLOGC_2 (acse_debug_sel & ACSE_LOG_ERR,a,b,c)
|
||||
#define ACSELOG_ERR3C(a,b,c,d) SLOGC_3 (acse_debug_sel & ACSE_LOG_ERR,a,b,c,d)
|
||||
|
||||
#define ACSELOG_ERRH(a,b) SLOGH (acse_debug_sel & ACSE_LOG_ERR,a,b)
|
||||
|
||||
/*--------------------------------------*/
|
||||
/* ACSELOG_DIB macros */
|
||||
/*--------------------------------------*/
|
||||
#define ACSELOG_DIB0(a) \
|
||||
SLOG_0 (acse_debug_sel & ACSE_LOG_DIB,_acse_dib_logstr,a)
|
||||
#define ACSELOG_DIB1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & ACSE_LOG_DIB,_acse_dib_logstr,a,b)
|
||||
#define ACSELOG_DIB2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & ACSE_LOG_DIB,_acse_dib_logstr,a,b,c)
|
||||
#define ACSELOG_DIB3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & ACSE_LOG_DIB,_acse_dib_logstr,a,b,c,d)
|
||||
|
||||
#define ACSELOG_DIB0C(a) SLOGC_0 (acse_debug_sel & ACSE_LOG_DIB,a)
|
||||
#define ACSELOG_DIB1C(a,b) SLOGC_1 (acse_debug_sel & ACSE_LOG_DIB,a,b)
|
||||
#define ACSELOG_DIB2C(a,b,c) SLOGC_2 (acse_debug_sel & ACSE_LOG_DIB,a,b,c)
|
||||
#define ACSELOG_DIB3C(a,b,c,d) SLOGC_3 (acse_debug_sel & ACSE_LOG_DIB,a,b,c,d)
|
||||
|
||||
#define ACSELOG_DIBH(a,b) SLOGH (acse_debug_sel & ACSE_LOG_DIB,a,b)
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* Log Control prototypes. */
|
||||
/****************************************************************/
|
||||
ST_VOID acse_default_log (ST_VOID); /* Set default log configuration */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ACSE2LOG_INCLUDED */
|
||||
|
||||
406
include/mmslite/acse2usr.h
Normal file
406
include/mmslite/acse2usr.h
Normal file
@@ -0,0 +1,406 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-2005, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : acse2usr.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* ACSE main header file. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/05/05 EJV 33 PRES_ADDR added port. */
|
||||
/* 03/28/05 EJV 32 MMSEASE_MOSE: add MAX_PSEL_LEN, MAX_SSEL_LEN */
|
||||
/* 10/21/03 JRB 31 Add a_get_event_handles_unix. */
|
||||
/* 08/25/03 EJV 30 Del old password auth (OBSOLETE_ACSE_AUTH) */
|
||||
/* Added a_get_chan. */
|
||||
/* Renamed encrypt_info to encrypt_ctrl */
|
||||
/* 07/23/03 MDE 29 Removed ACSE_AUTH_ENABLED, S_SEC_ENABLED */
|
||||
/* 06/17/03 EJV 28 Added ACSE_LOG_DIB mask. */
|
||||
/* 06/13/03 MDE 27 Added Security */
|
||||
/* 10/14/02 ASK 26 Added abort diagnostic to ABRT_APDU. */
|
||||
/* 09/30/02 ASK 25 Moved authentication defines / protos into */
|
||||
/* acseauth.h */
|
||||
/* 09/27/02 ASK 24 Add authentication stuff to AARE_APDU */
|
||||
/* 06/20/02 JRB 23 Add calling_paddr to AARQ_APDU. */
|
||||
/* Replace "nsap" in PRES_ADDR with union. */
|
||||
/* 05/02/02 MDE 22 Added _copp_bind */
|
||||
/* 02/14/02 ASK 21 Add a_associate_reqm */
|
||||
/* 01/22/02 JRB 20 Add args to copp_initialize (same as MAP30..)*/
|
||||
/* Del a_set_msgsize (no longer needed). */
|
||||
/* 01/10/02 JRB 19 Add cltp_decode_nsdu_2 proto. */
|
||||
/* 12/20/01 JRB 18 Del clpp_bind functions and bind id args to */
|
||||
/* a_unit_data_req & u_a_unit_data_ind. */
|
||||
/* 05/10/01 JRB 17 Chg SSEL_LEN from 16 to 4. */
|
||||
/* 12/18/00 EJV 16 Added remAr param to a_associate_req for */
|
||||
/* Lite over Marben stack (MAP30_ACSE). */
|
||||
/* 08/05/99 JRB 15 Add a_get_ev... prototype. */
|
||||
/* 07/14/99 JRB 14 Add ACSE Password Authentication stuff. */
|
||||
/* 01/28/99 JRB 13 Move cltp_decode_nsdu proto from TP4 to here.*/
|
||||
/* 12/04/98 JRB 12 Del "audt_debug_sel". */
|
||||
/* Add "loc_mac" to AUDT_APDU. */
|
||||
/* 08/13/98 JRB 11 Lint cleanup. */
|
||||
/* 08/14/97 JRB 10 Added "tp_type" to PRES_ADDR. */
|
||||
/* Del MAX_TSEL_LEN & MAX_NSAP_LEN defines (use */
|
||||
/* MAX_TSEL_LEN & MAX_IP_ADDR_LEN in tp4api.h). */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 04/10/97 JRB 09 Chg error defs to use base from "glberror.h".*/
|
||||
/* 03/07/97 JRB 08 Add COPP & COSP logmasks for MOSI. */
|
||||
/* 02/20/97 JRB 07 Move *_debug_sel & logmasks from acse2log.h */
|
||||
/* to acse2usr.h. */
|
||||
/* 01/09/97 MDE 06 Allow user to specify destination MAC */
|
||||
/* 01/01/97 RKR 05 Added ACSE2USR_INCLUDED and __cplusplus */
|
||||
/* 10/04/96 JRB 04 Add adlcAddr to PRES_ADDR for MCGW. */
|
||||
/* 08/15/96 JRB 03 Add a_buffers_avail prototype for LEAN_T. */
|
||||
/* 04/18/96 JRB 02 Chg a_associate_req return to ST_LONG. */
|
||||
/* 03/26/96 MDE 01 Added header, 'REDUCED_STACK' support */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ACSE2USR_INCLUDED
|
||||
#define ACSE2USR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "asn1defs.h"
|
||||
#include "acseauth.h"
|
||||
#include "ssec.h"
|
||||
#include "clnp_usr.h"
|
||||
#include "tp4api.h" /* Need TP_TYPE_* defines for "tp_type" values. */
|
||||
/* Need MAX_TSEL_LEN & MAX_IP_ADDR_LEN defines. */
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
/* Log Control */
|
||||
/****************************************************************/
|
||||
#define ACSE_LOG_ERR 0x00000001
|
||||
#define ACSE_LOG_ENC 0x00000002
|
||||
#define ACSE_LOG_DEC 0x00000004
|
||||
#define ACSE_LOG_DIB 0x00000008
|
||||
|
||||
#define COPP_LOG_ERR 0x00000100L
|
||||
#define COPP_LOG_DEC 0x00001000L
|
||||
#define COPP_LOG_DEC_HEX 0x00002000L
|
||||
#define COPP_LOG_ENC 0x00004000L
|
||||
#define COPP_LOG_ENC_HEX 0x00008000L
|
||||
|
||||
#define COSP_LOG_ERR 0x00010000L
|
||||
#define COSP_LOG_DEC 0x00100000L
|
||||
#define COSP_LOG_DEC_HEX 0x00200000L
|
||||
#define COSP_LOG_ENC 0x00400000L
|
||||
#define COSP_LOG_ENC_HEX 0x00800000L
|
||||
|
||||
|
||||
extern ST_UINT acse_debug_sel;
|
||||
|
||||
/************************************************************************/
|
||||
/* Error codes (returned from a_* functions). */
|
||||
/* NOTE: Values begin from E_ACSE2 (found in glberror.h). */
|
||||
/* NOTE: The exception codes (EX_ACSE_*) do not have separate range. */
|
||||
/************************************************************************/
|
||||
#define E_ACSE_ENC_ERR 0x3001
|
||||
#define E_ACSE_SEND_ERR 0x3002
|
||||
#define E_ACSE_INVALID_CONN_ID 0x3003
|
||||
#define E_ACSE_INVALID_STATE 0x3004
|
||||
#define E_ACSE_INVALID_PARAM 0x3005
|
||||
#define E_ACSE_BUFFER_OVERFLOW 0x3006
|
||||
#define E_ACSE_MEMORY_ALLOC 0x3007
|
||||
|
||||
/************************************************************************/
|
||||
/* Exception codes (passed to u_a_except or u_cla_except). */
|
||||
/* Caused by decode or state problems. */
|
||||
/************************************************************************/
|
||||
#define EX_ACSE_DECODE 0x3081
|
||||
#define EX_ACSE_INVALID_STATE 0x3082
|
||||
|
||||
/************************************************************************/
|
||||
/* Structure definitions. */
|
||||
/************************************************************************/
|
||||
/* This structure represents the entire Presentation address */
|
||||
/* NOTE: Using Fastbyte Presentation and Session, there are no P-Sels */
|
||||
/* and S-Sels, so the P-Address is equivalent to the T-Address */
|
||||
|
||||
#if defined(MMSEASE_MOSI)
|
||||
#define MAX_PSEL_LEN 16
|
||||
#define MAX_SSEL_LEN 16
|
||||
#else
|
||||
#define MAX_PSEL_LEN 4 /* International Std Profile recommends 4*/
|
||||
#define MAX_SSEL_LEN 4 /* GOSIP Ver2 recommends len of 2 */
|
||||
#endif
|
||||
/* MAX_TSEL_LEN defined in "tp4api.h" */
|
||||
/* MAX_IP_ADDR_LEN defined in "tp4api.h" */
|
||||
typedef struct tagPRES_ADDR
|
||||
{
|
||||
#if !defined(REDUCED_STACK)
|
||||
ST_UINT psel_len;
|
||||
ST_UCHAR psel [MAX_PSEL_LEN];
|
||||
ST_UINT ssel_len;
|
||||
ST_UCHAR ssel [MAX_SSEL_LEN];
|
||||
ST_INT tp_type; /* Type of transport: TP_TYPE_TP4 or TP_TYPE_TCP.*/
|
||||
ST_UINT tsel_len;
|
||||
ST_UCHAR tsel [MAX_TSEL_LEN];
|
||||
ST_UINT nsap_len;
|
||||
union
|
||||
{ /* If TP_TYPE_TP4, use "nsap". If TP_TYPE_TCP, use "ip". */
|
||||
ST_UCHAR nsap [CLNP_MAX_LEN_NSAP]; /* NSAP OR */
|
||||
ST_ULONG ip; /* IP Addr (network byte order) */
|
||||
}netAddr;
|
||||
ST_UINT16 port;
|
||||
#if defined (MCGW)
|
||||
ST_UINT16 adlcAddr;
|
||||
#endif /* defined (MCGW) */
|
||||
#else
|
||||
ST_UINT16 adlcAddr;
|
||||
#endif
|
||||
} PRES_ADDR;
|
||||
|
||||
/* This structure is used for any data that must be encoded/decoded */
|
||||
/* by the user instead of the ACSE. */
|
||||
/* If len == 0, or ptr == NULL, it is assumed there is no data. */
|
||||
typedef struct tagBUFFER
|
||||
{
|
||||
ST_INT len; /* Length of encoded data. */
|
||||
ST_UCHAR *ptr; /* Pointer to encoded data. */
|
||||
} BUFFER;
|
||||
|
||||
/* This structure contains AE_TITLE info. */
|
||||
typedef struct tagAE_TITLE
|
||||
{
|
||||
ST_BOOLEAN AP_title_pres; /* present flag */
|
||||
MMS_OBJ_ID AP_title; /* AP title */
|
||||
ST_BOOLEAN AE_qual_pres; /* present flag */
|
||||
ST_INT32 AE_qual; /* AE qualifier */
|
||||
ST_BOOLEAN AP_inv_id_pres; /* present flag */
|
||||
ST_INT32 AP_inv_id; /* AP invocation ID */
|
||||
ST_BOOLEAN AE_inv_id_pres; /* present flag */
|
||||
ST_INT32 AE_inv_id; /* AE invocation ID */
|
||||
} AE_TITLE;
|
||||
|
||||
/* This structure is used for the AARQ_APDU. */
|
||||
typedef struct tagAARQ_APDU
|
||||
{
|
||||
/* The following entries passed to peer in AARQ-apdu.*/
|
||||
/* ACSE sets and checks "protocol-version". Must be "version1". */
|
||||
ST_BOOLEAN ASO_context_name_pres;
|
||||
MMS_OBJ_ID ASO_context_name;
|
||||
AE_TITLE called_ae_title;
|
||||
AE_TITLE calling_ae_title;
|
||||
|
||||
/* authentication and security */
|
||||
ACSE_AUTH_INFO auth_info;
|
||||
S_SEC_ENCRYPT_CTRL encrypt_ctrl;
|
||||
|
||||
BUFFER user_info; /* User must encode/decode */
|
||||
|
||||
/* The following entries passed to presentation. */
|
||||
/* NOTE: "calling_paddr" ignored by "a_associate_req" function. */
|
||||
/* Contains remote addr when "u_a_associate_ind" called. */
|
||||
PRES_ADDR calling_paddr;
|
||||
PRES_ADDR called_paddr;
|
||||
} AARQ_APDU;
|
||||
|
||||
/* This structure is used for the AUDT_APDU */
|
||||
/* NOTE: same as AARQ_APDU except add calling_paddr. */
|
||||
typedef struct tagAUDT_APDU
|
||||
{
|
||||
/* The following entries passed to peer in AUDT-apdu.*/
|
||||
/* ACSE sets and checks "protocol-version". Must be "version1". */
|
||||
ST_BOOLEAN ASO_context_name_pres;
|
||||
MMS_OBJ_ID ASO_context_name;
|
||||
AE_TITLE called_ae_title;
|
||||
AE_TITLE calling_ae_title;
|
||||
BUFFER user_info; /* User must encode/decode */
|
||||
|
||||
/* The following entries passed to or received from presentation. */
|
||||
PRES_ADDR calling_paddr;
|
||||
PRES_ADDR called_paddr;
|
||||
|
||||
/* User doesn't need to set loc_mac before calling a_unit_data_req. */
|
||||
/* Decode process fills in loc_mac before calling u_a_unit_data_ind. */
|
||||
ST_UCHAR loc_mac [CLNP_MAX_LEN_MAC]; /* Local MAC addr */
|
||||
ST_BOOLEAN rem_mac_valid; /* SD_TRUE if MAC addr valid */
|
||||
ST_UCHAR rem_mac [CLNP_MAX_LEN_MAC]; /* Remote MAC addr */
|
||||
} AUDT_APDU;
|
||||
|
||||
|
||||
/* This structure is used for the AARE_APDU. */
|
||||
typedef struct tagAARE_APDU
|
||||
{
|
||||
/* ACSE sets and checks "protocol-version". Must be "version1". */
|
||||
ST_BOOLEAN ASO_context_name_pres;
|
||||
MMS_OBJ_ID ASO_context_name;
|
||||
AE_TITLE responding_ae_title;
|
||||
ST_INT16 result;
|
||||
ST_BOOLEAN result_source_diag_pres;
|
||||
ST_UINT16 result_source; /* Passed as asn1_tag to ASN1 functs */
|
||||
ST_INT16 result_diag;
|
||||
|
||||
/* authentication and security */
|
||||
ACSE_AUTH_INFO auth_info;
|
||||
S_SEC_ENCRYPT_CTRL encrypt_ctrl;
|
||||
|
||||
BUFFER user_info; /* User must encode/decode */
|
||||
} AARE_APDU;
|
||||
|
||||
/* This structure is used for the RLRQ_APDU. */
|
||||
typedef struct tagRLRQ_APDU
|
||||
{
|
||||
ST_BOOLEAN reason_pres;
|
||||
ST_INT16 reason;
|
||||
BUFFER user_info; /* User must encode/decode */
|
||||
} RLRQ_APDU;
|
||||
|
||||
/* This structure is used for the RLRE_APDU. */
|
||||
typedef struct tagRLRE_APDU
|
||||
{
|
||||
ST_BOOLEAN reason_pres;
|
||||
ST_INT16 reason;
|
||||
BUFFER user_info; /* User must encode/decode */
|
||||
/* NOTE: With Fastbyte presentation and session, there is no way to */
|
||||
/* refuse a release, so the "Result" parameter is assumed to be */
|
||||
/* "affirmative", and is therefore not needed in this structure.*/
|
||||
} RLRE_APDU;
|
||||
|
||||
/* This structure is used for the ABRT_APDU. */
|
||||
typedef struct tagABRT_APDU
|
||||
{
|
||||
ST_INT16 source; /* Abort source (0=user, 1=provider) */
|
||||
ST_BOOLEAN diagnostic_pres;
|
||||
ST_ACSE_AUTH diagnostic; /* Abort diagnostic; codes in acseauth.h */
|
||||
BUFFER user_info; /* User must encode/decode */
|
||||
} ABRT_APDU;
|
||||
|
||||
/* NOTE: the ASO-association-identifier in the ACSE specification is not*/
|
||||
/* supported in this implementation. It will not be sent in outgoing */
|
||||
/* APDUs and will be ignored in incoming APDUs. */
|
||||
|
||||
/************************************************************************/
|
||||
/* Prototypes */
|
||||
/************************************************************************/
|
||||
ST_RET copp_initialize (ST_INT max_conns, ST_UINT msg_size);
|
||||
ST_RET copp_terminate (ST_VOID);
|
||||
ST_BOOLEAN copp_event (ST_VOID);
|
||||
#if defined(MAP30_ACSE)
|
||||
ST_RET copp_bind (ST_LONG user_bind_id, ST_CHAR *loc_ar_name,
|
||||
ST_INT num_calling, ST_INT num_called);
|
||||
ST_RET _copp_bind (ST_LONG user_bind_id, ST_CHAR *loc_ar_name,
|
||||
ST_INT num_calling, ST_INT num_called,
|
||||
ST_BOOLEAN activate);
|
||||
#else
|
||||
ST_RET copp_bind (ST_LONG user_bind_id, PRES_ADDR *pres_addr,
|
||||
ST_INT sharable, ST_INT max_conns);
|
||||
#endif /* !defined(MAP30_ACSE) */
|
||||
ST_VOID u_copp_bind_cnf (ST_LONG user_bind_id, ST_LONG copp_bind_id, ST_RET result);
|
||||
ST_RET copp_unbind (ST_LONG copp_bind_id);
|
||||
ST_VOID u_copp_unbind_cnf (ST_LONG user_bind_id);
|
||||
ST_RET audt_set_msgsize (ST_UINT len);
|
||||
#if defined(MAP30_ACSE)
|
||||
ST_LONG a_associate_req (
|
||||
ST_LONG copp_bind_id, /* ACSE's bind ID received in u_copp_bind_cnf*/
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
AARQ_APDU *info, /* AARQ_APDU info */
|
||||
ST_CHAR *remAr); /* remote AR Name. */
|
||||
|
||||
ST_LONG a_associate_reqm (
|
||||
ST_LONG copp_bind_id, /* ACSE's bind ID received in u_copp_bind_cnf*/
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
AARQ_APDU *aarq_apdu, /* AARQ_APDU info */
|
||||
ST_CHAR *locAr, /* local AR Name. */
|
||||
ST_CHAR *remAr); /* remote AR Name. */
|
||||
#else
|
||||
ST_LONG a_associate_req (
|
||||
ST_LONG copp_bind_id, /* ACSE's bind ID received in u_copp_bind_cnf*/
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
AARQ_APDU *info); /* AARQ_APDU info. */
|
||||
#endif /* !defined(MAP30_ACSE) */
|
||||
ST_VOID u_a_associate_ind (
|
||||
ST_LONG user_bind_id, /* USER's Bind ID passed to copp_bind */
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
AARQ_APDU *info); /* AARQ_APDU info. */
|
||||
ST_RET a_associate_rsp (
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
AARE_APDU *info); /* AARE_APDU info. */
|
||||
ST_VOID u_a_associate_cnf (
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
AARE_APDU *info); /* AARE_APDU info. */
|
||||
ST_RET a_release_req (
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
RLRQ_APDU *info); /* RLRQ_APDU info. */
|
||||
ST_VOID u_a_release_ind (
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
RLRQ_APDU *info); /* RLRQ_APDU info. */
|
||||
ST_RET a_release_rsp (
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
RLRE_APDU *info); /* RLRE_APDU info. */
|
||||
ST_VOID u_a_release_cnf (
|
||||
ST_LONG user_conn_id, /* user's ID for this connection */
|
||||
RLRE_APDU *info); /* RLRE_APDU info. */
|
||||
ST_RET a_abort_req (
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
ABRT_APDU *info); /* ABORT request info. */
|
||||
ST_VOID u_a_abort_ind (
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
ABRT_APDU *info); /* ABORT request info. */
|
||||
ST_RET a_data_req (
|
||||
ST_LONG acse_conn_id, /* ACSE's ID for this connection */
|
||||
ST_UINT data_len,
|
||||
ST_UCHAR *data);
|
||||
ST_VOID u_a_data_ind (
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
ST_UINT data_len,
|
||||
ST_UCHAR *data);
|
||||
ST_INT a_buffers_avail (
|
||||
ST_LONG acse_conn_id); /* ACSE's ID for this connection */
|
||||
ST_VOID u_a_except (
|
||||
ST_LONG user_conn_id, /* USER's ID for this connection */
|
||||
ST_INT code, /* See EX_ACSE_* defines */
|
||||
ST_CHAR *filename, /* Source code file name */
|
||||
ST_INT line); /* source code line number */
|
||||
ST_VOID u_cla_except (
|
||||
ST_LONG user_bind_id, /* USER's ID for this bind */
|
||||
ST_INT code, /* See EX_ACSE_* defines */
|
||||
ST_CHAR *filename, /* Source code file name */
|
||||
ST_INT line); /* source code line number */
|
||||
|
||||
ST_RET clpp_initialize (ST_VOID);
|
||||
ST_RET clpp_terminate (ST_VOID);
|
||||
ST_RET a_unit_data_req (
|
||||
AUDT_APDU *info); /* AUDT_APDU info. */
|
||||
ST_VOID u_a_unit_data_ind (
|
||||
AUDT_APDU *info); /* AUDT_APDU info. */
|
||||
ST_BOOLEAN clpp_event (ST_VOID);
|
||||
|
||||
ST_VOID cltp_decode_nsdu (N_UNITDATA *n_unitdata);
|
||||
ST_RET cltp_decode_nsdu_2 (N_UNITDATA *pNudt, AUDT_APDU *pAudt);
|
||||
|
||||
/************************************************************************/
|
||||
/* Address resolution utility functions. */
|
||||
/************************************************************************/
|
||||
ST_UCHAR *a_get_rem_nsap (ST_LONG acse_conn_id);
|
||||
ST_ULONG a_get_rem_ip_addr (ST_LONG acse_conn_id);
|
||||
|
||||
/************************************************************************/
|
||||
/* Miscellaneous functions */
|
||||
/************************************************************************/
|
||||
ST_EVENT_SEM a_get_event_handles (ST_INT *pNumEntries);
|
||||
int *a_get_event_handles_unix (ST_INT *pNumEntries); /* for UNIX-like systems*/
|
||||
ST_RET a_get_chan (ST_LONG acse_conn_id, ST_INT *chan_out);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ACSE2USR_INCLUDED */
|
||||
/************************************************************************/
|
||||
|
||||
118
include/mmslite/acseauth.h
Normal file
118
include/mmslite/acseauth.h
Normal file
@@ -0,0 +1,118 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-2004, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : acseauth.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* ACSE Authentication header file. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 02/05/04 EJV 07 Added MACE_MECH_ID and PASWORD_MECH_ID defs. */
|
||||
/* 02/04/04 EJV 06 Removed extern maceMechId. */
|
||||
/* 08/20/03 EJV 05 Added extern maceMechId. */
|
||||
/* 07/08/03 EJV 04 Del old password auth (OBSOLETE_ACSE_AUTH) */
|
||||
/* 03/19/03 MDE 03 Added ACSE_AUTH_MECH_MACE_CERT */
|
||||
/* 03/13/03 EJV 02 Added asn1r.h. */
|
||||
/* 09/30/02 ASK 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ACSEAUTH_INCLUDED
|
||||
#define ACSEAUTH_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "asn1r.h" /* for MMS_OBJ_ID */
|
||||
|
||||
/************************************************************************/
|
||||
/* New Authentication stuff */
|
||||
/************************************************************************/
|
||||
#define ACSE_MAX_LEN_PASSWORD 64
|
||||
|
||||
typedef ST_INT16 ST_ACSE_AUTH;
|
||||
|
||||
/* Authentication mechanisms MMS_OBJ_ID */
|
||||
#define PASS_MECH_ID {4, {2 ,2 ,3 ,1 }}
|
||||
|
||||
#define MACE_MECH_ID \
|
||||
{ 8, /* num_comps */ \
|
||||
{ /* comps */ \
|
||||
1, /* ??? */ \
|
||||
0, /* ??? */ \
|
||||
840, /* iso member-body usa */ \
|
||||
0, /* ansi-t1-259-1997 */ \
|
||||
1, /* stase */ \
|
||||
0, /* stase-authentication value */ \
|
||||
1, /* abstractSyntax */ \
|
||||
1 /* version */ \
|
||||
} \
|
||||
}
|
||||
|
||||
/* The ACSE user shall return one of the falling codes once they have */
|
||||
/* taken a look at the partner's ACSE_AUTH_INFO structure. */
|
||||
|
||||
/* These return codes map to the ABRT-diagnostic of the Abort PDU. */
|
||||
/* Returning any of these will result in an abort PDU being sent with */
|
||||
/* the specified diagnostic code. */
|
||||
#define ACSE_AUTH_SUCCESS 0
|
||||
#define ACSE_DIAG_NO_REASON 1
|
||||
#define ACSE_DIAG_PROTOCOL_ERROR 2
|
||||
#define ACSE_DIAG_AUTH_MECH_NAME_NOT_RECOGNIZED 3
|
||||
#define ACSE_DIAG_AUTH_MECH_NAME_REQUIRED 4
|
||||
#define ACSE_DIAG_AUTH_FAILURE 5
|
||||
#define ACSE_DIAG_AUTH_REQUIRED 6
|
||||
|
||||
/* Mechanism types */
|
||||
#define ACSE_AUTH_MECH_PASSWORD 0
|
||||
#define ACSE_AUTH_MECH_MACE_CERT 1
|
||||
#define ACSE_AUTH_MECH_OTHER 2
|
||||
|
||||
/* This structure is used for any mechanism data that must be */
|
||||
/* encoded/decoded by the user instead of the ACSE. */
|
||||
typedef struct
|
||||
{
|
||||
ST_INT len; /* Length of encoded data. */
|
||||
ST_UCHAR *ptr; /* Pointer to encoded data. */
|
||||
ST_UCHAR *buf; /* User buffer (chk_free'd if != NULL) */
|
||||
} USR_AUTH_BUFFER;
|
||||
|
||||
|
||||
/* User-Supplied Authentication Structure */
|
||||
typedef struct
|
||||
{
|
||||
ST_BOOLEAN auth_pres; /* If this structure is filled out */
|
||||
ST_INT mech_type; /* One of the mechanism types, defined above */
|
||||
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
ST_CHAR password[ACSE_MAX_LEN_PASSWORD + 1];
|
||||
} pw_auth;
|
||||
struct
|
||||
{
|
||||
MMS_OBJ_ID mech_id; /* User must set to desired id */
|
||||
USR_AUTH_BUFFER auth_value; /* User must encode/decode ASN.1 */
|
||||
} other_auth;
|
||||
} u;
|
||||
|
||||
} ACSE_AUTH_INFO;
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ACSEAUTH_INCLUDED */
|
||||
/************************************************************************/
|
||||
1021
include/mmslite/adlc.h
Normal file
1021
include/mmslite/adlc.h
Normal file
File diff suppressed because it is too large
Load Diff
73
include/mmslite/adlc_dsm.h
Normal file
73
include/mmslite/adlc_dsm.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-1996, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : adlc_dsm.h */
|
||||
/* PRODUCT(S) : ADLC */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains functions that provide for serial port communi- */
|
||||
/* cations for the Digiboard. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* ST_INT sm_init(port,baud,parity,data,stop) */
|
||||
/* ST_INT sm_exit(port) */
|
||||
/* ST_INT sm_put (port,len,buffer) */
|
||||
/* ST_INT sm_putc (port,ch) */
|
||||
/* ST_INT sm_rx_cnt (port) */
|
||||
/* ST_INT sm_get (port,len,buffer) */
|
||||
/* ST_INT sm_getc (port) */
|
||||
/* ST_INT sm_rx_flush(port) */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/12/97 IKE 09 Changed to MMSEASE 7.0 Data Types */
|
||||
/* 02/21/97 IKE 08 Changed COM_TEST to ESSENTIAL_COM to make */
|
||||
/* more sense */
|
||||
/* 12/03/96 IKE 07 Moved some stuff to adlc_sm.h */
|
||||
/* 09/19/96 IKE 06 Rearranged sm_get and sm_set functions */
|
||||
/* 08/22/96 IKE 05 Added sm_get_dcd for contention avoidance */
|
||||
/* 06/11/96 IKE 04 Added more functions to check RS232 signals */
|
||||
/* 05/22/96 IKE 03 Added functions to control RS232 signals */
|
||||
/* 04/04/96 rkr 02 Cleanup */
|
||||
/* 11/12/95 IKE 1 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef _ADLC_DSM_H_
|
||||
#define _ADLC_DSM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(ESSENTIAL_COM)
|
||||
|
||||
ST_INT xc_entr (ST_INT);
|
||||
ST_INT xc_exit(ST_VOID);
|
||||
ST_INT xc_init(ST_INT, ST_INT, ST_INT, ST_INT, ST_INT);
|
||||
ST_INT xc_link (ST_INT, ST_INT);
|
||||
ST_INT xc_unlk (ST_INT);
|
||||
ST_INT xc_put (ST_INT, ST_CHAR*, ST_INT*);
|
||||
ST_INT xc_putc (ST_INT, ST_CHAR);
|
||||
ST_INT xc_get (ST_INT, ST_CHAR*, ST_INT*);
|
||||
ST_INT xc_getc (ST_INT);
|
||||
ST_INT xc_dtr (ST_INT, ST_INT);
|
||||
ST_INT xc_rts (ST_INT, ST_INT);
|
||||
ST_INT xc_cts(ST_INT);
|
||||
ST_INT xc_dsr(ST_INT);
|
||||
ST_INT xc_dcd(ST_INT);
|
||||
ST_INT xc_test (ST_INT);
|
||||
ST_INT xc_utest (ST_INT);
|
||||
ST_INT xc_uwait(ST_INT);
|
||||
#endif /* ESSENTIAL_COM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* adlc_dsm.h already included */
|
||||
879
include/mmslite/adlc_log.h
Normal file
879
include/mmslite/adlc_log.h
Normal file
@@ -0,0 +1,879 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-1996, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : adlc_log.h */
|
||||
/* PRODUCT(S) : ADLC */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* All the logging macros are defined in following order for easy */
|
||||
/* editing of this file. Please keep the same order if logging macros */
|
||||
/* need to be changed */
|
||||
/* */
|
||||
/* ADLC_MASK_LOG_ERR for critical errors */
|
||||
/* ADLC_MASK_LOG_NERR for normal errors */
|
||||
/* ADLC_MASK_LOG_FLOW for program flow logging */
|
||||
/* ADLC_MASK_LOG_IO for control frames */
|
||||
/* ADLC_MASK_LOG_DEBUG for debugging purposes */
|
||||
/* ADLC_MASK_LOG_ALWAYS for always logging */
|
||||
/* ADLC_MASK_LOG_SM for serial manager logging */
|
||||
/* ADLC_MASK_LOG_INFO_FRAME for data coming to or from stack */
|
||||
/* ADLC_MASK_LOG_USER from or to user (stack) logging */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/13/99 MDE 19 Added SD_CONST modifiers */
|
||||
/* 02/01/99 JRB 18 Fix ADLC_LOG_DEV_FILT macros for new API. */
|
||||
/* Put back ADLC_MAX_LOG_MASK. ADLC_LM needs it.*/
|
||||
/* 10/08/98 MDE 17 Migrated to updated SLOG interface */
|
||||
/* 09/01/98 IKE 16 Removed the if statement for ALWAYS macros */
|
||||
/* 09/18/97 IKE 15 Added telephone support */
|
||||
/* 08/27/97 IKE 14 Fixed number of parameters in */
|
||||
/* ADLC_LOG_DEV_FILT macros for non debug ver */
|
||||
/* 07/16/97 IKE 13 Added ADLC_LOG_DEV_FILT */
|
||||
/* 06/13/97 EJV 12 Added ADLC_LOG_ERR5 */
|
||||
/* 05/12/97 IKE 11 Changed to MMSEASE 7.0 Data Types */
|
||||
/* 04/30/97 IKE 10 Updated ADLC_MAX_LOG_MASK */
|
||||
/* 02/24/97 IKE 09 Changed logMask6 to use adlc_debug_sel */
|
||||
/* moved log masks to adlc_usr.h, changed */
|
||||
/* the logging macros to use slog functions */
|
||||
/* deleted macros specific to OS2 */
|
||||
/* 12/03/96 IKE 08 WIN32 Support, header files cleanup */
|
||||
/* 11/06/96 IKE 07 Changed C++ style comments to C style */
|
||||
/* comments to make it more platform independent*/
|
||||
/* 10/28/96 KCR 06 Changed LT of HEX logging macros to _CONT */
|
||||
/* 10/22/96 IKE 05 Added LOG_ALWAYS5 */
|
||||
/* 10/04/96 IKE 04 Changed DEBUG_MMS to DEBUG_SISCO */
|
||||
/* 06/21/96 IKE 03 Added ADLC_SM, ADLC_INFO_FRAME and ADLC_USER */
|
||||
/* Changed from slog_remote to SLOG6_REM_xxx */
|
||||
/* 04/04/96 rkr 02 Cleanup, removed slog_ipc.h */
|
||||
/* 01/20/96 IKE 01 Merged NAV's OS2 code */
|
||||
/* 11/25/95 IKE 1.00 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ADLC_LOG_INCLUDED
|
||||
#define ADLC_LOG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* The Logging Control structure */
|
||||
/* Note that more than one may be used, and there is a 1-to-1 mapping */
|
||||
/* of the control structure to associated file && memory buffer. */
|
||||
/************************************************************************/
|
||||
|
||||
#define ADLC_MAX_LOG_MASK (ADLC_MASK_LOG_ERR | ADLC_MASK_LOG_NERR | \
|
||||
ADLC_MASK_LOG_FLOW | \
|
||||
ADLC_MASK_LOG_IO | ADLC_MASK_LOG_HEXIO | \
|
||||
ADLC_MASK_LOG_DEBUG | ADLC_MASK_LOG_HEXDEBUG | \
|
||||
ADLC_MASK_LOG_SM | ADLC_MASK_LOG_HEXSM | \
|
||||
ADLC_MASK_LOG_INFO_FRAME | ADLC_MASK_LOG_HEXINFO_FRAME | \
|
||||
ADLC_MASK_LOG_USER | ADLC_MASK_LOG_HEXUSER)
|
||||
|
||||
#define ADLC_LOG_CLOSE_FILE (p) {slogCloseFile (p);}
|
||||
|
||||
/* Control bit set/clear macros */
|
||||
|
||||
#define ADLC_SET_CTRL(a) {sLogCtrl->logCtrl |= (a);}
|
||||
#define ADLC_CLR_CTRL(a) {sLogCtrl->logCtrl &= ~(a);}
|
||||
|
||||
#define ADLC_SET_FILE_CTRL(a) {sLogCtrl->fc.ctrl |= (a);}
|
||||
#define ADLC_CLR_FILE_CTRL(a) {sLogCtrl->fc.ctrl &= ~(a);}
|
||||
|
||||
#define ADLC_SET_LOG_MASK(a) {adlc_debug_sel |= (a);}
|
||||
#define ADLC_CLR_LOG_MASK(a) {adlc_debug_sel &= ~(a);}
|
||||
|
||||
|
||||
#ifdef DEBUG_SISCO /* if DEBUG_SISCO is defined, expand macros */
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC LOGGING CONTROL */
|
||||
/************************************************************************/
|
||||
|
||||
/* Log Type Strings */
|
||||
extern SD_CONST ST_CHAR *_adlc_err_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_nerr_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_flow_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_io_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_debug_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_always_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_sm_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_info_frame_logstr;
|
||||
extern SD_CONST ST_CHAR *_adlc_user_logstr;
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ Error Logging Macros ------------------ */
|
||||
#define ADLC_LOG_ERR0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slog (sLogCtrl, _adlc_err_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_ERR1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slog (sLogCtrl, _adlc_err_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_ERR2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slog (sLogCtrl, _adlc_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_ERR3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slog (sLogCtrl, _adlc_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_ERR4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slog (sLogCtrl, _adlc_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_ERR5(a,b,c,d,e,f) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slog (sLogCtrl, _adlc_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e,f);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CERR0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CERR1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CERR2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CERR3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CERR4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_ERR_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_ERR)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ Normal Error Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_NERR0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slog (sLogCtrl, _adlc_nerr_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_NERR1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slog (sLogCtrl, _adlc_nerr_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_NERR2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slog (sLogCtrl, _adlc_nerr_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_NERR3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slog (sLogCtrl, _adlc_nerr_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_NERR4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slog (sLogCtrl, _adlc_nerr_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CNERR0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CNERR1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CNERR2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CNERR3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CNERR4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_NERR_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_NERR)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ Flow Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_FLOW0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slog (sLogCtrl, _adlc_flow_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_FLOW1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slog (sLogCtrl, _adlc_flow_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_FLOW2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slog (sLogCtrl, _adlc_flow_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_FLOW3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slog (sLogCtrl, _adlc_flow_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_FLOW4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slog (sLogCtrl, _adlc_flow_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CFLOW0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CFLOW1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CFLOW2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CFLOW3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CFLOW4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_FLOW_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_FLOW)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ I/O Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_IO0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_IO1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_IO2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_IO3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_IO4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CIO0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CIO1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CIO2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CIO3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CIO4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_IO)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_IO_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_HEXIO)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ Debug Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_DEBUG0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slog (sLogCtrl, _adlc_debug_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_DEBUG1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slog (sLogCtrl, _adlc_debug_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_DEBUG2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slog (sLogCtrl, _adlc_debug_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_DEBUG3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slog (sLogCtrl, _adlc_debug_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_DEBUG4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slog (sLogCtrl, _adlc_debug_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CDEBUG0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CDEBUG1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CDEBUG2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CDEBUG3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CDEBUG4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_DEBUG)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_DEBUG_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_HEXDEBUG)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ Always Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_ALWAYS0(a) {\
|
||||
_slog (sLogCtrl, _adlc_always_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_ALWAYS1(a,b) {\
|
||||
_slog (sLogCtrl, _adlc_always_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_ALWAYS2(a,b,c) {\
|
||||
_slog (sLogCtrl, _adlc_always_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_ALWAYS3(a,b,c,d) {\
|
||||
_slog (sLogCtrl, _adlc_always_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_ALWAYS4(a,b,c,d,e) {\
|
||||
_slog (sLogCtrl, _adlc_always_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_ALWAYS5(a,b,c,d,e,f) {\
|
||||
_slog (sLogCtrl, _adlc_always_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e,f);\
|
||||
}
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CALWAYS0(a) {\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CALWAYS1(a,b) {\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CALWAYS2(a,b,c) {\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CALWAYS3(a,b,c,d) {\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CALWAYS4(a,b,c,d,e) {\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
#define ADLC_LOG_CALWAYS5(a,b,c,d,e,f) {\
|
||||
_slogc (sLogCtrl,a,b,c,d,e,f);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_ALWAYS_HEX(a,b) {\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ SM Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_SM0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slog (sLogCtrl, _adlc_sm_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_SM1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slog (sLogCtrl, _adlc_sm_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_SM2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slog (sLogCtrl, _adlc_sm_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_SM3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slog (sLogCtrl, _adlc_sm_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_SM4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slog (sLogCtrl, _adlc_sm_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CSM0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CSM1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CSM2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CSM3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CSM4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_SM)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_SM_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_HEXSM)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ INFO_FRAME Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_INFO_FRAME0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slog (sLogCtrl, _adlc_info_frame_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_INFO_FRAME1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slog (sLogCtrl, _adlc_info_frame_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_INFO_FRAME2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slog (sLogCtrl, _adlc_info_frame_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_INFO_FRAME3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slog (sLogCtrl, _adlc_info_frame_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_INFO_FRAME4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slog (sLogCtrl, _adlc_info_frame_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CINFO_FRAME0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CINFO_FRAME1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CINFO_FRAME2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CINFO_FRAME3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CINFO_FRAME4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_INFO_FRAME)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_INFO_FRAME_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_HEXINFO_FRAME)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ USER Logging Macros ------------------ */
|
||||
|
||||
#define ADLC_LOG_USER0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slog (sLogCtrl, _adlc_user_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_USER1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slog (sLogCtrl, _adlc_user_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_USER2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slog (sLogCtrl, _adlc_user_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_USER3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slog (sLogCtrl, _adlc_user_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_USER4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slog (sLogCtrl, _adlc_user_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
#define ADLC_LOG_USER5(a,b,c,d,e,f) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slog (sLogCtrl, _adlc_user_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e,f);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CUSER0(a) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CUSER1(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CUSER2(a,b,c) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CUSER3(a,b,c,d) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CUSER4(a,b,c,d,e) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
#define ADLC_LOG_CUSER5(a,b,c,d,e,f) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_USER)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e,f);\
|
||||
}
|
||||
#define ADLC_LOG_USER_HEX(a,b) {\
|
||||
if (adlc_debug_sel & ADLC_MASK_LOG_HEXUSER)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
/* ------------------ DEV_FILT Logging Macros ------------------ */
|
||||
#if defined(ADLC_LM)
|
||||
#define ADLC_LOG_DEV_FILT0(x,a) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define ADLC_LOG_DEV_FILT1(x,a,b) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_DEV_FILT2(x,a,b,c) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_DEV_FILT3(x,a,b,c,d) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_DEV_FILT4(x,a,b,c,d,e) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slog (sLogCtrl, _adlc_io_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
/* 'Continue' versions */
|
||||
#define ADLC_LOG_CDEV_FILT0(x,a) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define ADLC_LOG_CDEV_FILT1(x,a,b) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define ADLC_LOG_CDEV_FILT2(x,a,b,c) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define ADLC_LOG_CDEV_FILT3(x,a,b,c,d) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define ADLC_LOG_CDEV_FILT4(x,a,b,c,d,e) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
|
||||
#define ADLC_LOG_DEV_FILT_HEX(x,a,b) {\
|
||||
if (stFiltDevLog.bFilter && stFiltDevLog.address == x)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
#endif /* ADLC_LM */
|
||||
#else /* DEBUG_SISCO not defined */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Error Logging Macros for Hard( serious ) Errors
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_ERR0(a)
|
||||
#define ADLC_LOG_ERR1(a,b)
|
||||
#define ADLC_LOG_ERR2(a,b,c)
|
||||
#define ADLC_LOG_ERR3(a,b,c,d)
|
||||
#define ADLC_LOG_ERR4(a,b,c,d,e)
|
||||
#define ADLC_LOG_ERR5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_CERR0(a)
|
||||
#define ADLC_LOG_CERR1(a,b)
|
||||
#define ADLC_LOG_CERR2(a,b,c)
|
||||
#define ADLC_LOG_CERR3(a,b,c,d)
|
||||
#define ADLC_LOG_CERR4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_ERR_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Logging Macros for on Errors
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_NERR0(a)
|
||||
#define ADLC_LOG_NERR1(a,b)
|
||||
#define ADLC_LOG_NERR2(a,b,c)
|
||||
#define ADLC_LOG_NERR3(a,b,c,d)
|
||||
#define ADLC_LOG_NERR4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_CNERR0(a)
|
||||
#define ADLC_LOG_CNERR1(a,b)
|
||||
#define ADLC_LOG_CNERR2(a,b,c)
|
||||
#define ADLC_LOG_CNERR3(a,b,c,d)
|
||||
#define ADLC_LOG_CNERR4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_NERR_HEX(a,b)
|
||||
/*-----------------------------------------------------------------------
|
||||
* Flow Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_FLOW0(a)
|
||||
#define ADLC_LOG_FLOW1(a,b)
|
||||
#define ADLC_LOG_FLOW2(a,b,c)
|
||||
#define ADLC_LOG_FLOW3(a,b,c,d)
|
||||
#define ADLC_LOG_FLOW4(a,b,c,d,e)
|
||||
#define ADLC_LOG_FLOW5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_CFLOW0(a)
|
||||
#define ADLC_LOG_CFLOW1(a,b)
|
||||
#define ADLC_LOG_CFLOW2(a,b,c)
|
||||
#define ADLC_LOG_CFLOW3(a,b,c,d)
|
||||
#define ADLC_LOG_CFLOW4(a,b,c,d,e)
|
||||
#define ADLC_LOG_CFLOW5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_FLOW_HEX(a,b)
|
||||
/*-----------------------------------------------------------------------
|
||||
* I/O Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_IO0(a)
|
||||
#define ADLC_LOG_IO1(a,b)
|
||||
#define ADLC_LOG_IO2(a,b,c)
|
||||
#define ADLC_LOG_IO3(a,b,c,d)
|
||||
#define ADLC_LOG_IO4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_CIO0(a)
|
||||
#define ADLC_LOG_CIO1(a,b)
|
||||
#define ADLC_LOG_CIO2(a,b,c)
|
||||
#define ADLC_LOG_CIO3(a,b,c,d)
|
||||
#define ADLC_LOG_CIO4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_IO_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Debug Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_DEBUG0(a)
|
||||
#define ADLC_LOG_DEBUG1(a,b)
|
||||
#define ADLC_LOG_DEBUG2(a,b,c)
|
||||
#define ADLC_LOG_DEBUG3(a,b,c,d)
|
||||
#define ADLC_LOG_DEBUG4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_CDEBUG0(a)
|
||||
#define ADLC_LOG_CDEBUG1(a,b)
|
||||
#define ADLC_LOG_CDEBUG2(a,b,c)
|
||||
#define ADLC_LOG_CDEBUG3(a,b,c,d)
|
||||
#define ADLC_LOG_CDEBUG4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_DEBUG_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Always Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_ALWAYS0(a)
|
||||
#define ADLC_LOG_ALWAYS1(a,b)
|
||||
#define ADLC_LOG_ALWAYS2(a,b,c)
|
||||
#define ADLC_LOG_ALWAYS3(a,b,c,d)
|
||||
#define ADLC_LOG_ALWAYS4(a,b,c,d,e)
|
||||
#define ADLC_LOG_ALWAYS5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_CALWAYS0(a)
|
||||
#define ADLC_LOG_CALWAYS1(a,b)
|
||||
#define ADLC_LOG_CALWAYS2(a,b,c)
|
||||
#define ADLC_LOG_CALWAYS3(a,b,c,d)
|
||||
#define ADLC_LOG_CALWAYS4(a,b,c,d,e)
|
||||
#define ADLC_LOG_CALWAYS5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_ALWAYS_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Serial Manager Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_SM0(a)
|
||||
#define ADLC_LOG_SM1(a,b)
|
||||
#define ADLC_LOG_SM2(a,b,c)
|
||||
#define ADLC_LOG_SM3(a,b,c,d)
|
||||
#define ADLC_LOG_SM4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_CSM0(a)
|
||||
#define ADLC_LOG_CSM1(a,b)
|
||||
#define ADLC_LOG_CSM2(a,b,c)
|
||||
#define ADLC_LOG_CSM3(a,b,c,d)
|
||||
#define ADLC_LOG_CSM4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_SM_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* INFO_FRAME Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_INFO_FRAME0(a)
|
||||
#define ADLC_LOG_INFO_FRAME1(a,b)
|
||||
#define ADLC_LOG_INFO_FRAME2(a,b,c)
|
||||
#define ADLC_LOG_INFO_FRAME3(a,b,c,d)
|
||||
#define ADLC_LOG_INFO_FRAME4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_CINFO_FRAME0(a)
|
||||
#define ADLC_LOG_CINFO_FRAME1(a,b)
|
||||
#define ADLC_LOG_CINFO_FRAME2(a,b,c)
|
||||
#define ADLC_LOG_CINFO_FRAME3(a,b,c,d)
|
||||
#define ADLC_LOG_CINFO_FRAME4(a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_INFO_FRAME_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* USER Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_USER0(a)
|
||||
#define ADLC_LOG_USER1(a,b)
|
||||
#define ADLC_LOG_USER2(a,b,c)
|
||||
#define ADLC_LOG_USER3(a,b,c,d)
|
||||
#define ADLC_LOG_USER4(a,b,c,d,e)
|
||||
#define ADLC_LOG_USER5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_CUSER0(a)
|
||||
#define ADLC_LOG_CUSER1(a,b)
|
||||
#define ADLC_LOG_CUSER2(a,b,c)
|
||||
#define ADLC_LOG_CUSER3(a,b,c,d)
|
||||
#define ADLC_LOG_CUSER4(a,b,c,d,e)
|
||||
#define ADLC_LOG_CUSER5(a,b,c,d,e,f)
|
||||
|
||||
#define ADLC_LOG_USER_HEX(a,b)
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* DEV_FILT Logging Macros
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
#define ADLC_LOG_DEV_FILT0(x,a)
|
||||
#define ADLC_LOG_DEV_FILT1(x,a,b)
|
||||
#define ADLC_LOG_DEV_FILT2(x,a,b,c)
|
||||
#define ADLC_LOG_DEV_FILT3(x,a,b,c,d)
|
||||
#define ADLC_LOG_DEV_FILT4(x,a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_CDEV_FILT0(x,a)
|
||||
#define ADLC_LOG_CDEV_FILT1(x,a,b)
|
||||
#define ADLC_LOG_CDEV_FILT2(x,a,b,c)
|
||||
#define ADLC_LOG_CDEV_FILT3(x,a,b,c,d)
|
||||
#define ADLC_LOG_CDEV_FILT4(x,a,b,c,d,e)
|
||||
|
||||
#define ADLC_LOG_DEV_FILT_HEX(x,a,b)
|
||||
|
||||
#endif /* for DEBUG_SISCO */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ADLC_LOG_INCLUDED */
|
||||
|
||||
317
include/mmslite/adlc_sm.h
Normal file
317
include/mmslite/adlc_sm.h
Normal file
@@ -0,0 +1,317 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-2002, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : adlc_sm.h */
|
||||
/* PRODUCT(S) : ADLC */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains functions that provide for serial port communi- */
|
||||
/* cations for the Digiboard. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* ST_INT sm_init(port,baud,parity,data,stop) */
|
||||
/* ST_INT sm_exit(port) */
|
||||
/* ST_INT sm_put (port,len,buffer) */
|
||||
/* ST_INT sm_putc (port,ch) */
|
||||
/* ST_INT sm_rx_cnt (port) */
|
||||
/* ST_INT sm_get (port,packet,toRead,bytesRead) */
|
||||
/* ST_INT sm_getc (port) */
|
||||
/* ST_INT sm_rx_flush(port) */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 11/24/02 KCR 12 Added rdThreadError handling semaphore */
|
||||
/* 04/20/98 IKE 11 Moved u_smp_record_time in Serial Manager */
|
||||
/* 10/06/97 IKE 10 Added more baud rates */
|
||||
/* 09/18/97 IKE 09 Added telephone support */
|
||||
/* 05/12/97 IKE 08 Changed to MMSEASE 7.0 Data Types */
|
||||
/* 02/03/97 IKE 07 adlcCfg per port basis */
|
||||
/* CFG_PORT also for DOS so multiple ports can */
|
||||
/* be initialized in dos platform */
|
||||
/* 09/19/96 IKE 06 Rearranged sm_get and sm_set functions */
|
||||
/* 08/22/96 IKE 05 Added sm_get_dcd for contention avoidance */
|
||||
/* 06/11/96 IKE 04 Added more functions to check RS232 signals */
|
||||
/* 05/22/96 IKE 03 Added functions to control RS232 signals */
|
||||
/* 04/04/96 rkr 02 Cleanup */
|
||||
/* 11/12/95 IKE 1 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef _ADLC_SM_H_
|
||||
#define _ADLC_SM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define COM1 0 /* Async Adapter COM1: */
|
||||
#define COM2 1 /* Async Adapter COM2: */
|
||||
#define COM3 2 /* Async Adapter COM3: */
|
||||
#define COM4 3 /* Async Adapter COM4: */
|
||||
#define COM5 4 /* Async Adapter COM5: */
|
||||
#define COM6 5 /* Async Adapter COM6: */
|
||||
#define COM7 6 /* Async Adapter COM7: */
|
||||
#define COM8 7 /* Async Adapter COM8: */
|
||||
#define COM9 8 /* Async Adapter COM9: */
|
||||
#define COM10 9 /* Async Adapter COM10: */
|
||||
#define COM11 10 /* ETC. */
|
||||
#define COM12 11
|
||||
#define COM13 12
|
||||
#define COM14 13
|
||||
#define COM15 14
|
||||
#define COM16 15
|
||||
#define COM17 16
|
||||
#define COM18 17
|
||||
#define COM19 18
|
||||
#define COM20 19
|
||||
#define COM21 20
|
||||
#define COM22 21
|
||||
#define COM23 22
|
||||
#define COM24 23
|
||||
#define COM25 24
|
||||
#define COM26 25
|
||||
#define COM27 26
|
||||
#define COM28 27
|
||||
#define COM29 28
|
||||
#define COM30 29
|
||||
#define COM31 30
|
||||
#define COM32 31
|
||||
#define COM33 32
|
||||
#define COM34 33
|
||||
|
||||
#define LOW 0
|
||||
#define HIGH 1
|
||||
|
||||
ST_RET sm_init (ST_INT,ST_INT,ST_INT,ST_INT,ST_INT);
|
||||
ST_RET sm_exit (ST_INT);
|
||||
ST_RET sm_put (ST_INT,ST_INT, ST_CHAR *);
|
||||
ST_RET sm_putc (ST_INT, ST_CHAR);
|
||||
ST_INT sm_rx_cnt (ST_INT port);
|
||||
ST_INT sm_tx_cnt (ST_INT port);
|
||||
ST_RET sm_get (ST_INT,ST_CHAR *,ST_INT,ST_INT *);
|
||||
ST_INT sm_getc (ST_INT);
|
||||
ST_VOID sm_rx_flush (ST_INT);
|
||||
ST_RET sm_set_signals (ST_INT port);
|
||||
ST_RET sm_clear_signals (ST_INT port);
|
||||
ST_RET sm_set_rts (ST_INT port);
|
||||
ST_RET sm_clear_rts (ST_INT port);
|
||||
ST_RET sm_set_dtr (ST_INT port);
|
||||
ST_RET sm_clear_dtr (ST_INT port);
|
||||
ST_RET sm_set_rts_clear_dtr(ST_INT port);
|
||||
ST_RET sm_clear_rts_set_dtr(ST_INT port);
|
||||
ST_INT sm_get_rts (ST_INT port);
|
||||
ST_INT sm_get_dtr (ST_INT port);
|
||||
ST_INT sm_get_cts (ST_INT port);
|
||||
ST_INT sm_get_dsr (ST_INT port);
|
||||
ST_INT sm_get_dcd (ST_INT port);
|
||||
|
||||
#if !defined(ADLC_LM)
|
||||
/* The INIT (ah=00, Int 14h) communications parameters */
|
||||
|
||||
#define BAUD110 0 /* Baud rate 110 */
|
||||
#define BAUD150 1 /* Baud rate 150 */
|
||||
#define BAUD300 2 /* Baud rate 300 */
|
||||
#define BAUD600 3 /* Baud rate 600 */
|
||||
#define BAUD1200 4 /* Baud rate 1200 */
|
||||
#define BAUD2400 5 /* Baud rate 2400 */
|
||||
#define BAUD4800 6 /* Baud rate 4800 */
|
||||
#define BAUD9600 7 /* Baud rate 9600 */
|
||||
#define BAUD19200 8 /* Baud rate 19200 */
|
||||
#define BAUD38400 9 /* Baud rate 38400 */
|
||||
#define BAUD57K 10 /* Baud rate 57.4K */
|
||||
#define BAUD115K 11 /* Baud rate 115.2K */
|
||||
#define BAUD56K 12 /* Baud rate 56K */
|
||||
#define BAUD128K 13 /* Baud rate 128K */
|
||||
#define BAUD256K 14 /* Baud rate 256K */
|
||||
|
||||
#define DATA7 0 /* Data bits 7 */
|
||||
#define DATA8 1 /* Data bits 8 */
|
||||
|
||||
#define NOPAR 0 /* Parity none */
|
||||
#define ODDPAR 1 /* Parity odd */
|
||||
#define EVENPAR 2 /* Parity even */
|
||||
|
||||
#define STOP1 0 /* Stop bits 1 */
|
||||
#define STOP2 1 /* Stop bits 2 */
|
||||
|
||||
#endif /* !ADLC_LM */
|
||||
|
||||
#if defined(ADLC_LM)
|
||||
/* Request OpCode Definitions */
|
||||
#define SM_INITIALIZE_PORT_REQ 0 /* open the port */
|
||||
#define SM_TERMINATE_PORT_REQ 1 /* close the port */
|
||||
#define SM_READ_REQ 2 /* read from the port */
|
||||
#define SM_WRITE_REQ 3 /* write to the port */
|
||||
#define SM_IN_BYTE_COUNT_REQ 4 /* check the input Q */
|
||||
#define SM_OUT_BYTE_COUNT_REQ 5 /* check the output Q */
|
||||
#define SM_GET_STATUS_REQ 6 /* get modem status */
|
||||
#define SM_SET_STATUS_REQ 7 /* set modem status */
|
||||
#define SM_RX_FLUSH_REQ 8 /* flush recieve buffer */
|
||||
#define SM_GET_FRAME_REQ 9 /* respond to frameArr */
|
||||
|
||||
/* Request Error Code Definitions */
|
||||
#define SM_NO_ERR 0
|
||||
#define SM_INIT_ERR 1
|
||||
#define SM_TX_ERR 2
|
||||
#define SM_RX_ERR 3
|
||||
#define SM_INVALID_REQ 4
|
||||
#define SM_PORT_ALREADY_OPEN 5
|
||||
#define SM_OPEN_ERROR 6
|
||||
#define SM_SET_BAUD_FAILURE 7
|
||||
#define SM_SET_LINE_FAILURE 8
|
||||
#define SM_SET_FLOW_FAILURE 9
|
||||
#define SM_PORT_NOT_OPEN 10
|
||||
#define SM_INVALID_PARAM 11
|
||||
#define SM_ERROR 12
|
||||
#define SM_NO_FRAMES_AVAILABLE 13
|
||||
#define SM_NO_WRITE_CONF_AVIAL 14
|
||||
#define SM_SEM_OPEN_FAILURE 15
|
||||
#define SM_TERMINATED 16
|
||||
|
||||
/* Request Status Code Definitions */
|
||||
#define SM_COMPLETED 0
|
||||
#define SM_PENDING 1
|
||||
#define SM_UNDERWAY 2
|
||||
#define SM_ABORTED 3
|
||||
#define SM_FAILED 4
|
||||
#define SM_TX_RX_IN_PROCESS 5 /* pend TX & RX on terminate*/
|
||||
#define SM_TX_IN_PROCESS 6 /* pending TX on terminate */
|
||||
#define SM_RX_IN_PROCESS 7 /* pending RX on terminate */
|
||||
|
||||
/* Request Specific Structures */
|
||||
typedef struct smRdwrReq
|
||||
{
|
||||
ST_INT len; /* num of bytes to read or write */
|
||||
ST_CHAR *data; /* user allocates and frees for read or */
|
||||
}SM_RDWR_REQ; /* write */
|
||||
|
||||
typedef struct smFrameReq
|
||||
{
|
||||
ST_INT port; /* port the frame was received from */
|
||||
ST_INT len; /* frame length */
|
||||
ST_CHAR *data; /* SM allocates - user frees!!! */
|
||||
#if defined(UCA_SMP)
|
||||
ST_CHAR recTime[SMP_SIZE_OF_REC_TIME]; /* buffer to hold time stamp */
|
||||
#endif
|
||||
}SM_FRAME_REQ;
|
||||
|
||||
typedef struct smLineParam
|
||||
{
|
||||
ST_INT baudRate; /* 300, 1200, 4800, 9600, 19.2, 38.4, 57.6 */
|
||||
ST_INT dataBits; /* 5, 6, 7, 8 */
|
||||
ST_INT parity; /* 0=none, 1=odd, 2=even, 3=mark, 4=space */
|
||||
ST_INT stopBits; /* 0=>1, 1=>1.5 stop bits, 2=>2 */
|
||||
}SM_LINE_PARAM;
|
||||
|
||||
typedef struct smHandShake
|
||||
{
|
||||
ST_BOOLEAN enableDTR; /* enable DTR input handshaking */
|
||||
ST_BOOLEAN enableCTS; /* enable CTS output handshaking */
|
||||
ST_BOOLEAN enableDSRout; /* enable DSR output handshaking */
|
||||
ST_BOOLEAN enableDCD; /* enable DCD output handshaking */
|
||||
ST_BOOLEAN enableDSRin; /* enable DSR input sensitivity */
|
||||
ST_BOOLEAN enableRTS; /* enable RTS input handshaking */
|
||||
}SM_HAND_SHAKE;
|
||||
|
||||
typedef struct smFlowCtrl
|
||||
{
|
||||
ST_BOOLEAN enableTxFlow; /* enable auto transmit XON/XOFF */
|
||||
ST_BOOLEAN enableRxFlow; /* enable auto receive XON/XOFF */
|
||||
ST_UCHAR xonChar; /* usually 0x11 */
|
||||
ST_UCHAR xoffChar; /* usually 0x13 */
|
||||
}SM_FLOW_CTRL;
|
||||
|
||||
typedef struct smInitReq
|
||||
{
|
||||
SM_LINE_PARAM initLineParam;
|
||||
SM_HAND_SHAKE initHandShake;
|
||||
SM_FLOW_CTRL initFlowCtrl;
|
||||
HANDLE hCom;
|
||||
ST_INT frameLen;
|
||||
ST_UCHAR sof;
|
||||
ST_UCHAR eof;
|
||||
HEV txDoneSem;
|
||||
HEV frameArrivalSem;
|
||||
HEV rdThreadErrSem;
|
||||
}SM_INIT_REQ;
|
||||
|
||||
typedef struct smStatusReq
|
||||
{
|
||||
ST_BOOLEAN dtr;
|
||||
ST_BOOLEAN rts;
|
||||
ST_BOOLEAN dcd;
|
||||
ST_BOOLEAN cts;
|
||||
ST_BOOLEAN dsr;
|
||||
}SM_STATUS_REQ;
|
||||
|
||||
/************************************************************************/
|
||||
/* SM_REQ */
|
||||
/* Every request to serial Manager uses this data structure */
|
||||
/************************************************************************/
|
||||
typedef struct smReq
|
||||
{
|
||||
struct dbl_lnk l;
|
||||
ST_INT opCode; /* operation requested */
|
||||
ST_INT status;
|
||||
ST_INT errCode;
|
||||
ST_INT port;
|
||||
union
|
||||
{
|
||||
SM_RDWR_REQ readWriteReq;
|
||||
SM_INIT_REQ initReq;
|
||||
SM_STATUS_REQ setStatReq;
|
||||
} i; /* input data */
|
||||
union
|
||||
{
|
||||
SM_RDWR_REQ readReq;
|
||||
SM_STATUS_REQ getStatReq;
|
||||
ST_INT byteCount;
|
||||
SM_FRAME_REQ frameArrReq;
|
||||
}o; /* output data */
|
||||
}SM_REQ;
|
||||
|
||||
/* serial manager user access functions */
|
||||
ST_RET sm_get_status (ST_INT port,SM_REQ *pstReq);
|
||||
ST_VOID sm_set_status(ST_INT port, SM_REQ *pstReq);
|
||||
ST_RET _SmInitialize(ST_VOID); /* startup code */
|
||||
ST_RET _SmRequest(SM_REQ *); /* service user requests */
|
||||
ST_VOID _SmTerminate(ST_VOID); /* cleanup code */
|
||||
|
||||
#ifdef ADLC_TESTING
|
||||
ST_VOID _SmShowStats(ST_INT port);
|
||||
#endif
|
||||
|
||||
#endif /* ADLC_LM */
|
||||
|
||||
/************************************************************************/
|
||||
/* CFG_PORT */
|
||||
/* This data structure is used only when reading the configuration File */
|
||||
/* and when opening a port, after that it is not used any more */
|
||||
/************************************************************************/
|
||||
typedef struct cfgPortStuff
|
||||
{
|
||||
struct dbl_lnk l;
|
||||
ST_INT port;
|
||||
#if !defined(ADLC_LM)
|
||||
ST_INT baud;
|
||||
ST_INT parity;
|
||||
ST_INT data;
|
||||
ST_INT stop;
|
||||
#endif
|
||||
#if defined(ADLC_LM)
|
||||
SM_LINE_PARAM stLineParam;
|
||||
SM_HAND_SHAKE stHandShake;
|
||||
SM_FLOW_CTRL stFlowCtrl;
|
||||
#endif
|
||||
}CFG_PORT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* adlc_sm.h already included */
|
||||
82
include/mmslite/adlc_sts.h
Normal file
82
include/mmslite/adlc_sts.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-1996, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : adlc_sts.h */
|
||||
/* PRODUCT(S) : ADLC */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : This header file defines data structures */
|
||||
/* and types for rli adlc link manager. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 07/16/97 IKE 05 Added device statistics and device filt log */
|
||||
/* 05/12/97 IKE 04 Changed to MMSEASE 7.0 Data Types */
|
||||
/* 04/10/97 EJV 03 Deletes defines ADLC_MASTER, ADLC_SLAVE */
|
||||
/* 10/23/96 IKE 02 Added statsResetTime */
|
||||
/* 09/30/96 IKE 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ADLC_STS_H
|
||||
#define ADLC_STS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcStats
|
||||
{
|
||||
ST_LONG statsResetTime; /* time stats last reset */
|
||||
ST_ULONG txFrames; /* Total transmitted Frames */
|
||||
ST_ULONG rxFrames; /* Total received Frames */
|
||||
ST_ULONG goodFrames; /* Total good frames received */
|
||||
ST_ULONG badFrames; /* Total bad frames when sof was ok */
|
||||
ST_ULONG discardedBytes; /* Total discarded bytes */
|
||||
ST_ULONG mCastFrames; /* Total Multicast Frames */
|
||||
ST_ULONG txPackets; /* Total Transmitted MMS LSDU */
|
||||
ST_ULONG rxPackets; /* Total Received MMS LSDU */
|
||||
ST_ULONG rxInfo; /* Total Received INFO frames */
|
||||
ST_ULONG rxRr; /* Total Received RR frames */
|
||||
ST_ULONG rxRnr; /* Total Received RNR frames */
|
||||
ST_ULONG rxRej; /* Total Received REJ frames */
|
||||
ST_ULONG rxUi; /* Total Received UI frames */
|
||||
ST_ULONG txUFrames; /* Total Transmitted Unumbered frames */
|
||||
ST_ULONG txSFrames; /* Total Transmitted Supervisory frames */
|
||||
ST_ULONG txMFrames; /* Total Transmitted Multicast frames */
|
||||
ST_ULONG txIFrames; /* Total Transmitted INFO frames */
|
||||
ST_ULONG txUiFrames; /* Total Received UI frames */
|
||||
ST_ULONG timeout; /* Total Timeouts */
|
||||
ST_ULONG retransmits; /* Total retransmit INFO frames */
|
||||
ST_ULONG rxUa; /* Total Received UA frames */
|
||||
ST_ULONG rxRd; /* Total Received RD frames */
|
||||
ST_ULONG rxDm; /* Total Received DM frames */
|
||||
ST_ULONG rxFrmr; /* Total Received FRMR frames */
|
||||
ST_ULONG txRFrames; /* Total Received Redirect frames */
|
||||
ST_ULONG rxSnrm; /* Total Received SNRM frames */
|
||||
ST_ULONG rxDisc; /* Total Received DISC frames */
|
||||
} ADLC_STATS;
|
||||
|
||||
#if defined(__OS2__) || defined(_WIN32)
|
||||
typedef struct tagAdlcDevStats
|
||||
{
|
||||
ST_ULONG txFrames; /* Total transmitted Frames */
|
||||
ST_ULONG rxFrames; /* Total received Frames */
|
||||
ST_ULONG timeout; /* Total Timeouts */
|
||||
ST_ULONG retransmits; /* Total retransmitted INFO frames */
|
||||
} ADLC_DEV_STATS;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ADLC_STS.H already included */
|
||||
|
||||
441
include/mmslite/adlc_usr.h
Normal file
441
include/mmslite/adlc_usr.h
Normal file
@@ -0,0 +1,441 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1995-1997, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : adlc_usr.h */
|
||||
/* PRODUCT(S) : ADLC */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : This header file defines data structures */
|
||||
/* and types for ADLC */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/05/03 EJV 21 Chg mms_debug_sel to ST_UINT, and deleted */
|
||||
/* L suffix from MMS_LOG_... masks. */
|
||||
/* 10/17/01 JRB 20 Del #ifdef UCA_SMP */
|
||||
/* 02/04/99 JRB 19 Added adlcStartLinkMan.. */
|
||||
/* 10/08/98 MDE 18 Removed ADLC_MASK_LOG_ALWAYS */
|
||||
/* 10/21/97 IKE 17 Changed OSI_ADDR to LOCAL_ADDR in error codes*/
|
||||
/* 10/14/97 IKE 16 Split into two modules and put all the ipc */
|
||||
/* specific stuff into adlc_ipc.h */
|
||||
/* 10/1/97 IKE 15 Removed ADLC_LM define if _WIN32 or OS2 is */
|
||||
/* defined */
|
||||
/* 09/26/97 IKE 14 Added ADLC_M_LOCAL_BASE_ADDR */
|
||||
/* 09/22/97 IKE 13 Added SMP(Station Managment Protocol) support*/
|
||||
/* 09/18/97 IKE 12 Added telephone support */
|
||||
/* 07/16/97 IKE 11 Added support for new ADLC commands */
|
||||
/* adlcGetDevStats and adlcFilterDevLog. */
|
||||
/* 05/12/97 IKE 10 Changed to MMSEASE 7.0 Data Types */
|
||||
/* 04/10/97 EJV 09 Replaced error codes base 0x06xx with 0xA6xx */
|
||||
/* 03/13/97 EJV 08 Changes for BRIDGE-132-095 (COGW,RSGW,MCGW): */
|
||||
/* - added adlcLogState function; */
|
||||
/* 02/24/97 IKE 07 Moved the log masks defn from adlc_log.h */
|
||||
/* 01/22/97 IKE 06 Put prototypes for adlcOpenInterface and */
|
||||
/* adlcCloseInterface */
|
||||
/* 12/03/96 IKE 05 WIN32 Support */
|
||||
/* 09/30/96 IKE 04 Removed ifdef PLAIN_DOS for adlcRead func */
|
||||
/* so Lean-t stack can use same funct for OS2 */
|
||||
/* 05/22/96 IKE 03 Added some more error codes */
|
||||
/* 04/04/96 rkr 02 Cleanup */
|
||||
/* 01/02/96 IKE 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ADLC_USR_H
|
||||
#define ADLC_USR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "adlc_sts.h"
|
||||
|
||||
#include "smp_usr.h"
|
||||
|
||||
#define ADLC_ALL_ES 0x8080 /* ES-Hello Multicast Address */
|
||||
#define ADLC_ALL_IS 0x8081 /* IS-Hello Multicast Address */
|
||||
#define ALL_STATIONS_ADDR 0xFFFF /* Broadcast Address */
|
||||
#define NO_STATION_ADDR 0x0000 /* No station address */
|
||||
#define ADLC_M_BASE_LOC_ADDR 0x2000 /* For Adlc Master local Addr */
|
||||
#define ADLC_USR_M_BASE_LOC_ADDR 0x3000 /* For user apps local adlc addr*/
|
||||
|
||||
#define CMD_BASE_ADLC_LM 600
|
||||
|
||||
/****************************************************************/
|
||||
/* Log Control */
|
||||
/****************************************************************/
|
||||
/* adlc logging mask */
|
||||
#define ADLC_MASK_LOG_ERR 0x00010000
|
||||
#define ADLC_MASK_LOG_NERR 0x00020000
|
||||
#define ADLC_MASK_LOG_FLOW 0x00040000
|
||||
#define ADLC_MASK_LOG_IO 0x00080000
|
||||
#define ADLC_MASK_LOG_HEXIO 0x00100000
|
||||
#define ADLC_MASK_LOG_DEBUG 0x00200000
|
||||
#define ADLC_MASK_LOG_HEXDEBUG 0x00400000
|
||||
#define ADLC_MASK_LOG_SM 0x01000000
|
||||
#define ADLC_MASK_LOG_HEXSM 0x02000000
|
||||
#define ADLC_MASK_LOG_INFO_FRAME 0x04000000
|
||||
#define ADLC_MASK_LOG_HEXINFO_FRAME 0x08000000
|
||||
#define ADLC_MASK_LOG_USER 0x10000000
|
||||
#define ADLC_MASK_LOG_HEXUSER 0x20000000
|
||||
|
||||
extern ST_UINT adlc_debug_sel;
|
||||
/****************************************************************/
|
||||
/* ADLC Command OpCodes */
|
||||
/****************************************************************/
|
||||
|
||||
#define ADLC_CMD_CONNECT_NODE (CMD_BASE_ADLC_LM + 1)
|
||||
#define ADLC_CMD_DISCONNECT_NODE (CMD_BASE_ADLC_LM + 2)
|
||||
#define ADLC_CMD_CONNECT_NODE_DONE (CMD_BASE_ADLC_LM + 3)
|
||||
#define ADLC_CMD_DISCONNECT_NODE_DONE (CMD_BASE_ADLC_LM + 4)
|
||||
#define ADLC_CMD_CONNECT_ALL (CMD_BASE_ADLC_LM + 5)
|
||||
#define ADLC_CMD_DISCONNECT_ALL (CMD_BASE_ADLC_LM + 6)
|
||||
#define ADLC_CMD_WRITE_PACKET (CMD_BASE_ADLC_LM + 7)
|
||||
#define ADLC_CMD_GET_CON_STATUS (CMD_BASE_ADLC_LM + 8)
|
||||
#define ADLC_CMD_ADD_DEV (CMD_BASE_ADLC_LM + 9)
|
||||
#define ADLC_CMD_REMOVE_DEV (CMD_BASE_ADLC_LM + 10)
|
||||
#define ADLC_CMD_START_POLL_DEV (CMD_BASE_ADLC_LM + 11)
|
||||
#define ADLC_CMD_STOP_POLL_DEV (CMD_BASE_ADLC_LM + 12)
|
||||
#define ADLC_CMD_CHANGE_POLL_RATE (CMD_BASE_ADLC_LM + 13)
|
||||
#define ADLC_CMD_QUERY_POLL_INFO (CMD_BASE_ADLC_LM + 14)
|
||||
|
||||
/* #if ADLC_LM */
|
||||
#define ADLC_CMD_SET_SM_SLEEP (CMD_BASE_ADLC_LM + 15)
|
||||
#define ADLC_CMD_GET_SM_SLEEP (CMD_BASE_ADLC_LM + 16)
|
||||
#define ADLC_CMD_GET_DEV_STATS (CMD_BASE_ADLC_LM + 17)
|
||||
#define ADLC_CMD_FILTER_DEV_LOG (CMD_BASE_ADLC_LM + 18)
|
||||
#define ADLC_CMD_ADD_PORT (CMD_BASE_ADLC_LM + 19)
|
||||
#define ADLC_CMD_REMOVE_PORT (CMD_BASE_ADLC_LM + 20)
|
||||
#define ADLC_CMD_TEL_DIAL (CMD_BASE_ADLC_LM + 21)
|
||||
#define ADLC_CMD_TEL_DIAL_DONE (CMD_BASE_ADLC_LM + 22)
|
||||
#define ADLC_CMD_TEL_HANGUP (CMD_BASE_ADLC_LM + 23)
|
||||
#define ADLC_CMD_TEL_HANGUP_DONE (CMD_BASE_ADLC_LM + 24)
|
||||
/* #endif ADLC_LM */
|
||||
|
||||
#define ADLC_CMD_EXT_WRITE_PACKET (CMD_BASE_ADLC_LM + 25)
|
||||
#define ADLC_CMD_EXT_WRITE_PACKET_DONE (CMD_BASE_ADLC_LM + 26)
|
||||
|
||||
#define ADLC_CMD_WRITE_PACKET_DONE (CMD_BASE_ADLC_LM + 27)
|
||||
|
||||
|
||||
#define ADLC_DEV_NAME_SIZE 80
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_CONNECT_NODE */
|
||||
/* This is a bidirectional event */
|
||||
/* This could be an event from stack to ADLC and vice versa */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcConnectNode
|
||||
{
|
||||
struct
|
||||
{
|
||||
ST_UINT16 localAddr; /* OSI node address */
|
||||
ST_UINT16 remoteAddr; /* ADLC device address */
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_CONNECT_NODE;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_DISCONNECT_NODE */
|
||||
/* This is a bidirectional event */
|
||||
/* This could be an event from stack to ADLC and vice versa */
|
||||
/************************************************************************/
|
||||
|
||||
typedef ADLC_CONNECT_NODE ADLC_DISCONNECT_NODE;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_CONNECT_NODE_DONE */
|
||||
/* This is event from ADLC to stack */
|
||||
/************************************************************************/
|
||||
|
||||
typedef ADLC_CONNECT_NODE ADLC_CONNECT_NODE_DONE;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_DISCONNECT_NODE_DONE */
|
||||
/* This is event from ADLC to stack */
|
||||
/************************************************************************/
|
||||
typedef ADLC_CONNECT_NODE ADLC_DISCONNECT_NODE_DONE;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_CONNECT_ALL */
|
||||
/* This is an event from stack to ADLC */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcConnectAll
|
||||
{
|
||||
struct
|
||||
{
|
||||
ST_UINT16 localAddr; /* OSI node address */
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_CONNECT_ALL;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_DISCONNECT_ALL */
|
||||
/* This is an event from stack to ADLC */
|
||||
/************************************************************************/
|
||||
typedef ADLC_CONNECT_ALL ADLC_DISCONNECT_ALL;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_WRITE_PACKET */
|
||||
/* This is a bidirectional event */
|
||||
/* This could be an event from stack to ADLC and vice versa */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcWritePacket
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_UINT16 remoteAddr; /* device where data is going */
|
||||
ST_UINT16 localAddr; /* device where data comes from */
|
||||
ST_INT dataSize;
|
||||
ST_VOID *data; /* allocated memory */
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_WRITE_PACKET;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_WRITE_PACKET_DONE */
|
||||
/* This is an event from ADLC to stack */
|
||||
/************************************************************************/
|
||||
typedef ADLC_WRITE_PACKET ADLC_WRITE_PACKET_DONE;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_GET_CON_STATUS */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
|
||||
#define ADLC_CON_STATUS_ONLINE 1
|
||||
#define ADLC_CON_STATUS_OFFLINE 2
|
||||
#define ADLC_CON_STATUS_UNKNOWN 3
|
||||
|
||||
typedef struct tagAdlcGetConStat
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_UINT16 remoteAddr; /* ADLC device /remote addr */
|
||||
ST_UINT16 localAddr; /* OSI node / local addr */
|
||||
} i;
|
||||
struct /* output parameters */
|
||||
{
|
||||
ST_INT conStatusOut;
|
||||
} o;
|
||||
} ADLC_GET_CON_STATUS;
|
||||
|
||||
#define ADLC_NO_POLLING 0
|
||||
#define ADLC_POLL_FREQ_HI 1
|
||||
#define ADLC_POLL_FREQ_MED 2
|
||||
#define ADLC_POLL_FREQ_LOW 3
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_ADD_DEV */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcAddDev
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_CHAR devName[ADLC_DEV_NAME_SIZE+1];
|
||||
ST_UINT16 address;
|
||||
ST_INT pollGroup; /* defined above */
|
||||
ST_INT port; /* what port it belongs to */
|
||||
ST_BOOLEAN connectAll; /* should we try to connect it if connectAll issued */
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_ADD_DEV;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_REMOVE_DEV */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcRemoveDev
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_CHAR devName[ADLC_DEV_NAME_SIZE+1];
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_REMOVE_DEV;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_START_POLL_DEV */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcStartPollDev
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_CHAR devName[ADLC_DEV_NAME_SIZE+1];
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_START_POLL_DEV;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_STOP_POLL_DEV */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcStopPollDev
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_CHAR devName[ADLC_DEV_NAME_SIZE+1];
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_STOP_POLL_DEV;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_CHANGE_POLL_RATE */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
/* Notes on changing the poll rate for a device:
|
||||
To poll the device more frequently set
|
||||
pollFreqDelta = ADLC_INC_POLL_FREQ;
|
||||
The device will be moved to the poll group that polls more
|
||||
frequently.
|
||||
|
||||
Example: current pollGroup=3 with pollRate=n seconds
|
||||
new pollGroup=2 with pollRate=n-m seconds
|
||||
|
||||
Reverse the above discussion to decrease the polling frequency. */
|
||||
|
||||
#define ADLC_INC_POLL_FREQ 1
|
||||
#define ADLC_DEC_POLL_FREQ 2
|
||||
|
||||
typedef struct tagAdlcChangePollRate
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_CHAR devName[ADLC_DEV_NAME_SIZE+1];
|
||||
ST_INT pollFreqDelta; /* change to poll freq as */
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i; /* defined above */
|
||||
} ADLC_CHANGE_POLL_RATE;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_QUERY_POLL_INFO */
|
||||
/* This is an event from any task to ADLC */
|
||||
/************************************************************************/
|
||||
/* Notes on Polling:
|
||||
Poll groups range from 1 to n (as of 01/17/96 n=3). All devices
|
||||
associated with a poll group are polled at the pollRate set for
|
||||
the poll group. The smaller the poll group the more frequently
|
||||
the devices are polled. */
|
||||
|
||||
typedef struct tagQueryPollInfo
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_CHAR devName[ADLC_DEV_NAME_SIZE+1];
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
struct
|
||||
{
|
||||
ST_INT pollGroup; /* current poll group for device*/
|
||||
ST_DOUBLE pollRate; /* in mili seconds */
|
||||
ST_BOOLEAN bPollingSuspended; /* polling was stopped by user */
|
||||
} o;
|
||||
} ADLC_QUERY_POLL_INFO;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_EXT_WRITE_PACKET */
|
||||
/* This is a bidirectional event */
|
||||
/* This could be an event from stack to ADLC and vice versa */
|
||||
/************************************************************************/
|
||||
typedef struct tagAdlcExtWritePacket
|
||||
{
|
||||
struct /* input parameters */
|
||||
{
|
||||
ST_UINT16 remoteAddr; /* device where data is going */
|
||||
ST_UINT16 localAddr; /* device where data comes from */
|
||||
ST_INT dataSize;
|
||||
ST_VOID *data; /* allocated memory */
|
||||
ST_LONG userId; /* user passes for done func */
|
||||
ST_CHAR recTime[SMP_SIZE_OF_REC_TIME]; /* buffer to hold time stamp */
|
||||
ST_ULONG usr1; /* user data */
|
||||
} i;
|
||||
} ADLC_EXT_WRITE_PACKET;
|
||||
|
||||
/************************************************************************/
|
||||
/* ADLC_EXT_WRITE_PACKET_DONE */
|
||||
/* This is event from ADLC to stack */
|
||||
/************************************************************************/
|
||||
typedef ADLC_EXT_WRITE_PACKET ADLC_EXT_WRITE_PACKET_DONE;
|
||||
|
||||
/* ADLC defined error codes. The error base 0x3600 is defined in glberror.h */
|
||||
|
||||
#define E_ADLC_INVALID_DEV_NAME 0x3601
|
||||
#define E_ADLC_INVALID_DEV_ADDR 0x3602
|
||||
#define E_ADLC_DEVICE_EXISTS 0x3603
|
||||
#define E_ADLC_DEV_DOES_NOT_EXIST 0x3604
|
||||
|
||||
#define E_ADLC_INVALID_LOCAL_ADDR 0x3605
|
||||
#define E_ADLC_INVALID_CON_PAIR 0x3606
|
||||
#define E_ADLC_CON_EXISTS 0x3607
|
||||
#define E_ADLC_CON_DOES_NOT_EXIST 0x3608
|
||||
#define E_ADLC_TX_BUF_FULL 0x3609
|
||||
|
||||
#define E_ADLC_CANT_POLL_FASTER 0x360A
|
||||
#define E_ADLC_CANT_POLL_SLOWER 0x360B
|
||||
#define E_ADLC_INVALID_POLL_DELTA 0x360C
|
||||
#define E_ADLC_INTERNAL_ERR 0x360D
|
||||
#define E_ADLC_DEVICE_NOT_POLLED 0x360E
|
||||
#define E_ADLC_INVALID_HQUEUE 0x360F
|
||||
#define E_ADLC_INVALID_PORT 0x3610
|
||||
#define E_ADLC_INVALID_POLL_FREQ 0x3611
|
||||
#define E_ADLC_DUPLICATE_LOCAL_ADDR 0x3612
|
||||
#define E_ADLC_PACKET_LEN_NOT_VALID 0x3613
|
||||
|
||||
#define E_ADLC_RESPONSE_TIMEOUT 0x3614
|
||||
#define E_ADLC_INVALID_CMD 0x3615
|
||||
#define E_ADLC_CANT_INIT_PORT 0x3616
|
||||
|
||||
#define E_ADLC_CREATE_THREAD 0x3617
|
||||
#define E_ADLC_CANT_INIT_TAPI 0x3618
|
||||
#define E_ADLC_TEL_LINE_UNAVAIL 0x3619
|
||||
#define E_ADLC_CANT_INIT_TEL_LINE 0x361A
|
||||
|
||||
#define E_ADLC_PORT_EXISTS 0x361B
|
||||
#define E_ADLC_PORT_DOES_NOT_EXIST 0x361C
|
||||
|
||||
#define E_ADLC_SERIAL_TX 0x361D
|
||||
#define E_ADLC_SERIAL_RX 0x361E
|
||||
|
||||
#define E_ADLC_CANT_OPEN_DB 0x361F
|
||||
ST_RET adlcWrite(ADLC_WRITE_PACKET *adlcPacket);
|
||||
ADLC_WRITE_PACKET *adlcRead(ST_VOID);
|
||||
ST_VOID *adlcGetEvent(ST_INT *opcode, ST_RET *retCode);
|
||||
ST_RET adlcRegisterClient (ST_UINT16 localAddr);
|
||||
|
||||
/* routines to service ADLC commands */
|
||||
ST_RET adlcStartLinkManager (ST_VOID);
|
||||
ST_RET adlcInit(ST_VOID);
|
||||
ST_RET adlcConnectNode(ADLC_CONNECT_NODE *pstConNode);
|
||||
ST_RET adlcDisconnectNode(ADLC_DISCONNECT_NODE *pstDiscNode);
|
||||
ST_RET adlcConnectAll(ADLC_CONNECT_ALL *pstConAll);
|
||||
ST_RET adlcDisconnectAll(ADLC_DISCONNECT_ALL *pstDiscAll);
|
||||
ST_RET adlcWritePacket(ADLC_WRITE_PACKET *adlcPacket);
|
||||
ST_RET adlcGetConStatus(ADLC_GET_CON_STATUS *pstGetConStatus);
|
||||
ST_RET adlcAddDev(ADLC_ADD_DEV *pstAddDev);
|
||||
ST_RET adlcRemoveDev(ADLC_REMOVE_DEV *pstRemoveDev);
|
||||
ST_RET adlcStartPollingDev(ADLC_START_POLL_DEV *pstStartPollDev);
|
||||
ST_RET adlcStopPollingDev(ADLC_STOP_POLL_DEV *pstStopPollDev);
|
||||
ST_RET adlcChangePollRate(ADLC_CHANGE_POLL_RATE *pstChangePollRate);
|
||||
ST_RET adlcQueryPollInfo(ADLC_QUERY_POLL_INFO *pstQueryPollInfo);
|
||||
ST_VOID adlcExit (ST_VOID);
|
||||
|
||||
ST_RET adlcExtWritePacket(const ADLC_EXT_WRITE_PACKET *pstExtWrite);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end ADLC_USR */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
44
include/mmslite/arg.h
Normal file
44
include/mmslite/arg.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1991 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : arg.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 02/25/98 MDE 02 Changed numArgStrings to ST_INT */
|
||||
/* 06/23/94 MDE 01 Created */
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
ST_INT process_args (ST_INT argc, ST_CHAR **argv);
|
||||
ST_VOID listValidArgs (ST_VOID);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
struct arg_ctrl
|
||||
{
|
||||
ST_CHAR *str; /* text to be matched */
|
||||
ST_CHAR *help; /* Help text */
|
||||
ST_VOID (*fun)(ST_INT argNum, ST_CHAR *str); /* processing function */
|
||||
};
|
||||
|
||||
extern ST_INT argRetVal;
|
||||
extern ST_INT argStopProc;
|
||||
extern ST_INT argCurrArg;
|
||||
extern ST_CHAR **argArgv;
|
||||
|
||||
|
||||
/* User must define these variables */
|
||||
extern struct arg_ctrl argCtrl[];
|
||||
extern ST_INT numArgStrings;
|
||||
|
||||
40
include/mmslite/asn1defs.h
Normal file
40
include/mmslite/asn1defs.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : asn1defs.h */
|
||||
/* PRODUCT(S) : ASN1DE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Contains definitions and global variables useful to the ASN1DE */
|
||||
/* user. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/19/01 JRB 14 Del everything & use "asn1r.h". */
|
||||
/* 11/14/01 EJV 13 Added MMS_UTC_TIME typedef. */
|
||||
/* Added asn1_wr_utc_time, asn1_get_utc_time */
|
||||
/* 06/22/00 DSF 12 Added asn1_max_bitcount */
|
||||
/* 06/16/00 JRB 11 Add #if INT64_SUPP... */
|
||||
/* 05/24/00 RKR 10 Deleted a an extra declaration of asn1_tzone */
|
||||
/* 09/13/99 MDE 09 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 08 Migrated to updated SLOG interface */
|
||||
/* 03/18/98 JRB 07 Add ASN1E_* defines. */
|
||||
/* Move ASN1 error codes from mmsintr2.h to here*/
|
||||
/* Add 0x7000 to all ASN.1 error codes. */
|
||||
/* 12/10/97 MDE 06 Changed get_i8 to take ST_INT8 */
|
||||
/* 09/29/97 MDE 05 Changed ASN1_LITE to MMS_LITE */
|
||||
/* 08/21/97 MDE 04 Added ASN1_ARB_FLOAT define */
|
||||
/* 08/13/97 MDE 03 Changed wr_i8 and wr_u8 to take sized int's */
|
||||
/* 06/17/97 MDE 02 Removed old debug defines */
|
||||
/* 05/20/97 MDE 01 Changes to time handling - renames, etc. */
|
||||
/* 04/02/97 7.00 MMSEASE 7.0 release. See ASN1ML70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#include "asn1r.h" /* Simply use all new defs in this file */
|
||||
106
include/mmslite/asn1log.h
Normal file
106
include/mmslite/asn1log.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1993 - 1994, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : asn1log.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains ASN.1 logging definitions */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/16/03 JRB 06 Add more ERR/NERR macros. */
|
||||
/* 03/31/03 JRB 05 Use new "Base" macros SLOG_*, SLOGC_*, SLOGH.*/
|
||||
/* Add more macros. */
|
||||
/* 03/13/02 JRB 04 ALOG_PAUSEDEC, ALOG_DECLF macros do nothing. */
|
||||
/* 09/13/99 MDE 03 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 02 Migrated to updated SLOG interface */
|
||||
/* 09/11/97 DSF 01 Adde ALOG_NERRH */
|
||||
/* 04/02/97 7.00 MMSEASE 7.0 release. See ASN1ML70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef ASN1_LOG_INCLUDED
|
||||
#define ASN1_LOG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Log type strings */
|
||||
extern SD_CONST ST_CHAR *SD_CONST _asn1_log_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _asn1_log_enc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _asn1_log_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _asn1_log_nerr_logstr;
|
||||
|
||||
|
||||
#define ALOG_DECLF()
|
||||
#define ALOG_PAUSEDEC(msg)
|
||||
|
||||
#define ALOG_DEC0(a) \
|
||||
SLOG_0 (asn1_debug_sel & ASN1_LOG_DEC,_asn1_log_dec_logstr,a)
|
||||
#define ALOG_DEC1(a,b) \
|
||||
SLOG_1 (asn1_debug_sel & ASN1_LOG_DEC,_asn1_log_dec_logstr,a,b)
|
||||
|
||||
#define ALOG_CDEC0(a) \
|
||||
SLOGC_0 (asn1_debug_sel & ASN1_LOG_DEC,a)
|
||||
#define ALOG_CDEC1(a,b) \
|
||||
SLOGC_1 (asn1_debug_sel & ASN1_LOG_DEC,a,b)
|
||||
#define ALOG_CDEC2(a,b,c) \
|
||||
SLOGC_2 (asn1_debug_sel & ASN1_LOG_DEC,a,b,c)
|
||||
#define ALOG_CDEC3(a,b,c,d) \
|
||||
SLOGC_3 (asn1_debug_sel & ASN1_LOG_DEC,a,b,c,d)
|
||||
#define ALOG_CDEC4(a,b,c,d,e) \
|
||||
SLOGC_4 (asn1_debug_sel & ASN1_LOG_DEC,a,b,c,d,e)
|
||||
|
||||
#define ALOG_DECH(a,b) \
|
||||
SLOGH (asn1_debug_sel & ASN1_LOG_DEC,a,b)
|
||||
|
||||
#define ALOG_ENC0(a) \
|
||||
SLOG_0 (asn1_debug_sel & ASN1_LOG_ENC,_asn1_log_enc_logstr,a)
|
||||
#define ALOG_ENC1(a,b) \
|
||||
SLOG_1 (asn1_debug_sel & ASN1_LOG_ENC,_asn1_log_enc_logstr,a,b)
|
||||
|
||||
#define ALOG_CENC0(a) \
|
||||
SLOGC_0 (asn1_debug_sel & ASN1_LOG_ENC,a)
|
||||
#define ALOG_CENC1(a,b) \
|
||||
SLOGC_1 (asn1_debug_sel & ASN1_LOG_ENC,a,b)
|
||||
|
||||
#define ALOG_ENCH(a,b) \
|
||||
SLOGH (asn1_debug_sel & ASN1_LOG_ENC,a,b)
|
||||
|
||||
#define ALOG_ERR0(a) \
|
||||
SLOG_0 (asn1_debug_sel & ASN1_LOG_ERR,_asn1_log_err_logstr,a)
|
||||
#define ALOG_ERR1(a,b) \
|
||||
SLOG_1 (asn1_debug_sel & ASN1_LOG_ERR,_asn1_log_err_logstr,a,b)
|
||||
#define ALOG_ERR2(a,b,c) \
|
||||
SLOG_2 (asn1_debug_sel & ASN1_LOG_ERR,_asn1_log_err_logstr,a,b,c)
|
||||
#define ALOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (asn1_debug_sel & ASN1_LOG_ERR,_asn1_log_err_logstr,a,b,c,d)
|
||||
|
||||
#define ALOG_NERR0(a) \
|
||||
SLOG_0 (asn1_debug_sel & ASN1_LOG_NERR,_asn1_log_nerr_logstr,a)
|
||||
#define ALOG_NERR1(a,b) \
|
||||
SLOG_1 (asn1_debug_sel & ASN1_LOG_NERR,_asn1_log_nerr_logstr,a,b)
|
||||
#define ALOG_NERR2(a,b,c) \
|
||||
SLOG_2 (asn1_debug_sel & ASN1_LOG_NERR,_asn1_log_nerr_logstr,a,b,c)
|
||||
#define ALOG_NERR3(a,b,c,d) \
|
||||
SLOG_3 (asn1_debug_sel & ASN1_LOG_NERR,_asn1_log_nerr_logstr,a,b,c,d)
|
||||
|
||||
#define ALOG_NERRH(a,b) \
|
||||
SLOGH (asn1_debug_sel & ASN1_LOG_NERR,a,b)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
#endif /* End of ASN1_LOG_INCLUDED */
|
||||
/************************************************************************/
|
||||
699
include/mmslite/asn1r.h
Normal file
699
include/mmslite/asn1r.h
Normal file
@@ -0,0 +1,699 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2002, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : asn1r.h */
|
||||
/* PRODUCT(S) : ASN1DE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Contains definitions and global variables useful to the ASN1DE */
|
||||
/* user. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 11/12/08 MDE 28 Added asn1r_last_byte, asn1r_head_decode rc */
|
||||
/* 07/02/07 JRB 26 Chg ..fixlen, ..varlen arg to (ST_UCHAR *). */
|
||||
/* 12/20/06 JRB 25 Add bstrcmp. */
|
||||
/* 03/17/06 JRB 24 Add asn1r_anytag_fun, ASN1_ANYTAG_METHOD, */
|
||||
/* ASN1MASK_*. */
|
||||
/* Chg BSTR_BIT_GET macro to return only 0 or 1.*/
|
||||
/* 12/05/05 JRB 23 Add asn1r_skip_elmnt & more asn1r_get* protos*/
|
||||
/* 08/01/05 JRB 22 Add const on asn1r_wr_vstr, asn1_wr_octstr args.*/
|
||||
/* 03/23/05 JRB 21 Move APP_REF from suicacse to here so almost */
|
||||
/* any SISCO app can use it. */
|
||||
/* 07/08/04 JRB 20 Add define TIME_T_1984_JAN_1 & other defines.*/
|
||||
/* Add asn1_convert_timet_to_btime6. */
|
||||
/* 10/13/03 JRB 19 Add ASN1E_DECODE_OTHER, ASN1E_ENCODE_OTHER. */
|
||||
/* 03/31/03 JRB 18 Add UTF8string support. */
|
||||
/* asn1r_get_bitstr: add max_bits arg. */
|
||||
/* 12/14/02 JRB 17 Add BSTR_*, MMS_BVSTRING, bstrcpy, bvstrcpy */
|
||||
/* 11/11/02 EJV 16 asn1r_tag_add: added type cast */
|
||||
/* 11/08/02 JRB 15 Add ASN1_DEC_PTR, ASN1_DEC_LEN macros. */
|
||||
/* 10/29/02 JRB 14 Add asn1r_magic to ASN1_ENC_CTXT. */
|
||||
/* 10/25/02 JRB 13 Add ASN1_ENC_PTR, ASN1_ENC_LEN macros. */
|
||||
/* Add MMS_BTIME6 struct. */
|
||||
/* 07/03/02 EJV 12 MMS_UTC_TIME: chg name usec to fraction. */
|
||||
/* 01/22/02 JRB 11 Add "asn1r_buf_end" to ASN1_ENC_CTXT. */
|
||||
/* Chg asn1r_end_of_buffer to asn1r_buf_start */
|
||||
/* & asn1r_field_start to asn1r_field_end */
|
||||
/* & _asn1_constr_start to asn1r_constr_end */
|
||||
/* in ENC_CTX (start means start, end means end)*/
|
||||
/* 01/07/02 EJV 09 Added asn1_ prefix to convert_... functions. */
|
||||
/* 01/04/02 EJV 08 Add convert_btod_to_utc, convert_utc_to_btod */
|
||||
/* 12/20/01 JRB 07 Split ASN1_CTXT into ASN1_DEC_CTXT, ASN1_ENC_CTXT*/
|
||||
/* Del unused calendar stuff. */
|
||||
/* Del backward compatibility defines. */
|
||||
/* Chg asn1r_objidcmp to asn1_objidcmp. */
|
||||
/* Del unused tzhour_diff, tconst, default_dcomp*/
|
||||
/* Del unused strt_asn1,asn1_tz_calc,asn1_is_dst*/
|
||||
/* 11/09/01 EJV 06 Added MMS_UTC_TIME typedef. */
|
||||
/* Added asn1r_wr_utc_time, asn1r_get_utc_time */
|
||||
/* ASN1_CTXT: del _save_asn1_len, _save_asn1_ptr*/
|
||||
/* 08/15/00 JRB 05 Add asn1_ctxt "forward reference". */
|
||||
/* 06/19/00 JRB 04 Add #if INT64_SUPP... */
|
||||
/* 05/25/00 RKR 03 Deleted a an extra declaration of asn1_tzone */
|
||||
/* 07/29/99 MDE 02 Added TABLE method */
|
||||
/* 07/26/99 MDE 01 New, derived from asn1defs.h */
|
||||
/************************************************************************/
|
||||
|
||||
#if !defined(ASN1DEFS_INCLUDED) && !defined(ASN1R_INCLUDED)
|
||||
#define ASN1R_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
/* Defines for UNICODE local data format. */
|
||||
#define UNICODE_UTF8 0
|
||||
#define UNICODE_UTF16 1
|
||||
#if !defined(UNICODE_LOCAL_FORMAT)
|
||||
#if defined(_WIN32)
|
||||
#define UNICODE_LOCAL_FORMAT UNICODE_UTF16
|
||||
#else
|
||||
#define UNICODE_LOCAL_FORMAT UNICODE_UTF8 /*default format */
|
||||
#endif
|
||||
#endif /* !defined(UNICODE_LOCAL_FORMAT) */
|
||||
|
||||
/************************************************************************/
|
||||
/* asn1_debug_sel bit assignments */
|
||||
|
||||
#define ASN1_LOG_DEC 0x0001
|
||||
#define ASN1_LOG_ENC 0x0002
|
||||
#define ASN1_LOG_ERR 0x0004
|
||||
#define ASN1_LOG_NERR 0x0008
|
||||
|
||||
/************************************************************************/
|
||||
/* These are S_LOG control items for ASN1 logging */
|
||||
|
||||
extern ST_UINT asn1_debug_sel;
|
||||
|
||||
/************************************************************************/
|
||||
/* Support for development time debugging can be enabled here */
|
||||
/* #define DEBUG_ASN1_DECODE */
|
||||
|
||||
/************************************************************************/
|
||||
/* Support for seldom needed decode features can be disabled here */
|
||||
|
||||
#if !defined(MMS_LITE)
|
||||
#define GET_CONSTRUCTED_BSTRINGS
|
||||
#define GET_CONSTRUCTED_OSTRINGS
|
||||
#define ASN1_ARB_FLOAT
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Helpful Time-related defines */
|
||||
|
||||
#define SECONDS_PER_DAY (60*60*24)
|
||||
#define MILLISECONDS_PER_DAY (1000 * SECONDS_PER_DAY)
|
||||
#define DAYS_FROM_1970_TO_1984 ((11*365) + (3*366)) /*includes 3 leap years 1972, 1976, 1980*/
|
||||
#define TIME_T_1984_JAN_1 (DAYS_FROM_1970_TO_1984 * SECONDS_PER_DAY)
|
||||
|
||||
/************************************************************************/
|
||||
/* Binary Time Of Day */
|
||||
|
||||
#define MMS_BTOD4 4
|
||||
#define MMS_BTOD6 6
|
||||
|
||||
typedef struct btod_data
|
||||
{
|
||||
ST_INT form; /* MMS_BTOD6, MMS_BTOD4 */
|
||||
ST_INT32 ms; /* Number of milliseconds since midnight */
|
||||
ST_INT32 day; /* Number of days since Jan 1, 1984 */
|
||||
} MMS_BTOD;
|
||||
|
||||
/* MMS_BTIME6: this structure is the format used to pass "Btime6" data */
|
||||
/* (i.e. ISO/IEC 9506-2 TimeOfDay with size=6) between the user and */
|
||||
/* the ASN.1 encoder/decoder (i.e. ms_asn1_to_local & ms_local_to_asn1).*/
|
||||
typedef struct
|
||||
{
|
||||
ST_INT32 ms; /* Number of milliseconds since midnight */
|
||||
ST_INT32 day; /* Number of days since Jan 1, 1984 */
|
||||
} MMS_BTIME6;
|
||||
|
||||
/************************************************************************/
|
||||
/* UTC Time */
|
||||
|
||||
typedef struct mms_utc_time_tag
|
||||
{
|
||||
ST_UINT32 secs; /* Number of seconds since January 1, 1970 */
|
||||
ST_UINT32 fraction; /* Fraction of a second */
|
||||
ST_UINT32 qflags; /* Quality flags, 8 least-significant bits only */
|
||||
} MMS_UTC_TIME;
|
||||
|
||||
ST_RET asn1_convert_btod_to_utc (MMS_BTOD *btod, MMS_UTC_TIME *utc);
|
||||
ST_RET asn1_convert_utc_to_btod (MMS_UTC_TIME *utc, MMS_BTOD *btod);
|
||||
ST_RET asn1_convert_timet_to_btime6 (time_t tThis, MMS_BTIME6 *bTime6);
|
||||
|
||||
/************************************************************************/
|
||||
/* Variable Length Bitstring */
|
||||
/* This structure defines the format used to pass "variable length */
|
||||
/* bitstring" data between the user and */
|
||||
/* the ASN.1 encoder/decoder (i.e. ms_asn1_to_local & ms_local_to_asn1).*/
|
||||
/* NOTE: For bitstrings longer than 8 bits, the actual data extends */
|
||||
/* beyond the end of this struct. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_INT16 len;
|
||||
ST_UCHAR data[1];
|
||||
} MMS_BVSTRING;
|
||||
|
||||
/************************************************************************/
|
||||
/* VMS Float Format select */
|
||||
|
||||
#define A_D_FLOAT 1
|
||||
#define A_G_FLOAT 2
|
||||
extern ST_INT asn1_vax_double_type;
|
||||
|
||||
/************************************************************************/
|
||||
/* ASN1-DE limitiations */
|
||||
|
||||
#define ASN1_MAX_PDU 0x7FFF /* maximum decodable message length */
|
||||
#define ASN1_MAX_FIELD 0x7FFF /* maximum field (data element) length */
|
||||
#define ASN1_MAX_LEVEL 50 /* maximum supported nesting level */
|
||||
|
||||
/************************************************************************/
|
||||
/* ASN.1 Definitions to support identifier construction by bit OR. */
|
||||
/* Used to make up and test 'tag' bits. */
|
||||
|
||||
/* These used in ASN1_ANYTAG_METHOD decode method. */
|
||||
#define ASN1MASK_UNI 0x0000 /* universal class */
|
||||
#define ASN1MASK_APP 0x4000 /* application wide */
|
||||
#define ASN1MASK_CTX 0x8000 /* context specific */
|
||||
#define ASN1MASK_PRV 0xC000 /* private use */
|
||||
#define ASN1MASK_CONSTR 0x2000 /* constructor */
|
||||
|
||||
/* These used in other decode methods and in encoder. */
|
||||
#define UNI 0x00 /* universal class */
|
||||
#define APP 0x40 /* application wide */
|
||||
#define CTX 0x80 /* context specific */
|
||||
#define PRV 0xC0 /* private use */
|
||||
#define CONSTR 0x20 /* constructor */
|
||||
|
||||
#define DEF 0x00 /* definite length constructor */
|
||||
#define INDEF 0xFF /* indefinite length constructor */
|
||||
|
||||
/* Universal class ASN.1 ID code definitions */
|
||||
#define EOC_CODE 0x00
|
||||
#define BOOL_CODE 0x01
|
||||
#define INT_CODE 0x02
|
||||
#define BITS_CODE 0x03
|
||||
#define OCT_CODE 0x04
|
||||
#define NULL_CODE 0x05
|
||||
#define OBJ_ID_CODE 0x06
|
||||
#define OBJDSCR_CODE 0x07
|
||||
#define EXTERN_CODE 0x08
|
||||
#define SEQ_CODE 0x10
|
||||
#define SET_CODE 0x11
|
||||
#define NUMSTR_CODE 0x12
|
||||
#define PRTSTR_CODE 0x13
|
||||
#define S61STR_CODE 0x14
|
||||
#define S100STR_CODE 0x15
|
||||
#define IA5STR_CODE 0x16
|
||||
#define UTCTIM_CODE 0x17
|
||||
#define GENTIM_CODE 0x18
|
||||
#define GRAFSTR_CODE 0x19
|
||||
#define VISTR_CODE 0x1A
|
||||
#define GENSTR_CODE 0x1B
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* ASN.1 decode error definitions */
|
||||
/* Used as the argument to "asn1_set_dec_err" function which sets the */
|
||||
/* global variable "asn1_pdu_dec_err". */
|
||||
/************************************************************************/
|
||||
|
||||
#define NO_DECODE_ERR 0 /* no decode error */
|
||||
#define ASN1E_NEST_TOO_DEEP 0x7001
|
||||
#define ASN1E_UNEXPECTED_CLASS 0x7002
|
||||
#define ASN1E_UNEXPECTED_TAG 0x7003
|
||||
#define ASN1E_ID_TOO_BIG 0x7004
|
||||
#define ASN1E_CSTR_INVALID_LEN 0x7005
|
||||
#define ASN1E_INVALID_LENGTH 0x7006
|
||||
#define ASN1E_UNEXPECTED_FORM 0x7007
|
||||
#define ASN1E_PDU_TOO_BIG 0x7008
|
||||
#define ASN1E_END_O_BUFFER 0x7009
|
||||
#define ASN1E_BITCSTR_TOO_BIG 0x700a
|
||||
#define ASN1E_INVALID_BITSTR 0x700b
|
||||
#define ASN1E_OCTSTR_TOO_BIG 0x700c
|
||||
#define ASN1E_INVALID_BOOLEAN 0x700d
|
||||
#define ASN1E_END_OF_MESSAGE 0x700e
|
||||
#define ASN1E_END_OF_CSTR 0x700f
|
||||
|
||||
/* CRITICAL: The rest of the ASN.1 decode error definitions must not */
|
||||
/* must not be changed. The lower 2 nibbles are used to set the */
|
||||
/* REJECT class and code (mmsdec_map_err saves value to rslt.err_code */
|
||||
/* which is used in "mmspdu.c" to generate REJECT class and code). */
|
||||
|
||||
/************************************************************************/
|
||||
/* CONFIRMED REQUEST REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define REQ_UNSPECIFIED 0x7010
|
||||
#define REQ_UNREC_SERV 0x7011
|
||||
#define REQ_UNREC_MOD 0x7012
|
||||
#define REQ_INVAL_INVOKE 0x7013
|
||||
#define REQ_INVAL_ARG 0x7014
|
||||
#define REQ_INVAL_MOD 0x7015
|
||||
#define REQ_OUTSTD_EXCEED 0x7016
|
||||
#define REQ_EXCSV_LENGTH 0x7017
|
||||
#define REQ_EXCSV_NEST 0x7018
|
||||
#define REQ_BAD_VALUE 0x7019
|
||||
|
||||
/************************************************************************/
|
||||
/* CONFIRMED RESPONSE REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define RESP_UNSPECIFIED 0x7020
|
||||
#define RESP_UNREC_SERV 0x7021
|
||||
#define RESP_INVAL_INVOKE 0x7022
|
||||
#define RESP_INVAL_RSLT 0x7023
|
||||
#define RESP_EXCSV_LENGTH 0x7024
|
||||
#define RESP_EXCSV_NEST 0x7025
|
||||
#define RESP_BAD_VALUE 0x7026
|
||||
|
||||
/************************************************************************/
|
||||
/* CONFIRMED ERROR REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define ERR_UNSPECIFIED 0x7030
|
||||
#define ERR_UNREC_SERV 0x7031
|
||||
#define ERR_INVAL_INVOKE 0x7032
|
||||
#define ERR_INVAL_SERV 0x7033
|
||||
#define ERR_BAD_VALUE 0x7034
|
||||
|
||||
/************************************************************************/
|
||||
/* UNCONFIRMED PDU REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define UNCONF_UNSPECIFIED 0x7040
|
||||
#define UNCONF_UNREC_SERV 0x7041
|
||||
#define UNCONF_INVAL_ARG 0x7042
|
||||
#define UNCONF_EXCSV_NEST 0x7043
|
||||
#define UNCONF_BAD_VALUE 0x7044
|
||||
|
||||
/************************************************************************/
|
||||
/* PDU REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define PDU_UNKNOWN_TYPE 0x7050
|
||||
#define PDU_INVALID 0x7051
|
||||
|
||||
/************************************************************************/
|
||||
/* CANCEL REQUEST REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define CANREQ_UNSPECIFIED 0x7060
|
||||
#define CANREQ_INVAL_INVOKE 0x7061
|
||||
|
||||
/************************************************************************/
|
||||
/* CANCEL RESPONSE REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define CANRESP_UNSPECIFIED 0x7070
|
||||
#define CANRESP_INVAL_INVOKE 0x7071
|
||||
|
||||
/************************************************************************/
|
||||
/* CANCEL ERROR REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define CANERR_UNSPECIFIED 0x7080
|
||||
#define CANERR_INVAL_INVOKE 0x7081
|
||||
#define CANERR_INVAL_SERV 0x7082
|
||||
#define CANERR_BAD_VALUE 0x7083
|
||||
|
||||
/************************************************************************/
|
||||
/* CONCLUDE REQUEST REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define CONREQ_UNSPECIFIED 0x7090
|
||||
#define CONREQ_INVAL_ARG 0x7091
|
||||
|
||||
/************************************************************************/
|
||||
/* CONCLUDE RESPONSE REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define CONRESP_UNSPECIFIED 0x70A0
|
||||
#define CONRESP_INVAL_RSLT 0x70A1
|
||||
|
||||
/************************************************************************/
|
||||
/* CONCLUDE ERROR REJECT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define CONERR_UNSPECIFIED 0x70B0
|
||||
#define CONERR_INVAL_SERV 0x70B1
|
||||
#define CONERR_BAD_VALUE 0x70B2
|
||||
|
||||
/************************************************************************/
|
||||
/* OTHER ASN.1 ENCODE/DECODE ERROR DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#define ASN1E_DECODE_OTHER 0x70C0
|
||||
#define ASN1E_ENCODE_OTHER 0x70C1
|
||||
|
||||
/************************************************************************/
|
||||
/* General variables and pointers used by the ASN1 system. */
|
||||
/************************************************************************/
|
||||
|
||||
#define ASN1_TAG_METHOD 0 /* decode by tag method */
|
||||
#define ASN1_CLASS_METHOD 1 /* decode by class method */
|
||||
#define ASN1_TABLE_METHOD 2 /* decode by table method */
|
||||
#define ASN1_ANYTAG_METHOD 3 /* decode by "anytag" method */
|
||||
/* same callback for any tag of any class*/
|
||||
#define CSTR_DONE_FUN ac->asn1r_c_done_fun[ac->asn1r_msg_level]
|
||||
|
||||
/************************************************************************/
|
||||
/* This define is the maximum tag + length for a MMS-EASE encoded data */
|
||||
/* element (actually probably is 9), and is used in fin_constr and */
|
||||
/* fin_prim to prevent encode buffer overrun */
|
||||
|
||||
#define ASN1_MAX_ELEMENT_OVERHEAD 10
|
||||
|
||||
struct asn1_dec_ctxt; /* Forward reference */
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* TAG METHOD STRUCTURES AND DEFINES */
|
||||
|
||||
#define ASN1R_TAG_VAL(class,code) (((ST_UINT16)(class) << 8) | (code))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT16 _asn1r_tag;
|
||||
ST_VOID (*_asn1r_tag_fun)(struct asn1_dec_ctxt *ac);
|
||||
} ASN1R_TAG_PAIR;
|
||||
|
||||
/* Decode users: Select the structure that has sufficient tag capacity */
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[1]; } ASN1R_TAG_CTRL_1;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[2]; } ASN1R_TAG_CTRL_2;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[3]; } ASN1R_TAG_CTRL_3;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[4]; } ASN1R_TAG_CTRL_4;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[5]; } ASN1R_TAG_CTRL_5;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[6]; } ASN1R_TAG_CTRL_6;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[7]; } ASN1R_TAG_CTRL_7;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[8]; } ASN1R_TAG_CTRL_8;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[9]; } ASN1R_TAG_CTRL_9;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[10];} ASN1R_TAG_CTRL_10;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[11];} ASN1R_TAG_CTRL_11;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[12];} ASN1R_TAG_CTRL_12;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[13];} ASN1R_TAG_CTRL_13;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[14];} ASN1R_TAG_CTRL_14;
|
||||
typedef struct {ST_INT num_tags; ASN1R_TAG_PAIR tags[15];} ASN1R_TAG_CTRL_15;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* ASN.1 Context */
|
||||
/* This data structure is used to store all ASN.1 encode/decode context */
|
||||
/* information. If an application provides thread safe storage for this */
|
||||
/* data structure the ASN.1 tools become thread safe. */
|
||||
|
||||
#define ASN1_MAX_USR_INFO 5
|
||||
#define MAX_TAG_FUN 16
|
||||
|
||||
typedef struct asn1_dec_ctxt
|
||||
{
|
||||
/****** User and Internal Use ******/
|
||||
|
||||
/* User State */
|
||||
ST_VOID *usr_info[ASN1_MAX_USR_INFO];
|
||||
|
||||
/* General variables and pointers */
|
||||
ST_BOOLEAN asn1r_decode_done;
|
||||
ST_UCHAR *asn1r_field_ptr;
|
||||
ST_UCHAR *asn1r_field_start;
|
||||
ST_UCHAR *asn1r_done_ptr;
|
||||
ST_UCHAR asn1r_constr_elmnt;
|
||||
ST_UCHAR asn1r_elmnt_class;
|
||||
ST_UINT16 asn1r_elmnt_id;
|
||||
ST_INT asn1r_elmnt_len;
|
||||
ST_INT asn1r_msg_level;
|
||||
ST_BOOLEAN asn1r_indef_flag; /* flag for indef cstr */
|
||||
ST_RET asn1r_pdu_dec_err;
|
||||
ST_INT asn1r_decode_method;
|
||||
ST_INT asn1r_save_method;
|
||||
ST_INT asn1r_max_bits;
|
||||
ST_INT asn1r_bitcount;
|
||||
ST_INT asn1r_octetcount;
|
||||
|
||||
/* For ASN1 decode table mode */
|
||||
ST_VOID *asn1r_tag_table;
|
||||
|
||||
/* Function pointers used by decoder users */
|
||||
ST_VOID (*asn1r_decode_done_fun)(struct asn1_dec_ctxt *ac);
|
||||
ST_VOID (*asn1r_err_fun)(struct asn1_dec_ctxt *ac, ST_RET err_code);
|
||||
ST_VOID (*asn1r_c_done_fun[ASN1_MAX_LEVEL])(struct asn1_dec_ctxt *ac);
|
||||
ST_VOID (*asn1r_u_id_fun)(struct asn1_dec_ctxt *ac, ST_UINT16 id);
|
||||
ST_VOID (*asn1r_a_id_fun)(struct asn1_dec_ctxt *ac, ST_UINT16 id);
|
||||
ST_VOID (*asn1r_c_id_fun)(struct asn1_dec_ctxt *ac, ST_UINT16 id);
|
||||
ST_VOID (*asn1r_p_id_fun)(struct asn1_dec_ctxt *ac, ST_UINT16 id);
|
||||
/* asn1r_anytag_fun called for ANY tag of ANY class if */
|
||||
/* asn1r_decode_method==ASN1_ANYTAG_METHOD. */
|
||||
/* "id" argument has bits set to indicate class and/or constructor. */
|
||||
ST_VOID (*asn1r_anytag_fun)(struct asn1_dec_ctxt *ac, ST_UINT16 id);
|
||||
|
||||
/****** Internal Use Only ******/
|
||||
/* Decode variables */
|
||||
ST_INT _asn1_maxoctets;
|
||||
ST_UCHAR *_asn1_octetptr;
|
||||
|
||||
ST_UCHAR *_ad_bitptr;
|
||||
|
||||
/* Function pointers used internally by the ASN.1 tools */
|
||||
ST_VOID (*_asn1r_cstr_done_save)(struct asn1_dec_ctxt *ac);
|
||||
ST_VOID (*_asn1r_fun_save)(struct asn1_dec_ctxt *ac);
|
||||
|
||||
ST_INT _asn1r_ntag;
|
||||
ST_UINT16 _asn1r_valid_tags[MAX_TAG_FUN];
|
||||
ST_VOID (*_asn1r_tag_fun[MAX_TAG_FUN])(struct asn1_dec_ctxt *ac);
|
||||
ST_INT _asn1r_old_ntag;
|
||||
|
||||
ST_BOOLEAN _asn1_indef_track[ASN1_MAX_LEVEL];
|
||||
ST_UCHAR *_asn1_constr_start[ASN1_MAX_LEVEL];
|
||||
ST_INT _asn1_byte_count[ASN1_MAX_LEVEL];
|
||||
|
||||
ST_INT _ad_parse_method_save;
|
||||
ST_VOID (*_ad_parse_asn1r_fun_save)(struct asn1_dec_ctxt *ac);
|
||||
|
||||
ST_UCHAR *_contents_done; /* will be here when done parsing cstr contents */
|
||||
ST_UCHAR *_parse_begin_ptr; /* pointer to beginning of element being skipped*/
|
||||
} ASN1_DEC_CTXT;
|
||||
|
||||
typedef struct asn1_enc_ctxt
|
||||
{
|
||||
/* General variables and pointers */
|
||||
ST_UCHAR *asn1r_field_ptr;
|
||||
ST_UCHAR *asn1r_field_end;
|
||||
ST_INT asn1r_msg_level;
|
||||
ST_UCHAR *asn1r_buf_start; /* ptr to first byte of buffer */
|
||||
ST_UCHAR *asn1r_buf_end; /* ptr to last byte of buffer */
|
||||
ST_BOOLEAN asn1r_encode_overrun;
|
||||
ST_UINT16 asn1r_magic; /* Use to verify asn1r_strt.. was called*/
|
||||
ST_UCHAR *asn1r_constr_end[ASN1_MAX_LEVEL];
|
||||
} ASN1_ENC_CTXT;
|
||||
|
||||
/* Set "asn1r_magic" in ASN1_ENC_CTXT to this value in "asn1r_strt_asn1_bld".*/
|
||||
/* Check later to be sure asn1r_strt_asn1_bld was called. */
|
||||
#define ASN1_ENC_MAGIC_NUMBER 0xABCD
|
||||
/************************************************************************/
|
||||
|
||||
ASN1_DEC_CTXT *asn1r_get_ctxt (ST_VOID);
|
||||
|
||||
ST_VOID asn1r_decode_asn1 (ASN1_DEC_CTXT *ac, ST_UCHAR *ptr, ST_INT len);
|
||||
ST_VOID asn1r_decode_asn1_seq (ASN1_DEC_CTXT *ac, ST_UCHAR *ptr, ST_INT len);
|
||||
ST_RET asn1r_head_decode (ASN1_DEC_CTXT *ac);
|
||||
ST_VOID asn1r_set_dec_err (ASN1_DEC_CTXT *ac, ST_RET err_code);
|
||||
ST_VOID asn1r_done_err (ASN1_DEC_CTXT *ac);
|
||||
ST_VOID asn1r_cstr_done_err (ASN1_DEC_CTXT *ac);
|
||||
ST_VOID asn1r_set_all_cstr_done (ASN1_DEC_CTXT *ac);
|
||||
|
||||
|
||||
ST_VOID asn1r_class_err (ASN1_DEC_CTXT *ac, ST_UINT16 id);
|
||||
ST_VOID asn1r_chk_getcstr_done (ASN1_DEC_CTXT *ac);
|
||||
|
||||
#if !defined(ASN1R_FAST_TAG_ADD)
|
||||
|
||||
#define ASN1R_TAG_ADD(ac, class, code, fcn_ptr)\
|
||||
asn1r_tag_add (ac, (ST_UINT16)(((ST_UINT16)(class) << 8) | (code)), (fcn_ptr))
|
||||
|
||||
#else
|
||||
|
||||
#define ASN1R_TAG_ADD(ac, class, code, fcn_ptr)\
|
||||
{\
|
||||
ac->_asn1r_valid_tags[ac->_asn1r_ntag] = \
|
||||
(((ST_UINT16)(class) << 8) | (code));\
|
||||
ac->_asn1r_tag_fun[ac->_asn1r_ntag] = (ST_VOID (*)(ASN1_DEC_CTXT *)) fcn_ptr;\
|
||||
ac->_asn1r_ntag++;\
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#define ASN1R_TAG_DEL(ac, class, code)\
|
||||
asn1r_tag_del (ac, (((ST_UINT16)(class) << 8) | (code)))
|
||||
|
||||
ST_VOID asn1r_tag_add (ASN1_DEC_CTXT *ac, ST_UINT16 tag_class,
|
||||
ST_VOID (*fcn_ptr)(ASN1_DEC_CTXT *ac));
|
||||
|
||||
ST_VOID asn1r_tag_del (ASN1_DEC_CTXT *ac, ST_UINT16 tag);
|
||||
ST_VOID asn1r_tag_restore (ASN1_DEC_CTXT *ac);
|
||||
|
||||
ST_VOID asn1r_strt_asn1_bld (ASN1_ENC_CTXT *ac, ST_UCHAR *bufptr, ST_INT buflen);
|
||||
ST_VOID asn1r_fin_prim (ASN1_ENC_CTXT *ac, ST_UINT16 id_code, ST_UINT16 tag);
|
||||
ST_VOID asn1r_fin_constr (ASN1_ENC_CTXT *ac, ST_UINT16 id_code, ST_UINT16 el_tag, ST_BOOLEAN indef);
|
||||
ST_VOID asn1r_strt_constr (ASN1_ENC_CTXT *ac);
|
||||
|
||||
ST_VOID asn1r_wr_u8 (ASN1_ENC_CTXT *ac, ST_UINT8 data);
|
||||
ST_VOID asn1r_wr_u16 (ASN1_ENC_CTXT *ac, ST_UINT16 data);
|
||||
ST_VOID asn1r_wr_u32 (ASN1_ENC_CTXT *ac, ST_UINT32 data);
|
||||
ST_VOID asn1r_wr_i8 (ASN1_ENC_CTXT *ac, ST_INT8 data);
|
||||
ST_VOID asn1r_wr_bool (ASN1_ENC_CTXT *ac, ST_BOOLEAN data);
|
||||
ST_VOID asn1r_wr_i16 (ASN1_ENC_CTXT *ac, ST_INT16 data);
|
||||
ST_VOID asn1r_wr_i32 (ASN1_ENC_CTXT *ac, ST_INT32 data);
|
||||
ST_VOID asn1r_wr_vstr (ASN1_ENC_CTXT *ac, const ST_CHAR *data);
|
||||
ST_VOID asn1r_wr_delmnt (ASN1_ENC_CTXT *ac, ST_UCHAR *bufptr, ST_INT buflen);
|
||||
ST_VOID asn1r_wr_btod (ASN1_ENC_CTXT *ac, MMS_BTOD *data);
|
||||
ST_VOID asn1r_wr_time (ASN1_ENC_CTXT *ac, time_t data);
|
||||
ST_VOID asn1r_wr_objid (ASN1_ENC_CTXT *ac, ST_INT16 *data, ST_INT num_el);
|
||||
ST_VOID asn1r_wr_bitstr (ASN1_ENC_CTXT *ac, ST_UCHAR *bitptr, ST_INT numbits);
|
||||
ST_VOID asn1r_wr_octstr (ASN1_ENC_CTXT *ac, const ST_UCHAR *octptr, ST_INT numoctets);
|
||||
ST_VOID asn1r_wr_float (ASN1_ENC_CTXT *ac, ST_FLOAT data);
|
||||
ST_VOID asn1r_wr_double (ASN1_ENC_CTXT *ac, ST_DOUBLE data);
|
||||
ST_VOID asn1r_wr_utc_time (ASN1_ENC_CTXT *ac, MMS_UTC_TIME *data);
|
||||
ST_RET asn1r_wr_utf8 (ASN1_ENC_CTXT *ac, ST_CHAR *data, ST_INT el_len);
|
||||
|
||||
ST_RET asn1r_get_identifier (ASN1_DEC_CTXT *ac, ST_CHAR *dest);
|
||||
ST_RET asn1r_get_objid (ASN1_DEC_CTXT *ac, ST_INT16 component_list[], ST_INT *num_components);
|
||||
ST_RET asn1r_get_bool (ASN1_DEC_CTXT *ac, ST_BOOLEAN *dest);
|
||||
ST_VOID asn1r_get_strn (ASN1_DEC_CTXT *ac, ST_CHAR *dest);
|
||||
ST_RET asn1r_get_nstr (ASN1_DEC_CTXT *ac, ST_CHAR *dest);
|
||||
ST_RET asn1r_get_pstr (ASN1_DEC_CTXT *ac, ST_CHAR *dest);
|
||||
ST_RET asn1r_get_vstr (ASN1_DEC_CTXT *ac, ST_CHAR *dest);
|
||||
ST_RET asn1r_get_vstr_maxlen (ASN1_DEC_CTXT *aCtx, ST_CHAR *ptr, ST_INT max_len);
|
||||
ST_RET asn1r_get_i8 (ASN1_DEC_CTXT *ac, ST_INT8 *dest);
|
||||
ST_RET asn1r_get_i16 (ASN1_DEC_CTXT *ac, ST_INT16 *dest);
|
||||
ST_RET asn1r_get_i32 (ASN1_DEC_CTXT *ac, ST_INT32 *dest);
|
||||
ST_RET asn1r_get_u8 (ASN1_DEC_CTXT *ac, ST_UCHAR *dest);
|
||||
ST_RET asn1r_get_u16 (ASN1_DEC_CTXT *ac, ST_UINT16 *dest);
|
||||
ST_RET asn1r_get_u32 (ASN1_DEC_CTXT *ac, ST_UINT32 *dest);
|
||||
ST_RET asn1r_get_btod (ASN1_DEC_CTXT *ac, MMS_BTOD *dest);
|
||||
ST_RET asn1r_get_time (ASN1_DEC_CTXT *ac, time_t *dest);
|
||||
ST_RET asn1r_get_bitstr (ASN1_DEC_CTXT *ac, ST_UCHAR *dest, ST_INT max_bits);
|
||||
ST_VOID asn1r_get_bitstr_cstr (ASN1_DEC_CTXT *ac, ST_INT bits, ST_UCHAR *ptr);
|
||||
ST_RET asn1r_get_octstr (ASN1_DEC_CTXT *ac, ST_UCHAR *dest);
|
||||
ST_RET asn1r_get_octstr_fixlen (ASN1_DEC_CTXT *aCtx, ST_UCHAR *ptr, ST_INT len);
|
||||
ST_RET asn1r_get_octstr_varlen (ASN1_DEC_CTXT *aCtx, ST_UCHAR *ptr, ST_INT maxlen, ST_INT *lenout);
|
||||
ST_VOID asn1r_get_octstr_cstr (ASN1_DEC_CTXT *ac, ST_INT numoctets, ST_UCHAR *octptr);
|
||||
ST_VOID asn1r_get_delmnt (ASN1_DEC_CTXT *ac, ST_INT buflen, ST_UCHAR *bufptr,
|
||||
ST_VOID (*done_fun)(ASN1_DEC_CTXT *ac));
|
||||
ST_RET asn1r_get_float (ASN1_DEC_CTXT *ac, ST_FLOAT *dest);
|
||||
ST_RET asn1r_get_double (ASN1_DEC_CTXT *ac, ST_DOUBLE *dest);
|
||||
ST_RET asn1r_get_utc_time (ASN1_DEC_CTXT *ac, MMS_UTC_TIME *dest);
|
||||
ST_RET asn1r_get_utf8 (ASN1_DEC_CTXT *ac, ST_CHAR *ptr, ST_INT el_len);
|
||||
|
||||
#ifdef INT64_SUPPORT
|
||||
ST_VOID asn1r_wr_i64 (ASN1_ENC_CTXT *ac, ST_INT64 data);
|
||||
ST_VOID asn1r_wr_u64 (ASN1_ENC_CTXT *ac, ST_UINT64 data);
|
||||
ST_RET asn1r_get_i64 (ASN1_DEC_CTXT *ac, ST_INT64 *dest);
|
||||
ST_RET asn1r_get_u64 (ASN1_DEC_CTXT *ac, ST_UINT64 *dest);
|
||||
#endif /* INT64_SUPPORT */
|
||||
|
||||
ST_VOID asn1r_parse_next (ASN1_DEC_CTXT *ac, ST_VOID (*done_fun)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID asn1r_parse_cstr_contents (ASN1_DEC_CTXT *ac, ST_VOID (*done_fun)(ASN1_DEC_CTXT *ac));
|
||||
|
||||
ST_RET asn1r_skip_elmnt (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* These macros simplify access to members of the ASN1_ENC_CTXT struct. */
|
||||
/************************************************************************/
|
||||
/* This macro returns a pointer to the start of the ASN.1 encoded data. */
|
||||
#define ASN1_ENC_PTR(aCtx) ((aCtx)->asn1r_field_ptr+1)
|
||||
/* This macro returns the length (in bytes) of the ASN.1 encoded data. */
|
||||
#define ASN1_ENC_LEN(aCtx) ((aCtx)->asn1r_buf_end - (aCtx)->asn1r_field_ptr)
|
||||
|
||||
/* This macro returns a pointer to the start of the ASN.1 DECODED data. */
|
||||
#define ASN1_DEC_PTR(aCtx) ((aCtx)->asn1r_field_ptr)
|
||||
/* This macro returns the length (in bytes) of the ASN.1 DECODED data. */
|
||||
#define ASN1_DEC_LEN(aCtx) ((aCtx)->asn1r_elmnt_len)
|
||||
|
||||
/************************************************************************/
|
||||
/* OBJECT IDENTIFIER */
|
||||
/************************************************************************/
|
||||
|
||||
#define MAX_OBJID_COMPONENTS 16
|
||||
|
||||
struct mms_obj_id
|
||||
{
|
||||
ST_INT num_comps; /* number of objid components */
|
||||
ST_INT16 comps[MAX_OBJID_COMPONENTS]; /* identifier components */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct mms_obj_id MMS_OBJ_ID;
|
||||
ST_BOOLEAN asn1_objidcmp (MMS_OBJ_ID *obj1, MMS_OBJ_ID *obj2);
|
||||
|
||||
/************************************************************************/
|
||||
/* Application Reference data structure */
|
||||
/************************************************************************/
|
||||
|
||||
#define APP_REF_FORM1 0
|
||||
#define APP_REF_FORM2 1
|
||||
|
||||
struct form1
|
||||
{
|
||||
ST_UCHAR *ptr; /* ptr to something */
|
||||
ST_INT16 len; /* length of contents at ptr */
|
||||
};
|
||||
typedef struct form1 FORM1_T;
|
||||
|
||||
struct app_ref
|
||||
{
|
||||
ST_INT16 form; /* tells if form 1 or form 2 */
|
||||
ST_BOOLEAN ap_title_pres; /* tells if AP title is there */
|
||||
union /* AP title differs in form */
|
||||
{
|
||||
FORM1_T form_1; /* form 1 of AP title is ASN.1 */
|
||||
MMS_OBJ_ID form_2; /* form 2 of AP title is objectid*/
|
||||
} ap_title;
|
||||
ST_BOOLEAN ap_invoke_pres; /* tells if AP invoke is there */
|
||||
ST_INT32 ap_invoke;
|
||||
ST_BOOLEAN ae_qual_pres; /* tells if AE qualifier is there*/
|
||||
union /* AE qualifier differs in form */
|
||||
{
|
||||
FORM1_T form_1; /* form 1 of AE qual is ASN.1 */
|
||||
ST_INT32 form_2; /* form 2 if AE qual is long word*/
|
||||
} ae_qual;
|
||||
ST_BOOLEAN ae_invoke_pres; /* tells if AE invoke is there */
|
||||
ST_INT32 ae_invoke;
|
||||
};
|
||||
typedef struct app_ref APP_REF;
|
||||
|
||||
/************************************************************************/
|
||||
/* Miscellaneous functions/macros. */
|
||||
/************************************************************************/
|
||||
/* Functions to copy bitstrings and "variable length bitstrings". */
|
||||
ST_VOID bstrcpy (ST_UCHAR *dstptr, ST_UCHAR *srcptr, ST_INT numbits);
|
||||
ST_VOID bvstrcpy (MMS_BVSTRING *dstptr, MMS_BVSTRING *srcptr);
|
||||
ST_INT bstrcmp (ST_UCHAR *dstptr, ST_UCHAR *srcptr, ST_INT numbits);
|
||||
|
||||
/* Macros to access each individual bit of any bitstring. */
|
||||
#define BSTR_BIT_SET_ON(ptr,bitnum) \
|
||||
( ((ST_UINT8 *)(ptr))[(bitnum)/8] |= (0x80>>((bitnum)&7)) )
|
||||
#define BSTR_BIT_SET_OFF(ptr,bitnum) \
|
||||
( ((ST_UINT8 *)(ptr))[(bitnum)/8] &= ~(0x80>>((bitnum)&7)) )
|
||||
|
||||
/* BSTR_BIT_GET returns 0 if bit is clear, 1 if bit is set. */
|
||||
#define BSTR_BIT_GET(ptr,bitnum) \
|
||||
(( ((ST_UINT8 *)(ptr))[(bitnum)/8] & (0x80>>((bitnum)&7)) ) ? 1:0)
|
||||
|
||||
#define BSTR_BIT_SET_TRUE BSTR_BIT_SET_ON
|
||||
#define BSTR_BIT_SET_FALSE BSTR_BIT_SET_OFF
|
||||
|
||||
/* Calculate number of bytes needed to contain number of bits. */
|
||||
#define BSTR_NUMBITS_TO_NUMBYTES(numbits) (((numbits)+7)/8)
|
||||
|
||||
/* Functions for conversion from ASN.1 UTF8string to local format. */
|
||||
/* Must be ported to each platform. */
|
||||
ST_INT asn1r_utf8_to_local (ST_CHAR *dst, ST_INT dst_len, ST_CHAR *src, ST_INT src_len);
|
||||
ST_INT asn1r_local_to_utf8 (ST_CHAR *dst, ST_INT dst_len, ST_CHAR *src);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
#endif /* File not already included */
|
||||
/************************************************************************/
|
||||
|
||||
135
include/mmslite/bittypes.h
Normal file
135
include/mmslite/bittypes.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Copyright (C) 1999 WIDE Project.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the project nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef _BITTYPES_H
|
||||
#define _BITTYPES_H
|
||||
|
||||
#ifndef HAVE_U_INT8_T
|
||||
|
||||
#if SIZEOF_CHAR == 1
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef signed char int8_t;
|
||||
#elif SIZEOF_INT == 1
|
||||
typedef unsigned int u_int8_t;
|
||||
typedef signed int int8_t;
|
||||
#else /* XXX */
|
||||
#error "there's no appropriate type for u_int8_t"
|
||||
#endif
|
||||
#define HAVE_U_INT8_T 1
|
||||
#define HAVE_INT8_T 1
|
||||
|
||||
#endif /* HAVE_U_INT8_T */
|
||||
|
||||
#ifndef HAVE_U_INT16_T
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef signed short int16_t;
|
||||
#elif SIZEOF_INT == 2
|
||||
typedef unsigned int u_int16_t;
|
||||
typedef signed int int16_t;
|
||||
#elif SIZEOF_CHAR == 2
|
||||
typedef unsigned char u_int16_t;
|
||||
typedef signed char int16_t;
|
||||
#else /* XXX */
|
||||
#error "there's no appropriate type for u_int16_t"
|
||||
#endif
|
||||
#define HAVE_U_INT16_T 1
|
||||
#define HAVE_INT16_T 1
|
||||
|
||||
#endif /* HAVE_U_INT16_T */
|
||||
|
||||
#ifndef HAVE_U_INT32_T
|
||||
|
||||
#if SIZEOF_INT == 4
|
||||
typedef unsigned int u_int32_t;
|
||||
typedef signed int int32_t;
|
||||
#elif SIZEOF_LONG == 4
|
||||
typedef unsigned long u_int32_t;
|
||||
typedef signed long int32_t;
|
||||
#elif SIZEOF_SHORT == 4
|
||||
typedef unsigned short u_int32_t;
|
||||
typedef signed short int32_t;
|
||||
#else /* XXX */
|
||||
#error "there's no appropriate type for u_int32_t"
|
||||
#endif
|
||||
#define HAVE_U_INT32_T 1
|
||||
#define HAVE_INT32_T 1
|
||||
|
||||
#endif /* HAVE_U_INT32_T */
|
||||
|
||||
#ifndef HAVE_U_INT64_T
|
||||
#if SIZEOF_LONG_LONG == 8
|
||||
typedef unsigned long long u_int64_t;
|
||||
#elif defined(_MSC_EXTENSIONS)
|
||||
typedef unsigned _int64 u_int64_t;
|
||||
#elif SIZEOF_INT == 8
|
||||
typedef unsigned int u_int64_t;
|
||||
#elif SIZEOF_LONG == 8
|
||||
typedef unsigned long u_int64_t;
|
||||
#elif SIZEOF_SHORT == 8
|
||||
typedef unsigned short u_int64_t;
|
||||
#else /* XXX */
|
||||
#error "there's no appropriate type for u_int64_t"
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_U_INT64_T */
|
||||
|
||||
#ifndef PRId64
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define PRId64 "I64d"
|
||||
#else /* _MSC_EXTENSIONS */
|
||||
#define PRId64 "lld"
|
||||
#endif /* _MSC_EXTENSIONS */
|
||||
#endif /* PRId64 */
|
||||
|
||||
#ifndef PRIo64
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define PRIo64 "I64o"
|
||||
#else /* _MSC_EXTENSIONS */
|
||||
#define PRIo64 "llo"
|
||||
#endif /* _MSC_EXTENSIONS */
|
||||
#endif /* PRIo64 */
|
||||
|
||||
#ifndef PRIx64
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define PRIx64 "I64x"
|
||||
#else /* _MSC_EXTENSIONS */
|
||||
#define PRIx64 "llx"
|
||||
#endif /* _MSC_EXTENSIONS */
|
||||
#endif /* PRIx64 */
|
||||
|
||||
#ifndef PRIu64
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define PRIu64 "I64u"
|
||||
#else /* _MSC_EXTENSIONS */
|
||||
#define PRIu64 "llu"
|
||||
#endif /* _MSC_EXTENSIONS */
|
||||
#endif /* PRIu64 */
|
||||
|
||||
#endif /* _BITTYPES_H */
|
||||
54
include/mmslite/bucket_lookup.h
Normal file
54
include/mmslite/bucket_lookup.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2001 - 2003
|
||||
* NetGroup, Politecnico di Torino (Italy)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Politecnico di Torino nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __bucket_lookup
|
||||
#define __bucket_lookup
|
||||
#ifdef WIN32
|
||||
#include "tme.h"
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <net/tme/tme.h>
|
||||
#else
|
||||
#include <tme/tme.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define BUCKET_LOOKUP_INSERT 0x00000011
|
||||
uint32 bucket_lookup_insert(uint8 *key, TME_DATA *data, MEM_TYPE *mem_ex, struct time_conv *time_ref);
|
||||
#define BUCKET_LOOKUP 0x00000010
|
||||
uint32 bucket_lookup(uint8 *key, TME_DATA *data, MEM_TYPE *mem_ex, struct time_conv *time_ref);
|
||||
|
||||
#endif
|
||||
112
include/mmslite/cfg_util.h
Normal file
112
include/mmslite/cfg_util.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1991-2005 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : cfg_util.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 02/31/05 EJV 05 Chg MAX_NUM_KEYWORDS from 100 to 200. */
|
||||
/* 10/08/98 MDE 04 Migrated to updated SLOG interface */
|
||||
/* 08/06/98 JRB 03 Added cfg_get_octet_string function. */
|
||||
/* 12/04/97 KCR 02 Added cfg_goto_keyword function */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CFG_UTIL_INCLUDED
|
||||
#define CFG_UTIL_INCLUDED
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#define MAX_RVAL_LEN 256
|
||||
#define MAX_NUM_KEYWORDS 200 /* just to prevent runaway */
|
||||
|
||||
/* Keyword table element */
|
||||
struct cfg_kw_el
|
||||
{
|
||||
ST_CHAR *name; /* string to match on */
|
||||
ST_VOID (*extract)(ST_VOID); /* function to call to extract */
|
||||
ST_RET (*valid)(ST_VOID); /* call to check if ok to call */
|
||||
};
|
||||
typedef struct cfg_kw_el CFG_KW_EL;
|
||||
|
||||
/************************************************************************/
|
||||
/* Externally visible variables */
|
||||
|
||||
extern ST_BOOLEAN config_stop; /* Set SD_TRUE to terminate */
|
||||
extern ST_RET config_err; /* Set to non-zero for error */
|
||||
extern ST_BOOLEAN config_eof; /* Set to SD_SUCCESS when eof is ok */
|
||||
|
||||
extern ST_CHAR *cfg_line_buf; /* file line read buffer */
|
||||
extern ST_INT cfg_curr_line; /* Current line number */
|
||||
extern ST_INT cfg_line_offset; /* Offset into cfg_line_buf */
|
||||
extern ST_CHAR *cfg_special_char_str; /* Special ravl chars */
|
||||
extern ST_CHAR *cfg_end_of_rval_str; /* 'End of rval' chars */
|
||||
|
||||
/************************************************************************/
|
||||
/* Internal CFG_UTIL error codes */
|
||||
|
||||
#define CFG_CONVERT_ERR 0x8000
|
||||
#define CFG_GET_RVAL_ERR 0x8001
|
||||
#define CFG_UTIL_ERR 0x8002
|
||||
|
||||
/************************************************************************/
|
||||
/* Externally visible functions */
|
||||
|
||||
ST_RET cfg_process_file (ST_CHAR *fileName, CFG_KW_EL *root_kw_tbl);
|
||||
ST_RET cfg_tbl_push (CFG_KW_EL *);
|
||||
ST_RET cfg_tbl_pop (ST_INT);
|
||||
ST_CHAR *cfg_get_alloc_string (ST_VOID);
|
||||
ST_CHAR *cfg_get_string_ptr (ST_VOID);
|
||||
ST_RET cfg_get_short (ST_INT16 *int_ptr);
|
||||
ST_RET cfg_get_ushort (ST_UINT16 *int_ptr);
|
||||
ST_RET cfg_get_int (ST_INT *int_ptr);
|
||||
ST_RET cfg_get_uint (ST_UINT *int_ptr);
|
||||
ST_RET cfg_get_long (ST_LONG *int_ptr);
|
||||
ST_RET cfg_get_ulong (ST_ULONG *int_ptr);
|
||||
ST_RET cfg_get_hex_ushort (ST_UINT16 *int_ptr);
|
||||
ST_RET cfg_get_hex_uint (ST_UINT *int_ptr);
|
||||
ST_RET cfg_get_hex_ulong (ST_ULONG *out_ptr);
|
||||
ST_RET cfg_get_value (ST_CHAR *format_string, ST_VOID *out_ptr);
|
||||
ST_VOID cfg_set_config_err(ST_VOID);
|
||||
ST_VOID cfg_set_endfile_ok(ST_VOID);
|
||||
ST_RET cfg_get_double (ST_DOUBLE *out_ptr);
|
||||
ST_RET cfg_goto_keyword (ST_CHAR *keyword);
|
||||
ST_RET cfg_get_octet_string (ST_UCHAR *ostr, /* ptr to user's ostr */
|
||||
ST_UINT *len_out_ptr, /* addr of len var to be set */
|
||||
ST_UINT len_max); /* maximum len to allow. */
|
||||
|
||||
/************************************************************************/
|
||||
/* CFG_UTIL logging control */
|
||||
|
||||
#define CFG_LOG_ERR 0x0001
|
||||
#define CFG_LOG_FLOW 0x0002
|
||||
extern ST_UINT cfg_log_mask;
|
||||
|
||||
/* For compatibility with older code only */
|
||||
#define cfg_sLogCtrl sLogCtrl
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
101
include/mmslite/cfglog.h
Normal file
101
include/mmslite/cfglog.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1991-1997 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : cfglog.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/13/99 MDE 02 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 01 Migrated to updated SLOG interface */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CFGLOG_INCLUDED
|
||||
#define CFGLOG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cfg_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cfg_flow_logstr;
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef DEBUG_SISCO
|
||||
|
||||
#define CFG_LOG_ERR0(a) {\
|
||||
if (cfg_log_mask & CFG_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cfg_err_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define CFG_LOG_ERR1(a,b) {\
|
||||
if (cfg_log_mask & CFG_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cfg_err_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define CFG_LOG_ERR2(a,b,c) {\
|
||||
if (cfg_log_mask & CFG_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cfg_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define CFG_LOG_ERR3(a,b,c,d) {\
|
||||
if (cfg_log_mask & CFG_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cfg_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
|
||||
|
||||
#define CFG_LOG_FLOW0(a) {\
|
||||
if (cfg_log_mask & CFG_LOG_FLOW)\
|
||||
_slog (sLogCtrl,_cfg_flow_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define CFG_LOG_FLOW1(a,b) {\
|
||||
if (cfg_log_mask & CFG_LOG_FLOW)\
|
||||
_slog (sLogCtrl,_cfg_flow_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define CFG_LOG_CFLOW0(a) {\
|
||||
if (cfg_log_mask & CFG_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define CFG_LOG_CFLOW1(a,b) {\
|
||||
if (cfg_log_mask & CFG_LOG_FLOW)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
#else /* no DEBUG */
|
||||
|
||||
#define CFG_LOG_ERR0(a)
|
||||
#define CFG_LOG_ERR1(a,b)
|
||||
#define CFG_LOG_ERR2(a,b,c)
|
||||
#define CFG_LOG_ERR3(a,b,c,d)
|
||||
#define CFG_LOG_FLOW0(a)
|
||||
#define CFG_LOG_FLOW1(a,b)
|
||||
#define CFG_LOG_CFLOW0(a)
|
||||
#define CFG_LOG_CFLOW1(a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
46
include/mmslite/checksum.h
Normal file
46
include/mmslite/checksum.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef CHECKSUM_INCLUDED
|
||||
#define CHECKSUM_INCLUDED
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : checksum.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file contain functionprototypes for */
|
||||
/* implemented computation and verification of checksum */
|
||||
/* using the algorithm defined in Annex B of the ISO 8073 */
|
||||
/* or in the ISO 8473. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* checksum_insert */
|
||||
/* checksum_verified */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 06/19/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
ST_VOID checksum_insert (ST_UCHAR *buf, ST_UINT16 buf_len, ST_UINT16 position);
|
||||
ST_BOOLEAN checksum_verified (ST_UCHAR *buf, ST_UINT16 buf_len, ST_UINT16 position, ST_BOOLEAN clnp_csum);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
259
include/mmslite/clnp.h
Normal file
259
include/mmslite/clnp.h
Normal file
@@ -0,0 +1,259 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnp.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file specifies internal defines and function*/
|
||||
/* prototypes for implementation of Connectionless-mode */
|
||||
/* Network Protocol (CLNP). */
|
||||
/* Note that the CLNP is implemented as non-segmenting */
|
||||
/* subset of the full protocol. */
|
||||
/* */
|
||||
/* For information see the: */
|
||||
/* ISO 8473 "Information processing systems - Data communication - */
|
||||
/* Protocol providing the connectionless-mode network service"; */
|
||||
/* ISO 8348 "Information processing systems - Data communication - */
|
||||
/* Network service definition. Addendum 1: Connectionless-mode */
|
||||
/* transmission". */
|
||||
/* ISO 9542 "Information processing systems - Telecommunications */
|
||||
/* and information exchange beetween systems - End system to */
|
||||
/* Intermediate system routing exchange protocol for use with */
|
||||
/* ISO 8473. */
|
||||
/* */
|
||||
/* GLOBAL STRUCTURES DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* CLNP_8473_FHDR struct */
|
||||
/* CLNP_9542_FHDR struct */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 07/19/96 EJV 02 Moved CLNP_DEF_LEN_HDR from clnp_usr.h and */
|
||||
/* deleted clnpl_all_es_mac */
|
||||
/* 05/24/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CLNP_INCLUDED
|
||||
#define CLNP_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Defines and structures below are specific to the ISO 8473 standard */
|
||||
/* (DT and ER PDUs for CLNP). */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
/* ISO 8473 protocol id and version */
|
||||
#define CLNP_8473_PROT_ID (ST_UCHAR) 0x81
|
||||
#define CLNP_8473_PROT_VER (ST_UCHAR) 0x01
|
||||
|
||||
/* PDU type and flags (they are already in proper bit position) */
|
||||
#define CLNP_8473_TYPE_ER (ST_UCHAR) 0x01
|
||||
#define CLNP_8473_TYPE_DT (ST_UCHAR) 0x1C
|
||||
|
||||
#define CLNP_SEG_NOT_PERMITTED (ST_UCHAR) 0x00
|
||||
#define CLNP_SEG_PERMITTED (ST_UCHAR) 0x80
|
||||
/* bit 8 ON */
|
||||
|
||||
#define CLNP_LAST_SEG (ST_UCHAR) 0x00
|
||||
#define CLNP_MORE_SEG (ST_UCHAR) 0x40
|
||||
/* bit 7 ON */
|
||||
|
||||
#define CLNP_ERR_REP_NOT_GEN (ST_UCHAR) 0x00
|
||||
#define CLNP_ERR_REP_GENERATE (ST_UCHAR) 0x20
|
||||
/* bit 6 ON */
|
||||
|
||||
#define CLNP_MASK_FLAGS (ST_UCHAR) 0x1F /* mask bit 6,7,8 */
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* CLNP_8473_FHDR struct */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Structure below define the fixed part in the ISO 8473 PDU header. */
|
||||
/* The rest of the header has variable length. */
|
||||
|
||||
/* NOTE: ! only ST_UCHAR type should be in protocol structs to avoid */
|
||||
/* ! packing or problems with sizeof operator. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR protocol_id; /* Network Layer Protocol Identifier */
|
||||
ST_UCHAR hdr_len; /* Header length */
|
||||
ST_UCHAR protocol_ver; /* Version of the protocol */
|
||||
ST_UCHAR pdu_lifetime; /* Remaining lifetime for PDU */
|
||||
ST_UCHAR type_flags; /* PDU type & flags */
|
||||
ST_UCHAR seg_len[2]; /* Segment length (hdr+data len)swapped */
|
||||
ST_UCHAR checksum [2]; /* Checksum of the PDU header */
|
||||
}CLNP_8473_FHDR;
|
||||
|
||||
#define CLNP_8473_FHDR_LEN sizeof (CLNP_8473_FHDR)
|
||||
|
||||
|
||||
/* structure below defines the Segmenting part in a DT PDU header */
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR pdu_id [2]; /* Data Unit Identiefier */
|
||||
ST_UCHAR pdu_offset [2]; /* Offset of the segment in original PDU*/
|
||||
ST_UCHAR pdu_total_len [2]; /* Total len of original PDU */
|
||||
}CLNP_8473_HDR_SEG;
|
||||
|
||||
#define CLNP_8473_HDR_SEG_LEN sizeof (CLNP_8473_HDR_SEG)
|
||||
|
||||
|
||||
#define CLNP_DEF_LEN_HDR (ST_UCHAR) (CLNP_8473_FHDR_LEN+2*(CLNP_MAX_LEN_NSAP+1))
|
||||
/* this implementaion assumes */
|
||||
/* following parts to be present*/
|
||||
/* in header: */
|
||||
/* fixedPart +destNSAP +srcNSAP */
|
||||
/* (no seg, no options parts); */
|
||||
/* 51 bytes or less */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Defines and structures below are specific to the ISO 9542 standard */
|
||||
/* (ES-IS HELLOs for CLNP). */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
/* ISO 8473 protocol id and version */
|
||||
#define CLNP_9542_PROT_ID (ST_UCHAR) 0x82
|
||||
#define CLNP_9542_PROT_VER (ST_UCHAR) 0x01
|
||||
|
||||
/* PDU type */
|
||||
#define CLNP_9542_TYPE_ESH (ST_UCHAR) 0x02
|
||||
#define CLNP_9542_TYPE_ISH (ST_UCHAR) 0x04
|
||||
#define CLNP_9542_TYPE_RD (ST_UCHAR) 0x06
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* CLNP_9542_FHDR struct */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Structure below defines the fixed part in the ISO 9542 PDU header. */
|
||||
/* The rest of the header has variable length. */
|
||||
/* Note that the ISO 9542 (ES HELLO and IS HELLO PDUs) do not contain */
|
||||
/* PDU data part. */
|
||||
|
||||
/* NOTE: ! only ST_UCHAR type should be in protocol structs to avoid */
|
||||
/* ! packing or problems with sizeof operator. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR protocol_id; /* Network Layer Protocol Identifier */
|
||||
ST_UCHAR hdr_len; /* Header length */
|
||||
ST_UCHAR protocol_ver; /* Version of the protocol */
|
||||
ST_UCHAR rfu; /* Reserved for future use */
|
||||
ST_UCHAR type; /* PDU type, bits 6,7,8 are always 0 */
|
||||
ST_UCHAR holding_time[2];/* max time to retain received info */
|
||||
ST_UCHAR checksum [2]; /* Checksum of the PDU header */
|
||||
}CLNP_9542_FHDR;
|
||||
|
||||
#define CLNP_9542_FHDR_LEN sizeof (CLNP_9542_FHDR)
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Internal CLNP function prototypes */
|
||||
/************************************************************************/
|
||||
|
||||
/* clnp_enc.c module */
|
||||
|
||||
ST_RET clnpl_encode_dt (SN_UNITDATA *sn_req, N_UNITDATA *req);
|
||||
ST_RET clnpl_encode_esh (ST_UCHAR *enc_buf, ST_UINT16 *enc_len);
|
||||
|
||||
|
||||
/* clnp_dec.c module */
|
||||
|
||||
ST_RET clnpl_decode (SN_UNITDATA *sn_req, N_UNITDATA **req);
|
||||
ST_VOID clnpl_log_npdu (ST_UCHAR *pdu_buf, ST_UCHAR npdu_type, ST_CHAR *enc_dec_str);
|
||||
|
||||
/* clnp_esh.c module */
|
||||
|
||||
ST_RET clnpl_init_esh (ST_UINT16 delay_time);
|
||||
ST_VOID clnpl_check_cfg_timer (ST_VOID);
|
||||
ST_RET clnpl_send_esh (ST_UCHAR *rem_mac);
|
||||
|
||||
|
||||
#if 0
|
||||
/* struct below may be needed to implement in the future the ISO 8473 */
|
||||
/* header options */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* CLNP_OPTIONS struct */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Structure below specifies the options to be used for the PDU. */
|
||||
/* The options by default are all turned off at the start-up */
|
||||
/* time. In future some functions may be provided to set up the options */
|
||||
/* or the structure will be exposed to the CLNP-user for setting the */
|
||||
/* parameters. */
|
||||
/* NOTE: currently none of the option are implemented. */
|
||||
|
||||
/* Options for padding_flag */
|
||||
#define CLNP_OPT_PAD_NONE 0 /* no header padding */
|
||||
#define CLNP_OPT_PAD_TO_SIZE 1 /* pad header to specified size */
|
||||
#define CLNP_OPT_PAD_TO_BOUDARY 2 /* pad header so that data */
|
||||
/* starts on specified boundary */
|
||||
/* Options for security_flag */
|
||||
#define CLNP_OPT_SEC_NONE 0 /* no security level specified */
|
||||
#define CLNP_OPT_SEC_SRC 1 /* sec. Source Address specific */
|
||||
#define CLNP_OPT_SEC_DEST 2 /* sec. Dest Address specific */
|
||||
#define CLNP_OPT_SEC_UNIQUE 3 /* security Globally Unique */
|
||||
|
||||
/* Options for routeing_flag */
|
||||
#define CLNP_OPT_ROUTE_NONE 0 /* no routeing specified */
|
||||
#define CLNP_OPT_ROUTE_PART 1 /* partial routeing requested */
|
||||
#define CLNP_OPT_ROUTE_COMP 2 /* complete routeing requested */
|
||||
|
||||
/* Options for record_route_flag */
|
||||
#define CLNP_OPT_REC_ROUTE_NONE 0 /* no route recording */
|
||||
#define CLNP_OPT_REC_ROUTE_PART 1 /* partial route recording */
|
||||
#define CLNP_OPT_RCE_ROUTE_COMP 2 /* complete route recording */
|
||||
|
||||
/* Options for qos_flag (Quality of Service - QoS) */
|
||||
#define CLNP_OPT_QoS_NONE 0 /* no QoS specified */
|
||||
#define CLNP_OPT_QoS_SRC 1 /* QoS Source Address specific */
|
||||
#define CLNP_OPT_QoS_DEST 2 /* QoS Dest Address specific */
|
||||
#define CLNP_OPT_QoS_UNIQUE 3 /* QoS Globally Unique */
|
||||
|
||||
/* Options for priority_flag (use values from 1 to 14 to specified */
|
||||
/* priority parameter for the DT PDU. */
|
||||
#define CLNP_OPT_PRIORITY_DEF 0 /* default priority */
|
||||
#define CLNP_OPT_PRIORITY_MAX 14 /* max priority */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR padding_flag;
|
||||
ST_UCHAR security_flag;
|
||||
ST_UCHAR routeing_flag;
|
||||
ST_UCHAR record_route_flag;
|
||||
ST_UCHAR qos_flag;
|
||||
ST_UCHAR priority_flag;
|
||||
}CLNP_OPTIONS;
|
||||
|
||||
extern CLNP_OPTIONS clnpl_options;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
|
||||
|
||||
|
||||
66
include/mmslite/clnp_llc.h
Normal file
66
include/mmslite/clnp_llc.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996-2002, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnp_llc.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file contains defines for the encoding and */
|
||||
/* decoding of Logical Link Control (LLC) which is */
|
||||
/* implemented with the CLNP layer. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/12/04 JRB 04 Del LLC_LSAP_IEC_GOOSE 0xF5 (obsolete now). */
|
||||
/* 01/10/02 JRB 03 Add LLC_LSAP_IEC_GOOSE. */
|
||||
/* 09/09/97 EJV 02 Added support for UCA SMP (Station Mgt Prot) */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 06/04/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CLNP_LLC_INCLUDED
|
||||
#define CLNP_LLC_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define LLC_LSAP (ST_UCHAR) 0xFE
|
||||
#define LLC_CONTROL (ST_UCHAR) 0x03
|
||||
|
||||
#define LLC_LSAP_SMP (ST_UCHAR) 0xFB /* For UCA SMP (Station Mgt Prot) */
|
||||
#define LLC_CONTROL_SMP (ST_UCHAR) 0x03 /* For UCA SMP (Station Mgt Prot) */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR dest; /* destination SAP */
|
||||
ST_UCHAR src; /* source SAP */
|
||||
ST_UCHAR control; /* control field */
|
||||
}LLC_HDR;
|
||||
|
||||
#define LLC_HDR_LEN sizeof (LLC_HDR)
|
||||
|
||||
|
||||
/* Function prototypes from llc.c module */
|
||||
|
||||
ST_RET clnpl_llc_encode (ST_UCHAR *enc_buf, ST_UCHAR src_lsap, ST_UCHAR dest_lsap);
|
||||
ST_RET clnpl_llc_decode (ST_UCHAR *dec_buf, ST_UCHAR *dest_lsap);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
|
||||
231
include/mmslite/clnp_log.h
Normal file
231
include/mmslite/clnp_log.h
Normal file
@@ -0,0 +1,231 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnp_log.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file contains logging macros for CLNP. */
|
||||
/* Note: To compile logging functions use the DEBUG_SISCO define */
|
||||
/* in the project make file. */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 06/09/03 JRB 07 Use new "Base" macros SLOG_*, SLOGC_*, SLOGH.*/
|
||||
/* Del unused macros. */
|
||||
/* 10/02/01 JRB 06 Fix logstr in CLSNS_LOG_* macros. */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 04 Migrated to updated SLOG interface */
|
||||
/* 07/28/97 JRB 03 Added CLNP_LOG_REQ2 / 3 & CLNP_LOG_IND2 / 3 */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 03/03/97 EJV 02 Corrected ALWAYS macros; */
|
||||
/* Removed check if sLogCtrl not NULL */
|
||||
/* 06/10/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CLNP_LOG_INCLUDED
|
||||
#define CLNP_LOG_INCLUDED
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* NOTE: CLNP log masks and clnp_debug_sel are defined in clnp_usr.h */
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clnp_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clnp_nerr_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clnp_req_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clnp_ind_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clnp_enc_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clnp_llc_enc_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clsns_req_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _clsns_ind_logstr;
|
||||
|
||||
#if defined(DEBUG_SISCO)
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* macros below are used to log REQ or IND by passing mask to select */
|
||||
/* the logging macro (this is handy in log function so the macros */
|
||||
/* do not have to repeated in function for REQ and then for IND) */
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
#define CLNP_LOGC_RI0(m,a) {if (m == CLNP_LOG_REQ) {CLNP_LOGC_REQ0(a);} else {CLNP_LOGC_IND0(a);}}
|
||||
#define CLNP_LOGC_RI1(m,a,b) {if (m == CLNP_LOG_REQ) {CLNP_LOGC_REQ1(a,b);} else {CLNP_LOGC_IND1(a,b);}}
|
||||
|
||||
#define CLNP_LOGH_RI(m,a,b) {if (m == CLNP_LOG_REQ) {CLNP_LOGH_REQ(a,b);} else {CLNP_LOGH_IND(a,b);}}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* macros below are used to log REQ or IND by passing mask to select */
|
||||
/* the logging macro (this is handy in log function so the macros */
|
||||
/* do not have to repeated in function for REQ and then for IND) */
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
#define CLSNS_LOGC_RI0(m,a) {if (m == CLSNS_LOG_REQ) {CLSNS_LOGC_REQ0(a);} else {CLSNS_LOGC_IND0(a);}}
|
||||
#define CLSNS_LOGC_RI1(m,a,b) {if (m == CLSNS_LOG_REQ) {CLSNS_LOGC_REQ1(a,b);} else {CLSNS_LOGC_IND1(a,b);}}
|
||||
|
||||
#define CLSNS_LOGH_RI(m,a,b) {if (m == CLSNS_LOG_REQ) {CLSNS_LOGH_REQ(a,b);} else {CLSNS_LOGH_IND(a,b);}}
|
||||
|
||||
#else /* !defined(DEBUG_SISCO) */
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* macros below are used to log REQ or IND by passing mask */
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
#define CLNP_LOGC_RI0(m,a)
|
||||
#define CLNP_LOGC_RI1(m,a,b)
|
||||
#define CLNP_LOGH_RI(m,a,b)
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* macros below are used to log REQ or IND by passing mask */
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
#define CLSNS_LOGC_RI0(m,a)
|
||||
#define CLSNS_LOGC_RI1(m,a,b)
|
||||
|
||||
#define CLSNS_LOGH_RI(m,a,b)
|
||||
|
||||
#endif /* !defined(DEBUG_SISCO) */
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* hard errors logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define CLNP_LOG_ERR0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLNP_LOG_ERR,_clnp_err_logstr,a)
|
||||
#define CLNP_LOG_ERR1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLNP_LOG_ERR,_clnp_err_logstr,a,b)
|
||||
#define CLNP_LOG_ERR2(a,b,c) \
|
||||
SLOG_2 (clnp_debug_sel & CLNP_LOG_ERR,_clnp_err_logstr,a,b,c)
|
||||
#define CLNP_LOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (clnp_debug_sel & CLNP_LOG_ERR,_clnp_err_logstr,a,b,c,d)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* normal errors logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define CLNP_LOG_NERR0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLNP_LOG_NERR,_clnp_nerr_logstr,a)
|
||||
#define CLNP_LOG_NERR1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLNP_LOG_NERR,_clnp_nerr_logstr,a,b)
|
||||
#define CLNP_LOG_NERR2(a,b,c) \
|
||||
SLOG_2 (clnp_debug_sel & CLNP_LOG_NERR,_clnp_nerr_logstr,a,b,c)
|
||||
#define CLNP_LOG_NERR3(a,b,c,d) \
|
||||
SLOG_3 (clnp_debug_sel & CLNP_LOG_NERR,_clnp_nerr_logstr,a,b,c,d)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* CLNP-user request logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define CLNP_LOG_REQ0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLNP_LOG_REQ,_clnp_req_logstr,a)
|
||||
#define CLNP_LOG_REQ1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLNP_LOG_REQ,_clnp_req_logstr,a,b)
|
||||
#define CLNP_LOG_REQ2(a,b,c) \
|
||||
SLOG_2 (clnp_debug_sel & CLNP_LOG_REQ,_clnp_req_logstr,a,b,c)
|
||||
#define CLNP_LOG_REQ3(a,b,c,d) \
|
||||
SLOG_3 (clnp_debug_sel & CLNP_LOG_REQ,_clnp_req_logstr,a,b,c,d)
|
||||
/* continuation log */
|
||||
#define CLNP_LOGC_REQ0(a) \
|
||||
SLOGC_0 (clnp_debug_sel & CLNP_LOG_REQ,a)
|
||||
#define CLNP_LOGC_REQ1(a,b) \
|
||||
SLOGC_1 (clnp_debug_sel & CLNP_LOG_REQ,a,b)
|
||||
/* hex logging */
|
||||
#define CLNP_LOGH_REQ(a,b) \
|
||||
SLOGH (clnp_debug_sel & CLNP_LOG_REQ,a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* CLNP_user indication logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define CLNP_LOG_IND0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLNP_LOG_IND,_clnp_ind_logstr,a)
|
||||
#define CLNP_LOG_IND1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLNP_LOG_IND,_clnp_ind_logstr,a,b)
|
||||
#define CLNP_LOG_IND2(a,b,c) \
|
||||
SLOG_2 (clnp_debug_sel & CLNP_LOG_IND,_clnp_ind_logstr,a,b,c)
|
||||
#define CLNP_LOG_IND3(a,b,c,d) \
|
||||
SLOG_3 (clnp_debug_sel & CLNP_LOG_IND,_clnp_ind_logstr,a,b,c,d)
|
||||
/* continuation log */
|
||||
#define CLNP_LOGC_IND0(a) \
|
||||
SLOGC_0 (clnp_debug_sel & CLNP_LOG_IND,a)
|
||||
#define CLNP_LOGC_IND1(a,b) \
|
||||
SLOGC_1 (clnp_debug_sel & CLNP_LOG_IND,a,b)
|
||||
/* hex logging */
|
||||
#define CLNP_LOGH_IND(a,b) \
|
||||
SLOGH (clnp_debug_sel & CLNP_LOG_IND,a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* CLNP encoding/decoding of NPDU */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define CLNP_LOG_ENC_DEC0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLNP_LOG_ENC_DEC,_clnp_enc_dec_logstr,a)
|
||||
#define CLNP_LOG_ENC_DEC1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLNP_LOG_ENC_DEC,_clnp_enc_dec_logstr,a,b)
|
||||
#define CLNP_LOG_ENC_DEC2(a,b,c) \
|
||||
SLOG_2 (clnp_debug_sel & CLNP_LOG_ENC_DEC,_clnp_enc_dec_logstr,a,b,c)
|
||||
/* continuation log */
|
||||
#define CLNP_LOGC_ENC_DEC0(a) \
|
||||
SLOGC_0 (clnp_debug_sel & CLNP_LOG_ENC_DEC,a)
|
||||
#define CLNP_LOGC_ENC_DEC1(a,b) \
|
||||
SLOGC_1 (clnp_debug_sel & CLNP_LOG_ENC_DEC,a,b)
|
||||
/* hex logging */
|
||||
#define CLNP_LOGH_ENC_DEC(a,b) \
|
||||
SLOGH (clnp_debug_sel & CLNP_LOG_ENC_DEC,a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* LLC encoding/decoding of LPDU */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define CLNP_LOG_LLC_ENC_DEC3(a,b,c,d) \
|
||||
SLOG_3 (clnp_debug_sel & CLNP_LOG_LLC_ENC_DEC,_clnp_llc_enc_dec_logstr,a,b,c,d)
|
||||
|
||||
/*----------------------------------------------*/
|
||||
/* sub-network services request (write) logging */
|
||||
/*----------------------------------------------*/
|
||||
|
||||
#define CLSNS_LOG_REQ0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLSNS_LOG_REQ,_clsns_req_logstr,a)
|
||||
#define CLSNS_LOG_REQ1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLSNS_LOG_REQ,_clsns_req_logstr,a,b)
|
||||
/* continuation log */
|
||||
#define CLSNS_LOGC_REQ0(a) \
|
||||
SLOGC_0 (clnp_debug_sel & CLSNS_LOG_REQ,a)
|
||||
#define CLSNS_LOGC_REQ1(a,b) \
|
||||
SLOGC_1 (clnp_debug_sel & CLSNS_LOG_REQ,a,b)
|
||||
/* hex logging */
|
||||
#define CLSNS_LOGH_REQ(a,b) \
|
||||
SLOGH (clnp_debug_sel & CLSNS_LOG_REQ,a,b)
|
||||
|
||||
/*------------------------------------------------*/
|
||||
/* sub-network services indication logging (read) */
|
||||
/*------------------------------------------------*/
|
||||
|
||||
#define CLSNS_LOG_IND0(a) \
|
||||
SLOG_0 (clnp_debug_sel & CLSNS_LOG_IND,_clsns_ind_logstr,a)
|
||||
#define CLSNS_LOG_IND1(a,b) \
|
||||
SLOG_1 (clnp_debug_sel & CLSNS_LOG_IND,_clsns_ind_logstr,a,b)
|
||||
|
||||
/* continuation log */
|
||||
#define CLSNS_LOGC_IND0(a) \
|
||||
SLOGC_0 (clnp_debug_sel & CLSNS_LOG_IND,a)
|
||||
#define CLSNS_LOGC_IND1(a,b) \
|
||||
SLOGC_1 (clnp_debug_sel & CLSNS_LOG_IND,a,b)
|
||||
/* hex logging */
|
||||
#define CLSNS_LOGH_IND(a,b) \
|
||||
SLOGH (clnp_debug_sel & CLSNS_LOG_IND,a,b)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
227
include/mmslite/clnp_sne.h
Normal file
227
include/mmslite/clnp_sne.h
Normal file
@@ -0,0 +1,227 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996-2005, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnp_sne.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file defines the interface between the */
|
||||
/* Connectionless-mode Network Protocol (CLNP) and the */
|
||||
/* underlying sub-network. */
|
||||
/* */
|
||||
/* GLOBAL STRUCTURES DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* SN_UNITDATA struct */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* clnp_snet_init */
|
||||
/* clnp_snet_term */
|
||||
/* clnp_snet_read */
|
||||
/* clnp_snet_write */
|
||||
/* clnp_snet_free */
|
||||
/* clnp_snet_add_multicast_mac */
|
||||
/* clnp_snet_ext_write */
|
||||
/* clnp_snet_timer_tick */
|
||||
/* clnp_snet_update_is */
|
||||
/* clnp_snet_update_es */
|
||||
/* clnp_snet_lookup_mac */
|
||||
/* clnp_snet_get_all_is_mac */
|
||||
/* clnp_snet_get_all_es_mac */
|
||||
/* clnp_snet_get_local_mac */
|
||||
/* clnp_snet_get_max_udata_len */
|
||||
/* clnp_snet_get_type */
|
||||
/* clnp_snet_create_es_table */
|
||||
/* clnp_snet_check_mac */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/12/06 JRB 15 Add hPktSock extern. */
|
||||
/* 03/20/06 JRB 14 Add clnp_snet_write_raw. */
|
||||
/* Include clnp_usr.h (need some defs from it). */
|
||||
/* 07/25/05 JRB 13 Add comment explaining "lpdu_len". */
|
||||
/* 02/08/05 JRB 12 Increase ETHE_MAX_LEN_LSDU to 1518 to allow */
|
||||
/* for 802.1Q QTag Prefix. */
|
||||
/* Del ETYPE_UNITDATA, code no longer uses it. */
|
||||
/* Add clnp_snet_frame_to_udt. */
|
||||
/* Add clnp_snet_read_hook_*. */
|
||||
/* 11/20/02 ASK 11 Added ETYPE_UNITDATA struct, clnp_etype_write*/
|
||||
/* proto */
|
||||
/* 10/24/02 NAV 10 Add clnp_snet_rx_multicast_stop proto. */
|
||||
/* 11/15/01 JRB 09 Add more "multicast" functions. */
|
||||
/* Add clnpl_log_snsdu proto. */
|
||||
/* 02/21/00 JRB 08 Del "free_lpdu" flag from SN_UNITDATA, and */
|
||||
/* use portable "clnp_snet_free" instead. */
|
||||
/* 01/28/99 MDE 07 Added size to ETHE_ALL_ES, ETHE_ALL_IS */
|
||||
/* 11/30/98 JRB 06 Added Ethernet defines. */
|
||||
/* Added clnp_snet_add_multicast_mac prototype. */
|
||||
/* Added clnp_snet_check_mac prototype. */
|
||||
/* 09/23/97 EJV 05 Added clnp_snet_ext_write for UCA_SMP. */
|
||||
/* Aligned fields in SN_UNITDATA struct. */
|
||||
/* 06/19/97 EJV 04 Added clnp_snet_create_es_table prototype. */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 10/17/96 EJV 03 Added define SUBNET_PROFI. */
|
||||
/* 07/22/96 EJV 02 Added func clnp_snet_get_type () and defines */
|
||||
/* for implemented sub-networks SUBNET_ADLC and */
|
||||
/* SUBNET_ETHE. */
|
||||
/* 05/23/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CLNP_SNE_INCLUDED
|
||||
#define CLNP_SNE_INCLUDED
|
||||
|
||||
#include "clnp_usr.h" /* need CLNP_MAX_LEN_MAC & CLNP_PARAM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* implemented sub-networks types */
|
||||
#define SUBNET_ADLC 1
|
||||
#define SUBNET_ETHE 2
|
||||
#define SUBNET_PROFI 3
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Structure below is used to pass SN_UNITDATA to/from read/write */
|
||||
/* functions between the CLNP and CLNP-Subnetwork interface. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR loc_mac [CLNP_MAX_LEN_MAC]; /* Buffer for local MAC addr */
|
||||
ST_UCHAR rem_mac [CLNP_MAX_LEN_MAC]; /* Buffer for remote MAC addr */
|
||||
/* WARNING: The "lpdu_len" param does NOT always contain the PDU length.*/
|
||||
/* It contains the "Length/Type" field of the MAC frame as defined in */
|
||||
/* IEEE 802.3. Any value greater than or equal to 0x600 must be */
|
||||
/* interpreted as the "Type" of the MAC frame. */
|
||||
/* Renaming this parameter would clarify the code, but too much */
|
||||
/* existing code is already using it. */
|
||||
ST_UINT16 lpdu_len; /* IEEE 802.3 "Length/Type" field. */
|
||||
ST_UCHAR *lpdu; /* Pointer to LPDU buffer to send. */
|
||||
}SN_UNITDATA;
|
||||
|
||||
#define SN_UNITDATA_LEN sizeof (SN_UNITDATA)
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Defines for type of MAC address in received PDU. */
|
||||
/* Returned by "clnp_snet_check_mac". */
|
||||
/*----------------------------------------------------------------------*/
|
||||
#define CLNP_MAC_INVALID 0 /* Invalid MAC address (not one */
|
||||
/* of addresses def below) */
|
||||
#define CLNP_MAC_LOCAL 1 /* Our MAC address */
|
||||
#define CLNP_MAC_ALL_ES 2 /* All-ES (End Systems) address */
|
||||
#define CLNP_MAC_ALL_IS 3 /* All-IS (Intermediate Systems)*/
|
||||
#define CLNP_MAC_GOOSE 4 /* Possible GOOSE address */
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Defines and externs for Ethernet Subnetwork (SUBNET_ETHE) only. */
|
||||
/*----------------------------------------------------------------------*/
|
||||
#define ETHE_MAC_LEN 6
|
||||
|
||||
#define ETHE_LEN_HEAD (2*ETHE_MAC_LEN + 2)
|
||||
#define ETHE_MIN_LEN_LSDU 60
|
||||
/* Max len for normal frame is 1514, but with QTag Prefix it could be 1518*/
|
||||
#define ETHE_MAX_LEN_LSDU 1518
|
||||
#define ETHE_MAX_LEN_UDATA 1500 /* max. MAC User data length */
|
||||
|
||||
#define ETHE_LEN_QTAG_PREFIX 4 /* 802.1Q (VLAN) header length */
|
||||
#define ETHE_LEN_LENTYPE 2 /* MAC Len/type field length */
|
||||
|
||||
/* Ethernet frame structure */
|
||||
/* WARNING: This structure is not convenient for representing frames */
|
||||
/* containing the IEEE 802.1Q QTag Prefix. The QTag Prefix would come */
|
||||
/* between src_addr and frame_len in this structure. */
|
||||
/* Most code using this structure was written before QTag existed. */
|
||||
/* New code should not use this structure. */
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR dst_addr [ETHE_MAC_LEN]; /* destination MAC address */
|
||||
ST_UCHAR src_addr [ETHE_MAC_LEN]; /* source MAC address */
|
||||
ST_UCHAR frame_len[2]; /* total frame length */
|
||||
ST_UCHAR data_buf [ETHE_MAX_LEN_UDATA]; /* data buffer */
|
||||
} ETHE_FRAME;
|
||||
|
||||
#define ETHE_FRAME_LEN sizeof (ETHE_FRAME)
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Global variables. */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* All ES and all IS addresses */
|
||||
extern ST_UCHAR ETHE_ALL_ES [ETHE_MAC_LEN];
|
||||
extern ST_UCHAR ETHE_ALL_IS [ETHE_MAC_LEN];
|
||||
extern int hPktSock; /* Packet Socket handle (for LINUX, etc.) */
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Interface functions to underlying sub-network */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
ST_RET clnp_snet_init (CLNP_PARAM *clnp_param);
|
||||
ST_RET clnp_snet_term (ST_VOID);
|
||||
ST_RET clnp_snet_read (SN_UNITDATA *sn_req);
|
||||
ST_RET clnp_snet_write (SN_UNITDATA *sn_req);
|
||||
ST_RET clnp_etype_write (SN_UNITDATA *sn_req);
|
||||
/* clnp_snet_write_raw replaces OBSOLETE clnp_snet_write and clnp_etype_write.*/
|
||||
ST_RET clnp_snet_write_raw (
|
||||
ST_UCHAR *framePtr, /* Pointer to complete frame including MACs*/
|
||||
size_t frameLen); /* Length of complete frame */
|
||||
ST_VOID clnp_snet_free (SN_UNITDATA *sn_req);
|
||||
ST_VOID clnpl_log_snsdu (SN_UNITDATA *sn_req, ST_ULONG log_mask);
|
||||
ST_RET clnp_snet_add_multicast_mac (ST_UCHAR *mac_buf);
|
||||
ST_RET clnp_snet_set_multicast_filter (ST_UCHAR *mac_list, ST_INT num_macs);
|
||||
ST_RET clnp_snet_rx_all_multicast_start (ST_VOID);
|
||||
ST_RET clnp_snet_rx_all_multicast_stop (ST_VOID);
|
||||
ST_RET clnp_snet_rx_multicast_stop (ST_VOID);
|
||||
|
||||
ST_RET clnp_snet_ext_write (SN_UNITDATA *sn_req, ST_LONG user_id);
|
||||
ST_VOID clnp_snet_timer_tick (ST_VOID);
|
||||
|
||||
ST_RET clnp_snet_update_is (ST_UCHAR *rem_nsap, ST_UCHAR *rem_mac, ST_UINT16 holding_time);
|
||||
ST_RET clnp_snet_update_es (ST_UCHAR *rem_nsap, ST_UCHAR *rem_mac, ST_UINT16 holding_time);
|
||||
|
||||
ST_RET clnp_snet_lookup_is (ST_UCHAR *rem_mac);
|
||||
ST_RET clnp_snet_lookup_es (ST_UCHAR *rem_nsap, ST_UCHAR *rem_mac);
|
||||
|
||||
ST_RET clnp_snet_get_all_is_mac (ST_UCHAR *mac_buf);
|
||||
ST_RET clnp_snet_get_all_es_mac (ST_UCHAR *mac_buf);
|
||||
ST_RET clnp_snet_get_local_mac (ST_UCHAR *mac_buf);
|
||||
ST_UINT16 clnp_snet_get_max_udata_len (ST_VOID);
|
||||
ST_INT clnp_snet_get_type (ST_VOID);
|
||||
|
||||
ST_RET clnp_snet_create_es_table (ST_UINT max_count);
|
||||
ST_INT clnp_snet_check_mac (ST_UCHAR *mac_addr);
|
||||
|
||||
/* Add subnetwork read hook function to do custom processing of */
|
||||
/* received packets. */
|
||||
ST_RET clnp_snet_read_hook_add (
|
||||
ST_RET (*usr_fun)(SN_UNITDATA *sn_req)); /* hook function*/
|
||||
|
||||
/* Remove subnetwork read hook function (i.e. stop custom processing). */
|
||||
ST_RET clnp_snet_read_hook_remove (
|
||||
ST_RET (*usr_fun)(SN_UNITDATA *sn_req)); /* hook function*/
|
||||
|
||||
/* Process all subnetwork read hook functions. */
|
||||
ST_RET clnp_snet_read_hook_process (SN_UNITDATA *sn_req);
|
||||
|
||||
/* Copy data from raw frame to SN_UNITDATA struct. */
|
||||
ST_RET clnp_snet_frame_to_udt (ST_UINT8 *frame_buf, /* ptr to raw frame*/
|
||||
ST_INT frame_len, /* len of raw frame*/
|
||||
SN_UNITDATA *sn_req,
|
||||
ST_INT udata_max_len); /* max user data len */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
125
include/mmslite/clnp_sta.h
Normal file
125
include/mmslite/clnp_sta.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnp_sta.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file defines the statistics for the */
|
||||
/* Connectionless-mode Network Protocol (CLNP). */
|
||||
/* */
|
||||
/* Note: Compile the whole project with CLNP_STAT define to */
|
||||
/* keep statistics of CLNP operation. */
|
||||
/* */
|
||||
/* GLOBAL STRUCTURES DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* CLNP_STATS struct */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 05/23/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#ifndef CLNP_STA_INCLUDED
|
||||
#define CLNP_STA_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* struct below describes the statistics recorded by the CLNP */
|
||||
|
||||
/* Statistics for PDUs */
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT cnt_sent; /* Number of sent PDUs */
|
||||
ST_UINT cnt_rcvd; /* Number of received PDUs */
|
||||
ST_UINT cnt_expired; /* Number of expired PDUs */
|
||||
ST_UINT cnt_discarded; /* Number of discarded PDUs */
|
||||
}CLNP_PDU_STAT;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CLNP_PDU_STAT all_pdu; /* stats for all PDUs */
|
||||
CLNP_PDU_STAT dt_pdu; /* stats for DT PDUs */
|
||||
CLNP_PDU_STAT er_pdu; /* stats for ER PDUs */
|
||||
}CLNP_STATS;
|
||||
|
||||
#define CLNP_STATS_LEN sizeof (CLNP_STATS)
|
||||
|
||||
|
||||
ST_RET clnp_stats_reset (ST_VOID);
|
||||
CLNP_STATS *clnp_stats_get (ST_VOID);
|
||||
|
||||
|
||||
#if defined(CLNP_STAT)
|
||||
|
||||
extern CLNP_STATS clnp_stats;
|
||||
|
||||
/* macros to increment all PDUs statistics */
|
||||
|
||||
#define CLNP_STAT_INC_PDU_SENT {clnp_stats.all_pdu.cnt_sent += 1;}
|
||||
#define CLNP_STAT_INC_PDU_RECEIVED {clnp_stats.all_pdu.cnt_rcvd += 1;}
|
||||
#define CLNP_STAT_INC_PDU_EXPIRED {clnp_stats.all_pdu.cnt_expired += 1;}
|
||||
#define CLNP_STAT_INC_PDU_DISCARDED {clnp_stats.all_pdu.cnt_discarded += 1;}
|
||||
|
||||
/* macros to increment DT PDU statistics */
|
||||
|
||||
#define CLNP_STAT_INC_DT_SENT {clnp_stats.dt_pdu.cnt_sent += 1;}
|
||||
#define CLNP_STAT_INC_DT_RECEIVED {clnp_stats.dt_pdu.cnt_rcvd += 1;}
|
||||
#define CLNP_STAT_INC_DT_EXPIRED {clnp_stats.dt_pdu.cnt_expired += 1;}
|
||||
#define CLNP_STAT_INC_DT_DISCARDED {clnp_stats.dt_pdu.cnt_discarded += 1;}
|
||||
|
||||
/* macros to increment ER PDU statistics */
|
||||
|
||||
#define CLNP_STAT_INC_ER_SENT {clnp_stats.er_pdu.cnt_sent += 1;}
|
||||
#define CLNP_STAT_INC_ER_RECEIVED {clnp_stats.er_pdu.cnt_rcvd += 1;}
|
||||
#define CLNP_STAT_INC_ER_EXPIRED {clnp_stats.er_pdu.cnt_expired += 1;}
|
||||
#define CLNP_STAT_INC_ER_DISCARDED {clnp_stats.er_pdu.cnt_discarded += 1;}
|
||||
|
||||
#else
|
||||
|
||||
/* macros if CLNP_STAT is not defined */
|
||||
|
||||
/* macros to increment all PDU statistics */
|
||||
|
||||
#define CLNP_STAT_INC_PDU_SENT
|
||||
#define CLNP_STAT_INC_PDU_RECEIVED
|
||||
#define CLNP_STAT_INC_PDU_EXPIRED
|
||||
#define CLNP_STAT_INC_PDU_DISCARDED
|
||||
|
||||
/* macros to increment DT PDU statistics */
|
||||
|
||||
#define CLNP_STAT_INC_DT_SENT
|
||||
#define CLNP_STAT_INC_DT_RECEIVED
|
||||
#define CLNP_STAT_INC_DT_EXPIRED
|
||||
#define CLNP_STAT_INC_DT_DISCARDED
|
||||
|
||||
/* macros to increment ER PDU statistics */
|
||||
|
||||
#define CLNP_STAT_INC_ER_SENT
|
||||
#define CLNP_STAT_INC_ER_RECEIVED
|
||||
#define CLNP_STAT_INC_ER_EXPIRED
|
||||
#define CLNP_STAT_INC_ER_DISCARDED
|
||||
|
||||
#endif /* end of CLNP_STAT defined */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
45
include/mmslite/clnp_tnt.h
Normal file
45
include/mmslite/clnp_tnt.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef CLNP_TNT_INCLUDED
|
||||
#define CLNP_TNT_INCLUDED
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1998 - 2000 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : clnp_tnt.h */
|
||||
/* PRODUCT(S) : Lean-T Stack (Phar Lap TNT ETS port only) */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Stub function prototypes for Phar Lap TNT ETS. Ethernet drivers */
|
||||
/* must be modified to call these functions instead of the normal */
|
||||
/* functions in the Phar Lap TCP/IP stack. This allows the SISCO */
|
||||
/* OSI stack to intercept these calls and and do any necessary OSI */
|
||||
/* processing before passing them on to the Phar Lap TCP/IP stack. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/05/00 JRB 03 Remove last chg. No longer needed. */
|
||||
/* 03/19/99 EJV 02 pfXmit has 4 parameters in Phar Lap ver 9.1 */
|
||||
/* (with NE2K patch) */
|
||||
/* Introduced the _PHARLAP91_PATCHED define */
|
||||
/* 10/30/98 JRB 01 Created */
|
||||
/************************************************************************/
|
||||
int __cdecl stubEtsTCPSetDeviceEthernetInfo(DEVHANDLE hDriver,
|
||||
char *pEnetStationAddr);
|
||||
int __cdecl stubEtsTCPRegisterDeviceFuncs(DEVHANDLE hDevice,
|
||||
int (__cdecl *pfUpDown)(DEVHANDLE hDevice,
|
||||
unsigned short goingUp,
|
||||
char *options),
|
||||
int (__cdecl *pfIoctl)(DEVHANDLE hDevice, int mode),
|
||||
int (__cdecl *pfXmit)(DEVHANDLE hDevice,
|
||||
long *pPacket, int packetLen),
|
||||
int (__cdecl *pfSend)(void *pPacketHdr));
|
||||
|
||||
void __cdecl stubEtsTCPQueueRecvBuffer(DEVHANDLE hDriver, void *hMsg,
|
||||
int pkt_len,
|
||||
char *pRecvBuf);
|
||||
|
||||
#endif /* !CLNP_TNT_INCLUDED */
|
||||
462
include/mmslite/clnp_usr.h
Normal file
462
include/mmslite/clnp_usr.h
Normal file
@@ -0,0 +1,462 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnp_usr.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file defines the interface between the */
|
||||
/* Connectionless-mode Network Protocol (CLNP) and the */
|
||||
/* CLNP-user in order to exchange Network Service Data */
|
||||
/* Units (NSDUs). */
|
||||
/* Note that the CLNP is implemented as non-segmenting */
|
||||
/* subset of the full protocol. */
|
||||
/* */
|
||||
/* For information see the: */
|
||||
/* ISO 8473 "Information processing systems - Data communication - */
|
||||
/* Protocol providing the connectionless-mode network service"; */
|
||||
/* ISO 8348 "Information processing systems - Data communication - */
|
||||
/* Network service definition. Addendum 1: Connectionless-mode */
|
||||
/* transmission". */
|
||||
/* ISO 9542 "Information processing systems - Telecommunications */
|
||||
/* and information exchange beetween systems - End system to */
|
||||
/* Intermediate system routing exchange protocol for use with */
|
||||
/* ISO 8473. */
|
||||
/* */
|
||||
/* */
|
||||
/* GLOBAL STRUCTURES DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* CLNP_PARAM struct */
|
||||
/* N_UNITDATA struct */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* clnp_init */
|
||||
/* clnp_end */
|
||||
/* clnp_alloc */
|
||||
/* clnp_free */
|
||||
/* clnp_read */
|
||||
/* clnp_write */
|
||||
/* clnp_timer_tick */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/10/07 JRB 09 Add network_device to CLNP_PARAM. */
|
||||
/* 10/24/03 JRB 08 Move clnp_debug_sel to slog.h. */
|
||||
/* 02/29/00 JRB 07 Add clnp_status proto. */
|
||||
/* 08/11/99 JRB 06 Add DBL_LNK to N_UNITDATA for multithreading.*/
|
||||
/* 08/05/99 JRB 05 Clean up multithreading. */
|
||||
/* 08/02/99 JRB 04 Use glbsem for multithreading. */
|
||||
/* 07/30/99 JRB 03 Add "multi-threading" support. */
|
||||
/* 12/04/98 JRB 02 Add "loc_nsap" to N_UNITDATA. */
|
||||
/* 08/13/98 JRB 01 Lint cleanup. */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 04/10/97 JRB 06 Moved error defs from clnp_err.h to here */
|
||||
/* and changed to use base from "glberror.h". */
|
||||
/* 03/03/97 EJV 05 Removed CLNP_LOG_ALWAYS */
|
||||
/* 10/04/96 JRB 04 Added loc_mac to N_UNITDATA. */
|
||||
/* 07/22/96 EJV 03 Changed CLNP_DEF_ESH_DELAY from 5 to 0. */
|
||||
/* 07/19/96 EJV 02 Removed ns_userdata_len from clnp_param */
|
||||
/* Moved CLNP_DEF_LEN_HDR to clnp.h and deleted */
|
||||
/* unused defines */
|
||||
/* 05/23/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CLNP_USR_INCLUDED
|
||||
#define CLNP_USR_INCLUDED
|
||||
|
||||
#include "gen_list.h" /* Need DBL_LNK definition. */
|
||||
#include "glbsem.h" /* Need ST_EVENT_SEM definition. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Error codes returned from the CLNP interface funcs to the CLNP-user */
|
||||
/* NOTE: Values begin from E_CLNP (found in glberror.h). */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* CLNP general errors */
|
||||
#define CLNP_ERR_CFG_FILE 0x3400 /* Errors found in cfg file (or required*/
|
||||
/* params not configured = local MAC and*/
|
||||
/* local NSAP) */
|
||||
#define CLNP_ERR_NOT_INIT 0x3401 /* CLNP has not been initialized */
|
||||
#define CLNP_ERR_MEM_ALLOC 0x3402 /* allocating memory failed */
|
||||
#define CLNP_ERR_NULL_PTR 0x3403 /* NULL pointer passed to clnp_... func */
|
||||
|
||||
/* CLNP parsing clnp_param structure errors */
|
||||
/* -&-&- */
|
||||
/* CAN NOT recover from this parameter error !!! */
|
||||
#define CLNP_ERR_NSAP_LEN 0x3404 /* NSAP length is 0 or more then allowed*/
|
||||
/* CAN recover from parameter errors below */
|
||||
#define CLNP_ERR_LIFETIME 0x3405 /* Invalid PDU lifetime */
|
||||
#define CLNP_ERR_LIFETIME_DEC 0x3406 /* Invalid PDU lifetime decrement value */
|
||||
#define CLNP_ERR_ESH_CFG_TIMER 0x3407 /* Invalid ESH Configuration Timer value*/
|
||||
#define CLNP_ERR_ESH_DELAY 0x3408 /* Invalid delay value for first ESH */
|
||||
#define CLNP_ERR_MAC_ADDR 0x3409 /* Local MAC address not configured */
|
||||
/* (for ADLC sub-network) */
|
||||
#define CLNP_ERR_UDATA_LEN 0x3410 /* CLNP-user data length (too big) */
|
||||
/* last error code is also used for CLNP PDU encoding error */
|
||||
/* -&-&- */
|
||||
|
||||
/* CLNP PDU parsing (decoding) errors */
|
||||
#define CLNP_ERR_PDU_MAC_ADDR 0x3420 /* The NPDU MAC address is not local MAC*/
|
||||
/* or All ES MAC. */
|
||||
#define CLNP_ERR_PDU_ID 0x3421 /* invalid/not supported PDU identifier */
|
||||
#define CLNP_ERR_PDU_VER 0x3422 /* invalid/not supported PDU version */
|
||||
#define CLNP_ERR_PDU_TYPE 0x3423 /* invalid/not supported PDU type */
|
||||
#define CLNP_ERR_PDU_LEN 0x3424 /* received PDU len does not match the */
|
||||
/* len indicated by sub-network */
|
||||
#define CLNP_ERR_PDU_EXPIRED 0x3425 /* DT or ER PDU's lifetime expired */
|
||||
#define CLNP_ERR_PDU_NSAP_ADDR 0x3426 /* PDU not addressed to our local NSAP */
|
||||
#define CLNP_ERR_PDU_SEGMENTING 0x3427 /* Segmented PDUs not supported */
|
||||
#define CLNP_ERR_PDU_CHECKSUM 0x3428 /* PDU checksum verification failed */
|
||||
#define CLNP_ERR_PDU_LAST_SEG 0x3429 /* Last seg bit not set (unsegmented PDU)*/
|
||||
#define CLNP_ERR_PDU_ER_PDU 0x342A /* code turned off for ER PDU processing*/
|
||||
|
||||
/* LLC encoding/decoding errors */
|
||||
#define LLC_ERR_SRC_ADDR 0x3481 /* LLC header Source field invalid */
|
||||
#define LLC_ERR_DEST_ADDR 0x3482 /* LLC header Dest filed invalid */
|
||||
#define LLC_ERR_CONTROL 0x3483 /* LLC header Control field invalid */
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Error codes returned from the sub-network interface functions. */
|
||||
/* NOTE: Values begin from E_SUBNET (found in glberror.h). */
|
||||
/*----------------------------------------------------------------------*/
|
||||
#define SNET_ERR_INIT 0x3501 /* Init sub-net interface failed*/
|
||||
#define SNET_ERR_WRITE 0x3502 /* sub-net write func failed */
|
||||
#define SNET_ERR_READ 0x3503 /* sub-net read func failed or no data */
|
||||
#define SNET_ERR_MAC_INVALID 0x3504 /* invalid MAC address, unable */
|
||||
/* to obtain requested ALL ES, */
|
||||
/* ALL IS, or local MAC address.*/
|
||||
#define SNET_ERR_FRAME_LEN 0x3505 /* received more data than */
|
||||
/* reserved in buffer. */
|
||||
#define SNET_ERR_UDATA_LEN 0x3506 /* invalid len of data to send (too large)*/
|
||||
|
||||
/* sub-net errors specific to the Ethernet driver */
|
||||
#define SNET_ERR_DRV_OPEN 0x3520 /* open driver failed */
|
||||
#define SNET_ERR_DRV_LOC_MAC 0x3521 /* obtain local MAC addr from driver failed*/
|
||||
#define SNET_ERR_DRV_ADD_ES_ADDR 0x3522 /* add All ES Address failed */
|
||||
#define SNET_ERR_DRV_BIND_LSAP 0x3523 /* bind to LSAP failed */
|
||||
#define SNET_ERR_DRV_POST_BUFS 0x3524 /* post buffers to driver failed*/
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* CLNP logging types */
|
||||
|
||||
#define CLNP_LOG_ERR 0x00000001L
|
||||
#define CLNP_LOG_NERR 0x00000002L
|
||||
|
||||
/* to log CLNP-user indication or request */
|
||||
#define CLNP_LOG_REQ 0x00000010L
|
||||
#define CLNP_LOG_IND 0x00000020L
|
||||
|
||||
/* to log CLNP encoding/decoding or LLC encoding/decoding */
|
||||
|
||||
#define CLNP_LOG_ENC_DEC 0x00000100L
|
||||
#define CLNP_LOG_LLC_ENC_DEC 0x00000200L
|
||||
|
||||
/* to log data read/written to sub-network */
|
||||
#define CLSNS_LOG_REQ 0x00001000L
|
||||
#define CLSNS_LOG_IND 0x00002000L
|
||||
|
||||
/* CLNP is using clnp_debug_sel variable to turn on/off different */
|
||||
/* types of logging (see slog.h). */
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* The defines with CLNP_MAX_... specify the maximum values the */
|
||||
/* ISO 8473 or this implementation allows. The CLNP_DEF_... defines */
|
||||
/* specify the default values used to initialize the CLNP_PARAM struct. */
|
||||
/* */
|
||||
/* Note: The max length of NS-USERDATA is 64512 bytes but this number */
|
||||
/* is limited by underlying sub-network to: */
|
||||
/* for ADLC -> 32676 - CLNP_DEF_LEN_HDR - LLC_HDR_LEN */
|
||||
/* for Ethernet -> 1500 - CLNP_DEF_LEN_HDR - LLC_HDR_LEN */
|
||||
|
||||
|
||||
#define CLNP_MAX_LEN_MAC 6 /* Max len of MAC addr */
|
||||
#define CLNP_MAX_LEN_NSAP 20 /* Max len of NSAP addr */
|
||||
|
||||
#define CLNP_MIN_PDU_LIFETIME (ST_UCHAR) 1 /* min PDU lifetime in 500msec units */
|
||||
#define CLNP_MAX_PDU_LIFETIME (ST_UCHAR) 255 /* max PDU lifetime in 500msec units */
|
||||
#define CLNP_DEF_PDU_LIFETIME (ST_UCHAR) 50 /* def PDU lifetime in 500msec units */
|
||||
#define CLNP_DEF_PDU_LIFETIME_DEC (ST_UCHAR) 1 /* PDU lifetime decrement (in 500msec units) */
|
||||
|
||||
|
||||
#define CLNP_MAX_ESH_CFG_TIMER (ST_UINT16) 32767 /* max value for ESH Configuration Timer, it is */
|
||||
/* related to Holding Time in ESH which is */
|
||||
/* 2*CfgTimer=2*32767=65534 (must be ST_UINT16) */
|
||||
#define CLNP_DEF_ESH_CFG_TIMER (ST_UINT16) 120 /* default ESH Configuration Timer (in seconds) */
|
||||
#define CLNP_DEF_ESH_DELAY (ST_UINT16) 0 /* default delay before first ESH will be sent */
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* CLNP_PARAM struct */
|
||||
/* */
|
||||
/* This struct is used to supply actual parameters needed for operation */
|
||||
/* of the CLNP. */
|
||||
/* It is set by the NS-USER during call to clnp_init() function from */
|
||||
/* configuration file or from hard coded module clnp_hc.c. */
|
||||
/* */
|
||||
/* NOTE: The NSAP address is represented as sequence of unsigned bytes. */
|
||||
/* The first byte is the length of the NSAP address. This makes */
|
||||
/* it easy to put the NSAP to PDU. */
|
||||
/* Note: The pdu_lifetime_dec specifies by how many units the lifetime */
|
||||
/* value in received DT or ER PDU should be decremented. It has */
|
||||
/* to be at least 1. In case the transit delay plus processing */
|
||||
/* time is larger then 500msec the pdu_life_time_dec should be */
|
||||
/* adjusted accordingly. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UCHAR pdu_lifetime; /* PDU lifetime (in 500 msec units) for */
|
||||
/* outgoing DT PDUs. */
|
||||
/* init to CLNP_DEF_PDU_LIFETIME */
|
||||
ST_UCHAR pdu_lifetime_dec; /* PDU lifetime decrement (1=500msec) */
|
||||
/* for incomming DT or ER PDUs. */
|
||||
/* init to CLNP_DEF_PDU_LIFETIME_DEC */
|
||||
ST_UINT16 esh_cfg_timer; /* How often we report our presence to */
|
||||
/* other network entities (in seconds) */
|
||||
/* init to CLNP_DEF_ESH_CFG_TIMER */
|
||||
ST_UINT16 esh_delay; /* Delay time before first ESH is sent */
|
||||
/* init to CLNP_DEF_ESH_DELAY */
|
||||
ST_UCHAR loc_mac [CLNP_MAX_LEN_MAC]; /* Local MAC address */
|
||||
/* For ADLC the NS-USER sets the loc_mac*/
|
||||
/* DEBUG: Now the loc_mac has to match */
|
||||
/* the address in adlc.cfg !!! */
|
||||
/* For the Ethernet this param will be */
|
||||
/* read from the driver during init. */
|
||||
ST_UCHAR loc_nsap [1+CLNP_MAX_LEN_NSAP];/* Local len & NSAP address */
|
||||
ST_CHAR *network_device; /* network device name. May be used to */
|
||||
/* select device on some platforms */
|
||||
}CLNP_PARAM;
|
||||
|
||||
#define CLNP_PARAM_LEN sizeof (CLNP_PARAM)
|
||||
|
||||
|
||||
extern CLNP_PARAM clnp_param; /* This struct holds parameters needed */
|
||||
/* for the CLNP operations. */
|
||||
/* It is set by the CLNP-user before */
|
||||
/* calling the clnp_init() function. */
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* N_UNITDATA struct */
|
||||
/* */
|
||||
/* This struct is used to pass N_UNITDATA request primitive to CLNP */
|
||||
/* and to receive N_UNITDATA indication from CLNP. */
|
||||
/* This struct uses the following trick to make the size of data buffer */
|
||||
/* configurable: */
|
||||
/* The last entry in the structure is a tiny (2 bytes) buffer. */
|
||||
/* To allow for any size data_buf, we can allocate extra bytes */
|
||||
/* after this struct. */
|
||||
/* For example if we want data_buf to be 4096 bytes, we could use */
|
||||
/* the following malloc call: */
|
||||
/* N_UNITDATA *req = malloc (sizeof (N_UNITDATA) + 4096 - 2 ); */
|
||||
/* The buffer can then be filled in, for example, as follow: */
|
||||
/* memcpy (req->data_buf, raw_data, 4096); */
|
||||
/* */
|
||||
/* NOTE: The "Local NSAP" is not passed back and forth in this struct. */
|
||||
/* Only one local NSAP is allowed. */
|
||||
/* */
|
||||
/* NOTE: The NSAP address is represented as sequence of unsigned bytes. */
|
||||
/* The first byte is the length of the NSAP address. This makes */
|
||||
/* it easy to get a NSAP from a NSDU. */
|
||||
|
||||
|
||||
#define CLNP_MIN_LEN_UDATA 2
|
||||
/* min length of data_buf defined in */
|
||||
/* N_UNITDATA struct. Do not use 1 */
|
||||
/* because optimizer may NOT treat this */
|
||||
/* field as an array. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DBL_LNK link; /* for multithreading, must go on linked list */
|
||||
ST_BOOLEAN rem_mac_valid; /* SD_TRUE if MAC addr valid */
|
||||
ST_UCHAR loc_mac [CLNP_MAX_LEN_MAC]; /* Local MAC addr */
|
||||
ST_UCHAR rem_mac [CLNP_MAX_LEN_MAC]; /* Remote MAC addr */
|
||||
ST_UCHAR loc_nsap [1+CLNP_MAX_LEN_NSAP]; /* Local len & NSAP addr*/
|
||||
ST_UCHAR rem_nsap [1+CLNP_MAX_LEN_NSAP]; /* Remote len & NSAP addr */
|
||||
ST_UINT16 data_len; /* Data length in bytes */
|
||||
ST_UCHAR data_buf [CLNP_MIN_LEN_UDATA]; /* Data buffer */
|
||||
}N_UNITDATA;
|
||||
|
||||
#define N_UNITDATA_LEN sizeof (N_UNITDATA)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_init */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function will initialize the operation of CLNP and the interface*/
|
||||
/* to underlying sub-network. */
|
||||
/* The CLNP-user should set the parameters in the clnp_param structure */
|
||||
/* before calling this function. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_UINT ns_userdata_len Max size of NS-USERDATA */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if initialization successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET clnp_init (ST_UINT ns_userdata_len);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_end */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function will terminate the operation of the CLNP and cleanup */
|
||||
/* the interface to underlying subnetwork. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_VOID none */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if termination successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET clnp_end (ST_VOID);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_alloc */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function will allocate a buffer for N_UNITDATA to pass data */
|
||||
/* between the CLNP and the CLNP-user. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_UINT data_len Length of data in bytes. The length */
|
||||
/* of CLNP-user data has to be: */
|
||||
/* 0 < data_len <= CLNP_MAX_LEN_UDATA */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* N_UNITDATA * pointer to allocated memory */
|
||||
/* NULL if function fails to alloc memory */
|
||||
/************************************************************************/
|
||||
N_UNITDATA *clnp_alloc (ST_UINT data_len);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_free */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function will free buffer allocated for N_UNITDATA passed */
|
||||
/* between the CLNP and the CLNP-user. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* N_UNITDATA * memory pointer to free */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID clnp_free (N_UNITDATA *req);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_read */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function is used by the CLNP-user to read N_UNITDATA.indication */
|
||||
/* from the CLNP. */
|
||||
/* The CLNP-user should free the returned pointer after the indication */
|
||||
/* has been processed. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_VOID none */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* N_UNITDATA * ptr to received N_UNITDATA.indication */
|
||||
/* NULL if N_UNITDATA.indication not received */
|
||||
/************************************************************************/
|
||||
N_UNITDATA *clnp_read (ST_VOID);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_write */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function is used by the CLNP-user to write N_UNITDATA.request */
|
||||
/* to the CLNP. */
|
||||
/* The CLNP will free the req pointer. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* N_UNITDATA *req ptr to N_UNITDATA.request to send */
|
||||
/* This pointer should be allocated using */
|
||||
/* the clnp_alloc function. */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if N_UNITDATA.request sent successfully */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET clnp_write (N_UNITDATA *req);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_timer_tick */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function is called on 1 second intervals by the CLNP-user (TP4) */
|
||||
/* When this function is called, CLNP decrements the Configuration */
|
||||
/* Timer (used to trigger sending of ES-Hellos), and the Holding Timers */
|
||||
/* (used to trigger clearing the {NSAP,MAC} table entries). */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_VOID none */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID none */
|
||||
/************************************************************************/
|
||||
ST_VOID clnp_timer_tick (ST_VOID);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_config */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function will initialize the CLNP parameters. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_VOID none */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if configuration successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET clnp_config (ST_VOID);
|
||||
|
||||
/************************************************************************/
|
||||
/* clnp_status */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function checks to see if CLNP is running. */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS if running, else error code. */
|
||||
/************************************************************************/
|
||||
ST_RET clnp_status (ST_VOID);
|
||||
|
||||
/************************************************************************/
|
||||
/* Multi-threading prototypes and externs. */
|
||||
/************************************************************************/
|
||||
ST_RET clnp_read_thread_start (ST_VOID);
|
||||
N_UNITDATA *clnp_read_main (ST_VOID);
|
||||
N_UNITDATA *clnp_read_goose (ST_VOID);
|
||||
|
||||
extern N_UNITDATA * (*clnp_read_fun_cl) (ST_VOID); /* Function ptr.*/
|
||||
extern N_UNITDATA * (*clnp_read_fun_co) (ST_VOID); /* Function ptr.*/
|
||||
extern ST_EVENT_SEM hMMSEvent;
|
||||
extern ST_EVENT_SEM hMainEvent;
|
||||
extern ST_EVENT_SEM hGooseEvent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
|
||||
52
include/mmslite/clnpport.h
Normal file
52
include/mmslite/clnpport.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : clnpport.h */
|
||||
/* PRODUCT(S) : Lean-T Stack */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file specifies defines which should be */
|
||||
/* ported for use by specific system. */
|
||||
/* */
|
||||
/* For information see the: */
|
||||
/* ISO 8473 "Information processing systems - Data communication - */
|
||||
/* Protocol providing the connectionless-mode network service"; */
|
||||
/* ISO 8348 "Information processing systems - Data communication - */
|
||||
/* Network service definition. Addendum 1: Connectionless-mode */
|
||||
/* transmission". */
|
||||
/* ISO 9542 "Information processing systems - Telecommunications */
|
||||
/* and information exchange beetween systems - End system to */
|
||||
/* Intermediate system routing exchange protocol for use with */
|
||||
/* ISO 8473. */
|
||||
/* */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 05/06/97 EJV 02 Removed SWAP_SHORT macro */
|
||||
/* 05/31/96 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef CLNPPORT_INCLUDED
|
||||
#define CLNPPORT_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE: This file currently is empty. It may be used in the future */
|
||||
/* to implement code specific to an operating system. */
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
101
include/mmslite/conpack.h
Normal file
101
include/mmslite/conpack.h
Normal file
@@ -0,0 +1,101 @@
|
||||
#define NDIS_PACKET_TYPE_DIRECTED 0x0001
|
||||
#define NDIS_PACKET_TYPE_MULTICAST 0x0002
|
||||
#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x0004
|
||||
#define NDIS_PACKET_TYPE_BROADCAST 0x0008
|
||||
#define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x0010
|
||||
#define NDIS_PACKET_TYPE_PROMISCUOUS 0x0020
|
||||
#define NDIS_PACKET_TYPE_SMT 0x0040
|
||||
#define NDIS_PACKET_TYPE_MAC_FRAME 0x8000
|
||||
#define NDIS_PACKET_TYPE_FUNCTIONAL 0x4000
|
||||
#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x2000
|
||||
#define NDIS_PACKET_TYPE_GROUP 0x1000
|
||||
|
||||
#define OID_GEN_SUPPORTED_LIST 0x00010101
|
||||
#define OID_GEN_HARDWARE_STATUS 0x00010102
|
||||
#define OID_GEN_MEDIA_SUPPORTED 0x00010103
|
||||
#define OID_GEN_MEDIA_IN_USE 0x00010104
|
||||
#define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105
|
||||
#define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106
|
||||
#define OID_GEN_LINK_SPEED 0x00010107
|
||||
#define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108
|
||||
#define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109
|
||||
#define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A
|
||||
#define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B
|
||||
#define OID_GEN_VENDOR_ID 0x0001010C
|
||||
#define OID_GEN_VENDOR_DESCRIPTION 0x0001010D
|
||||
#define OID_GEN_CURRENT_PACKET_FILTER 0x0001010E
|
||||
#define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F
|
||||
#define OID_GEN_DRIVER_VERSION 0x00010110
|
||||
#define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111
|
||||
#define OID_GEN_PROTOCOL_OPTIONS 0x00010112
|
||||
#define OID_GEN_MAC_OPTIONS 0x00010113
|
||||
|
||||
#define OID_GEN_XMIT_OK 0x00020101
|
||||
#define OID_GEN_RCV_OK 0x00020102
|
||||
#define OID_GEN_XMIT_ERROR 0x00020103
|
||||
#define OID_GEN_RCV_ERROR 0x00020104
|
||||
#define OID_GEN_RCV_NO_BUFFER 0x00020105
|
||||
|
||||
#define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201
|
||||
#define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202
|
||||
#define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203
|
||||
#define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204
|
||||
#define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205
|
||||
#define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206
|
||||
#define OID_GEN_DIRECTED_BYTES_RCV 0x00020207
|
||||
#define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208
|
||||
#define OID_GEN_MULTICAST_BYTES_RCV 0x00020209
|
||||
#define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A
|
||||
#define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B
|
||||
#define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C
|
||||
|
||||
#define OID_GEN_RCV_CRC_ERROR 0x0002020D
|
||||
#define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E
|
||||
|
||||
|
||||
//
|
||||
// 802.3 Objects (Ethernet)
|
||||
//
|
||||
|
||||
#define OID_802_3_PERMANENT_ADDRESS 0x01010101
|
||||
#define OID_802_3_CURRENT_ADDRESS 0x01010102
|
||||
#define OID_802_3_MULTICAST_LIST 0x01010103
|
||||
#define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
|
||||
|
||||
#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
|
||||
#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
|
||||
#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
|
||||
|
||||
#define OID_802_3_XMIT_DEFERRED 0x01020201
|
||||
#define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
|
||||
#define OID_802_3_RCV_OVERRUN 0x01020203
|
||||
#define OID_802_3_XMIT_UNDERRUN 0x01020204
|
||||
#define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205
|
||||
#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
|
||||
#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
|
||||
|
||||
//
|
||||
// WAN objects
|
||||
//
|
||||
|
||||
#define OID_WAN_PERMANENT_ADDRESS 0x04010101
|
||||
#define OID_WAN_CURRENT_ADDRESS 0x04010102
|
||||
#define OID_WAN_QUALITY_OF_SERVICE 0x04010103
|
||||
#define OID_WAN_PROTOCOL_TYPE 0x04010104
|
||||
#define OID_WAN_MEDIUM_SUBTYPE 0x04010105
|
||||
#define OID_WAN_HEADER_FORMAT 0x04010106
|
||||
|
||||
#define OID_WAN_GET_INFO 0x04010107
|
||||
#define OID_WAN_SET_LINK_INFO 0x04010108
|
||||
#define OID_WAN_GET_LINK_INFO 0x04010109
|
||||
|
||||
#define OID_WAN_LINE_COUNT 0x0401010A
|
||||
|
||||
#define OID_WAN_GET_BRIDGE_INFO 0x0401020A
|
||||
#define OID_WAN_SET_BRIDGE_INFO 0x0401020B
|
||||
#define OID_WAN_GET_COMP_INFO 0x0401020C
|
||||
#define OID_WAN_SET_COMP_INFO 0x0401020D
|
||||
#define OID_WAN_GET_STATS_INFO 0x0401020E
|
||||
|
||||
|
||||
|
||||
68
include/mmslite/copp.h
Normal file
68
include/mmslite/copp.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : copp.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* COPP internal header file. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/11/01 JRB 04 Convert to use ASN1R. */
|
||||
/* 02/20/98 JRB 03 Chg abort_reason to ST_INT8 too. */
|
||||
/* 12/22/97 JRB 02 Use ST_INT8. */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 03/05/97 JRB 01 Created. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef COPP_INCLUDED
|
||||
#define COPP_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "copp_usr.h"
|
||||
#include "copp_log.h"
|
||||
|
||||
/*======================================================*/
|
||||
/* C O N N E C T I O N S T A T E S */
|
||||
/*======================================================*/
|
||||
|
||||
/* Valid states, the first IDLE state must be 0) */
|
||||
#define COPP_STATE_IDLE 0
|
||||
#define COPP_STATE_AWAIT_CPA 1
|
||||
#define COPP_STATE_AWAIT_CON_RSP 2
|
||||
#define COPP_STATE_CONNECTED 3
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION INTERNAL FUNCTIONS */
|
||||
/*======================================================*/
|
||||
|
||||
/* Function to encode and send ARP PPDU. */
|
||||
ST_VOID copp_p_abort_req (ACSE_CONN *acse_conn, ST_INT8 abort_reason, ST_INT8 event_id);
|
||||
ST_VOID START_p_user_data (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION INTERNAL VARIABLES */
|
||||
/*======================================================*/
|
||||
|
||||
extern ST_UCHAR only_loc_psel []; /* Local len & PSEL */
|
||||
extern ST_BOOLEAN p_user_data_is_outer; /* Is P-User-data outermost constr?*/
|
||||
/* SD_TRUE or SD_FALSE */
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* COPP_INCLUDED */
|
||||
/************************************************************************/
|
||||
|
||||
167
include/mmslite/copp_log.h
Normal file
167
include/mmslite/copp_log.h
Normal file
@@ -0,0 +1,167 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997 - 2007, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : copp_log.h */
|
||||
/* PRODUCT(S) : MOSI Stack (over TP4) */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file contains logging macros for COPP. */
|
||||
/* Note: To compile logging functions use the DEBUG_SISCO define */
|
||||
/* in the project make file. */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 11/01/07 EJV 05 Updated COPP_LOG_* macros to use SLOG_n. */
|
||||
/* 09/13/99 MDE 04 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 03 Migrated to updated SLOG interface */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 03/19/97 JRB 02 General cleanup. */
|
||||
/* 02/20/97 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef COPP_LOG_INCLUDED
|
||||
#define COPP_LOG_INCLUDED
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* NOTE: COPP log masks and acse_debug_sel are defined in acse2usr.h */
|
||||
|
||||
#if defined(DEBUG_SISCO)
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _copp_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _copp_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _copp_dec_hex_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _copp_enc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _copp_enc_hex_logstr;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* hard errors logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COPP_LOG_ERR0(a) \
|
||||
SLOG_0 (acse_debug_sel & COPP_LOG_ERR,_copp_err_logstr,a)
|
||||
|
||||
#define COPP_LOG_ERR1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & COPP_LOG_ERR,_copp_err_logstr,a,b)
|
||||
|
||||
#define COPP_LOG_ERR2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & COPP_LOG_ERR,_copp_err_logstr,a,b, c)
|
||||
|
||||
#define COPP_LOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & COPP_LOG_ERR,_copp_err_logstr,a,b, c,d)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* PS-user req and rsp logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COPP_LOG_ENC0(a) \
|
||||
SLOG_0 (acse_debug_sel & COPP_LOG_ENC,_copp_enc_logstr,a)
|
||||
|
||||
#define COPP_LOG_ENC1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & COPP_LOG_ENC,_copp_enc_logstr,a,b)
|
||||
|
||||
#define COPP_LOG_ENC2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & COPP_LOG_ENC,_copp_enc_logstr,a,b,c)
|
||||
|
||||
#define COPP_LOG_ENC3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & COPP_LOG_ENC,_copp_enc_logstr,a,b,c,d)
|
||||
|
||||
#define COPP_LOG_ENC4(a,b,c,d,e) \
|
||||
SLOG_4 (acse_debug_sel & COPP_LOG_ENC,_copp_enc_logstr,a,b,c,d,e)
|
||||
|
||||
/* continuation macros */
|
||||
#define COPP_LOG_ENCC0(a) \
|
||||
SLOGC_0 (acse_debug_sel & COPP_LOG_ENC,a)
|
||||
|
||||
#define COPP_LOG_ENCC1(a,b) \
|
||||
SLOGC_1 (acse_debug_sel & COPP_LOG_ENC,a,b)
|
||||
|
||||
/* hex logging */
|
||||
#define COPP_LOG_ENCH(a,b) \
|
||||
SLOGH (acse_debug_sel & COPP_LOG_ENC,a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* PS-user ind and cnf logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COPP_LOG_DEC0(a) \
|
||||
SLOG_0 (acse_debug_sel & COPP_LOG_DEC,_copp_dec_logstr,a)
|
||||
|
||||
#define COPP_LOG_DEC1(a,b) \
|
||||
SLOG_1 (acse_debug_sel & COPP_LOG_DEC,_copp_dec_logstr,a,b)
|
||||
|
||||
#define COPP_LOG_DEC2(a,b,c) \
|
||||
SLOG_2 (acse_debug_sel & COPP_LOG_DEC,_copp_dec_logstr,a,b,c)
|
||||
|
||||
#define COPP_LOG_DEC3(a,b,c,d) \
|
||||
SLOG_3 (acse_debug_sel & COPP_LOG_DEC,_copp_dec_logstr,a,b,c,d)
|
||||
|
||||
#define COPP_LOG_DEC4(a,b,c,d,e) \
|
||||
SLOG_4 (acse_debug_sel & COPP_LOG_DEC,_copp_dec_logstr,a,b,c,d,e)
|
||||
|
||||
/* continuation macros */
|
||||
#define COPP_LOG_DECC0(a) \
|
||||
SLOGC_0 (acse_debug_sel & COPP_LOG_DEC,a)
|
||||
|
||||
#define COPP_LOG_DECC1(a,b) \
|
||||
SLOGC_1 (acse_debug_sel & COPP_LOG_DEC,a,b)
|
||||
|
||||
/* hex logging */
|
||||
#define COPP_LOG_DECH(a,b) \
|
||||
SLOGH (acse_debug_sel & COPP_LOG_DEC,a,b)
|
||||
|
||||
#else
|
||||
/*--------------------------------------------*/
|
||||
/* hard errors logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COPP_LOG_ERR0(a)
|
||||
#define COPP_LOG_ERR1(a,b)
|
||||
#define COPP_LOG_ERR2(a,b,c)
|
||||
#define COPP_LOG_ERR3(a,b,c,d)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* PS-user req and rsp logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COPP_LOG_ENC0(a)
|
||||
#define COPP_LOG_ENC1(a,b)
|
||||
#define COPP_LOG_ENC2(a,b,c)
|
||||
#define COPP_LOG_ENC3(a,b,c,d)
|
||||
#define COPP_LOG_ENC4(a,b,c,d,e)
|
||||
#define COPP_LOG_ENCC0(a)
|
||||
#define COPP_LOG_ENCC1(a,b)
|
||||
#define COPP_LOG_ENCH(a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* PS-user ind and cnf logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COPP_LOG_DEC0(a)
|
||||
#define COPP_LOG_DEC1(a,b)
|
||||
#define COPP_LOG_DEC2(a,b,c)
|
||||
#define COPP_LOG_DEC3(a,b,c,d)
|
||||
#define COPP_LOG_DEC4(a,b,c,d,e)
|
||||
#define COPP_LOG_DECC0(a)
|
||||
#define COPP_LOG_DECC1(a,b)
|
||||
#define COPP_LOG_DECH(a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
193
include/mmslite/copp_usr.h
Normal file
193
include/mmslite/copp_usr.h
Normal file
@@ -0,0 +1,193 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997-2001, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : copp_usr.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* COPP user header file. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/11/01 JRB 05 Convert to use ASN1R. */
|
||||
/* 08/13/98 JRB 04 Lint cleanup. */
|
||||
/* 06/17/98 JRB 03 Add error codes. */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 03/19/97 JRB 02 Add "CALLING" support. General cleanup. */
|
||||
/* 03/05/97 JRB 01 Created. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef COPP_USR_INCLUDED
|
||||
#define COPP_USR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION USER DEFINES */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
/* Defines used for encoded values of "Provider-reason". */
|
||||
/* Used in encode/decode of CPR (Connect Presentation Reject PPDU). */
|
||||
#define PROV_REASON_NOT_SPECIFIED 0
|
||||
#define PROV_REASON_CONGESTION 1
|
||||
#define PROV_REASON_LOCAL_LIMIT 2
|
||||
#define PROV_REASON_CALLED_PRES_ADDR 3
|
||||
#define PROV_REASON_VERSION 4
|
||||
#define PROV_REASON_DEFAULT_CONTEXT 5
|
||||
#define PROV_REASON_USER_DATA 6
|
||||
#define PROV_REASON_NO_PSAP 7
|
||||
|
||||
/* Defines for P-CONNECT.cnf result parameter */
|
||||
#define P_CON_RESULT_ACCEPT 0
|
||||
#define P_CON_RESULT_USER_REJ 1
|
||||
#define P_CON_RESULT_PROVIDER_REJ 2
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION ERROR CODES */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/* NOTE: Values begin from E_COPP (found in glberror.h). */
|
||||
|
||||
/* COPP general errors */
|
||||
#define COPP_ERR_INV_PSEL 0x3101 /* Invalid local PSEL */
|
||||
#define COPP_ERR_INV_STATE 0x3102 /* Invalid connect state */
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION GLOBAL VARIABLES */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
extern ST_CHAR expected_pdv_pci;
|
||||
extern ST_UCHAR *pdv_data_ptr;
|
||||
extern ST_INT pdv_data_len;
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION PROVIDER FUNCTIONS */
|
||||
/* */
|
||||
/* Called by user to encode and send */
|
||||
/* Presentation PDUs. */
|
||||
/*======================================================*/
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_con_req */
|
||||
/* P-Connect Request. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_con_req (ST_LONG copp_bind_id, ACSE_CONN *acse_conn, PRES_ADDR *rem_addr);
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_rel_req */
|
||||
/* P-Release Request. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_rel_req (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_con_rsp_pos */
|
||||
/* P-Connect Accept. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_con_rsp_pos (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_con_rsp_neg */
|
||||
/* P-Connect Reject. */
|
||||
/* If "provider_reason" < 0, this is "user-reject", else this is */
|
||||
/* "provider-reject" and the value of "provider_reason" will be */
|
||||
/* encoded in the "Provider-reason" parameter of the PPDU. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_con_rsp_neg (ACSE_CONN *acse_conn, ST_INT provider_reason);
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_rel_rsp_pos */
|
||||
/* P-Release Positive Response. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_rel_rsp_pos (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_u_abort_req */
|
||||
/* P-U-Abort Request. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_u_abort_req (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* copp_data_req */
|
||||
/* P-Data Request. */
|
||||
/************************************************************************/
|
||||
ST_RET copp_data_req (ACSE_CONN *acse_conn);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* PRESENTATION USER FUNCTIONS */
|
||||
/* */
|
||||
/* Called by Presentation to pass decoded */
|
||||
/* Presentation PDUs up to user. */
|
||||
/*======================================================*/
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_con_cnf */
|
||||
/* P-CONNECT.cnf (Connect Confirm). */
|
||||
/* Parameters: */
|
||||
/* acse_conn Pointer to connection info */
|
||||
/* result P_CON_RESULT_ACCEPT, P_CON_RESULT_USER_REJ or */
|
||||
/* P_CON_RESULT_PROVIDER_REJ */
|
||||
/* reason Provider-reason (if result=P_CON_RESULT_PROVIDER_REJ)*/
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_con_cnf (ACSE_CONN *acse_conn, ST_INT result, ST_INT reason);
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_rel_cnf_pos */
|
||||
/* P-RELEASE.cnf+ (POSITIVE Release Confirm). */
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_rel_cnf_pos (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_con_ind */
|
||||
/* P-Connect Indication. */
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_con_ind (ST_LONG user_bind_id, ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_rel_ind */
|
||||
/* P-Release Indication. */
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_rel_ind (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_p_abort_ind */
|
||||
/* P-P-Abort Indication. */
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_p_abort_ind (ACSE_CONN *acse_conn, ST_INT reason);
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_u_abort_ind */
|
||||
/* P-U-Abort Indication. */
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_u_abort_ind (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* u_copp_data_ind */
|
||||
/* P-Data Indication. */
|
||||
/************************************************************************/
|
||||
ST_VOID u_copp_data_ind (ACSE_CONN *acse_conn);
|
||||
|
||||
/************************************************************************/
|
||||
/* START_pdv_list */
|
||||
/* ASN.1 decode function that may be used by Presentation-user */
|
||||
/* (i.e. ACSE) for decoding a "PDV-list" (same encoding as "EXTERNAL"). */
|
||||
/************************************************************************/
|
||||
ST_VOID START_pdv_list (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* COPP_USR_INCLUDED */
|
||||
/************************************************************************/
|
||||
|
||||
199
include/mmslite/cosp.h
Normal file
199
include/mmslite/cosp.h
Normal file
@@ -0,0 +1,199 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : cosp.h */
|
||||
/* PRODUCT(S) : MOSI Stack (over TP4) */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file defines variable and functions */
|
||||
/* internal to the COSP (decoding and encoding). */
|
||||
/* */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/12/01 JRB 03 Reverse cosp_enc_cn_ac change (not needed). */
|
||||
/* 08/01/01 JRB 02 Del rem_addr from cosp_enc_cn_ac proto. */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 01/13/97 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
#ifndef COSP_INCLUDED
|
||||
#define COSP_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
extern ST_UCHAR cosp_only_ssel [1+MAX_SSEL_LEN];
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O N N E C T I O N S T A T E S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/* Valid states, the first IDLE state must be 0) */
|
||||
#define COSP_CSTATE_IDLE 0 /* idle, transport not connected*/
|
||||
#define COSP_CSTATE_WAIT_TCON_CNF 1 /* wait T-CONNECT.cnf */
|
||||
#define COSP_CSTATE_IDLE_TCON 100 /* idle, transport connected */
|
||||
#define COSP_CSTATE_WAIT_AC 2 /* wait for ACCEPT SPDU */
|
||||
#define COSP_CSTATE_WAIT_DN 3 /* wait for DISCONNECT SPDU */
|
||||
#define COSP_CSTATE_WAIT_CON_RSP 8 /* wait S-CONNECT.rsp */
|
||||
#define COSP_CSTATE_WAIT_REL_RSP 9 /* wait for S-RELEASE.rsp */
|
||||
#define COSP_CSTATE_WAIT_TDISCON_IND 16 /* wait T-DISCONNECT.ind */
|
||||
#define COSP_CSTATE_DATA_XFER 713 /* Data Transfer state */
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O S P P R O T O C O L D E F I N E S */
|
||||
/* */
|
||||
/* D E C O D E D S P D U S T R U C T U R E S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/* Encoding for supported COSP versions codes */
|
||||
#define COSP_VER1 (ST_UCHAR) 1
|
||||
#define COSP_VER2 (ST_UCHAR) 2
|
||||
|
||||
|
||||
/* Encoding of SPDU Session Identifier (SI) codes */
|
||||
#define COSP_SI_DATA (ST_UCHAR) 1
|
||||
#define COSP_SI_GIVE_TOKEN (ST_UCHAR) 1 /* this is correct DT=GIVE-TOKEN */
|
||||
#define COSP_SI_FINISH (ST_UCHAR) 9
|
||||
#define COSP_SI_DISCON (ST_UCHAR) 10
|
||||
#define COSP_SI_REFUSE (ST_UCHAR) 12
|
||||
#define COSP_SI_CONNECT (ST_UCHAR) 13
|
||||
#define COSP_SI_ACCEPT (ST_UCHAR) 14
|
||||
#define COSP_SI_ABORT (ST_UCHAR) 25
|
||||
#define COSP_SI_AB_ACCEPT (ST_UCHAR) 26
|
||||
|
||||
|
||||
/* struct used to store decoded params from CONNECT or ACCEPT SPDU */
|
||||
typedef struct tagCOSP_CN_AC
|
||||
{
|
||||
ST_UCHAR prot_option;
|
||||
ST_UINT16 initiator_tsdu_size;
|
||||
ST_UINT16 responder_tsdu_size;
|
||||
ST_UCHAR ver_num;
|
||||
ST_UCHAR ses_urequir [2]; /* byte0 (bits 9-16), byte1 (bits 1-8)*/
|
||||
ST_UCHAR loc_ssel [1+MAX_SSEL_LEN];
|
||||
ST_UCHAR rem_ssel [1+MAX_SSEL_LEN];
|
||||
ST_UINT udata_len; /* SS-user data length */
|
||||
ST_UCHAR *udata_ptr; /* SS-user data pointer */
|
||||
}COSP_CN_AC;
|
||||
|
||||
|
||||
/* Encoding for Reason Code PI in a REFUSE SPDU generated by SS-user */
|
||||
#define COSP_RF_REASON_U_NOT_SPECIFIED (ST_UCHAR) 0
|
||||
#define COSP_RF_REASON_U_CONGESTION (ST_UCHAR) 1
|
||||
#define COSP_RF_REASON_U_REJECT (ST_UCHAR) 2
|
||||
/* Encoding for Reason Code PI in a REFUSE SPDU generated by SS-provider */
|
||||
#define COSP_RF_REASON_S_INV_SSEL (ST_UCHAR) 128+1
|
||||
#define COSP_RF_REASON_S_NOT_ATTACHED (ST_UCHAR) 128+2
|
||||
#define COSP_RF_REASON_S_CONGESTION (ST_UCHAR) 128+3
|
||||
#define COSP_RF_REASON_S_INV_VERSION (ST_UCHAR) 128+4
|
||||
#define COSP_RF_REASON_S_NOT_SPECIFIED (ST_UCHAR) 128+5
|
||||
#define COSP_RF_REASON_S_RESTRICTIONS (ST_UCHAR) 128+6
|
||||
|
||||
|
||||
/* struct used to store decoded params from REFUSE SPDU */
|
||||
typedef struct tagCOSP_RF
|
||||
{
|
||||
ST_BOOLEAN disconnect; /* if SD_TRUE then disconnect transport */
|
||||
ST_UCHAR ver_num;
|
||||
ST_UCHAR reason; /* reason code for refuse connection */
|
||||
ST_UCHAR ses_urequir [2]; /* byte0 (bits 9-16), byte1 (bits 1-8) */
|
||||
ST_UINT udata_len; /* SS-user data length */
|
||||
ST_UCHAR *udata_ptr; /* SS-user data pointer */
|
||||
}COSP_RF;
|
||||
|
||||
|
||||
#define COSP_P_AB_SPDU_LEN 9 /* P-ABORT is fixed in size */
|
||||
|
||||
/* Encoding for Transport Disconnect PI in an ABORT (and FINISH) SPDU */
|
||||
#define COSP_TCONN_KEEP (ST_UCHAR) 0x00
|
||||
#define COSP_TCONN_RELEASE (ST_UCHAR) 0x01
|
||||
/* | with one reason code below */
|
||||
#define COSP_AB_REASON_USER_ABORT (ST_UCHAR) 0x02
|
||||
#define COSP_AB_REASON_PROT_ERROR (ST_UCHAR) 0x04
|
||||
#define COSP_AB_REASON_NO_REASON (ST_UCHAR) 0x08
|
||||
#define COSP_AB_REASON_IMPLEMENTATION (ST_UCHAR) 0x10
|
||||
|
||||
|
||||
/* struct used to store decoded params from ABORT SPDU */
|
||||
typedef struct tagCOSP_AB
|
||||
{
|
||||
ST_BOOLEAN disconnect; /* if SD_TRUE then disconnect transport */
|
||||
ST_UCHAR reason; /* reason code for abort connection */
|
||||
ST_UINT reflect_par_len; /* Reflect param length */
|
||||
ST_UCHAR reflect_par [9]; /* Reflect param */
|
||||
ST_UINT udata_len; /* SS-user data length */
|
||||
ST_UCHAR *udata_ptr; /* SS-user data pointer */
|
||||
}COSP_AB;
|
||||
|
||||
|
||||
/* struct used to store decoded params from FINISH SPDU */
|
||||
typedef struct tagCOSP_FN_DN
|
||||
{
|
||||
ST_BOOLEAN disconnect; /* SD_TRUE to discon transport (FN)*/
|
||||
ST_UINT udata_len; /* SS-user data length */
|
||||
ST_UCHAR *udata_ptr; /* SS-user data pointer */
|
||||
}COSP_FN_DN;
|
||||
|
||||
/* struct used to store decoded params from DATA SPDU */
|
||||
typedef struct tagCOSP_DT
|
||||
{
|
||||
ST_UINT udata_len; /* SS-user data length */
|
||||
ST_UCHAR *udata_ptr; /* SS-user data pointer */
|
||||
}COSP_DT;
|
||||
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* E N C O D E / D E C O D E F U N C T I O N S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/* cosp_enc.c */
|
||||
ST_UINT cosp_envelope_len (ACSE_CONN *con, ST_UINT rem_ssel_len, ST_UCHAR spdu_type);
|
||||
|
||||
ST_RET cosp_enc_cn_ac (ACSE_CONN *con, PRES_ADDR *rem_addr,
|
||||
char **spdu_ptr, ST_UINT *spdu_len, ST_UCHAR spdu_type);
|
||||
ST_RET cosp_enc_rf (ACSE_CONN *con, char **spdu_ptr, ST_UINT *spdu_len, ST_UCHAR reason);
|
||||
ST_RET cosp_enc_fn_dn (ACSE_CONN *con, char **spdu_ptr, ST_UINT *spdu_len, ST_UCHAR spdu_type);
|
||||
ST_RET cosp_enc_u_ab (ACSE_CONN *con, char **spdu_ptr, ST_UINT *spdu_len);
|
||||
ST_RET cosp_enc_p_ab (char *spdu_ptr, ST_INT err_code);
|
||||
ST_RET cosp_enc_dt (ACSE_CONN *con, char **spdu_ptr, ST_UINT *spdu_len);
|
||||
|
||||
/* cosp_dec.c */
|
||||
ST_RET cosp_dec_cn_ac (COSP_CN_AC *dec_par, char *spdu_buf, ST_UINT spdu_len, ST_UCHAR spdu_type);
|
||||
ST_RET cosp_dec_rf (COSP_RF *dec_par, char *spdu_buf, ST_UINT spdu_len);
|
||||
ST_RET cosp_dec_fn_dn (COSP_FN_DN *dec_par, char *spdu_buf, ST_UINT spdu_len, ST_UCHAR spdu_type);
|
||||
ST_RET cosp_dec_ab (COSP_AB *dec_par, char *spdu_buf, ST_UINT spdu_len);
|
||||
ST_RET cosp_dec_dt (COSP_DT *dec_par, char *spdu_buf, ST_UINT spdu_len);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
|
||||
|
||||
214
include/mmslite/cosp_log.h
Normal file
214
include/mmslite/cosp_log.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : cosp_log.h */
|
||||
/* PRODUCT(S) : MOSI Stack (over TP4) */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file contains logging macros for COSP. */
|
||||
/* Note: To compile logging functions use the DEBUG_SISCO define */
|
||||
/* in the project make file. */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/13/99 MDE 05 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 04 Migrated to updated SLOG interface */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 04/24/97 JRB 03 Added NO-DEBUG version of COSP_LOG_ERRH. */
|
||||
/* 03/20/97 EJV 02 Enhanced logging. */
|
||||
/* 02/13/97 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
#ifndef COSP_LOG_INCLUDED
|
||||
#define COSP_LOG_INCLUDED
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* NOTE: COSP log masks and acse_debug_sel are defined in acse2usr.h */
|
||||
|
||||
|
||||
#if defined(DEBUG_SISCO)
|
||||
|
||||
/* this number will identify the log entry as COSP log */
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cosp_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cosp_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cosp_dec_hex_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cosp_enc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _cosp_enc_hex_logstr;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* hard errors logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COSP_LOG_ERR0(a) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cosp_err_logstr,thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define COSP_LOG_ERR1(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cosp_err_logstr,thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define COSP_LOG_ERR2(a,b,c) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cosp_err_logstr,thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define COSP_LOG_ERR3(a,b,c,d) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slog (sLogCtrl,_cosp_err_logstr,thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
/* continuation macros */
|
||||
#define COSP_LOG_ERRC0(a) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define COSP_LOG_ERRC1(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define COSP_LOG_ERRC2(a,b,c) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
/* hex logging */
|
||||
#define COSP_LOG_ERRH(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_ERR)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* SS-user req and rsp logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COSP_LOG_ENC0(a) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slog (sLogCtrl,_cosp_enc_logstr,thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define COSP_LOG_ENC1(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slog (sLogCtrl,_cosp_enc_logstr,thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define COSP_LOG_ENC2(a,b,c) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slog (sLogCtrl,_cosp_enc_logstr,thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define COSP_LOG_ENC3(a,b,c,d) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slog (sLogCtrl,_cosp_enc_logstr,thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define COSP_LOG_ENC4(a,b,c,d,e) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slog (sLogCtrl,_cosp_enc_logstr,thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
/* continuation macros */
|
||||
#define COSP_LOG_ENCC0(a) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define COSP_LOG_ENCC1(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
/* hex logging */
|
||||
#define COSP_LOG_ENCH(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_ENC_HEX)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* SS-user ind and cnf logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COSP_LOG_DEC0(a) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slog (sLogCtrl,_cosp_dec_logstr,thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define COSP_LOG_DEC1(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slog (sLogCtrl,_cosp_dec_logstr,thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define COSP_LOG_DEC2(a,b,c) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slog (sLogCtrl,_cosp_dec_logstr,thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define COSP_LOG_DEC3(a,b,c,d) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slog (sLogCtrl,_cosp_dec_logstr,thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define COSP_LOG_DEC4(a,b,c,d,e) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slog (sLogCtrl,_cosp_dec_logstr,thisFileName,__LINE__,a,b,c,d,e);\
|
||||
}
|
||||
/* continuation macros */
|
||||
#define COSP_LOG_DECC0(a) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define COSP_LOG_DECC1(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
/* hex logging */
|
||||
#define COSP_LOG_DECH(a,b) {\
|
||||
if (acse_debug_sel & COSP_LOG_DEC_HEX)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
#else
|
||||
/*--------------------------------------------*/
|
||||
/* hard errors logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COSP_LOG_ERR0(a)
|
||||
#define COSP_LOG_ERR1(a,b)
|
||||
#define COSP_LOG_ERR2(a,b,c)
|
||||
#define COSP_LOG_ERR3(a,b,c,d)
|
||||
#define COSP_LOG_ERRC0(a)
|
||||
#define COSP_LOG_ERRC1(a,b)
|
||||
#define COSP_LOG_ERRC2(a,b,c)
|
||||
#define COSP_LOG_ERRH(a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* SS-user req and rsp logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COSP_LOG_ENC0(a)
|
||||
#define COSP_LOG_ENC1(a,b)
|
||||
#define COSP_LOG_ENC2(a,b,c)
|
||||
#define COSP_LOG_ENC3(a,b,c,d)
|
||||
#define COSP_LOG_ENC4(a,b,c,d,e)
|
||||
#define COSP_LOG_ENCC0(a)
|
||||
#define COSP_LOG_ENCC1(a,b)
|
||||
#define COSP_LOG_ENCH(a,b)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
/* SS-user ind and cnf logging */
|
||||
/*--------------------------------------------*/
|
||||
|
||||
#define COSP_LOG_DEC0(a)
|
||||
#define COSP_LOG_DEC1(a,b)
|
||||
#define COSP_LOG_DEC2(a,b,c)
|
||||
#define COSP_LOG_DEC3(a,b,c,d)
|
||||
#define COSP_LOG_DEC4(a,b,c,d,e)
|
||||
#define COSP_LOG_DECC0(a)
|
||||
#define COSP_LOG_DECC1(a,b)
|
||||
#define COSP_LOG_DECH(a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
531
include/mmslite/cosp_usr.h
Normal file
531
include/mmslite/cosp_usr.h
Normal file
@@ -0,0 +1,531 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997, All Rights Reserved */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : cosp_usr.h */
|
||||
/* PRODUCT(S) : MOSI Stack (over TP4) */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This header file defines the interface between the */
|
||||
/* Connection-oriented Session Protocol (COSP) and the */
|
||||
/* Connection-oriented Presentation Layer (COPP) in order */
|
||||
/* to exchange Session Service Data Units (SSDU). */
|
||||
/* */
|
||||
/* For information see the: */
|
||||
/* ISO 8326 "Information processing systems - Open Systems */
|
||||
/* Interconnection - Basic connection oriented session service */
|
||||
/* definition. */
|
||||
/* ISO 8327 "Information processing systems - Open Systems */
|
||||
/* Interconnection - Basic connection oriented session protocol */
|
||||
/* specification. */
|
||||
/* ISO 8327/ADD.2 (Draft for Version2). */
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* cosp_bind */
|
||||
/* u_cosp_bind_cnf */
|
||||
/* cosp_unbind */
|
||||
/* u_cosp_unbind_cnf */
|
||||
/* */
|
||||
/* cosp_con_req */
|
||||
/* u_cosp_con_cnf_pos */
|
||||
/* u_cosp_con_cnf_neg */
|
||||
/* */
|
||||
/* u_cosp_con_ind */
|
||||
/* cosp_con_rsp_pos */
|
||||
/* cosp_con_rsp_neg */
|
||||
/* */
|
||||
/* cosp_rel_req */
|
||||
/* u_cosp_rel_cnf_pos */
|
||||
/* */
|
||||
/* u_cosp_rel_ind */
|
||||
/* cosp_rel_rsp_pos */
|
||||
/* */
|
||||
/* cosp_u_abort_req */
|
||||
/* u_cosp_abort_ind */
|
||||
/* */
|
||||
/* cosp_data_req */
|
||||
/* u_cosp_data_ind */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 04/10/97 JRB 02 Chg error defs to use base from "glberror.h".*/
|
||||
/* 01/10/97 EJV 01 Created */
|
||||
/************************************************************************/
|
||||
#ifndef COSP_USR_INCLUDED
|
||||
#define COSP_USR_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O S P S P E C I F I C D E F I N E S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/* Defines below specify limits on certain parameters for the COSP MOSI */
|
||||
/* Version2 implementation: */
|
||||
|
||||
#define COSP_MAX_UDATA_CON (ST_UINT) 10240
|
||||
#define COSP_MAX_ENVELOPE (ST_UINT) 56
|
||||
#define COSP_MAX_UDATA ((ST_UINT) 65535 - COSP_MAX_ENVELOPE)
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* Result and Reason Codes in S-CONNECT.cnf- */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/* Result codes */
|
||||
#define COSP_CON_CNF_U_REJECT 1
|
||||
#define COSP_CON_CNF_P_REJECT 2
|
||||
|
||||
/* Reason codes in S-CONNECT.cnf- when result=COSP_CON_CNF_U_REJECT */
|
||||
#define COSP_CON_CNF_U_NOT_SPECIFIED 0
|
||||
#define COSP_CON_CNF_U_CONGESTION 1
|
||||
#define COSP_CON_CNF_U_IN_UDATA 2 /* udata = PPDU */
|
||||
|
||||
/* Valid reason codes in S-CONNECT.cnf- when result=COSP_CON_CNF_P_REJECT */
|
||||
#define COSP_CON_CNF_P_NOT_SPECIFIED 3 /* or version not supported, */
|
||||
/* or implementation restrictions */
|
||||
#define COSP_CON_CNF_P_CONGESTION 4
|
||||
#define COSP_CON_CNF_P_INV_SSEL 5 /* called Session Address unknown */
|
||||
#define COSP_CON_CNF_P_NOT_ATTACHED 6 /* called SS-user not attached to SSAP */
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* Reason Codes in S-CONNECT.rsp- */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/* Reason codes in S-CONNECT.rsp- (if connection rejected) */
|
||||
#define COSP_CON_RSP_U_NOT_SPECIFIED 0
|
||||
#define COSP_CON_RSP_U_CONGESTION 1
|
||||
#define COSP_CON_RSP_U_IN_UDATA 2 /* udata = PPDU */
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* Reason Codes in S-P-ABORT.ind */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
#define COSP_P_AB_IND_TP_DISCON 0
|
||||
#define COSP_P_AB_IND_PROT_ERR 1
|
||||
#define COSP_P_AB_IND_UNDEFINED 2
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O S P E R R O R C O D E S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/* NOTE: Values begin from E_COSP (found in glberror.h). */
|
||||
|
||||
/* COSP general errors */
|
||||
#define COSP_ERR_BIND_STATE 0x3201 /* Invalid Bind state->already called*/
|
||||
#define COSP_ERR_TP4_RET 0x3202 /* Transport layer returned error */
|
||||
#define COSP_ERR_INV_TP4_ADDR 0x3203 /* Transport address invalid */
|
||||
#define COSP_ERR_INV_CON_STATE 0x3204 /* Invalid connect state */
|
||||
#define COSP_ERR_INV_SSEL 0x3205 /* Invalid local SSEL length */
|
||||
#define COSP_ERR_INV_UDATA_LEN 0x3206 /* Invalid User Data length */
|
||||
#define COSP_ERR_INV_POINTER 0x3207 /* Invalid pointer to encode buffer */
|
||||
|
||||
/* COSP PDU decoding errors */
|
||||
#define COSP_ERR_DEC_INV_SPDU 0x3210 /* Invalid/not-supp. SPDU SI rcvd */
|
||||
#define COSP_ERR_DEC_INV_LEN 0x3211 /* Invalid SPDU len (dec vs fun len) */
|
||||
#define COSP_ERR_DEC_INV_PI_CODE 0x3212 /* Invalid/out-of-place PGI/PI code */
|
||||
#define COSP_ERR_DEC_INV_LOC_SSEL 0x3213 /* SPDU not addressed to local SSEL */
|
||||
#define COSP_ERR_DEC_INV_PROT_OPT 0x3214 /* Extended SPDU concat not supp. */
|
||||
#define COSP_ERR_DEC_INV_SEG 0x3215 /* Invalid/not-supp. SSDU Segmenting */
|
||||
#define COSP_ERR_DEC_INV_PROT_VER 0x3216 /* Invalid/not-supp. prot version */
|
||||
#define COSP_ERR_DEC_INV_FUN_UNITS 0x3217 /* Invalid/not-supp. FU in Ses Req. */
|
||||
#define COSP_ERR_DEC_INV_RF_UDATA 0x3218 /* Invalid udata len,len>0 reason!=2 */
|
||||
#define COSP_ERR_DEC_INV_AB_RP 0x3219 /* Inv len of Reflect Par in AB SPDU */
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* B I N D I N G F U N C T I O N S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_bind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to bind to local Session Address. */
|
||||
/* The SS-user should implement the u_cosp_bind_cnf function. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_LONG cosp_user_bind_id COSP User's id for this binding.*/
|
||||
/* PRES_ADDR *loc_addr Local Address to bind to */
|
||||
/* ST_INT sharable Ignored, (for compatibility with*/
|
||||
/* ST_INT max_conns Ignored, previous versions) */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if bind successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_bind (ST_LONG cosp_user_bind_id, PRES_ADDR *loc_addr,
|
||||
ST_INT sharable, ST_INT max_conns);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_bind_cnf */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function is called by the SS-provider to indicate the result of */
|
||||
/* the bind operation (see cosp_bind func). */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_LONG cosp_user_bind_id COSP User's id for this binding. */
|
||||
/* ST_LONG cosp_bind_id COSP id for this binding. */
|
||||
/* ST_RET result Indicates if the bind was successful: */
|
||||
/* = 0 Success */
|
||||
/* <> 0 Error code */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_bind_cnf (ST_LONG cosp_user_bind_id, ST_LONG cosp_bind_id,
|
||||
ST_RET result);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_unbind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to unbind from local Session Address. */
|
||||
/* The SS-user should implement the u_cosp_unbind_cnf function. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_LONG cosp_bind_id COSP's id to unbind. */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if unbind successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_unbind (ST_LONG cosp_bind_id);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_unbind_cnf */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This function is called by the SS-provider to indicate that the */
|
||||
/* unbind operation finished (see cosp_unbind func). */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_LONG cosp_user_bind_id COSP User's id for this binding.*/
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_unbind_cnf (ST_LONG cosp_user_bind_id);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O N N E C T F U N C T I O N S (CALLED SIDE) */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_con_ind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate that a */
|
||||
/* remote node wishes to establish a connection. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_LONG cosp_user_bind_id COSP user id bind */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_con_ind (ST_LONG cosp_user_bind_id, ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_con_rsp_pos */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to Accept an incomming connection. */
|
||||
/* If SS-user data are sent make sure the reason=COSP_CON_RSP_U_IN_UDATA*/
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to con info struct */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_con_rsp_pos (ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_con_rsp_neg */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to Reject an incomming connection. */
|
||||
/* If SS-user data are sent make sure the reason=COSP_CON_RSP_U_IN_UDATA*/
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to con info struct */
|
||||
/* ST_INT reason Reason for reject COSP_CON_RSP_U_... */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_con_rsp_neg (ACSE_CONN *con, ST_INT reason);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O N N E C T F U N C T I O N S (CALLING SIDE) */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_con_req */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to establish a Session connection. */
|
||||
/* SS-user should implement following functions to confirm to this */
|
||||
/* request: u_cosp_con_cnf_pos and u_cosp_con_cnf_neg. */
|
||||
/* If this function returns value other then SD_SUCCESS then the function */
|
||||
/* u_cosp_con_cnf_xxx will not be called. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ST_LONG cosp_bind_id COSP bind id (also= TP4 bind id)*/
|
||||
/* PRES_ADDR *rem_addr Remote Address */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_con_req (ST_LONG cosp_bind_id, PRES_ADDR *rem_addr, ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_con_cnf_pos */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate that */
|
||||
/* the connection has been established. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_con_cnf_pos (ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_con_cnf_neg */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate the */
|
||||
/* connection has been rejected by remote. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* ST_INT result see def results COSP_CON_CNF_... above */
|
||||
/* ST_INT reason see def reasons COSP_CON_CNF_... above */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_con_cnf_neg (ACSE_CONN *con, ST_INT result, ST_INT reason);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O N N E C T I O N R E L E A S E (CALLED SIDE) */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_rel_ind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate that a */
|
||||
/* remote node wishes to release a connection. The SS-user should call */
|
||||
/* cosp_rel_rsp_pos to release the connection. Negative cnf not allowed.*/
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_rel_ind (ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_rel_rsp_pos */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to respond positively to release of */
|
||||
/* connection. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_rel_rsp_pos (ACSE_CONN *con);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* C O N N E C T I O N R E L E A S E (CALLING SIDE)*/
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_rel_req */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to release a Session connection. */
|
||||
/* SS-user should implement the u_cosp_rel_cnf_pos function to receive */
|
||||
/* confirm for this request. Negative confirm is not implemented. */
|
||||
/* If this function returns value other then SD_SUCCESS then the function */
|
||||
/* u_cosp_rel_cnf_pos will not be called. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_rel_req (ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_rel_cnf_pos */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate positive */
|
||||
/* result of the release operation. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_rel_cnf_pos (ACSE_CONN *con);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* A B O R T F U N C T I O N S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_u_abort_req */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to Abort a connection (S-U-ABORT) */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_u_abort_req (ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_p_abort_ind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate that a */
|
||||
/* connection has been aborted by SS-provider (local or remote). */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* ST_INT reason see def reasons COSP_P_AB_IND_... above */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_p_abort_ind (ACSE_CONN *con, ST_INT reason);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_u_abort_ind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate that a */
|
||||
/* connection has been aborted by remote SS-user. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_u_abort_ind (ACSE_CONN *con);
|
||||
|
||||
|
||||
/*======================================================*/
|
||||
/* */
|
||||
/* D A T A T R A N S F E R F U N C T I O N S */
|
||||
/* */
|
||||
/*======================================================*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* cosp_data_req */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* Function called by SS-user to transfer normal data on a previously */
|
||||
/* established connection. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* SD_SUCCESS (0) if successful */
|
||||
/* error code otherwise */
|
||||
/************************************************************************/
|
||||
ST_RET cosp_data_req (ACSE_CONN *con);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* u_cosp_data_ind */
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* This USER function is called by the SS-Provider to indicate that a */
|
||||
/* data have been received. */
|
||||
/* */
|
||||
/* Parameters: */
|
||||
/* ACSE_CONN *con Pointer to connection info */
|
||||
/* */
|
||||
/* Return: */
|
||||
/* ST_VOID */
|
||||
/************************************************************************/
|
||||
ST_VOID u_cosp_data_ind (ACSE_CONN *con);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
|
||||
|
||||
62
include/mmslite/count_packets.h
Normal file
62
include/mmslite/count_packets.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (c) 2001 - 2003
|
||||
* NetGroup, Politecnico di Torino (Italy)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Politecnico di Torino nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __count_packets
|
||||
#define __count_packets
|
||||
|
||||
#ifdef WIN32
|
||||
#include "tme.h"
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <net/tme/tme.h>
|
||||
#else
|
||||
#include <tme/tme.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct __c_p_data
|
||||
{
|
||||
struct timeval timestamp;
|
||||
uint64 packets;
|
||||
uint64 bytes;
|
||||
}
|
||||
c_p_data;
|
||||
|
||||
#define COUNT_PACKETS 0x00000000
|
||||
uint32 count_packets(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_ex, uint8 *mem_data);
|
||||
|
||||
#endif
|
||||
|
||||
90
include/mmslite/devioctl.h
Normal file
90
include/mmslite/devioctl.h
Normal file
@@ -0,0 +1,90 @@
|
||||
/*++ BUILD Version: 0004 // Increment this if a change has global effects
|
||||
Copyright (c) 1992-1993 Microsoft Corporation
|
||||
Module Name:
|
||||
devioctl.h
|
||||
Revision History:
|
||||
-- */
|
||||
// begin_winioctl
|
||||
#ifndef _DEVIOCTL_
|
||||
#define _DEVIOCTL_
|
||||
// begin_ntddk begin_nthal begin_ntifs
|
||||
//
|
||||
// Define the various device type values. Note that values used by Microsoft
|
||||
// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
|
||||
// by customers.
|
||||
//
|
||||
#define DEVICE_TYPE ULONG
|
||||
#define FILE_DEVICE_BEEP 0x00000001
|
||||
#define FILE_DEVICE_CD_ROM 0x00000002
|
||||
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
|
||||
#define FILE_DEVICE_CONTROLLER 0x00000004
|
||||
#define FILE_DEVICE_DATALINK 0x00000005
|
||||
#define FILE_DEVICE_DFS 0x00000006
|
||||
#define FILE_DEVICE_DISK 0x00000007
|
||||
#define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
|
||||
#define FILE_DEVICE_FILE_SYSTEM 0x00000009
|
||||
#define FILE_DEVICE_INPORT_PORT 0x0000000a
|
||||
#define FILE_DEVICE_KEYBOARD 0x0000000b
|
||||
#define FILE_DEVICE_MAILSLOT 0x0000000c
|
||||
#define FILE_DEVICE_MIDI_IN 0x0000000d
|
||||
#define FILE_DEVICE_MIDI_OUT 0x0000000e
|
||||
#define FILE_DEVICE_MOUSE 0x0000000f
|
||||
#define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
|
||||
#define FILE_DEVICE_NAMED_PIPE 0x00000011
|
||||
#define FILE_DEVICE_NETWORK 0x00000012
|
||||
#define FILE_DEVICE_NETWORK_BROWSER 0x00000013
|
||||
#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
|
||||
#define FILE_DEVICE_NULL 0x00000015
|
||||
#define FILE_DEVICE_PARALLEL_PORT 0x00000016
|
||||
#define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
|
||||
#define FILE_DEVICE_PRINTER 0x00000018
|
||||
#define FILE_DEVICE_SCANNER 0x00000019
|
||||
#define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
|
||||
#define FILE_DEVICE_SERIAL_PORT 0x0000001b
|
||||
#define FILE_DEVICE_SCREEN 0x0000001c
|
||||
#define FILE_DEVICE_SOUND 0x0000001d
|
||||
#define FILE_DEVICE_STREAMS 0x0000001e
|
||||
#define FILE_DEVICE_TAPE 0x0000001f
|
||||
#define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
|
||||
#define FILE_DEVICE_TRANSPORT 0x00000021
|
||||
#define FILE_DEVICE_UNKNOWN 0x00000022
|
||||
#define FILE_DEVICE_VIDEO 0x00000023
|
||||
#define FILE_DEVICE_VIRTUAL_DISK 0x00000024
|
||||
#define FILE_DEVICE_WAVE_IN 0x00000025
|
||||
#define FILE_DEVICE_WAVE_OUT 0x00000026
|
||||
#define FILE_DEVICE_8042_PORT 0x00000027
|
||||
#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
|
||||
#define FILE_DEVICE_BATTERY 0x00000029
|
||||
#define FILE_DEVICE_BUS_EXTENDER 0x0000002a
|
||||
#define FILE_DEVICE_MODEM 0x0000002b
|
||||
#define FILE_DEVICE_VDM 0x0000002c
|
||||
#define FILE_DEVICE_MASS_STORAGE 0x0000002d
|
||||
//
|
||||
// Macro definition for defining IOCTL and FSCTL function control codes. Note
|
||||
// that function codes 0-2047 are reserved for Microsoft Corporation, and
|
||||
// 2048-4095 are reserved for customers.
|
||||
//
|
||||
#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
|
||||
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
|
||||
)
|
||||
//
|
||||
// Define the method codes for how buffers are passed for I/O and FS controls
|
||||
//
|
||||
#define METHOD_BUFFERED 0
|
||||
#define METHOD_IN_DIRECT 1
|
||||
#define METHOD_OUT_DIRECT 2
|
||||
#define METHOD_NEITHER 3
|
||||
//
|
||||
// Define the access check value for any access
|
||||
//
|
||||
//
|
||||
// The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
|
||||
// ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
|
||||
// constants *MUST* always be in sync.
|
||||
//
|
||||
#define FILE_ANY_ACCESS 0
|
||||
#define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
|
||||
#define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
|
||||
// end_ntddk end_nthal end_ntifs
|
||||
#endif // _DEVIOCTL_
|
||||
// end_winioctl
|
||||
64
include/mmslite/dibmatch.h
Normal file
64
include/mmslite/dibmatch.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef DIBMATCH_H
|
||||
|
||||
#define DIBMATCH_H
|
||||
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2003 - 2005, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : dibmatch.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 01/04/06 EJV 04 Added DLLs incompatibility comments. */
|
||||
/* 07/19/05 EJV 03 Added gensock2.h include. */
|
||||
/* 07/12/05 EJV 02 DIB_MATCH_CTRL: added use_gethostbyname. */
|
||||
/* 06/11/03 MDE 01 New */
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "gensock2.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* General address matching defines, control, functions */
|
||||
|
||||
/* Compare Results */
|
||||
#define DIB_MATCH_NOT 0
|
||||
#define DIB_MATCH_CLOSE 1
|
||||
#define DIB_MATCH_EXACT 2
|
||||
|
||||
typedef struct dib_match_ctrl_tag
|
||||
{
|
||||
/* Note: adding/removing fields to/from this struct will make older */
|
||||
/* !!! applications incompatible with new security DLLs. */
|
||||
ST_BOOLEAN match_allow_missing_ae_elements;
|
||||
ST_BOOLEAN match_allow_extra_ae_elements;
|
||||
|
||||
ST_BOOLEAN match_ap_title;
|
||||
ST_BOOLEAN match_ae_qualifier;
|
||||
ST_BOOLEAN match_ap_invoke;
|
||||
ST_BOOLEAN match_ae_invoke;
|
||||
ST_BOOLEAN match_psel;
|
||||
ST_BOOLEAN match_ssel;
|
||||
ST_BOOLEAN match_tsel;
|
||||
ST_BOOLEAN match_net_addr;
|
||||
ST_BOOLEAN use_gethostbyname; /* gethostbyname() call may take LONG */
|
||||
/* time when the DNS is not available. */
|
||||
} DIB_MATCH_CTRL;
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DIBMATCH_H */
|
||||
72
include/mmslite/ethertyp.h
Normal file
72
include/mmslite/ethertyp.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2002-2005, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : ethertyp.h */
|
||||
/* PRODUCT(S) : MMS-EASE Lite */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : Ethertype frame encode functions and constants.*/
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 02/08/05 JRB 03 Chg first arg to etype_hdr_decode. */
|
||||
/* 03/24/03 ASK 02 Updated ETYPE_TYPE_* constant values */
|
||||
/* 11/20/02 ASK 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#if !defined(ETHERTYP_H_INCLUDED)
|
||||
#define ETHERTYP_H_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "clnp_usr.h"
|
||||
#include "clnp_sne.h"
|
||||
|
||||
|
||||
#define ETYPE_VLAN_TYPE_ID 0x8100
|
||||
#define ETYPE_TYPE_GOOSE 0x88B8
|
||||
#define ETYPE_TYPE_GSE 0x88B9
|
||||
#define ETYPE_TYPE_SV 0x88BA
|
||||
#define ETYPE_TCI_GOOSE 0x8000
|
||||
#define ETYPE_TCI_GSE 0x2000
|
||||
#define ETYPE_TCI_SV 0x8001
|
||||
|
||||
#define VLAN_HEAD_LEN 4
|
||||
#define ETYPE_HEAD_LEN 8
|
||||
|
||||
/* Ethertype Frame Info to be filled out by the user */
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT16 tci; /* VLAN Tag Control Info */
|
||||
ST_UINT16 etypeID; /* Ethertype ID */
|
||||
ST_UINT16 appID; /* APP ID */
|
||||
} ETYPE_INFO;
|
||||
|
||||
|
||||
ST_UCHAR *etype_hdr_encode(ST_UCHAR *bufPtr, /* buffer to encode into */
|
||||
ST_INT bufLen, /* len of buffer */
|
||||
ST_INT *asn1Len, /* ptr to len encoded */
|
||||
ETYPE_INFO *info);/* ptr etype struct */
|
||||
|
||||
ST_UCHAR *vlan_hdr_encode(ST_UCHAR *bufPtr, /* buffer to encode into */
|
||||
ST_INT *asn1Len, /* ptr to len encoded */
|
||||
ETYPE_INFO *info); /* ptr etype struct */
|
||||
|
||||
ST_UCHAR *etype_hdr_decode(SN_UNITDATA *sn_req,
|
||||
ETYPE_INFO *info, /* ptr etype struct */
|
||||
ST_INT *bufLen); /* ptr to len decoded */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of 'already included' */
|
||||
132
include/mmslite/ethsub.h
Normal file
132
include/mmslite/ethsub.h
Normal file
@@ -0,0 +1,132 @@
|
||||
#ifndef ETHSUB_INCLUDED
|
||||
#define ETHSUB_INCLUDED
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2000-2006 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : ethsub.h */
|
||||
/* PRODUCT(S) : Lean-T Stack for Windows 95/98/NT */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Definitions to allow Subnetwork interface to work with OSI LLC */
|
||||
/* Ethernet driver. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 07/21/06 JRB 04 Chg to use SISCO naming conventions. */
|
||||
/* 04/14/06 JRB 03 Add sysincs header. */
|
||||
/* 11/20/02 ASK 02 Add ethdown_etype proto */
|
||||
/* 04/06/00 JRB 01 Created */
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/****************************************************************/
|
||||
/* Include files required to interface with */
|
||||
/* OSI LLC NDIS Ethernet Driver */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
|
||||
#include "conpack.h"
|
||||
#include "osillc.h"
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
#include "slog.h"
|
||||
#include "stime.h"
|
||||
#include "clnp_usr.h" /* clnp_sne.h needs this */
|
||||
#include "clnp_log.h"
|
||||
#include "clnp_sne.h" /* for SN_UNITDATA, etc. */
|
||||
|
||||
/****************************************************************/
|
||||
/****************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/** ----- Following fields are specific to this Access Method */
|
||||
HANDLE hFile; /* LLC device driver descriptor */
|
||||
|
||||
unsigned long seq; /* sequence number to expect */
|
||||
void *readlst[10]; /* list of pointers to out of sequence packet blocks */
|
||||
|
||||
/* ----- Following fields are required for 95/98 */
|
||||
struct rd_wr_block *pWriteEvents; /* list of write event structures */
|
||||
struct rd_wr_block *pReadEvents; /* list of read event structures */
|
||||
} LLC_CONTEXT;
|
||||
|
||||
/************************************************************************/
|
||||
/* OSI Event structure - Modified for MMS_LITE */
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void * nxevt;
|
||||
SN_UNITDATA sn_req; /* event data in format needed by LEANT CLNP. */
|
||||
} SN_EVENT;
|
||||
|
||||
typedef struct rd_wr_block
|
||||
{
|
||||
int inuse;
|
||||
HANDLE hEvent;
|
||||
OVERLAPPED *ovlp;
|
||||
ST_UCHAR *framep; /* pointer to raw Ethernet frame */
|
||||
void *pb;
|
||||
LLC_CONTEXT *gccp;
|
||||
} RD_WR_BLOCK;
|
||||
|
||||
/************************************************************************/
|
||||
/* MMS_LITE function to Queue received packet for Lite CLNP. */
|
||||
/************************************************************************/
|
||||
void QueueRxPacket (ST_UCHAR *framep);
|
||||
|
||||
/************************************************************************/
|
||||
/* Functions that may be called from CLNP. */
|
||||
/************************************************************************/
|
||||
void ethdown (SN_UNITDATA *sn_req);
|
||||
void ethdown_etype (SN_UNITDATA *sn_req);
|
||||
void ethsapoff (void);
|
||||
void ethsapon (ST_CHAR *drvname);
|
||||
int llcsetup (void);
|
||||
|
||||
BOOL QueryOid (HANDLE hDriver, ULONG ulOid, PBYTE pBuffer, ULONG ulLength);
|
||||
BOOL SetOid (HANDLE hDriver, ULONG ulOid, PBYTE pBuffer, ULONG ulLength);
|
||||
|
||||
void osifreeevt (SN_EVENT *evt);
|
||||
SN_EVENT *osiallocevt ();
|
||||
void osiputevt (SN_EVENT *evt);
|
||||
SN_EVENT *osigetevt ();
|
||||
|
||||
void OsiReadThread (LPDWORD lpdwParam);
|
||||
void OsiReadThreadNT (LPDWORD lpdwParam);
|
||||
void CALLBACK WriteCompletion (DWORD error, DWORD length, OVERLAPPED *ovlp);
|
||||
void CALLBACK ReadCompletion (DWORD error, DWORD length, OVERLAPPED *ovlp);
|
||||
void ProcessReadBlock (OVERLAPPED *ovlp);
|
||||
|
||||
/************************************************************************/
|
||||
/* Global variables. */
|
||||
/************************************************************************/
|
||||
extern LLC_CONTEXT GCC; /* General Current Context */
|
||||
extern LLC_CONTEXT *GCCP; /* General Current Context Pointer */
|
||||
|
||||
extern int MaxWriteOut;
|
||||
extern int MaxReadOut;
|
||||
extern int FramesPerBlock;
|
||||
extern int ReceptionMode;
|
||||
extern int DriverID;
|
||||
extern int NumWriteOut;
|
||||
extern CRITICAL_SECTION csOsiList; /* Critical Section object for OSI Event List */
|
||||
extern BOOL bServiceControl;
|
||||
extern BOOL bNT;
|
||||
extern BOOL bOsiRequired;
|
||||
extern DWORD Priority;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !ETHSUB_INCLUDED */
|
||||
|
||||
209
include/mmslite/fkeydefs.h
Normal file
209
include/mmslite/fkeydefs.h
Normal file
@@ -0,0 +1,209 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986-2001 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : fkeydefs.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains user application definitions and is not */
|
||||
/* directly a part of MMSEASE. It is only used for the sample */
|
||||
/* application. */
|
||||
/* NOTE: If the ?key.c module is compiled with define UTIL_LIB only */
|
||||
/* following functions from wkey.c are exposed: */
|
||||
/* nlfn () */
|
||||
/* log_hex_bytes () */
|
||||
/* wait_debug_log () */
|
||||
/* wait_msg () */
|
||||
/* flush_keys () */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/18/03 JRB 05 Fix QNX #ifdef. */
|
||||
/* 02/17/03 CRM 04 Added "defined(linux)" code. */
|
||||
/* 02/17/03 JRB 03 Stop using SYSTEM_SEL define. */
|
||||
/* 05/16/01 EJV 02 Added proto for term_init, term_rest. */
|
||||
/* 01/22/98 NAV 01 Added funct_menu proto. */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef FKEYDEFS_INCLUDED
|
||||
#define FKEYDEFS_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined (_WIN32)
|
||||
#include <conio.h>
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* NOTE: */
|
||||
/* For QUICK WIN application the call to kbhit () or getch () functions */
|
||||
/* will install our keyboard handling hook function to intercept the */
|
||||
/* keyboard input. */
|
||||
/* It is not necessary to call strt_Hook function, because the kbhit */
|
||||
/* and getch functions are checking for the hook beeing in place. */
|
||||
/* It will be wise to call the end_Hook function to clear the Windows */
|
||||
/* from our keyboard handling if not needed anymore. */
|
||||
/************************************************************************/
|
||||
int strt_Hook(ST_VOID);
|
||||
int end_Hook(ST_VOID);
|
||||
|
||||
/*======================================================================
|
||||
Basic functions keyboard functions:
|
||||
kbhit () checks if keyboard was pressed. It installs also our
|
||||
keyboard handling hook function for the QUICK WIN apps.
|
||||
fkey_kbhit () returns SD_FALSE most of the times. Only every KBHIT_PERIOD
|
||||
(50-th time when called) it will return the return
|
||||
from the call to the kbhit () function.
|
||||
This function may be absolete.
|
||||
getch () returns the ASCII value of a pressed key. The kbhit ()
|
||||
function should be called first to see if the keyboard
|
||||
was pressed. The function will install our keyboard
|
||||
handling hook function for the QUICK WIN applications,
|
||||
if not already installed.
|
||||
flush_keys () flushes the keyboard character buffer.
|
||||
get_a_char () will wait for the keyboard hit and return the ascii
|
||||
code for the character. In addition the function will
|
||||
echo the character to screen.
|
||||
======================================================================*/
|
||||
#if !defined (_WIN32)
|
||||
#if defined(__VMS)
|
||||
/* VMS uses a short return type, and is prototyped in a lot of places */
|
||||
ST_INT kbhit (ST_VOID);
|
||||
ST_INT getch (ST_VOID);
|
||||
#else
|
||||
int kbhit (ST_VOID);
|
||||
int getch (ST_VOID);
|
||||
#endif
|
||||
#else
|
||||
int nt_kbhit (ST_VOID);
|
||||
#define kbhit nt_kbhit
|
||||
#endif
|
||||
|
||||
ST_RET fkey_kbhit (ST_VOID);
|
||||
ST_VOID flush_keys (ST_VOID);
|
||||
ST_CHAR get_a_char (ST_VOID);
|
||||
|
||||
#define KBHIT_PERIOD 50
|
||||
#define KBHIT() fkey_kbhit ()
|
||||
|
||||
|
||||
/*=======================================================================
|
||||
Formatting output to stdout (or FILE *) functions:
|
||||
log_hex_bytes () outputs formatted hex data to a dest (may be stdout).
|
||||
It will format each line (16 hex numbers) of the output
|
||||
as follow:
|
||||
"\noffs hh hh hh hh hh hh hh hh hh hh hh hh hh hh hh hh *tttttttttttttttt*"
|
||||
list_bytes () outputs formatted bytes to stdout. It will format each
|
||||
line (16 hex numbers) of the output as follow:
|
||||
"\n hh hh hh hh hh hh hh hh hh hh hh hh hh hh hh hh "
|
||||
list_ascii () outputs the ascii data to stdout. The ascii data will
|
||||
be split on more then one line if required. The data in
|
||||
the ptr do not have to be NULL terminated.
|
||||
list_words () outputs the formatted words to stdout. The format is
|
||||
as follow:
|
||||
"hhhh hhhh hhhh ...."
|
||||
========================================================================*/
|
||||
ST_VOID log_hex_bytes (FILE *dest, ST_UCHAR *ptr, ST_INT len);
|
||||
ST_VOID list_bytes (ST_UCHAR *ptr, ST_INT len);
|
||||
ST_VOID list_ascii (ST_CHAR *ptr, ST_INT len);
|
||||
ST_VOID list_words (ST_UINT *ptr, ST_INT len);
|
||||
|
||||
|
||||
/*=======================================================================
|
||||
Functions to display a message and wait for user to hit a key:
|
||||
wait_debug_log () outputs the str to a fptr (which may be stdout).
|
||||
If the output is stdout the function will wait for user
|
||||
to hit a key. During waiting the function will call
|
||||
the servefun () to execute background processing.
|
||||
wait_msg () outputs the str to stdout. The function will wait for
|
||||
user to hit a key. During waiting the function will call
|
||||
the servefun () to execute background processing.
|
||||
wait_key () waits for user to hit a key. During waiting the function
|
||||
will call the servefun () to execute background processing.
|
||||
err_msg () outputs the str to stdout. The function will wait for
|
||||
user to hit a key. Note that this func will NOT call
|
||||
the servefun () while waiting for the keyboard input.
|
||||
ask () asks a yes/no question and return the answer.
|
||||
SD_TRUE will be returned if the answer is 'y' or 'Y';
|
||||
SD_FALSE will be returned if the answer is 'n' or 'N';
|
||||
if user presses the ENTER key the default answer will
|
||||
be returned.
|
||||
key_err () displays a message and returns shortly after, used to
|
||||
display error messages without waiting for user to hit
|
||||
a key to continue.
|
||||
========================================================================*/
|
||||
ST_VOID wait_debug_log (FILE *fptr, ST_CHAR *str);
|
||||
ST_VOID wait_msg (ST_CHAR *msg);
|
||||
ST_VOID wait_key (ST_VOID);
|
||||
ST_VOID err_msg (ST_CHAR *str);
|
||||
ST_BOOLEAN ask (ST_CHAR *question, ST_BOOLEAN default_ans);
|
||||
ST_VOID key_err (ST_CHAR *msg);
|
||||
|
||||
/*========================================================================
|
||||
Pointer to USER's background function called while waiting for keyboard
|
||||
input in following functions:
|
||||
wait_key ()
|
||||
wait_msg ()
|
||||
wait_debug_log ()
|
||||
do_fun ()
|
||||
This function is initialized to a nlfn () which returns 0 if called.
|
||||
========================================================================*/
|
||||
extern ST_RET (*servefun) (ST_VOID);
|
||||
|
||||
/*========================================================================
|
||||
Pointers to USER's functions handling the actions for key F1 - F10
|
||||
This pointers will be initialized at program startup to bad_key ()
|
||||
function, which flushes the keyboard buffer.
|
||||
========================================================================*/
|
||||
extern ST_VOID (*funct_1) (ST_VOID);
|
||||
extern ST_VOID (*funct_2) (ST_VOID);
|
||||
extern ST_VOID (*funct_3) (ST_VOID);
|
||||
extern ST_VOID (*funct_4) (ST_VOID);
|
||||
extern ST_VOID (*funct_5) (ST_VOID);
|
||||
extern ST_VOID (*funct_6) (ST_VOID);
|
||||
extern ST_VOID (*funct_7) (ST_VOID);
|
||||
extern ST_VOID (*funct_8) (ST_VOID);
|
||||
extern ST_VOID (*funct_9) (ST_VOID);
|
||||
extern ST_VOID (*funct_10) (ST_VOID);
|
||||
extern ST_VOID (*funct_menu) (ST_VOID); /* may be used to refresh menu */
|
||||
|
||||
ST_VOID fun_null (ST_VOID); /* make all function keys F1-F10 illegal*/
|
||||
ST_VOID do_fun (ST_VOID); /* execute functions assigned to funct_n*/
|
||||
/* pointers until F10 is pressed. */
|
||||
ST_INT check_key (ST_VOID); /* Check for pressed function key and */
|
||||
/* execute an action for that key. */
|
||||
/* Returns 1 if F10 key was pressed, */
|
||||
/* 0 otherwise. */
|
||||
|
||||
/* functions implemented in ?key.c */
|
||||
#if defined(_AIX) || defined(sun) || defined(__hpux) || defined(linux) \
|
||||
|| (defined(__alpha) && !defined(__VMS)) \
|
||||
|| defined(VXWORKS) || defined(__QNX__) || defined(__VMS)
|
||||
ST_VOID term_init ();
|
||||
ST_VOID term_rest ();
|
||||
#elif defined (__OS2__)
|
||||
int term_init (void);
|
||||
int term_rest (void);
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
ST_RET term_init (ST_VOID);
|
||||
ST_INT term_rest (ST_VOID);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FKEYDEFS_INCLUDED */
|
||||
117
include/mmslite/gen_list.h
Normal file
117
include/mmslite/gen_list.h
Normal file
@@ -0,0 +1,117 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1988-2000, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : gen_list.h */
|
||||
/* PRODUCT(S) : General Use */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the definitions as required for */
|
||||
/* manipulation of double-linked circular lists */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 01/04/06 EJV 04 Added DLLs incompatibility comments. */
|
||||
/* 04/20/00 JRB 03 Del (ST_VOID **) protos. ANSI doesn't like. */
|
||||
/* 10/09/98 JRB 02 Add list_find_prev, list_find_last. */
|
||||
/* 08/25/98 EJV 01 Use non-relaxed protos for __hpux. */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef GEN_LIST_INCLUDED
|
||||
#define GEN_LIST_INCLUDED
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*#define FASTLIST */
|
||||
|
||||
/************************************************************************/
|
||||
/* LINKED LIST MECHANISM */
|
||||
/************************************************************************/
|
||||
/* This following structure is used in all doubly linked circular lists */
|
||||
/* as the first component in the structure. This allows one set of list*/
|
||||
/* manipulation primitives to be used with any linked structure */
|
||||
/* containing it. */
|
||||
|
||||
typedef struct dbl_lnk
|
||||
{
|
||||
/* Note: adding/removing fields to/from this struct will make older */
|
||||
/* !!! applications incompatible with new security DLLs. */
|
||||
struct dbl_lnk *next;
|
||||
struct dbl_lnk *prev;
|
||||
} DBL_LNK;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The variable below can be used to do integrity checking of any list */
|
||||
/* manipulated in the generic queuing functions by setting it to SD_TRUE */
|
||||
|
||||
extern ST_BOOLEAN list_debug_sel;
|
||||
|
||||
/* For compatibility with older code only */
|
||||
#define list_sLogCtrl sLogCtrl
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef FASTLIST
|
||||
#define list_get_next(h,p) (((DBL_LNK *)p)->next == (DBL_LNK *)h ? NULL : ((DBL_LNK *)p)->next)
|
||||
#define list_get_first(h) *(h);list_unlink (h,*h)
|
||||
#else
|
||||
/* NOTE: I_AM_THE_TRUE_GEN_LIST is only defined in the module */
|
||||
/* genlists.c so it will compile. */
|
||||
#if defined(I_AM_THE_TRUE_GEN_LIST)
|
||||
ST_VOID *list_get_first (DBL_LNK **);
|
||||
ST_VOID *list_get_next (DBL_LNK *, DBL_LNK *);
|
||||
#else
|
||||
ST_VOID *list_get_first (ST_VOID *);
|
||||
ST_VOID *list_get_next (ST_VOID *, ST_VOID *);
|
||||
#endif
|
||||
#endif /* FASTLIST */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Primitive functions for generic queue handling */
|
||||
|
||||
#if defined(I_AM_THE_TRUE_GEN_LIST)
|
||||
ST_RET list_unlink (DBL_LNK **, DBL_LNK *);
|
||||
ST_RET list_add_first (DBL_LNK **, DBL_LNK *);
|
||||
ST_RET list_add_last (DBL_LNK **, DBL_LNK *);
|
||||
ST_RET list_move_to_first (DBL_LNK **, DBL_LNK **, DBL_LNK *);
|
||||
ST_RET list_find_node (DBL_LNK *, DBL_LNK *);
|
||||
ST_RET list_add_node_after (DBL_LNK *, DBL_LNK *);
|
||||
ST_INT list_get_sizeof (DBL_LNK *);
|
||||
ST_VOID *list_get_last (DBL_LNK **);
|
||||
#else
|
||||
/* NOTE: these prototypes provide very little argument type checking. */
|
||||
/* They allow you to pass almost any argument without casting. */
|
||||
/* ANSI compilers automatically cast the arguments to (ST_VOID *). */
|
||||
/* This is not a great loss, because if the "real" prototypes were */
|
||||
/* used, most code would have to cast arguments to (DBL_LNK *) or */
|
||||
/* (DBL_LNK **), which would disable the argument type checking anyway. */
|
||||
|
||||
ST_RET list_unlink (ST_VOID *pphol, ST_VOID *pnode);
|
||||
ST_RET list_add_first (ST_VOID *pphol, ST_VOID *pnode);
|
||||
ST_RET list_add_last (ST_VOID *pphol, ST_VOID *pnode);
|
||||
ST_RET list_move_to_first (ST_VOID *pphol1, ST_VOID *pphol2, ST_VOID *pnode);
|
||||
ST_RET list_find_node (ST_VOID *pphol, ST_VOID *pnode);
|
||||
ST_RET list_add_node_after (ST_VOID *pnode1, ST_VOID *pnode2);
|
||||
ST_INT list_get_sizeof (ST_VOID *phol);
|
||||
ST_VOID *list_get_last (ST_VOID *pphol);
|
||||
#endif
|
||||
|
||||
/* New functions. Abandon the "I_AM_THE_TRUE_GEN_LIST" casting business.*/
|
||||
DBL_LNK *list_find_prev (DBL_LNK *list_head_ptr, DBL_LNK *cur_node);
|
||||
DBL_LNK *list_find_last (DBL_LNK *list_head_ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
591
include/mmslite/gensock2.h
Normal file
591
include/mmslite/gensock2.h
Normal file
@@ -0,0 +1,591 @@
|
||||
/************************************************************************/
|
||||
/* SOFTWARE MODULE HEADER ***********************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2002 - 2007, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : gensock2.h */
|
||||
/* PRODUCT(S) : General Sockets Interface */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 10/08/08 MDE 29 Allow variable len header, sockEventQueueFlush*/
|
||||
/* 03/17/08 EJV 28 Chg MMSEASE_MOSI to !defined(MMS_LITE). */
|
||||
/* 12/07/07 EJV 27 Impl SISCO's KeepAlive (disconnect idle cons)*/
|
||||
/* GEN_SOCK_CTRL: added lastCheckIdleTime, */
|
||||
/* GEN_SOCK_CTXT: added maxIdleTime, */
|
||||
/* GEN_SOCK_STATS: added lastActivityTime. */
|
||||
/* 11/01/07 EJV 26 Moved include winsock2.h to sysincs.h. */
|
||||
/* Added new GS_DISCONNECT_* error codes. */
|
||||
/* Added GS_DISCONNECT_REASON_STR macro & vars. */
|
||||
/* 09/10/07 MDE 25 Added log_disable, to support IPC logging */
|
||||
/* 05/18/07 RKR 24 Ported to Red Hat 5 */
|
||||
/* 02/08/07 JRB 23 Add GEN_SOCK_EVENT, sockEventPut/Get. */
|
||||
/* Repl uSockConnect with 2 separate pointers */
|
||||
/* uSockConnectInd, uSockConnectConf. */
|
||||
/* 01/30/07 JRB 22 Del obsolete params & sockServiceFreeList. */
|
||||
/* 01/15/07 JRB 21 Del gs_poll_mode flag & poll_mode arg to */
|
||||
/* sockStart (no longer supported). */
|
||||
/* 01/03/07 EJV 20 GEN_SOCK_CTXT: del gSockMutex, txMutex fields*/
|
||||
/* 11/29/06 EJV 19 HP-UX: chg to use socklen_t. */
|
||||
/* 10/25/06 EJV 18 Ported to HP-UX. */
|
||||
/* 02/17/06 EJV 17 __VMS: added SOCK_OPTLEN,SOCK_ADDRLEN. */
|
||||
/* Aligned some defines. */
|
||||
/* 12/19/05 EJV 28 sockUsrFun: chg args. */
|
||||
/* GEN_SOCK: moved sockId, sockIdStr fields down*/
|
||||
/* 09/28/05 EJV 27 Implemented GEN_SOCK_CTXT. */
|
||||
/* Moved GENSOCK_MAX_HEADER_SIZE above struct. */
|
||||
/* Moved MUTEX macros to gensock2.c and renamed */
|
||||
/* GEN_SOCK: added sockId, sockIdStr, sockCtx. */
|
||||
/* GEN_SOCK_CTRL: added sockCtx. */
|
||||
/* Added GS_DISCONNECT_XXX_ERROR defines. */
|
||||
/* _sockAddSock: chg from ST_VOID to ST_RET ret.*/
|
||||
/* sockUsrFun: new func. */
|
||||
/* 07/11/05 EJV 26 Add convertIPAddr proto. */
|
||||
/* 06/10/05 JRB 25 Obsolete "_sockClose" function replaced with */
|
||||
/* macro that calls normal "sockClose". */
|
||||
/* 05/10/05 EJV 24 Added _sockAllocSock, _sockAddSock protos. */
|
||||
/* 03/23/05 EJV 23 Added sockCreateWakeupSockets */
|
||||
/* linux MMSEASE_MOSI:add GENSOCK_THREAD_SUPPORT*/
|
||||
/* 03/16/05 JRB 22 Add GENSOCK_HUNT_DISCONNECT define. */
|
||||
/* 02/21/05 JRB 21 Fix ioctlsocket define (deleted from tp0_sock)*/
|
||||
/* 02/10/05 MDE 20 Added sockGetRemAddrInfo */
|
||||
/* 07/22/04 EJV 19 sun: added GENSOCK_THREAD_SUPPORT */
|
||||
/* 06/18/04 MDE 18 Include winsock2.h if needed */
|
||||
/* 03/11/04 EJV 17 SOCK_OPTLEN,SOCK_ADDRLEN diff for each system*/
|
||||
/* 02/25/04 EJV 16 _AIX: added GENSOCK_THREAD_SUPPORT */
|
||||
/* Added SOCK_OPTLEN and SOCK_ADDRLEN. */
|
||||
/* Chg SOCK_NOTSOCK to be EBADF (not ENOTSOCK). */
|
||||
/* 01/27/04 EJV 15 Added SOCK_NOTSOCK error. */
|
||||
/* 01/14/04 EJV 14 GEN_SOCK: added sockTxQueuedGroupCnt field. */
|
||||
/* GEN_SOCK_DATA: added eot field. */
|
||||
/* Added sockGetTxQueueGroupCnt proto. */
|
||||
/* 10/23/03 JRB 13 Move all system includes to sysincs.h */
|
||||
/* 06/25/03 JRB 12 Move log macros to "sock_log.h". */
|
||||
/* 06/23/03 EJV 11 Added 'first' param to sockTxQueueAdd. */
|
||||
/* 06/20/03 EJV 10 Rem param from gs_mutex_get. */
|
||||
/* 06/20/03 EJV 09 Added sockTxQueueDestroy.Chg gSock w/pSock. */
|
||||
/* Alligned struct fields. */
|
||||
/* 06/19/03 EJV 08 _WIN32: added GENSOCK_THREAD_SUPPORT */
|
||||
/* Added comments to struct, #else, #endif */
|
||||
/* 06/19/03 JRB 07 Make Rx/Tx names more consistent. */
|
||||
/* 06/18/03 JRB 06 Move defines to top & add SOCKADDR*, ioctlsocket*/
|
||||
/* Del GENSOCK_THREAD_SUPPORT, define in makefile*/
|
||||
/* Add forward reference. */
|
||||
/* Add sockTxPend to GEN_SOCK. */
|
||||
/* Add GSOCK_LOG_FLOWH. */
|
||||
/* Del winsock2.h (windows.h gets right winsock)*/
|
||||
/* Use "base" slog macros. */
|
||||
/* Add uSockTxBufFree to GEN_SOCK_CONFIG. */
|
||||
/* Add sockTxMsg, sockTxQueue* funcs. */
|
||||
/* 06/13/03 MDE 05 More user poll featuresAdded sockGetFds */
|
||||
/* 06/13/03 EJV 04 Added parameter to gs_mutex_get. */
|
||||
/* 05/14/03 MDE 03 Added sockGetFds */
|
||||
/* 05/09/03 JRB 02 Add SOCK_* defines for !_WIN32 */
|
||||
/* 02/17/03 MDE 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef GENSOCK_INCLUDED
|
||||
#define GENSOCK_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "glbtypes.h"
|
||||
#include "sysincs.h"
|
||||
#include "gen_list.h"
|
||||
#include "glbsem.h"
|
||||
#include "mem_chk.h"
|
||||
#include "sock_log.h" /* logging macros */
|
||||
|
||||
/* Windows vs. the rest of the world ... */
|
||||
#ifdef _WIN32
|
||||
|
||||
#if !defined(GENSOCK_THREAD_SUPPORT)
|
||||
#define GENSOCK_THREAD_SUPPORT
|
||||
#endif
|
||||
#define SOCKET_ERRORNO WSAGetLastError()
|
||||
#define SOCK_EADDRINUSE WSAEADDRINUSE
|
||||
#define SOCK_WOULDBLOCK WSAEWOULDBLOCK
|
||||
#define SOCK_INTR WSAEINTR
|
||||
#define SOCK_NOBUFS WSAENOBUFS
|
||||
#define SOCK_INPROGRESS WSAEINPROGRESS
|
||||
#define SOCK_TIMEDOUT WSAETIMEDOUT
|
||||
#define SOCK_NOTSOCK WSAENOTSOCK
|
||||
#define CLOSE_SOCKET(x) closesocket(x)
|
||||
|
||||
#define SOCK_OPTLEN ST_INT /* in getsockopt */
|
||||
#define SOCK_ADDRLEN ST_INT /* in accept */
|
||||
|
||||
#else /* !_WIN32 */
|
||||
|
||||
/* define multithread support for GENSOCK on some platforms */
|
||||
#if defined(_AIX) || defined(sun) || defined(__hpux) || \
|
||||
(defined(linux) && !defined(MMS_LITE))
|
||||
#if !defined(GENSOCK_THREAD_SUPPORT)
|
||||
#define GENSOCK_THREAD_SUPPORT
|
||||
#endif
|
||||
#endif /* defined(_AIX) || ... */
|
||||
|
||||
#define SOCKET_ERRORNO errno
|
||||
#define SOCK_EADDRINUSE EADDRINUSE
|
||||
#define SOCK_WOULDBLOCK EWOULDBLOCK
|
||||
#define SOCK_INTR EINTR
|
||||
#define SOCK_NOBUFS ENOBUFS
|
||||
#define SOCK_INPROGRESS EINPROGRESS
|
||||
#define SOCK_TIMEDOUT ETIMEDOUT
|
||||
#define SOCK_NOTSOCK EBADF
|
||||
#define CLOSE_SOCKET(x) close(x)
|
||||
|
||||
#define SOCKET int
|
||||
#define INVALID_SOCKET (-1)
|
||||
#define SOCKADDR struct sockaddr
|
||||
#define SOCKADDR_IN struct sockaddr_in
|
||||
|
||||
#if defined (__OS2__) /* OS/2 ioctl has extra arg */
|
||||
#define ioctlsocket(hSock,opt,valptr) ioctl(hSock, opt, (ST_CHAR *)valptr, sizeof(u_long))
|
||||
#elif defined (VXWORKS) /* VXWORKS wants arg to be int */
|
||||
#define ioctlsocket(hSock,opt,valptr) ioctl(hSock, opt, (int) valptr)
|
||||
#else /* all other systems (e.g. UNIX) */
|
||||
#define ioctlsocket ioctl
|
||||
#endif
|
||||
|
||||
#if defined(_AIX) || defined(sun) || defined(__hpux) || defined(linux)
|
||||
/* Note: __hpux will need these defines when passing access rights SCM_RIGHTS */
|
||||
/* through domain socket is working properly for _XOPEN_SOURCE_EXTENDED. */
|
||||
#define SOCK_OPTLEN socklen_t /* in getsockopt */
|
||||
#define SOCK_ADDRLEN socklen_t /* in accept */
|
||||
#elif defined(__VMS)
|
||||
#define SOCK_OPTLEN __size_t /* in getsockopt */
|
||||
#define SOCK_ADDRLEN __size_t /* in accept */
|
||||
#else
|
||||
/* all other no-Windows platforms not defined above */
|
||||
#define SOCK_OPTLEN int /* in getsockopt */
|
||||
#define SOCK_ADDRLEN int /* in accept */
|
||||
#endif
|
||||
#endif /* !_WIN32 */
|
||||
|
||||
|
||||
struct tag_GEN_SOCK; /* Forward reference */
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct tag_GEN_SOCK_DATA
|
||||
{
|
||||
/* User Send/Receive Queueing */
|
||||
DBL_LNK l;
|
||||
|
||||
/* For user management of send/receive buffers */
|
||||
ST_UCHAR *usrBufBase; /* Data buffer */
|
||||
ST_INT usrBufLen; /* Total send buffer size */
|
||||
|
||||
ST_VOID *usr1; /* Misc. user use */
|
||||
ST_VOID *usr2; /* Misc. user use */
|
||||
|
||||
/* Data to be sent/Received Data */
|
||||
ST_UCHAR *data; /* Recv Data, Send Data */
|
||||
ST_INT dataLen; /* Length of data recvd, or to be sent */
|
||||
|
||||
ST_INT result; /* For receive, SD_SUCCESS or error */
|
||||
ST_BOOLEAN eot; /* SD_TRUE - if last msg in a group */
|
||||
} GEN_SOCK_DATA;
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
time_t createdTime;
|
||||
time_t activeTime; /* connected or listening */
|
||||
ST_LONG numSend; /* num of RFC1006 msgs sent */
|
||||
ST_LONG numRecv; /* num of RFC1006 msgs received */
|
||||
ST_DOUBLE lastActivityTime; /* for disconnecting idle connections */
|
||||
} GEN_SOCK_STATS;
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct tag_GEN_SOCK_CONFIG
|
||||
{
|
||||
/* Config parameters */
|
||||
ST_INT hdrSize; /* Default sizeof (ST_INT) */
|
||||
ST_INT hdrAllocSize; /* Size to allocate for hdrBuf */
|
||||
/* in GEN_SOCK struct */
|
||||
/* If 0 then hdrSize is used */
|
||||
|
||||
/* setsockopt parameters */
|
||||
ST_BOOLEAN setSockOpts;
|
||||
ST_INT noDelay;
|
||||
ST_INT keepAlive;
|
||||
ST_INT reuseAddr;
|
||||
ST_INT rcvBufSize;
|
||||
ST_INT sndBufSize;
|
||||
|
||||
/* User can set to disable receive */
|
||||
ST_BOOLEAN pauseRecv;
|
||||
|
||||
/* Listen backlog */
|
||||
ST_INT listenBacklog;
|
||||
|
||||
/* User callbacks */
|
||||
ST_RET (*uSockConnectInd) (struct tag_GEN_SOCK *pSock);
|
||||
ST_RET (*uSockConnectConf) (struct tag_GEN_SOCK *pSock);
|
||||
ST_VOID (*uSockDisconnect) (struct tag_GEN_SOCK *pSock);
|
||||
ST_VOID (*uSockHunt) (struct tag_GEN_SOCK *pSock, ST_INT *huntStateIo,
|
||||
ST_CHAR *buf, ST_INT bufCount, ST_INT *lenOut);
|
||||
ST_VOID (*uSockRx) (struct tag_GEN_SOCK *pSock, GEN_SOCK_DATA *sockData);
|
||||
ST_VOID (*uSockRxBufAlloc) (struct tag_GEN_SOCK *pSock, ST_INT dataLen, GEN_SOCK_DATA **sockData);
|
||||
ST_VOID (*uSockTxBufFree) (struct tag_GEN_SOCK *pSock, GEN_SOCK_DATA *sockData);
|
||||
ST_VOID (*uSockWritable) (struct tag_GEN_SOCK *pSock);
|
||||
|
||||
/* User fields */
|
||||
ST_EVENT_SEM recvEvent;
|
||||
ST_VOID *usr1;
|
||||
ST_VOID *usr2;
|
||||
ST_VOID *usr3;
|
||||
ST_VOID *usr4;
|
||||
|
||||
/* Internal Security Hooks: Set to NULL unless using security plug-in */
|
||||
ST_BOOLEAN secEnable;
|
||||
ST_RET (*secConnectProc) (struct tag_GEN_SOCK *pSock);
|
||||
ST_VOID (*secDisconnectProc) (struct tag_GEN_SOCK *pSock);
|
||||
ST_RET (*secRxProc) (struct tag_GEN_SOCK *pSock, ST_CHAR *dest, ST_INT maxRx,
|
||||
ST_INT flags, ST_INT *rxCountOut, ST_BOOLEAN *secDataLeftOut);
|
||||
ST_RET (*secTxProc) (struct tag_GEN_SOCK *pSock, GEN_SOCK_DATA *sockData, ST_INT *numSentOut);
|
||||
ST_VOID (*secWritable) (struct tag_GEN_SOCK *pSock);
|
||||
ST_VOID (*secSockFree) (struct tag_GEN_SOCK *pSock);
|
||||
|
||||
ST_VOID *secCtrl;
|
||||
|
||||
/* Set to enable write select */
|
||||
ST_BOOLEAN chkWritable;
|
||||
} GEN_SOCK_CONFIG;
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/* State defines for GEN_SOCK */
|
||||
#define GS_STATE_LISTENING 1
|
||||
#define GS_STATE_STOPPING_LISTEN 2
|
||||
#define GS_STATE_FAILED_LISTEN 3
|
||||
#define GS_STATE_CONNECTING 4
|
||||
#define GS_STATE_CONNECTED 5
|
||||
#define GS_STATE_CLOSED 6
|
||||
#define GS_STATE_OLD_SOCKET 7
|
||||
|
||||
/* Role defines */
|
||||
#define GS_ROLE_CALLING 1
|
||||
#define GS_ROLE_LISTENING 2
|
||||
#define GS_ROLE_CALLED 3
|
||||
|
||||
/* disconnectReason defines */
|
||||
#define GS_DISCONNECT_UNKNOWN 0
|
||||
#define GS_DISCONNECT_CONNECT_FAILED 1
|
||||
#define GS_DISCONNECT_USR_REFUSED 2
|
||||
#define GS_DISCONNECT_SEND_FAILURE 3
|
||||
#define GS_DISCONNECT_RECV_FAILED 4
|
||||
#define GS_DISCONNECT_ACCEPT_FAILED 5
|
||||
#define GS_DISCONNECT_CLOSED 6
|
||||
#define GS_DISCONNECT_TERMINATING 7
|
||||
#define GS_DISCONNECT_RESOURCES_ERROR 8
|
||||
#define GS_DISCONNECT_INTERNAL_ERROR 9
|
||||
#define GS_DISCONNECT_NORMAL_DISCONNECT 10 /* normal disconnect */
|
||||
/* disconnectReason for SSL connection */
|
||||
#define GS_DISCONNECT_SSLE_LICENSE 11 /* SSL Engine licence expired */
|
||||
#define GS_DISCONNECT_SSLE_INT_ERR 12 /* SSL Engine internal error */
|
||||
#define GS_DISCONNECT_REKEY_FAILED 13 /* failed to rekey SSL conn */
|
||||
#define GS_DISCONNECT_CERT_VERIFY_ERR 14 /* certificate not acceptable */
|
||||
#define GS_DISCONNECT_CERT_ON_CRL 15 /* certificate on CRL */
|
||||
#define GS_DISCONNECT_SEC_PARAM_ERR 16 /* cipher or cert ctrl err */
|
||||
/* update gensock2.c sockDisconnReasonStr when more codes added */
|
||||
|
||||
extern ST_CHAR *sockDisconnReasonStr[];
|
||||
extern ST_INT sockDisconnReasonStrCnt;
|
||||
/* disconnectReason strings for logging */
|
||||
#define GS_DISCONNECT_REASON_STR(reason) ((reason < sockDisconnReasonStrCnt) ? sockDisconnReasonStr[reason] : "DISCONNECT REASON: UNKNOWN")
|
||||
|
||||
/* Hunt state defines */
|
||||
#define GENSOCK_HUNT_UNDERWAY 1
|
||||
#define GENSOCK_HUNT_DONE 2
|
||||
#define GENSOCK_HUNT_RESET 3
|
||||
#define GENSOCK_HUNT_DISCONNECT 4 /* stop hunting and disconnect */
|
||||
|
||||
#define RECV_STATE_HUNT 1
|
||||
#define RECV_STATE_DATA 2
|
||||
|
||||
#define GEN_SOCK_CTX_NAME_MAX_STR 32 /* Socket Context max name length */
|
||||
#define GEN_SOCK_CTX_ID_MAX_STR 20
|
||||
#define GEN_SOCK_SOCK_ID_MAX_STR (GEN_SOCK_CTX_NAME_MAX_STR + GEN_SOCK_CTX_ID_MAX_STR + 20)
|
||||
|
||||
struct tag_GEN_SOCK_CTXT; /* Forward reference */
|
||||
|
||||
typedef struct tag_GEN_SOCK
|
||||
{
|
||||
DBL_LNK l; /* internal use */
|
||||
|
||||
/* Socket state */
|
||||
ST_INT sockState;
|
||||
ST_INT role;
|
||||
|
||||
/* Valid in user socket disconnet call */
|
||||
ST_INT disconnectReason;
|
||||
|
||||
/* Config parameters */
|
||||
GEN_SOCK_CONFIG sockCfg;
|
||||
|
||||
GEN_SOCK_STATS sockStats;
|
||||
|
||||
/* For Listen socket only */
|
||||
ST_UINT maxActive;
|
||||
ST_UINT numActive;
|
||||
|
||||
/* For called socket, reference the listen socket */
|
||||
struct tag_GEN_SOCK *listenSocket;
|
||||
|
||||
ST_INT callingAddrLen;
|
||||
SOCKADDR_IN callingAddr;
|
||||
|
||||
/* Internal */
|
||||
SOCKET hSock;
|
||||
|
||||
ST_INT recvState;
|
||||
ST_CHAR *recvBuf;
|
||||
ST_INT recvDoneCount;
|
||||
ST_INT recvCurrCount;
|
||||
ST_CHAR *hdrBuf; /* ptr to buffer allocated after this struct*/
|
||||
GEN_SOCK_DATA *sockData;
|
||||
|
||||
struct sockaddr_in sockAddrIn;
|
||||
ST_BOOLEAN usrCloseCalled;
|
||||
ST_BOOLEAN recvUsing;
|
||||
|
||||
struct tag_GEN_SOCK_CTRL *serviceCtrl;
|
||||
|
||||
GEN_SOCK_DATA *sockTxPend; /* Queue of data to be sent. */
|
||||
ST_UINT sockTxQueueGroupCnt; /* num of queued msgs w/eot to tx */
|
||||
|
||||
/* Fields added since MMS-SECURE, ICCP-SECURE v1.03 release */
|
||||
ST_UINT sockId; /* different id for each socket */
|
||||
ST_CHAR sockIdStr[GEN_SOCK_SOCK_ID_MAX_STR]; /* assemble for use in log later */
|
||||
|
||||
struct tag_GEN_SOCK_CTXT *sockCtx;
|
||||
} GEN_SOCK;
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/* Allow one for wakeup socket */
|
||||
#define GS_MAX_SOCK_PER_SERVICE FD_SETSIZE - 1
|
||||
|
||||
typedef struct tag_GEN_SOCK_CTRL
|
||||
{
|
||||
DBL_LNK l;
|
||||
ST_INT numSock;
|
||||
GEN_SOCK *sockList;
|
||||
ST_DOUBLE lastCheckIdleTime;
|
||||
|
||||
#if defined(GENSOCK_THREAD_SUPPORT)
|
||||
ST_EVENT_SEM serviceEvent;
|
||||
ST_THREAD_HANDLE thService;
|
||||
ST_THREAD_ID tIdService;
|
||||
|
||||
ST_UINT16 wakeupPort;
|
||||
SOCKET xCalledSock;
|
||||
SOCKET xCallingSock;
|
||||
#endif /* GENSOCK_THREAD_SUPPORT */
|
||||
|
||||
struct tag_GEN_SOCK_CTXT *sockCtx;
|
||||
} GEN_SOCK_CTRL;
|
||||
|
||||
/************************************************************************/
|
||||
/* GEN_SOCK_EVENT: Socket event structure to store incoming event. */
|
||||
|
||||
/* Values for "eventType" member of GEN_SOCK_EVENT structure. */
|
||||
#define GS_EVENT_CONNECT_IND 1 /* connect indication */
|
||||
#define GS_EVENT_CONNECT_CONF 2 /* connect confirmation */
|
||||
#define GS_EVENT_DISCONNECT 3 /* socket disconnected */
|
||||
#define GS_EVENT_DATA_IND 4 /* data indication */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DBL_LNK l;
|
||||
ST_INT eventType; /* type of event (GS_EVENT_DATA_IND, etc.)*/
|
||||
GEN_SOCK *pSock;
|
||||
GEN_SOCK_DATA *sockData;
|
||||
} GEN_SOCK_EVENT;
|
||||
|
||||
/************************************************************************/
|
||||
/* gensock2 context */
|
||||
/* each sockStart() call will create new context with its own lists, */
|
||||
/* threads, and events handling. Call sockEnd() to clean. */
|
||||
|
||||
/* ctxStatus states */
|
||||
#define GEN_SOCK_CTX_ACTIVE 0
|
||||
#define GEN_SOCK_CTX_TERMINATING 1
|
||||
|
||||
|
||||
typedef struct tag_GEN_SOCK_CTXT
|
||||
{
|
||||
DBL_LNK l; /* internal use */
|
||||
|
||||
ST_UINT ctxId; /* diff id for each context */
|
||||
ST_INT ctxStatus; /* GEN_SOCK_CTX_xxx */
|
||||
ST_CHAR ctxName[GEN_SOCK_CTX_NAME_MAX_STR + GEN_SOCK_CTX_ID_MAX_STR];
|
||||
ST_BOOLEAN log_disable;
|
||||
|
||||
/* Lists */
|
||||
GEN_SOCK_CTRL *sockServiceList;
|
||||
|
||||
GEN_SOCK_EVENT *sockEventList; /* socket event list */
|
||||
/* maintained by sockEventPut/Get*/
|
||||
ST_INT sockEventCount; /* num events on sockEventList */
|
||||
/* maintained by sockEventPut/Get*/
|
||||
|
||||
ST_UINT maxIdleTime; /* ms, if>0 check for idle cons, */
|
||||
/* SISCO's KeepAlive implementation */
|
||||
|
||||
#if defined(GENSOCK_THREAD_SUPPORT)
|
||||
/* Port used for wakeup sockets */
|
||||
ST_UINT16 gs_wakeup_port; /* default >= 55050 */
|
||||
|
||||
/* Used by list service thread */
|
||||
ST_INT gs_select_timeout; /* default = 100000 */
|
||||
|
||||
ST_BOOLEAN gTerminateService;
|
||||
|
||||
#endif /* defined(GENSOCK_THREAD_SUPPORT) */
|
||||
} GEN_SOCK_CTXT;
|
||||
|
||||
extern GEN_SOCK_CTXT *sockCtxList; /* contexts list */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* gensock2 user functions */
|
||||
|
||||
ST_RET sockStart (ST_CHAR *ctxName, GEN_SOCK_CTXT **sockCtxOut);
|
||||
ST_RET sockStartEx (ST_CHAR *ctxName, GEN_SOCK_CTXT **sockCtxOut, ST_BOOLEAN log_disable);
|
||||
ST_RET sockEnd (GEN_SOCK_CTXT *sockCtx);
|
||||
|
||||
ST_RET sockInitCalling (GEN_SOCK_CTXT *sockCtx, GEN_SOCK_CONFIG *sockCfg,
|
||||
ST_UINT16 portNo, ST_CHAR *ipAddr, GEN_SOCK **pSockOut);
|
||||
|
||||
ST_RET sockInitListen (GEN_SOCK_CTXT *sockCtx, GEN_SOCK_CONFIG *sockCfg,
|
||||
ST_UINT16 portNo, ST_INT maxActive, GEN_SOCK **pListenSockOut);
|
||||
|
||||
ST_RET sockTx (GEN_SOCK *pSock, GEN_SOCK_DATA *sockData, ST_INT *numSentOut);
|
||||
ST_RET sockTxMsg (GEN_SOCK *pSock, GEN_SOCK_DATA *sockData);
|
||||
ST_RET sockTxQueueAdd (GEN_SOCK *pSock, GEN_SOCK_DATA *sockData, ST_BOOLEAN first);
|
||||
ST_RET sockTxQueueDestroy (GEN_SOCK *pSock);
|
||||
ST_RET sockTxQueueProc (GEN_SOCK *pSock);
|
||||
ST_UINT sockTxQueueGroupCntGet (GEN_SOCK *pSock);
|
||||
ST_RET sockStopRecv (GEN_SOCK *pSock);
|
||||
ST_RET sockClose (GEN_SOCK *pSock);
|
||||
ST_RET sockFree (GEN_SOCK *pSock);
|
||||
|
||||
/* Polling support */
|
||||
|
||||
/* Get socket descriptors */
|
||||
typedef struct
|
||||
{
|
||||
ST_INT totalfds;
|
||||
ST_UINT selectnfds;
|
||||
|
||||
ST_INT numReadfds;
|
||||
fd_set readfds;
|
||||
|
||||
ST_INT numWritefds;
|
||||
fd_set writefds;
|
||||
|
||||
ST_INT numExceptfds;
|
||||
fd_set exceptfds;
|
||||
} GENSOCK_FD_SET;
|
||||
|
||||
ST_VOID sockGetFds (GEN_SOCK_CTRL *serviceCtrl, GENSOCK_FD_SET *sockFds);
|
||||
|
||||
/* Return values for sockCtrlService, sockSelectResultProcess */
|
||||
#define GS_SELECT_NO_ACTIVE_SOCK 1
|
||||
#define GS_SELECT_TIMEOUT 2
|
||||
#define GS_SELECT_ERROR 3
|
||||
#define GS_SELECT_ACTIVE 4
|
||||
#define GS_SELECT_TERMINATED 5
|
||||
|
||||
ST_VOID sockServiceAll (GEN_SOCK_CTXT *sockCtx, ST_LONG timeOut);
|
||||
ST_INT sockCtrlService (GEN_SOCK_CTRL *serviceCtrl, ST_LONG timeOut);
|
||||
|
||||
#if !defined(GENSOCK_THREAD_SUPPORT)
|
||||
ST_VOID sockInitAllFds (GENSOCK_FD_SET *sockFds);
|
||||
#endif
|
||||
|
||||
ST_VOID sockInitFds (GEN_SOCK_CTRL *serviceCtrl, GENSOCK_FD_SET *sockFds);
|
||||
ST_VOID sockAddReadFds (GENSOCK_FD_SET *sockFds, SOCKET hSock);
|
||||
ST_VOID sockAddWriteFds (GENSOCK_FD_SET *sockFds, SOCKET hSock);
|
||||
ST_VOID sockAddExceptFds (GENSOCK_FD_SET *sockFds, SOCKET hSock);
|
||||
ST_INT sockSelectResultProcess (GEN_SOCK_CTRL *serviceCtrl,
|
||||
int nfds, GENSOCK_FD_SET *sockFds);
|
||||
|
||||
/* Thread support */
|
||||
ST_RET sockCreateWakeupSockets (GEN_SOCK_CTXT *sockCtx,
|
||||
ST_UINT16 basePort, ST_UINT portRange,
|
||||
ST_UINT16 *usedPort,
|
||||
SOCKET *callingSock, SOCKET *calledSock);
|
||||
ST_VOID sockServiceWakeAll (GEN_SOCK_CTXT *sockCtx);
|
||||
ST_VOID sockServiceWake (GEN_SOCK_CTRL *serviceCtrl);
|
||||
|
||||
/* Logging */
|
||||
ST_VOID sockLogState (GEN_SOCK_CTXT *sockCtx);
|
||||
ST_VOID sockLogSockState (GEN_SOCK *pSock, ST_CHAR *prefix);
|
||||
|
||||
/* Socket info */
|
||||
ST_RET sockGetRemAddrInfo (GEN_SOCK *pSock, SOCKADDR_IN *remSockAddrDest,
|
||||
ST_CHAR **remAddrTxtOut, ST_INT *portOut);
|
||||
|
||||
/* Functions to maintain list of GEN_SOCK_EVENT. */
|
||||
ST_VOID sockEventPut (GEN_SOCK_CTXT *sockCtx, GEN_SOCK_EVENT *event); /* put on list*/
|
||||
GEN_SOCK_EVENT *sockEventGet (GEN_SOCK_CTXT *sockCtx); /* get from list*/
|
||||
ST_VOID sockEventQueueFlush (GEN_SOCK_CTXT *sockCtx, GEN_SOCK *pSock);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* INTERNAL */
|
||||
/************************************************************************/
|
||||
|
||||
/* sockUsrFun calls usrFun for each socket in every context, if the */
|
||||
/* usrFun doesn't return SD_SUCCESS then socket will be closed; */
|
||||
/* errMsg will be logged on error. */
|
||||
ST_VOID sockUsrFun (ST_RET (*usrFun)(ST_VOID *secCtrl), ST_CHAR *errMsg);
|
||||
|
||||
GEN_SOCK *_sockAllocSock (GEN_SOCK_CTXT *sockCtx,
|
||||
ST_INT role, ST_INT sockState, SOCKET hSock,
|
||||
GEN_SOCK_CONFIG *sockCfg);
|
||||
ST_RET _sockAddSock (GEN_SOCK *pSock);
|
||||
|
||||
ST_RET _sockRecv (GEN_SOCK *pSock, ST_CHAR *dest,
|
||||
ST_INT maxRx, ST_INT flags, ST_INT *rxCountOut);
|
||||
|
||||
ST_RET _sockTx (GEN_SOCK *pSock, GEN_SOCK_DATA *sockData, ST_INT *numSentOut);
|
||||
|
||||
/* OBSOLETE: For backward compatibility only. New code should use "sockClose".*/
|
||||
#define _sockClose sockClose
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Misc socket related functions */
|
||||
/* -------------------------------------------- */
|
||||
|
||||
ST_ULONG convertIPAddr (ST_CHAR *ipAddrStr, ST_BOOLEAN useGetHostByName);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GENSOCK_INCLUDED */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
117
include/mmslite/glberror.h
Normal file
117
include/mmslite/glberror.h
Normal file
@@ -0,0 +1,117 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : glberror.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains defines for all the entities that may */
|
||||
/* generate error code. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 10/30/98 DSF 02 Added E_ACTIVEMMS */
|
||||
/* 03/18/98 JRB 01 Added E_ASN1_DEC. */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
/*** NOTE : These defines are for reference only, and are not used in */
|
||||
/* creating the actual error code defines. */
|
||||
|
||||
#ifndef GBLERROR_INCLUDED
|
||||
#define GBLERROR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define E_SUBSYS 0x0 /* underlying MAP subsystem: */
|
||||
/* Board or Board Driver (non-SISCO) */
|
||||
|
||||
#define E_DRIVER 0x100 /* SISCO MAP Board Driver */
|
||||
#define E_DH 0x200 /* SISCO Data Highway Driver */
|
||||
|
||||
#define EX_DRIVER 0x500 /* SISCO MAP Board Driver Exceptions */
|
||||
#define EX_DH 0x600 /* SISCO Data Highway Driver Exceptions */
|
||||
|
||||
#define E_CASESUIC 0xA00 /* CASE SUIC */
|
||||
#define E_ACSESUIC 0xB00 /* ACSE SUIC */
|
||||
|
||||
#define EX_CASESUIC 0xE00 /* CASE SUIC Exceptions */
|
||||
#define EX_ACSESUIC 0xF00 /* ACSE SUIC Exceptions */
|
||||
|
||||
#define E_TP4 0x1200 /* TP4 errors (see tp4api.h) */
|
||||
|
||||
#define E_CASESUIC_IS 0x1400 /* CASE SUIC Implementation Specific */
|
||||
#define E_ACSESUIC_IS 0x1500 /* ACSE SUIC Implementation Specific */
|
||||
|
||||
#define EX_CASESUIC_IS 0x1900 /* CASE SUIC Implementation Specific Exceptions */
|
||||
#define EX_ACSESUIC_IS 0x1A00 /* ACSE SUIC Implementation Specific Exceptions */
|
||||
|
||||
#define E_SESSIF 0x1E00 /* Session Interface */
|
||||
#define E_CASE 0x1F00 /* SISCO CASE Layer Provider */
|
||||
|
||||
#define EX_SESSIF 0x2400 /* Session Interface Exceptions */
|
||||
#define EX_CASE 0x2500 /* SISCO CASE Layer Provider Exceptions */
|
||||
|
||||
#define E_SESSIF_IS 0x2800 /* Session IF Implementation Spec */
|
||||
#define E_CASE_IS 0x2900 /* SISCO CASE Layer Provider Imp. Spec */
|
||||
|
||||
#define EX_SESSIF_IS 0x2D00 /* Session IF Implementation Spec Exceptions */
|
||||
#define EX_CASE_IS 0x2E00 /* SISCO CASE Layer Provider Imp. Spec Exceptions */
|
||||
|
||||
#define E_ACSE2 0x3000 /* ACSE2 errors (see acse2usr.h) */
|
||||
#define E_COPP 0x3100 /* COPP errors (see copp_usr.h) */
|
||||
#define E_COSP 0x3200 /* COSP errors (see cosp_usr.h) */
|
||||
#define E_CLNP 0x3400 /* CLNP errors (see clnp_usr.h) */
|
||||
#define E_SUBNET 0x3500 /* SUBNET errors (see clnp_usr.h) */
|
||||
#define E_ADLC 0x3600 /* ADLC errors (see adlc_usr.h) */
|
||||
#define E_RLI_IPC 0x3700 /* RLI_IPC errors (see rli_ipce.h) */
|
||||
|
||||
#define E_CFG_UTIL 0x4000 /* CFG UTIL codes */
|
||||
#define E_HLM 0x4100 /* HLM codes */
|
||||
#define E_HLM_MMS 0x4200 /* HLM MMS code */
|
||||
|
||||
#define E_ACTIVEMMS 0x4A00 /* ActiveMMS codes */
|
||||
|
||||
#define E_CM 0x5100 /* CM error codes base */
|
||||
#define E_CRM 0x5200 /* CRM error codes base */
|
||||
|
||||
#define E_MMS_GEN 0x6400 /* General provider */
|
||||
#define E_MMS_PPI 0X6500 /* Paired Primitive Interface */
|
||||
#define E_MMS_RESP 0x6600 /* Request Control Block (resp_err) */
|
||||
#define E_MMS_VMI 0x6700 /* Virtual Machine Interface */
|
||||
#define E_MMS_EXCPT 0x6800 /* MMS exceptions */
|
||||
#define E_LLP_ACSE 0x6900 /* ACSE LLP codes */
|
||||
#define E_LLP_CASE 0x6A00 /* CASE LLP codes */
|
||||
#define E_LLP_LLC 0x6B00 /* LLC LLP codes */
|
||||
#define E_MMS_LITE 0x6A00 /* MMS-LITE codes */
|
||||
|
||||
#define E_MMS_DS 0x6B00 /* MMS Directory Services */
|
||||
|
||||
#define E_ASN1_DEC 0x7000 /* ASN.1 decode errors */
|
||||
|
||||
/* The following define indicates the beginning of a range for */
|
||||
/* User-Defined error codes. Users may define error codes above this */
|
||||
/* value without conflicting with SISCO defined errors. */
|
||||
|
||||
#define E_USER_APP 0x7E00 /* User Application errors */
|
||||
|
||||
/* ******** DO NOT DEFINE ANY ERROR CODES ABOVE "0x7E00" ******** */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
43
include/mmslite/glbopt.h
Normal file
43
include/mmslite/glbopt.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef GLBOPT_INCLUDED
|
||||
#define GLBOPT_INCLUDED
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2002-2002 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : glbopt.h */
|
||||
/* PRODUCT(S) : MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Global compiler options to be used by all SISCO source modules. */
|
||||
/* This file may be used to enable optional features in */
|
||||
/* MMSEASE-LITE. Usually this is easier than adding an */
|
||||
/* option to several makefiles. If this file is modified, all */
|
||||
/* source code should be recompiled. */
|
||||
/* */
|
||||
/* This file must be included by "glbtypes.h" so that all SISCO */
|
||||
/* source modules will indirectly include it. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/09/05 JRB 09 Delete all defines. This file should now be */
|
||||
/* used only for "user" customization. */
|
||||
/* 09/22/03 EJV 08 Deleted ACSE_AUTH_ENABLED, S_SEC_ENABLED */
|
||||
/* 07/16/03 MDE 07 Removed ACSE_AUTH_ENABLED */
|
||||
/* 07/15/03 EJV 06 ACSE_AUTH_ENABLED enabled (ICCP Gateway) */
|
||||
/* 04/17/03 JRB 05 Chg MVLU_LEAF_FUN_LOOKUP_ENABLE (defined). */
|
||||
/* 12/20/02 JRB 04 Add MVLU_LEAF_FUN_LOOKUP_ENABLE (!defined). */
|
||||
/* 12/18/02 JRB 03 Add USE_RT_TYPE_2 (defined by default). */
|
||||
/* 10/17/02 ASK 02 Added ACSE_AUTH_ENABLED */
|
||||
/* 02/27/02 JRB 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
* NOTE: Insert "global" defines here. These will be used when compiling
|
||||
* all SISCO code.
|
||||
*/
|
||||
|
||||
#endif /* !GLBOPT_INCLUDED */
|
||||
|
||||
565
include/mmslite/glbsem.h
Normal file
565
include/mmslite/glbsem.h
Normal file
@@ -0,0 +1,565 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997-2008, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : glbsem.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : Multi-thread support defines and prototypes. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 06/01/08 EJV 61 Ported to Windows Vista. */
|
||||
/* 01/15/07 EJV 60 Chg S_LOCK_RESOURCES to S_LOCK_UTIL_RESOURCES*/
|
||||
/* 12/15/06 MDE 59 Added S_UNLOCK_CR_AND_RETURN_VAL */
|
||||
/* 10/25/06 EJV 58 Ported to HP-UX. */
|
||||
/* 07/13/06 EJV 57 Sun: changed the test for POSIX define. */
|
||||
/* 03/23/06 EJV 56 Added ( ) in #if a || b || (c && d). */
|
||||
/* 01/30/06 GLB 55 Integrated porting changes for VMS */
|
||||
/* 08/04/05 EJV 54 Reworked defs for UNIX and LINUX */
|
||||
/* 04/12/05 DSF 53 Added refCount member to GS_MUTEX (Windows) */
|
||||
/* 01/10/05 DSF 52 Added event member to GS_TIMER */
|
||||
/* 01/06/05 DSF 51 Added owner member to GS_MUTEX (Windows) */
|
||||
/* 01/14/05 EJV 50 Change removed. */
|
||||
/* 06/09/04 EJV 49 Added multithread support for sun. */
|
||||
/* 08/23/04 EJV 48 GS_TIMER: rpl elapsed w/ ST_DOUBLE expiration*/
|
||||
/* 05/10/04 EJV 47 gs_timer_cleanup: added timeout parameter. */
|
||||
/* gs_timer_init: added min_workers, max_workers*/
|
||||
/* Added GS_TIMER_WORKER_... defines. */
|
||||
/* GS_TIMER: added/moved fields. */
|
||||
/* 01/21/04 JRB 46 Add LYNX support. */
|
||||
/* 01/21/04 EJV 45 Win Timers: changed to use UNIX code. */
|
||||
/* Win impl preserved with _WIN32_timers define */
|
||||
/* 12/03/03 EJV 44 Add SD_WIN_VER_2003_AND_LATER, replaced */
|
||||
/* SD_WIN_VER_NET with SD_WIN_VER_2003; */
|
||||
/* gs_is_win_ver(): chg return ST_RET to ST_INT */
|
||||
/* 12/01/03 EJV 43 Added SD_WIN_VER_2K_AND_LATER. */
|
||||
/* 11/04/03 JRB 42 Del gs_sleep (use sMsSleep). */
|
||||
/* 10/24/03 JRB 41 Move gs_debug_sel to slog.h. */
|
||||
/* 09/29/03 JRB 40 Add "linux" support. */
|
||||
/* Enable gs_timer* functions for ALL systems. */
|
||||
/* 06/20/03 EJV 39 Redesigned mutex sems implementation. */
|
||||
/* 06/11/03 EJV 38 gs_named_mutex_xxx, gs_get_named_event_sem */
|
||||
/* defined for all systems. */
|
||||
/* __alpha: removed gs_xxx_sig and related code.*/
|
||||
/* 06/10/03 EJV 37 _WIN32: added gs_named_mutex_xxx functions. */
|
||||
/* 06/06/03 JRB 36 S_LOCK_RESOURCES use new gs_util_mutex. */
|
||||
/* Use new "Base" macros SLOG_*, SLOGC_*, SLOGH.*/
|
||||
/* Del GLBSEM_LOG_ALWAYS*, use SLOGALWAYS*. */
|
||||
/* 06/03/03 EJV 35 _WIN32: changed for 64-bit compiler: */
|
||||
/* ST_THREAD_HANDLE to uintptr_t */
|
||||
/* 04/14/03 JRB 34 Chg mutex macros to use gs_mutex_get/free. */
|
||||
/* Chg gs_get/free_sem functions to macros. */
|
||||
/* 03/03/24 EJV 33 Added _glbem_err_logstr & _glbem_nerr_logstr;*/
|
||||
/* S_LOCK_RESOURCES, S_UNLOCK_RESOURCES call */
|
||||
/* now non-logging gs_get_sem & gs_free_sem. */
|
||||
/* 02/03/03 EJV 32 _WIN32: added gs_is_win_ver(), SD_WIN_.. defs*/
|
||||
/* added gs_get_named_event_sem() */
|
||||
/* 01/14/03 EJV 31 Added gs_sleep(). */
|
||||
/* 11/01/02 EJV 30 Use SISCO's link list in GS_TIMER. */
|
||||
/* 07/29/02 EJV 29 Added gs_timer_get_resolution(), */
|
||||
/* GS_TIMER: made more fields common to UNIX,Win*/
|
||||
/* Added field delay_start for WIN32. */
|
||||
/* 04/09/02 EJV 28 __alpha: moved pthread.h up (cleaner code) */
|
||||
/* 02/06/02 EJV 27 _AIX: check for _THREAD_SAFE compiler define */
|
||||
/* 10/31/01 EJV 26 _WIN32: added code to call _beginthreadex; */
|
||||
/* Added gs_close_thread, gs_pulse_event_sem; */
|
||||
/* Added _ERR, _NERR log macros */
|
||||
/* UNIX: chg predicate to ST_INT from ST_BOOLEAN*/
|
||||
/* UNIX: added manualReset to GS_EVENT_SEM. */
|
||||
/* 09/20/01 EJV 25 _WIN32: added pending field to GS_TIMER. */
|
||||
/* 08/01/01 JRB 24 Add comment explaining S_LOCK_RES.. */
|
||||
/* 07/30/01 EJV 23 Added gs_timer_set_resolution().Chg GS_TIMER.*/
|
||||
/* Added ST_THREAD_RET, ST_THREAD_RET_VAL macros*/
|
||||
/* and changed gs_start_thread arg. */
|
||||
/* 07/25/01 DSF 22 Use <> when including windows.h */
|
||||
/* 07/24/01 EJV 21 _WIN32: added gs_timer support. */
|
||||
/* 04/04/01 DSF 20 Added gs_set_thread_name for WIN32 */
|
||||
/* 03/15/01 EJV 19 UNIX: corrected spelling of REENTRANT. */
|
||||
/* 03/07/01 EJV 18 Added slog macros for !DEBUG_SISCO */
|
||||
/* 02/19/01 EJV 17 _AIX: eliminated need to call gs_timer_init. */
|
||||
/* 02/16/01 EJV 16 AIX: added timer functions gs_times_xxx. */
|
||||
/* 01/16/01 EJV 15 Moved GET_THREAD_ID define here from glbsem.c*/
|
||||
/* 12/20/00 EJV 14 Ported to AIX. Revised DEC UNIX. */
|
||||
/* 12/13/00 EJV 13 Added gs_mutex_... funs for multiple mutex */
|
||||
/* semaphores support. Added ST_MUTEX_SEM. */
|
||||
/* 12/13/00 EJV 12 Removed USE_MANUAL_RESET_SEM. */
|
||||
/* 12/06/00 EJV 11 Changed gs_get_event_sem to accept arg. */
|
||||
/* 10/25/00 JRB 10 For _WIN32, define S_MT_SUP.. if _MT defined.*/
|
||||
/* 10/06/00 EJV 09 Ported to DEC UNIX (__alpha) pthread funcs. */
|
||||
/* Added few GLBSEM_LOG_FLOWn macros. */
|
||||
/* Deleted gs_chk_thread_id(), check _REENTRANT */
|
||||
/* 01/21/00 JRB 08 Del *sem_fun & *sem_funx function pointers. */
|
||||
/* Chg macros to call functions directly. */
|
||||
/* S_GS_INSTALL, gs_install, S_GS_INIT obsolete.*/
|
||||
/* Chg macros if !S_MT_SUPPORT to call gs_chk...*/
|
||||
/* 09/13/99 MDE 07 Added SD_CONST modifiers */
|
||||
/* 08/02/99 JRB 06 Chged "gs_get_event_sem" to "auto-reset" & */
|
||||
/* #ifdef'd out "gs_reset_event_sem". */
|
||||
/* 10/08/98 MDE 05 Migrated to updated SLOG interface */
|
||||
/* 05/05/98 DSF 04 Added SD_TIMEOUT */
|
||||
/* 12/11/97 KCR 03 Added gs_wait_mult_event_sem for _WIN32 */
|
||||
/* 10/06/97 DSF 02 Modified the macros used by SLOG such that */
|
||||
/* they could be used by SLOG in DEBUG_SISCO */
|
||||
/* mode */
|
||||
/* 08/15/97 MDE 01 Changed default ST_xxx to ST_VOID * */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef GBLSEM_INCLUDED
|
||||
#define GBLSEM_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "slog.h"
|
||||
#include "stime.h"
|
||||
#include "gen_list.h"
|
||||
|
||||
/************************************************************************/
|
||||
#define SD_TIMEOUT 2
|
||||
|
||||
/************************************************************************/
|
||||
/* Logging masks and variable */
|
||||
|
||||
#define GS_LOG_FLOW 0x0001
|
||||
#define GS_LOG_ERR 0x0002
|
||||
#define GS_LOG_NERR 0x0004
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _glbem_flow_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _glbem_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _glbem_nerr_logstr;
|
||||
|
||||
/* Mutex types: unnamed (local) can be used to synchronize threads in */
|
||||
/* a process, and named (global) can be used to synchronize processes */
|
||||
/* and threads within a process. */
|
||||
#define GS_MUTEX_UNNAMED 0
|
||||
#define GS_MUTEX_NAMED 1
|
||||
|
||||
/************************************************************************/
|
||||
/* Just for convenience ... */
|
||||
#define S_UNLOCK_CR_AND_RETURN() {S_UNLOCK_COMMON_RESOURCES(); return;}
|
||||
#define S_UNLOCK_CR_AND_RETURN_VAL(_rc) {S_UNLOCK_COMMON_RESOURCES(); return (_rc);}
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* WINDOWS 95/98/NT/2000 */
|
||||
/* These typedefs, defines, and function prototypes are for use with */
|
||||
/* Windows only. */
|
||||
/************************************************************************/
|
||||
|
||||
#if defined(_WIN32) /* VC++, 32-Bit */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
/* The VC++ compiler automatically defines (_MT) if Multithread libs */
|
||||
/* are selected. The user clearly wants multithread support, so */
|
||||
/* S_MT_SUPPORT "MUST" be enabled. */
|
||||
/* DEBUG: something similar should be done for any system that supports */
|
||||
/* multithreading (e.g. OS2). */
|
||||
|
||||
#if defined(_MT) && !defined(S_MT_SUPPORT)
|
||||
#define S_MT_SUPPORT
|
||||
#endif
|
||||
|
||||
#define ST_THREAD_ID unsigned
|
||||
|
||||
typedef struct gs_mutex_tag
|
||||
{
|
||||
ST_INT mutexType; /* GS_MUTEX_UNNAMED (_NAMED) */
|
||||
ST_THREAD_ID owner;
|
||||
ST_THREAD_ID refCount;
|
||||
union
|
||||
{
|
||||
HANDLE hMutex; /* for named mutex & unnamed special */
|
||||
CRITICAL_SECTION cs; /* for unnamed mutex */
|
||||
} u;
|
||||
} GS_MUTEX;
|
||||
|
||||
#define GET_THREAD_ID() GetCurrentThreadId()
|
||||
#define ST_MUTEX_SEM GS_MUTEX
|
||||
#define ST_EVENT_SEM HANDLE
|
||||
#if (_MSC_VER >= 1300)
|
||||
#define ST_THREAD_HANDLE uintptr_t
|
||||
#else
|
||||
#define ST_THREAD_HANDLE unsigned long
|
||||
#endif
|
||||
#define ST_THREAD_ARG void *
|
||||
#define ST_THREAD_CALL_CONV __stdcall
|
||||
#define ST_THREAD_RET unsigned
|
||||
#define ST_THREAD_RET_VAL 0
|
||||
|
||||
/* defines to distinguish Windows versions passed to gs_is_win_ver() */
|
||||
#define SD_WIN_VER_95_98_Me 1 /* 95, 98, Me */
|
||||
#define SD_WIN_VER_NT_AND_LATER 2 /* NT 3.51, NT 4.0 and above */
|
||||
#define SD_WIN_VER_2K_AND_LATER 3 /* 2000 and above */
|
||||
#define SD_WIN_VER_XP_AND_LATER 4 /* XP and above */
|
||||
#define SD_WIN_VER_2003_AND_LATER 5 /* 2003 and above */
|
||||
#define SD_WIN_VER_VISTA_AND_LATER 6 /* Vista and above */
|
||||
|
||||
/* specific Windows version */
|
||||
#define SD_WIN_VER_95 10
|
||||
#define SD_WIN_VER_98 20
|
||||
#define SD_WIN_VER_Me 30
|
||||
#define SD_WIN_VER_NT_351 40
|
||||
#define SD_WIN_VER_NT_40 50
|
||||
#define SD_WIN_VER_2000 60
|
||||
#define SD_WIN_VER_XP 70
|
||||
#define SD_WIN_VER_2003 80
|
||||
#define SD_WIN_VER_VISTA 90
|
||||
|
||||
#endif /* defined(_WIN32) */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* UNIX, Linux, ... */
|
||||
/* These typedefs, defines, and function prototypes are for use with */
|
||||
/* UNIX, Linux,... only */
|
||||
/* Implemented functions are complying with the "POSIX 1003.1c" standard.*/
|
||||
/************************************************************************/
|
||||
|
||||
#if defined(_AIX) || defined(sun) || defined(__hpux) || \
|
||||
defined(linux) || defined(__LYNX) || \
|
||||
(defined(__alpha) && !defined(__VMS)) || /* Tru64 alpha */ \
|
||||
(defined(__ALPHA) && defined(__VMS)) /* OpenVMS alpha */
|
||||
|
||||
#if (defined(__alpha) && !defined(__VMS)) || /* Tru64 alpha */ \
|
||||
(defined(__ALPHA) && defined(__VMS)) /* OpenVMS alpha */
|
||||
/* If the code is compiled with -pthread switch then the _REENTRANT */
|
||||
/* symbol is defined. This means that there should be a multithread */
|
||||
/* support for the code (the S_MT_SUPPORT should be defined). */
|
||||
|
||||
#if defined(_REENTRANT) && !defined(S_MT_SUPPORT)
|
||||
#define S_MT_SUPPORT
|
||||
#endif
|
||||
|
||||
/* According to the POSIX standard this define should be included in */
|
||||
/* every application module. The <standards.h> included in <pthread.h> */
|
||||
/* defines the _POSIX_C_SOURCE to be 199506L. */
|
||||
|
||||
#define _POSIX_C_SOURCE 199506L
|
||||
#endif /* defined(__alpha) && !defined(__VMS) */
|
||||
|
||||
#if defined(_AIX)
|
||||
/* If the compiler defines _THREAD_SAFE we should build the code */
|
||||
/* with multithread support (the S_MT_SUPPORT should be defined). */
|
||||
|
||||
#if defined(_THREAD_SAFE) && !defined(S_MT_SUPPORT)
|
||||
#define S_MT_SUPPORT
|
||||
#endif
|
||||
#endif /* defined(_AIX) */
|
||||
|
||||
#if defined(sun) || defined(__hpux)
|
||||
/* On Solaris 9,10 an application must define _POSIX_C_SOURCE >=199506L */
|
||||
/* IN EVERY MODULE OF AN APPLICATION to get the multithread support. */
|
||||
/* There is no other compiler define that indicates if a module is */
|
||||
/* compiled for multithread support. */
|
||||
|
||||
#define _POSIX_C_SOURCE 199506L
|
||||
|
||||
#if (_POSIX_C_SOURCE-0 >= 199506L) && !defined(S_MT_SUPPORT)
|
||||
#define S_MT_SUPPORT
|
||||
#endif
|
||||
#endif /* defined(sun) || defined(__hpux) */
|
||||
|
||||
#if defined(linux) || defined(__LYNX)
|
||||
/* If the compiler defines _THREAD_SAFE, we should build the code */
|
||||
/* with multithread support (the S_MT_SUPPORT should be defined). */
|
||||
|
||||
#if (defined(_THREAD_SAFE) || defined(_REENTRANT)) && !defined(S_MT_SUPPORT)
|
||||
#define S_MT_SUPPORT
|
||||
#endif
|
||||
#endif /* defined(linux) */
|
||||
|
||||
#if defined(S_MT_SUPPORT)
|
||||
#include <pthread.h>
|
||||
typedef struct gs_event_sem_tag
|
||||
{
|
||||
ST_INT predicate; /* predicate to change value */
|
||||
pthread_mutex_t mutex; /* mutex sem protecting the cond*/
|
||||
pthread_cond_t cond; /* condition variable */
|
||||
ST_BOOLEAN manualReset; /* type os event semaphore */
|
||||
} GS_EVENT_SEM;
|
||||
|
||||
#define GET_THREAD_ID() pthread_self()
|
||||
#define ST_MUTEX_SEM pthread_mutex_t
|
||||
#define ST_EVENT_SEM GS_EVENT_SEM *
|
||||
#define ST_THREAD_ID pthread_t
|
||||
#define ST_THREAD_HANDLE pthread_t
|
||||
#define ST_THREAD_ARG void *
|
||||
#define ST_THREAD_CALL_CONV
|
||||
#define ST_THREAD_RET void *
|
||||
#define ST_THREAD_RET_VAL NULL
|
||||
#endif /* defined(S_MT_SUPPORT) */
|
||||
|
||||
#endif /* defined UNIX, linux,... */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* If no system has defined the required types, do so now. This allows */
|
||||
/* the source to include variables of these types w/o errors. */
|
||||
|
||||
#if !defined (ST_EVENT_SEM)
|
||||
|
||||
#define GET_THREAD_ID() (ST_THREAD_ID) 0xFFFFFFFF
|
||||
#define ST_MUTEX_SEM ST_VOID *
|
||||
#define ST_EVENT_SEM ST_VOID *
|
||||
#define ST_THREAD_ID ST_VOID *
|
||||
#define ST_THREAD_HANDLE ST_VOID *
|
||||
#define ST_THREAD_ARG ST_VOID *
|
||||
#define ST_THREAD_CALL_CONV
|
||||
#define ST_THREAD_RET ST_VOID
|
||||
#define ST_THREAD_RET_VAL
|
||||
|
||||
#endif /* !defined (ST_EVENT_SEM) */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Global functions */
|
||||
|
||||
/* SISCO Single MUTEX functions */
|
||||
ST_RET gs_init (ST_VOID);
|
||||
ST_VOID gs_log_sem_state (ST_VOID);
|
||||
ST_VOID gs_get_semx (SD_CONST ST_CHAR *srcFile, ST_INT srcLineNum);
|
||||
ST_VOID gs_free_semx (SD_CONST ST_CHAR *srcFile, ST_INT srcLineNum);
|
||||
|
||||
/* User's MUTEX Semaphore functions */
|
||||
ST_RET gs_mutex_create (ST_MUTEX_SEM *ms);
|
||||
ST_RET gs_named_mutex_create (ST_MUTEX_SEM *ms, ST_CHAR *name);
|
||||
ST_RET gs_mutex_get_tm (ST_MUTEX_SEM *ms, ST_LONG timeout);
|
||||
#define gs_mutex_get(ms) gs_mutex_get_tm(ms, -1L)
|
||||
ST_RET gs_mutex_free (ST_MUTEX_SEM *ms);
|
||||
ST_RET gs_mutex_destroy (ST_MUTEX_SEM *ms);
|
||||
|
||||
/* Event Semaphores */
|
||||
ST_EVENT_SEM gs_get_event_sem (ST_BOOLEAN manualReset);
|
||||
ST_EVENT_SEM gs_get_named_event_sem (ST_CHAR *name, ST_BOOLEAN manualReset);
|
||||
ST_RET gs_wait_event_sem (ST_EVENT_SEM es, ST_LONG timeout);
|
||||
ST_RET gs_wait_mult_event_sem (ST_INT numEvents, ST_EVENT_SEM *esTable,
|
||||
ST_BOOLEAN *activity, ST_LONG timeout);
|
||||
ST_VOID gs_signal_event_sem (ST_EVENT_SEM es);
|
||||
ST_VOID gs_pulse_event_sem (ST_EVENT_SEM es);
|
||||
ST_VOID gs_reset_event_sem (ST_EVENT_SEM es);
|
||||
ST_VOID gs_free_event_sem (ST_EVENT_SEM es);
|
||||
|
||||
/* Thread */
|
||||
ST_RET gs_start_thread (ST_THREAD_RET (ST_THREAD_CALL_CONV *threadFunc) (ST_THREAD_ARG),
|
||||
ST_THREAD_ARG threadArg,
|
||||
ST_THREAD_HANDLE *threadHandleOut,
|
||||
ST_THREAD_ID *threadIdOut);
|
||||
ST_RET gs_wait_thread (ST_THREAD_HANDLE threadHandle,
|
||||
ST_THREAD_ID threadId, ST_LONG timeout);
|
||||
ST_RET gs_close_thread (ST_THREAD_HANDLE threadHandle);
|
||||
|
||||
#if defined (_WIN32)
|
||||
ST_VOID gs_set_thread_name (ST_THREAD_ID threadId, ST_CHAR *pThreadName);
|
||||
#endif
|
||||
|
||||
/* Misc. functions */
|
||||
#if defined (_WIN32)
|
||||
ST_INT gs_is_win_ver (ST_UINT ver);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* These are the macro's used to call the glbsem get/free functions. */
|
||||
/* Note that the behavior depends on the defines used at compile time. */
|
||||
|
||||
#if defined(S_MT_SUPPORT) /* If code is to have MT support */
|
||||
|
||||
#if defined(DEBUG_SISCO) /* MT support, debug */
|
||||
|
||||
#define S_LOCK_COMMON_RESOURCES() gs_get_semx(thisFileName, __LINE__)
|
||||
#define S_UNLOCK_COMMON_RESOURCES() gs_free_semx(thisFileName, __LINE__)
|
||||
|
||||
/* NOTE: because S_LOCK_UTIL_RESOURCES & S_UNLOCK_UTIL_RESOURCES are called from SLOG, */
|
||||
/* the gs_mutex_get and gs_mutex_free (code handling unnamed mutexes) */
|
||||
/* should not be logging to avoid infinite loop (i.e. lock funct calling */
|
||||
/* log funct which calls lock funct again). */
|
||||
#define S_LOCK_UTIL_RESOURCES() gs_mutex_get (&gs_util_mutex)
|
||||
#define S_UNLOCK_UTIL_RESOURCES() gs_mutex_free (&gs_util_mutex)
|
||||
|
||||
#else /* MT support, no debug */
|
||||
|
||||
#define S_LOCK_COMMON_RESOURCES() gs_mutex_get (&gs_glb_mutex)
|
||||
#define S_UNLOCK_COMMON_RESOURCES() gs_mutex_free (&gs_glb_mutex)
|
||||
|
||||
#define S_LOCK_UTIL_RESOURCES() gs_mutex_get (&gs_util_mutex)
|
||||
#define S_UNLOCK_UTIL_RESOURCES() gs_mutex_free (&gs_util_mutex)
|
||||
|
||||
#endif
|
||||
|
||||
#else /* No MT support is compiled in */
|
||||
#define S_LOCK_COMMON_RESOURCES()
|
||||
#define S_UNLOCK_COMMON_RESOURCES()
|
||||
#define S_LOCK_UTIL_RESOURCES()
|
||||
#define S_UNLOCK_UTIL_RESOURCES()
|
||||
#endif
|
||||
|
||||
/* FOR BACKWARD COMPATIBILITY ONLY. Old code may be calling gs_get_sem, */
|
||||
/* gs_free_sem directly. These calls should be replaced with S_LOCK_.. */
|
||||
#define gs_get_sem() S_LOCK_UTIL_RESOURCES()
|
||||
#define gs_free_sem() S_UNLOCK_UTIL_RESOURCES()
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#define MAX_SEM_NEST_TRACK 20
|
||||
extern ST_MUTEX_SEM gs_glb_mutex; /* the global mutex semaphore */
|
||||
extern ST_MUTEX_SEM gs_util_mutex;/* UTILITY MUTEX semaphore: for "low-level"*/
|
||||
/* util functs (slog,mem_chk,stime,etc.)*/
|
||||
extern ST_BOOLEAN gs_already_inited;
|
||||
extern ST_UINT gs_track; /* This variable when set to value >0 */
|
||||
/* during an application startup allows */
|
||||
/* tracking of MUTEX or EVENT sem. */
|
||||
extern ST_INT gs_currSemOwnerIndex;
|
||||
extern ST_CHAR gs_currSemOwnerFile[MAX_SEM_NEST_TRACK][SLOG_MAX_FNAME+1];
|
||||
extern ST_INT gs_currSemOwnerLine[MAX_SEM_NEST_TRACK];
|
||||
|
||||
extern ST_DOUBLE gs_hwMutexTime;
|
||||
extern ST_DOUBLE gs_hwEventTime;
|
||||
|
||||
/*---*---*---*---*---*---*---*---*---*---*---*---*---*--*/
|
||||
/* */
|
||||
/* Timer functions */
|
||||
/* */
|
||||
/*---*---*---*---*---*---*---*---*---*---*---*---*---*--*/
|
||||
|
||||
/* Note: On AIX the real-time support is not implemented. */
|
||||
/* Functions such as timer_create, sleep, or nanosleep are*/
|
||||
/* not available (in AIX version 4.3.2 or 4.3.3). */
|
||||
/* This implementation of timers is using the GLBSEM */
|
||||
/* gs_wait_event_sem function implemented with phtreads */
|
||||
/* to support the timer functionality. */
|
||||
|
||||
/* The timer support will be initialized automatically when the function*/
|
||||
/* gs_timer_start is called for the first time. */
|
||||
|
||||
/* If the timer is of type SD_TIMER_ONESHOT then the timer resources */
|
||||
/* will be automatically deleted after the first time the timer is */
|
||||
/* serviced. For the SD_TIMER_PERIODIC timer the user needs to call */
|
||||
/* the gs_timer_end function to stop the timer and release resources. */
|
||||
|
||||
/* Before application exits the function gs_timer_cleanup should be */
|
||||
/* called to cleanup all resources associates with timers. */
|
||||
|
||||
/* NOTE: Since Windows is limiting number of timers to 16 per process */
|
||||
/* we have to use the UNIX timer implementation on Windows. */
|
||||
/* If the _WIN32_timers is defined then the Windows implementation*/
|
||||
/* of timers will be in effect for Windows. */
|
||||
#if defined _WIN32
|
||||
/* #define _WIN32_timers */
|
||||
#endif
|
||||
|
||||
#define SD_TIMER_ONESHOT 1
|
||||
#define SD_TIMER_PERIODIC 2
|
||||
|
||||
#define GS_TIMER_WORKER_MIN 4 /* def min number of timer worker threads */
|
||||
#define GS_TIMER_WORKER_MAX 10 /* def max number of timer worker threads */
|
||||
|
||||
struct gs_timer_tag; /* forward definition */
|
||||
|
||||
typedef struct gs_timer_tag
|
||||
{
|
||||
DBL_LNK link; /* link list */
|
||||
#if defined (_WIN32_timers)
|
||||
UINT timerID; /* timer id returned from timeSetEvent */
|
||||
ST_DOUBLE delay_start; /* time when delete timer delay started */
|
||||
#endif
|
||||
ST_BOOLEAN terminate; /* set if timer should be terminated */
|
||||
ST_BOOLEAN pending; /* shows if timer processing is already pending */
|
||||
ST_ULONG interval; /* milliseconds, time between servicing */
|
||||
ST_DOUBLE expiration; /* milliseconds, next expiration time */
|
||||
ST_UINT type; /* timer type: oneshot or periodic */
|
||||
ST_VOID (*callback_fun)(ST_VOID *);
|
||||
ST_VOID *arg; /* argument for the callback_fun. */
|
||||
ST_EVENT_SEM event; /* user can set this if it wants to be notified */
|
||||
/* when the timer object is destroyed */
|
||||
} GS_TIMER;
|
||||
|
||||
/* The timer resolution could be set to the lowest value required by an */
|
||||
/* application before calling the gs_timer_start function. */
|
||||
/* On Windows system if the timer resolution is changed while the */
|
||||
/* application is running, only timers started afterwards will be */
|
||||
/* affected. On UNIX system all timers will be affected. */
|
||||
|
||||
ST_RET gs_timer_init (ST_UINT min_workers, ST_UINT max_workers);
|
||||
ST_RET gs_timer_set_resolution (ST_ULONG timer_resolution);
|
||||
ST_ULONG gs_timer_get_resolution (ST_VOID);
|
||||
|
||||
GS_TIMER *gs_timer_start (ST_UINT type,
|
||||
ST_ULONG interval,
|
||||
ST_VOID (*callback_fun)(ST_VOID *),
|
||||
ST_VOID *arg);
|
||||
ST_RET gs_timer_end (GS_TIMER *timer_id);
|
||||
ST_RET gs_timer_cleanup (ST_LONG timeout);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Logging macro's used internally by glbsem.c */
|
||||
|
||||
#define GLBSEM_LOG_ERR0(a) \
|
||||
SLOG_0 (gs_debug_sel & GS_LOG_ERR,_glbem_err_logstr,a)
|
||||
#define GLBSEM_LOG_ERR1(a,b) \
|
||||
SLOG_1 (gs_debug_sel & GS_LOG_ERR,_glbem_err_logstr,a,b)
|
||||
#define GLBSEM_LOG_ERR2(a,b,c) \
|
||||
SLOG_2 (gs_debug_sel & GS_LOG_ERR,_glbem_err_logstr,a,b,c)
|
||||
#define GLBSEM_LOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (gs_debug_sel & GS_LOG_ERR,_glbem_err_logstr,a,b,c,d)
|
||||
|
||||
#define GLBSEM_LOG_CERR0(a) \
|
||||
SLOGC_0 (gs_debug_sel & GS_LOG_ERR,a)
|
||||
#define GLBSEM_LOG_CERR1(a,b) \
|
||||
SLOGC_1 (gs_debug_sel & GS_LOG_ERR,a,b)
|
||||
#define GLBSEM_LOG_CERR2(a,b,c) \
|
||||
SLOGC_2 (gs_debug_sel & GS_LOG_ERR,a,b,c)
|
||||
#define GLBSEM_LOG_CERR3(a,b,c,d) \
|
||||
SLOGC_3 (gs_debug_sel & GS_LOG_ERR,a,b,c,d)
|
||||
|
||||
#define GLBSEM_LOG_NERR0(a) \
|
||||
SLOG_0 (gs_debug_sel & GS_LOG_NERR,_glbem_nerr_logstr,a)
|
||||
#define GLBSEM_LOG_NERR1(a,b) \
|
||||
SLOG_1 (gs_debug_sel & GS_LOG_NERR,_glbem_nerr_logstr,a,b)
|
||||
#define GLBSEM_LOG_NERR2(a,b,c) \
|
||||
SLOG_2 (gs_debug_sel & GS_LOG_NERR,_glbem_nerr_logstr,a,b,c)
|
||||
#define GLBSEM_LOG_NERR3(a,b,c,d) \
|
||||
SLOG_3 (gs_debug_sel & GS_LOG_NERR,_glbem_nerr_logstr,a,b,c,d)
|
||||
|
||||
#define GLBSEM_LOG_FLOW0(a) \
|
||||
SLOG_0 (gs_debug_sel & GS_LOG_FLOW,_glbem_flow_logstr,a)
|
||||
#define GLBSEM_LOG_FLOW1(a,b) \
|
||||
SLOG_1 (gs_debug_sel & GS_LOG_FLOW,_glbem_flow_logstr,a,b)
|
||||
#define GLBSEM_LOG_FLOW2(a,b,c) \
|
||||
SLOG_2 (gs_debug_sel & GS_LOG_FLOW,_glbem_flow_logstr,a,b,c)
|
||||
#define GLBSEM_LOG_FLOW3(a,b,c,d) \
|
||||
SLOG_3 (gs_debug_sel & GS_LOG_FLOW,_glbem_flow_logstr,a,b,c,d)
|
||||
|
||||
#define GLBSEM_LOG_CFLOW0(a) \
|
||||
SLOGC_0 (gs_debug_sel & GS_LOG_FLOW,a)
|
||||
#define GLBSEM_LOG_CFLOW1(a,b) \
|
||||
SLOGC_1 (gs_debug_sel & GS_LOG_FLOW,a,b)
|
||||
#define GLBSEM_LOG_CFLOW2(a,b,c) \
|
||||
SLOGC_2 (gs_debug_sel & GS_LOG_FLOW,a,b,c)
|
||||
#define GLBSEM_LOG_CFLOW3(a,b,c,d) \
|
||||
SLOGC_3 (gs_debug_sel & GS_LOG_FLOW,a,b,c,d)
|
||||
|
||||
/************************************************************************/
|
||||
#define gs_install() /* OBSOLETE: for backward compat. only */
|
||||
#define S_GS_INSTALL() /* OBSOLETE: for backward compat. only. */
|
||||
#define S_GS_INIT() /* OBSOLETE: for backward compat. only. */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #ifndef GBLSEM_INCLUDED */
|
||||
|
||||
645
include/mmslite/glbtypes.h
Normal file
645
include/mmslite/glbtypes.h
Normal file
@@ -0,0 +1,645 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2006, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : glbtypes.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/18/08 JRB 30 Use endian.h to set SD_BYTE_ORDER on linux. */
|
||||
/* 01/27/06 EJV 29 _WIN32: chg ST_UINT64 to unsigned __int64. */
|
||||
/* 08/01/05 JRB 28 Disable SD_CONST for ALL platforms. */
|
||||
/* 02/12/04 JRB 27 Disable ST_CONST for LINUX. */
|
||||
/* 01/08/04 EJV 26 Checked SD_BIG_ENDIAN on sun, rem pragma msg.*/
|
||||
/* 12/09/03 JRB 25 Add LYNX, don't def ST_CONST for LYNX. */
|
||||
/* 02/19/03 JRB 24 Define SD_BYTE_ORDER for each system. */
|
||||
/* 02/19/03 JRB 23 Del VAX-VMS & PSOS code. */
|
||||
/* 02/17/03 CRM 22 Added "defined(linux)" code. */
|
||||
/* 02/17/03 JRB 21 Del unsupported __IC86__ */
|
||||
/* Del obsolete DEBUG_MMS, DEBUG_SUIC, etc. */
|
||||
/* Del NEW_SYSTEM.. defines (not very useful). */
|
||||
/* 02/27/02 JRB 20 Include compiler option file "glbopt.h". */
|
||||
/* 10/05/01 EJV 19 sun supports ST_INT64 (long long) */
|
||||
/* 01/02/01 EJV 18 disabled SD_CONST macro for _AIX */
|
||||
/* enabled SD_CONST macro for QNX */
|
||||
/* 06/16/00 JRB 17 Define "*INT64" only if INT64_SUPPORT defined*/
|
||||
/* 03/13/00 MDE 16 disabled SD_CONST macro for WIN32 */
|
||||
/* 09/24/99 JRB 15 disabled SD_CONST macro for QNX */
|
||||
/* 09/13/99 MDE 14 Added SD_CONST modifiers */
|
||||
/* 04/14/99 MDE 13 Changed SYSTEM_SEL defines */
|
||||
/* 01/19/99 EJV 12 AIX: Added 64 bit integer support */
|
||||
/* 08/26/98 EJV 11 Deleted CPU_SEL and all releated defines. */
|
||||
/* __hpux supports 64-bit integers. */
|
||||
/* Eliminated spaces at the end of lines. */
|
||||
/* 02/09/98 RKR 10 Removed PRODUCT_ONLY_VMS_ALPHA */
|
||||
/* 01/23/98 EJV 09 Digital UNIX: revised. */
|
||||
/* 12/11/97 JRB 08 Cleaned up PSOS ifdefs. Define PSOS_SYSTEM */
|
||||
/* to compile. Use new SYSTEM_SEL=SYS_PSOS. */
|
||||
/* 12/11/97 JRB 07 Deleted _MRI ifdef (for Modicon/MICROTEC) */
|
||||
/* Deleted EMBEDDED_6800 SYSTEM_SEL. */
|
||||
/* 10/27/97 EJV 06 AIX: revised types, deleted pragma message() */
|
||||
/* 09/23/97 JRB 05 QNX: pragma stops unused symbol warnings. */
|
||||
/* 08/16/97 EJV 04 For QNX corrected ST_INT16, ST_UINT16. */
|
||||
/* 08/15/97 JRB 03 Use MOTO_68000 consistently. */
|
||||
/* 08/13/97 EJV 02 Changed #if (A && B) statements to avoid */
|
||||
/* warning if A or B has not been defined. */
|
||||
/* 06/20/97 MDE 01 Added 64 bit integer support for 95/NT */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef GBLTYPES_INCLUDED
|
||||
#define GBLTYPES_INCLUDED
|
||||
|
||||
#include "glbopt.h" /* Global compiler options. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* General purpose defines, same for all platforms */
|
||||
|
||||
#define SD_TRUE 1
|
||||
#define SD_FALSE 0
|
||||
#define SD_SUCCESS 0
|
||||
#define SD_FAILURE 1
|
||||
#define SD_BIG_ENDIAN 0
|
||||
#define SD_LITTLE_ENDIAN 1
|
||||
|
||||
/* Define used for 'const' modifier */
|
||||
/* DEBUG: someday if all code is changed to consistently use SD_CONST, */
|
||||
/* this define may be replaced with the following: */
|
||||
/* #define SD_CONST const */
|
||||
#define SD_CONST
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
/* SYSTEM_SEL defines - bit masked */
|
||||
#define SYSTEM_SEL_MSOFT 0x0001
|
||||
#define SYSTEM_SEL_OS2 0x0008
|
||||
#define SYSTEM_SEL_OPEN_VMS 0x0010
|
||||
#define SYSTEM_SEL_SYS_5 0x0020
|
||||
#define SYSTEM_SEL_SYS_BSD 0x0040
|
||||
#define SYSTEM_SEL_QNX_C86 0x0100
|
||||
#define SYSTEM_SEL_SYSVXWORKS 0x0800
|
||||
#define SYSTEM_SEL_SYS_QNX4 0x1000
|
||||
|
||||
/* For backwards compatibility only, do not use. Will be deleted soon. */
|
||||
#if !defined(MSOFT)
|
||||
#define MSOFT SYSTEM_SEL_MSOFT
|
||||
#endif
|
||||
#if !defined(OS2)
|
||||
#define OS2 SYSTEM_SEL_OS2
|
||||
#endif
|
||||
#if !defined(OPEN_VMS)
|
||||
#define OPEN_VMS SYSTEM_SEL_OPEN_VMS
|
||||
#endif
|
||||
#if !defined(SYS_5)
|
||||
#define SYS_5 SYSTEM_SEL_SYS_5
|
||||
#endif
|
||||
#if !defined(SYS_BSD)
|
||||
#define SYS_BSD SYSTEM_SEL_SYS_BSD
|
||||
#endif
|
||||
#if !defined(QNX_C86)
|
||||
#define QNX_C86 SYSTEM_SEL_QNX_C86
|
||||
#endif
|
||||
#if !defined(SYSVXWORKS)
|
||||
#define SYSVXWORKS SYSTEM_SEL_SYSVXWORKS
|
||||
#endif
|
||||
#if !defined(SYS_QNX4)
|
||||
#define SYS_QNX4 SYSTEM_SEL_SYS_QNX4
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* SYSTEM and CPU select defines. These are based on built in compiler */
|
||||
/* defines which allow automatic detection of the compiler. */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* MS-DOS and WINDOWS */
|
||||
/************************************************************************/
|
||||
#if defined(MSDOS) || defined(__MSDOS__) /* Microsoft or Borland */
|
||||
|
||||
#if !defined(_WINDOWS) && !defined(_Windows)
|
||||
#define PLAIN_DOS /* straight and pure DOS */
|
||||
#endif
|
||||
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_MSOFT
|
||||
#define SD_END_STRUCT
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
|
||||
/* SD_TRUE or SD_FALSE only */
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
#define ALIGNPACKED
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* WINDOWS 95/NT */
|
||||
/************************************************************************/
|
||||
#if defined(_WIN32) /* VC++, 32-Bit */
|
||||
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_MSOFT
|
||||
#define SD_END_STRUCT
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_INT64 __int64
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_UINT64 unsigned __int64
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
/* This define shows that we really have support for 64 bit integers */
|
||||
#define INT64_SUPPORT
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* OS/2 - IBM C/SET2 and C/SET++ */
|
||||
/************************************************************************/
|
||||
#if defined(__OS2__) /* IBM C Set/2 */
|
||||
|
||||
#pragma message("Please look over the OS/2 system detect & defines")
|
||||
|
||||
#pragma data_seg(alldata)
|
||||
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_OS2
|
||||
#define SD_END_STRUCT
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* SUN */
|
||||
/************************************************************************/
|
||||
#if defined(sun) /* SUN */
|
||||
|
||||
#if defined(sparc)
|
||||
#define SD_BYTE_ORDER SD_BIG_ENDIAN
|
||||
#else
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#endif /*sun sparc*/
|
||||
#define SYSTEM_SEL SYS_5
|
||||
#define SD_END_STRUCT long end_of; /* force struct to quad word allign */
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
/*#define ST_INT32 signed long */
|
||||
#define ST_INT32 signed int
|
||||
#define ST_INT64 signed long long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
//#define ST_UINT32 unsigned long
|
||||
#define ST_UINT32 unsigned int
|
||||
#define ST_UINT64 unsigned long long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
/* This define shows that we really have support for 64 bit integers */
|
||||
#define INT64_SUPPORT
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* AIX */
|
||||
/************************************************************************/
|
||||
#if defined(_AIX) /* AIX */
|
||||
|
||||
#define SD_BYTE_ORDER SD_BIG_ENDIAN
|
||||
#define SYSTEM_SEL SYS_5
|
||||
#define SD_END_STRUCT long end_of; /* force struct to quad word allign */
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_INT64 signed long long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_UINT64 unsigned long long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
/* This define shows that we really have support for 64 bit integers */
|
||||
#define INT64_SUPPORT
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* OpenVMS AXP */
|
||||
/************************************************************************/
|
||||
#if defined(__ALPHA) && defined(__VMS) /* OpenVMS AXP uses DECC*/
|
||||
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_OPEN_VMS
|
||||
#define SD_END_STRUCT long end_of;
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Digital UNIX */
|
||||
/************************************************************************/
|
||||
|
||||
#if defined(__alpha) && !defined(__VMS)
|
||||
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_SYS_5
|
||||
#define SD_END_STRUCT long end_of;
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed int
|
||||
#define ST_INT64 signed long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned int
|
||||
#define ST_UINT64 unsigned long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
/* This define shows that we really have support for 64 bit integers */
|
||||
#define INT64_SUPPORT
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* VXWORKS - VXWORKS on Motorola 680x0 processor */
|
||||
/************************************************************************/
|
||||
|
||||
#if defined(VXWORKS)
|
||||
|
||||
#define SD_BYTE_ORDER SD_BIG_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_SYSVXWORKS
|
||||
#define SD_END_STRUCT
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* QNX */
|
||||
/************************************************************************/
|
||||
#ifdef __QNX__ /* This should be defined automatically by compiler. */
|
||||
|
||||
#pragma off (unreferenced) /* don't warn about unused symbols. */
|
||||
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#define SYSTEM_SEL SYSTEM_SEL_SYS_QNX4
|
||||
#define SD_END_STRUCT
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* HP-UX */
|
||||
/************************************************************************/
|
||||
#if defined(__hpux) /* HP-UX */
|
||||
|
||||
#define SD_BYTE_ORDER SD_BIG_ENDIAN
|
||||
#define SYSTEM_SEL SYS_5
|
||||
#define SD_END_STRUCT long end_of; /* force struct to quad word allign */
|
||||
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
#define ST_INT32 signed long
|
||||
#define ST_INT64 signed long long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
#define ST_UINT32 unsigned long
|
||||
#define ST_UINT64 unsigned long long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
/* This define shows that we really have support for 64 bit integers */
|
||||
#define INT64_SUPPORT
|
||||
|
||||
#define ALIGNPACKED
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* LINUX SYSTEM */
|
||||
/* OR LYNXOS SYSTEM (same types) */
|
||||
/************************************************************************/
|
||||
#if defined(linux) || defined(__LYNX)
|
||||
|
||||
/* NOTE: this may also work for setting SD_BYTE_ORDER on other */
|
||||
/* platforms that use the GNU C Library */
|
||||
#include <endian.h>
|
||||
#if (__BYTE_ORDER ==__LITTLE_ENDIAN)
|
||||
#define SD_BYTE_ORDER SD_LITTLE_ENDIAN
|
||||
#elif (__BYTE_ORDER ==__BIG_ENDIAN)
|
||||
#define SD_BYTE_ORDER SD_BIG_ENDIAN
|
||||
#else
|
||||
#error unsupported byte order
|
||||
#endif
|
||||
|
||||
#define SD_END_STRUCT
|
||||
|
||||
/* We can tolerate machine-dependent sizes for these types */
|
||||
#define ST_CHAR char
|
||||
#define ST_INT signed int
|
||||
#define ST_LONG signed long int
|
||||
#define ST_UCHAR unsigned char
|
||||
#define ST_UINT unsigned int
|
||||
#define ST_ULONG unsigned long
|
||||
#define ST_VOID void
|
||||
#define ST_DOUBLE double
|
||||
#define ST_FLOAT float
|
||||
|
||||
/* General purpose return code */
|
||||
#define ST_RET signed int
|
||||
|
||||
/* We need specific sizes for these types */
|
||||
#define ST_INT8 signed char
|
||||
#define ST_INT16 signed short
|
||||
//#define ST_INT32 signed long
|
||||
#define ST_INT32 signed int
|
||||
#define ST_INT64 signed long long
|
||||
#define ST_UINT8 unsigned char
|
||||
#define ST_UINT16 unsigned short
|
||||
//#define ST_UINT32 unsigned long
|
||||
#define ST_UINT32 unsigned int
|
||||
#define ST_UINT64 unsigned long long
|
||||
#define ST_BOOLEAN unsigned char
|
||||
|
||||
/* This define shows that we really have support for 64 bit integers */
|
||||
#define INT64_SUPPORT
|
||||
|
||||
#define ALIGNPACKED
|
||||
//#define ALIGNPACKED __attribute__((packed))
|
||||
|
||||
/* This define shows that we have supplied all required */
|
||||
#define _SISCOTYPES_DEFINED
|
||||
|
||||
#endif /* linux */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Make sure that this module has identified the target system */
|
||||
|
||||
#if !defined(_SISCOTYPES_DEFINED)
|
||||
#error Warning: System not correctly identified by glbtypes.h
|
||||
#endif
|
||||
|
||||
#if !defined(SD_BYTE_ORDER)
|
||||
#error SD_BYTE_ORDER not defined
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* #ifndef GBLTYPES_INCLUDED */
|
||||
46
include/mmslite/gnuc.h
Normal file
46
include/mmslite/gnuc.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* @(#) $Header: /JoyProject/jspqfe/src/pt61850netd_pqfe/source/include/mmslite/gnuc.h,v 1.1 2018/11/24 06:54:50 lizhongming Exp $ (LBL) */
|
||||
|
||||
/* Define __P() macro, if necessary */
|
||||
|
||||
#ifndef __P
|
||||
#if __STDC__
|
||||
#define __P(protos) protos
|
||||
#else
|
||||
#define __P(protos) ()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* inline foo */
|
||||
#ifndef __cplusplus
|
||||
#ifdef __GNUC__
|
||||
#define inline __inline
|
||||
#else
|
||||
#define inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handle new and old "dead" routine prototypes
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* __dead void foo(void) __attribute__((volatile));
|
||||
*
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#ifndef __dead
|
||||
#define __dead volatile
|
||||
#endif
|
||||
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(args)
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifndef __dead
|
||||
#define __dead
|
||||
#endif
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(args)
|
||||
#endif
|
||||
#endif
|
||||
223
include/mmslite/goose.h
Normal file
223
include/mmslite/goose.h
Normal file
@@ -0,0 +1,223 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1999-2002, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : goose.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 07/23/08 JRB 10 Fix len of gcRef, dataSetRef, appID. */
|
||||
/* 09/11/07 JRB 09 Add gse_iec_enc_part1, gse_iec_enc_part2. */
|
||||
/* Chg gcRef, dataSetRef, appID data type from */
|
||||
/* char ptr to char array (reduces allocation). */
|
||||
/* Fix type of numDataEntries, confRev. */
|
||||
/* 01/08/03 JRB 08 Del obsolete dataRef, elementId from structs */
|
||||
/* & from gse_iec_data_init args. */
|
||||
/* 12/03/02 ASK 07 Chg Goose structs for new ASN.1 encoding. Chg*/
|
||||
/* gse_iec_encode and gse_iec_hdr_decode protos */
|
||||
/* for Ethertype. include "ethertyp.h" */
|
||||
/* 09/30/02 NAV 06 Add ifdef __cplusplus */
|
||||
/* 02/26/02 JRB 05 Chg IEC GOOSE asn1Data args to UCHAR. */
|
||||
/* Chg some IEC GOOSE decode params to INT32. */
|
||||
/* 01/02/02 JRB 04 Add IEC GOOSE definitions. */
|
||||
/* 07/25/00 RKR 03 changed VisibleString SendingIED to ST_CHAR */
|
||||
/* 09/10/99 JRB 02 Chg SqNum, StNum, HoldTim, & BackTim */
|
||||
/* to UINT32 to match GOMSFE 0.9. */
|
||||
/* 06/25/99 MDE 01 Created */
|
||||
/************************************************************************/
|
||||
#ifndef GOOSE_HDR_INCLUDED
|
||||
#define GOOSE_HDR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "asn1r.h" /* need MMS_UTC_TIME */
|
||||
#include "clnp_usr.h"
|
||||
#include "clnp_sne.h"
|
||||
#include "acse2usr.h"
|
||||
#include "ethertyp.h"
|
||||
#include "mvl_defs.h" /* need MVL61850_MAX_* defines. */
|
||||
/* NOTE: need runtime_type from "mms_vvar.h" but requires bunch of */
|
||||
/* other includes, so just use forward declaration. */
|
||||
struct runtime_type; /* forward declaration */
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#define GOOSE_NAME_MISMATCH 0x112
|
||||
#define GOOSE_DONE_TOO_SOON 0x113
|
||||
|
||||
/************************************************************************/
|
||||
#define GOOSE_MAX_NUM_DNA_BITS 128
|
||||
#define GOOSE_MAX_NUM_USR_BITS 512
|
||||
|
||||
#define GOOSE_DEF_NUM_DNA_BITS 64
|
||||
#define GOOSE_DEF_NUM_USR_BITS 128
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* GOOSE Stack addressing information */
|
||||
AUDT_APDU audtApdu;
|
||||
|
||||
/* GOOSE MMS values */
|
||||
ST_CHAR SendingIED[66];
|
||||
MMS_BTOD t;
|
||||
ST_UINT32 SqNum;
|
||||
ST_UINT32 StNum;
|
||||
ST_UINT32 HoldTim;
|
||||
ST_UINT32 BackTim;
|
||||
ST_UINT16 PhsID;
|
||||
|
||||
ST_INT num_dna_bits;
|
||||
ST_UCHAR DNA[GOOSE_MAX_NUM_DNA_BITS/8];
|
||||
|
||||
ST_INT num_usr_bits;
|
||||
ST_UCHAR UserSt[GOOSE_MAX_NUM_USR_BITS/8];
|
||||
} GOOSE_INFO;
|
||||
|
||||
/************************************************************************/
|
||||
/* The user makes use of these functions to send and receive GOOSE */
|
||||
/* messages. */
|
||||
|
||||
ST_RET mmsl_send_goose (GOOSE_INFO *gi);
|
||||
ST_VOID u_mmsl_goose_received (GOOSE_INFO *goose_info);
|
||||
|
||||
/************************************************************************/
|
||||
/* Internal */
|
||||
|
||||
#define GOOSE_MAX_PDU_SIZE 200
|
||||
|
||||
/* Define macro so new function just calls old function. */
|
||||
#define gse_uca_write(gi) mmsl_send_goose (gi)
|
||||
|
||||
ST_RET gse_uca_decode (SN_UNITDATA *sn_udt, /* input subnet packet */
|
||||
GOOSE_INFO *goose_info); /* output GOOSE data */
|
||||
|
||||
/************************************************************************/
|
||||
/* BEGIN IEC GOOSE DEFINITIONS */
|
||||
/************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
struct runtime_type *runtimeTypeHead; /* Array of Runtime Types */
|
||||
ST_INT numRuntimeTypes; /* # of Runtime Types in array */
|
||||
ST_CHAR *dataBuf; /* ptr to local data */
|
||||
ST_VOID *userInfo; /* To store anything user wants.*/
|
||||
/* GSE code does not use it. */
|
||||
} GSE_IEC_DATA_ENTRY;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT8 *asn1Ptr;
|
||||
ST_INT asn1Len;
|
||||
} GSE_IEC_DATA_ENTRY_RX;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_CHAR gcRef [MVL61850_MAX_OBJREF_LEN+1]; /* GoCBRef in IEC 61850 */
|
||||
ST_UINT32 timeToLive;
|
||||
ST_CHAR dataSetRef [MVL61850_MAX_OBJREF_LEN+1];/* DatSet in IEC 61850 */
|
||||
ST_BOOLEAN appID_pres;
|
||||
ST_CHAR appID [MVL61850_MAX_RPTID_LEN+1]; /* GoID in IEC 61850 */
|
||||
/* (was AppID in Ed 1) */
|
||||
MMS_UTC_TIME utcTime;
|
||||
ST_UINT32 stNum;
|
||||
ST_UINT32 sqNum;
|
||||
ST_BOOLEAN test;
|
||||
ST_UINT32 confRev;
|
||||
ST_BOOLEAN needsCommissioning;
|
||||
ST_INT32 numDataEntries;
|
||||
GSE_IEC_DATA_ENTRY *dataEntries; /* array of data entry structs */
|
||||
}GSE_IEC_CTRL;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_CHAR *gcRef;
|
||||
ST_UINT32 timeToLive;
|
||||
ST_CHAR *dataSetRef;
|
||||
ST_BOOLEAN appID_pres;
|
||||
ST_CHAR *appID;
|
||||
MMS_UTC_TIME utcTime;
|
||||
ST_UINT32 stNum;
|
||||
ST_UINT32 sqNum;
|
||||
ST_BOOLEAN test;
|
||||
ST_UINT32 confRev;
|
||||
ST_BOOLEAN needsCommissioning;
|
||||
ST_INT32 numDataEntries;
|
||||
ST_INT tmpIndex; /* index to current entry in "dataEntries" array.*/
|
||||
/* Used during decode when filling in "dataEntries".*/
|
||||
GSE_IEC_DATA_ENTRY_RX *dataEntries; /* array of data entry structs */
|
||||
}GSE_IEC_HDR;
|
||||
|
||||
/* Subnet functions (clnp_snet_*) must be used to set multicast filters.*/
|
||||
/* The following "gse_*" macros may be used to access these functions. */
|
||||
#define gse_set_multicast_filter clnp_snet_set_multicast_filter
|
||||
#define gse_discovery_start clnp_snet_rx_all_multicast_start
|
||||
#define gse_discovery_stop clnp_snet_rx_all_multicast_stop
|
||||
|
||||
GSE_IEC_HDR *gse_iec_hdr_decode (ST_UCHAR *apdu, ST_INT apdu_len);
|
||||
/* After calling "gse_iec_hdr_decode", user can examine "dataEntries" */
|
||||
/* array in GSE_IEC_HDR, and call "ms_asn1_to_local" to decode any or */
|
||||
/* all dataEntries. */
|
||||
|
||||
/* User must call this function when they are done with the decoded */
|
||||
/* GOOSE info to free up the resources. */
|
||||
ST_RET gse_iec_decode_done (GSE_IEC_HDR *hdr);
|
||||
|
||||
|
||||
GSE_IEC_CTRL *gse_iec_control_create (ST_CHAR *gcRef, ST_CHAR *dataSetRefRef, ST_CHAR *appId,
|
||||
ST_INT numDataEntry);
|
||||
ST_RET gse_iec_control_destroy (GSE_IEC_CTRL *ctrl);
|
||||
|
||||
ST_RET gse_iec_data_init (GSE_IEC_CTRL *ctrl,
|
||||
ST_INT index,
|
||||
struct runtime_type *runtimeTypeHead,
|
||||
ST_INT numRuntimeTypes
|
||||
);
|
||||
|
||||
ST_RET gse_iec_data_update (GSE_IEC_CTRL *ctrl,
|
||||
ST_INT index,
|
||||
ST_VOID *dataPtr);
|
||||
|
||||
ST_UCHAR *gse_iec_encode (GSE_IEC_CTRL *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info);/* ptr to Ethertype info*/
|
||||
|
||||
ST_RET gse_iec_send (GSE_IEC_CTRL *ctrl,
|
||||
ST_UCHAR *dstMac, /* Destination MAC addr */
|
||||
ST_UCHAR *asn1Data, /* ptr to ASN.1 encoded data*/
|
||||
ST_INT asn1DataLen); /* len of ASN.1 encoded data*/
|
||||
|
||||
/* Functions to use for 2-part encode. Reduces re-encoding of data. */
|
||||
ST_UCHAR *gse_iec_enc_part1 (GSE_IEC_CTRL *ctrl,
|
||||
ST_UCHAR *buf_ptr, /* buffer in which to encode */
|
||||
ST_INT buf_len, /* buffer len */
|
||||
ST_INT *asn1_len_out); /* len of ASN.1 encoded data */
|
||||
ST_UCHAR *gse_iec_enc_part2 (GSE_IEC_CTRL *ctrl,
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UCHAR *buf_ptr, /* buffer in which to encode */
|
||||
ST_INT buf_len, /* buffer len */
|
||||
ST_INT enc_part1_len, /* len of data encoded by */
|
||||
/* gse_iec_enc_part1 */
|
||||
/* CRITICAL: must be < buf_len. */
|
||||
ST_INT *asn1_len_out); /* len of ASN.1 encoded data */
|
||||
|
||||
/************************************************************************/
|
||||
/* END IEC GOOSE DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* included */
|
||||
252
include/mmslite/gse_mgmt.h
Normal file
252
include/mmslite/gse_mgmt.h
Normal file
@@ -0,0 +1,252 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1999-2002, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : gse_mgmt.h */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 11/03/06 CRM 01 Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef GSE_MGMT_INCLUDED
|
||||
#define GSE_MGMT_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "acse2usr.h"
|
||||
#include "asn1r.h"
|
||||
#include "ethertyp.h"
|
||||
|
||||
|
||||
|
||||
#define MAX_GSE_MGMT_ENCODE_BUF 1540
|
||||
#define MAX_VSTRING_BUF 65
|
||||
#define NUM_ELEMENTS 500
|
||||
|
||||
#define GET_GO_REF_REQ_TAG 1
|
||||
#define GET_GOOSE_ELE_NUM_REQ_TAG 2
|
||||
#define GET_GS_REF_REQ_TAG 3
|
||||
#define GET_GSSE_DATA_OFF_REQ_TAG 4
|
||||
|
||||
#define GET_GO_REF_RSP_TAG 1
|
||||
#define GET_GOOSE_ELE_NUM_RSP_TAG 2
|
||||
#define GET_GS_REF_RSP_TAG 3
|
||||
#define GET_GSSE_DATA_OFF_RSP_TAG 4
|
||||
|
||||
#define RSP_OTHER 0
|
||||
#define RSP_NOT_FOUND 1
|
||||
|
||||
#define GLB_ERROR 2
|
||||
#define GLB_ERR_OTHER 0
|
||||
#define GLB_ERR_UNKNOWN_CTRL_BLK 1
|
||||
#define GLB_ERR_RSP_TOO_LARGE 2
|
||||
#define GLB_ERR_CTRL_BLK_CONFIG_ERR 3
|
||||
|
||||
|
||||
#define GSE_MSG_TYPE_GO_REF_REQ 1
|
||||
#define GSE_MSG_TYPE_GOOSE_ELE_REQ 2
|
||||
#define GSE_MSG_TYPE_GS_REF_REQ 3
|
||||
#define GSE_MSG_TYPE_GSSE_DATA_OFF_REQ 4
|
||||
|
||||
#define GSE_MSG_TYPE_GLOBAL_ERROR_RSP 10
|
||||
#define GSE_MSG_TYPE_GO_REF_RSP 11
|
||||
#define GSE_MSG_TYPE_GOOSE_ELE_RSP 12
|
||||
#define GSE_MSG_TYPE_GS_REF_RSP 13
|
||||
#define GSE_MSG_TYPE_GSSE_DATA_OFF_RSP 14
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* BEGIN GSE MGMT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT32 stateID;
|
||||
ST_CHAR ident[MAX_VSTRING_BUF+1];
|
||||
ST_INT numIntegers;
|
||||
ST_UINT32 *offset;
|
||||
} GSE_REF_REQ;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT32 stateID;
|
||||
ST_CHAR ident[MAX_VSTRING_BUF+1];
|
||||
ST_INT numVStrings;
|
||||
ST_CHAR **references;
|
||||
} GSE_OFFSET_REQ;
|
||||
|
||||
/* Global error response sturcture */
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT32 stateID;
|
||||
ST_CHAR ident[MAX_VSTRING_BUF+1];
|
||||
ST_UINT32 confRev;
|
||||
ST_UINT32 glbError;
|
||||
} GSE_GLB_ERR_RSP;
|
||||
|
||||
|
||||
/* Offset response sturctures */
|
||||
typedef struct
|
||||
{
|
||||
ST_INT rsp_type;
|
||||
ST_UINT32 offset;
|
||||
ST_UINT32 error;
|
||||
} OFFSET_REQ_RESULTS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT32 stateID;
|
||||
ST_CHAR ident[MAX_VSTRING_BUF+1];
|
||||
ST_UINT32 confRev;
|
||||
ST_CHAR datSet[MAX_VSTRING_BUF+1];
|
||||
ST_INT numResults;
|
||||
OFFSET_REQ_RESULTS *result;
|
||||
} GSE_OFFSET_RSP;
|
||||
|
||||
|
||||
/* Reference response sturctures */
|
||||
typedef struct
|
||||
{
|
||||
ST_INT rsp_type;
|
||||
ST_CHAR reference[MAX_VSTRING_BUF+1];
|
||||
ST_UINT32 error;
|
||||
} REF_REQ_RESULTS;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT32 stateID;
|
||||
ST_CHAR ident[MAX_VSTRING_BUF+1];
|
||||
ST_UINT32 confRev;
|
||||
ST_CHAR datSet[MAX_VSTRING_BUF+1];
|
||||
ST_INT numResults;
|
||||
REF_REQ_RESULTS *result;
|
||||
} GSE_REF_RSP;
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* STRUCTURE DEFINITIONS */
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_UINT32 stateID;
|
||||
ST_INT msgType;
|
||||
|
||||
union GSE_MSG
|
||||
{
|
||||
GSE_REF_REQ refReq;
|
||||
GSE_OFFSET_REQ offReq;
|
||||
GSE_OFFSET_RSP offRsp;
|
||||
GSE_REF_RSP refRsp;
|
||||
GSE_GLB_ERR_RSP glbErrRsp;
|
||||
} msg;
|
||||
} GSE_MGMT_MSG;
|
||||
|
||||
|
||||
|
||||
|
||||
ST_UCHAR *getGoRefReqEncode (GSE_REF_REQ *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGOOSEEleNumReqEncode (GSE_OFFSET_REQ *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGsRefReqEncode (GSE_REF_REQ *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGSSEDataOffsetReqEncode (GSE_OFFSET_REQ *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
|
||||
|
||||
|
||||
ST_UCHAR *gse_mgmt_NotSupported (ST_VOID);
|
||||
ST_UCHAR *getGlbErrorRspEncode (GSE_GLB_ERR_RSP *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGoRefRspEncode (GSE_REF_RSP *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGOOSEEleNumRspEncode (GSE_OFFSET_RSP *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGsRefRspEncode (GSE_REF_RSP *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
ST_UCHAR *getGSSEDataOffsetRspEncode (GSE_OFFSET_RSP *ctrl,
|
||||
ST_UCHAR *asn1DataBuf, /* buffer to encode in */
|
||||
ST_INT asn1DataBufLen, /* len of buffer */
|
||||
ST_INT *asn1DataLenOut, /* ptr to len encoded */
|
||||
ETYPE_INFO *etype_info, /* ptr to Ethertype info */
|
||||
ST_UINT8 *dstMac, /* destination MAC address */
|
||||
ST_UINT8 *srcMac); /* source MAC address */
|
||||
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Functions for receiving GSE_MGMT messages. */
|
||||
/* Decode GSE_MGMT message and fill in GSE_MGMT_MSG struct. */
|
||||
/************************************************************************/
|
||||
GSE_MGMT_MSG *gse_mgmt_msg_decode (
|
||||
SN_UNITDATA *sn_req, /* message to decode */
|
||||
ETYPE_INFO *etypeInfo); /* where to store decoded Ethertype info*/
|
||||
|
||||
/* Must be called to free structure returned from gse_mgmt_msg_decode. */
|
||||
ST_VOID gse_mgmt_msg_free (GSE_MGMT_MSG *gseMgmtMsg);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* END GSE MGMT DEFINITIONS */
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GSE_MGMT_INCLUDED */
|
||||
48
include/mmslite/gvaldefs.h
Normal file
48
include/mmslite/gvaldefs.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986-1997 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : gvaldefs.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This include file contains common declarations used throughout */
|
||||
/* the user application code. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef GVALDEFS_INCLUDED
|
||||
#define GVALDEFS_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define STRGETSTRINGSIZE 256
|
||||
|
||||
ST_BOOLEAN floatget (ST_FLOAT *dest);
|
||||
ST_BOOLEAN doubleget( ST_DOUBLE *dest);
|
||||
ST_BOOLEAN intget (ST_INT *dest); /* int get function */
|
||||
ST_BOOLEAN hexget (ST_INT *dest); /* int get function */
|
||||
ST_BOOLEAN longget (ST_LONG *dest); /* long int get function */
|
||||
ST_BOOLEAN longhexget (ST_LONG *dest); /* long int get function */
|
||||
ST_BOOLEAN strget (ST_CHAR *dest); /* string get function */
|
||||
ST_INT input_hex (ST_UCHAR *dest_str, ST_INT maxbytes);
|
||||
|
||||
ST_VOID entry1 (ST_INT maxlen, ST_CHAR *str_ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
165
include/mmslite/ip6_misc.h
Normal file
165
include/mmslite/ip6_misc.h
Normal file
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
* Copyright (c) 1993, 1994, 1997
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that: (1) source code distributions
|
||||
* retain the above copyright notice and this paragraph in its entirety, (2)
|
||||
* distributions including binary code include the above copyright notice and
|
||||
* this paragraph in its entirety in the documentation or other materials
|
||||
* provided with the distribution, and (3) all advertising materials mentioning
|
||||
* features or use of this software display the following acknowledgement:
|
||||
* ``This product includes software developed by the University of California,
|
||||
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
|
||||
* the University nor the names of its contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* @(#) $Header: /JoyProject/jspqfe/src/pt61850netd_pqfe/source/include/mmslite/ip6_misc.h,v 1.1 2018/11/24 06:54:50 lizhongming Exp $ (LBL)
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains a collage of declarations for IPv6 from FreeBSD not present in Windows
|
||||
*/
|
||||
|
||||
#include <winsock2.h>
|
||||
|
||||
#ifndef __MINGW32__
|
||||
#include <ws2tcpip.h>
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#ifndef __MINGW32__
|
||||
#define IN_MULTICAST(a) IN_CLASSD(a)
|
||||
#endif
|
||||
|
||||
#define IN_EXPERIMENTAL(a) ((((u_int32_t) (a)) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
#define IN_LOOPBACKNET 127
|
||||
|
||||
#ifdef __MINGW32__
|
||||
/* IPv6 address */
|
||||
struct in6_addr
|
||||
{
|
||||
union
|
||||
{
|
||||
u_int8_t u6_addr8[16];
|
||||
u_int16_t u6_addr16[8];
|
||||
u_int32_t u6_addr32[4];
|
||||
} in6_u;
|
||||
#define s6_addr in6_u.u6_addr8
|
||||
#define s6_addr16 in6_u.u6_addr16
|
||||
#define s6_addr32 in6_u.u6_addr32
|
||||
#define s6_addr64 in6_u.u6_addr64
|
||||
};
|
||||
|
||||
#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
|
||||
#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
|
||||
#if (defined WIN32) || (defined __MINGW32__)
|
||||
typedef unsigned short sa_family_t;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __MINGW32__
|
||||
|
||||
#define __SOCKADDR_COMMON(sa_prefix) \
|
||||
sa_family_t sa_prefix##family
|
||||
|
||||
/* Ditto, for IPv6. */
|
||||
struct sockaddr_in6
|
||||
{
|
||||
__SOCKADDR_COMMON (sin6_);
|
||||
u_int16_t sin6_port; /* Transport layer port # */
|
||||
u_int32_t sin6_flowinfo; /* IPv6 flow information */
|
||||
struct in6_addr sin6_addr; /* IPv6 address */
|
||||
};
|
||||
|
||||
#define IN6_IS_ADDR_V4MAPPED(a) \
|
||||
((((u_int32_t *) (a))[0] == 0) && (((u_int32_t *) (a))[1] == 0) && \
|
||||
(((u_int32_t *) (a))[2] == htonl (0xffff)))
|
||||
|
||||
#define IN6_IS_ADDR_MULTICAST(a) (((u_int8_t *) (a))[0] == 0xff)
|
||||
|
||||
#define IN6_IS_ADDR_LINKLOCAL(a) \
|
||||
((((u_int32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000))
|
||||
|
||||
#define IN6_IS_ADDR_LOOPBACK(a) \
|
||||
(((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \
|
||||
((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1))
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
|
||||
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
|
||||
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
|
||||
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
|
||||
#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
|
||||
#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
|
||||
|
||||
#define nd_rd_type nd_rd_hdr.icmp6_type
|
||||
#define nd_rd_code nd_rd_hdr.icmp6_code
|
||||
#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
|
||||
#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
|
||||
|
||||
/*
|
||||
* IPV6 extension headers
|
||||
*/
|
||||
#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
|
||||
#define IPPROTO_IPV6 41 /* IPv6 header. */
|
||||
#define IPPROTO_ROUTING 43 /* IPv6 routing header */
|
||||
#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
|
||||
#define IPPROTO_ESP 50 /* encapsulating security payload */
|
||||
#define IPPROTO_AH 51 /* authentication header */
|
||||
#define IPPROTO_ICMPV6 58 /* ICMPv6 */
|
||||
#define IPPROTO_NONE 59 /* IPv6 no next header */
|
||||
#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */
|
||||
#define IPPROTO_PIM 103 /* Protocol Independent Multicast. */
|
||||
|
||||
#define IPV6_RTHDR_TYPE_0 0
|
||||
|
||||
/* Option types and related macros */
|
||||
#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
|
||||
#define IP6OPT_PADN 0x01 /* 00 0 00001 */
|
||||
#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
|
||||
#define IP6OPT_JUMBO_LEN 6
|
||||
#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */
|
||||
|
||||
#define IP6OPT_RTALERT_LEN 4
|
||||
#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
|
||||
#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
|
||||
#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
|
||||
#define IP6OPT_MINLEN 2
|
||||
|
||||
#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */
|
||||
#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */
|
||||
#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */
|
||||
#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */
|
||||
#define IP6OPT_EID 0x8a /* 10 0 01010 */
|
||||
|
||||
#define IP6OPT_TYPE(o) ((o) & 0xC0)
|
||||
#define IP6OPT_TYPE_SKIP 0x00
|
||||
#define IP6OPT_TYPE_DISCARD 0x40
|
||||
#define IP6OPT_TYPE_FORCEICMP 0x80
|
||||
#define IP6OPT_TYPE_ICMP 0xC0
|
||||
|
||||
#define IP6OPT_MUTABLE 0x20
|
||||
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#ifndef EAI_ADDRFAMILY
|
||||
struct addrinfo {
|
||||
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
|
||||
int ai_family; /* PF_xxx */
|
||||
int ai_socktype; /* SOCK_xxx */
|
||||
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
||||
size_t ai_addrlen; /* length of ai_addr */
|
||||
char *ai_canonname; /* canonical name for hostname */
|
||||
struct sockaddr *ai_addr; /* binary address */
|
||||
struct addrinfo *ai_next; /* next structure in linked list */
|
||||
};
|
||||
#endif
|
||||
#endif /* __MINGW32__ */
|
||||
145
include/mmslite/lean_a.h
Normal file
145
include/mmslite/lean_a.h
Normal file
@@ -0,0 +1,145 @@
|
||||
#ifndef LEAN_A_H
|
||||
#define LEAN_A_H
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996 - 2005 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : lean_a.h */
|
||||
/* PRODUCT(S) : Lean-T Stack SUIC */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* NONE */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/13/05 EJV 11 MMSEASE_MOSI: added extern domsock_listener */
|
||||
/* 03/15/05 EJV 10 MMSEASE_MOSI: set MAX_SUIC_CHAN to 1000 */
|
||||
/* Added mms_event_fd. */
|
||||
/* 02/08/02 JRB 09 Move osicfgx prototype to mvl_acse.h. */
|
||||
/* 11/27/00 JRB 08 Add osicfgx proto. */
|
||||
/* 12/10/97 JRB 07 Add MMSEventName and hMMSEvent for OS2. */
|
||||
/* 08/14/97 JRB 06 #include "acse2usr.h" and use PRES_ADDR in */
|
||||
/* DIB_ENTRY. */
|
||||
/* 05/27/97 JRB 7.00 MMSEASE 7.0 release. */
|
||||
/* 05/02/97 JRB 05 Del MAX_?_SEL defines. Use suicacse.h defs. */
|
||||
/* 05/01/97 JRB 04 Move MAX_SUIC_CHAN define to here. */
|
||||
/* 01/02/96 JRB 03 Add MMSEventName and hMMSEvent. */
|
||||
/* 10/04/96 JRB 02 #ifdef MCGW, add adlcAddr to DIB_ENTRY. */
|
||||
/* Add *_clt7 function prototypes. */
|
||||
/* 05/29/96 MDE 01 Changed DIB_ENTRY - name is now a pointer */
|
||||
/* 03/27/96 MDE Created */
|
||||
/************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
#include <windows.h>
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#if defined (__OS2__)
|
||||
#define INCL_BASE
|
||||
#include <os2.h>
|
||||
#endif /* __OS2__ */
|
||||
|
||||
#include "asn1defs.h" /* for MMS_OBJ_ID definition */
|
||||
#include "acse2usr.h" /* for PRES_ADDR definition */
|
||||
|
||||
#if defined(MMSEASE_MOSI)
|
||||
#define MAX_SUIC_CHAN 1024 /* number of channels <=TP_MAX_NUM_CONNS*/
|
||||
#include "gensock2.h" /* defines SOCKET */
|
||||
extern SOCKET mms_event_fd; /* wakeup socket, indicating TCP Events */
|
||||
extern SOCKET domsock_listener; /* domain socket connected to the */
|
||||
/* RFC1006_LISTENER task. */
|
||||
#else
|
||||
#define MAX_SUIC_CHAN 256 /* number of channels */
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* The structure below is used to save Directory and other information */
|
||||
/* about local and remote AE's read in from SUIC.DIB */
|
||||
/************************************************************************/
|
||||
|
||||
#define DIB_ENTRY_DEFINED
|
||||
|
||||
struct dib_entry
|
||||
{
|
||||
ST_LONG reserved; /* reserved field */
|
||||
ST_CHAR *name; /* user-defined ASCII character string */
|
||||
ST_CHAR local; /* local or remote name */
|
||||
ST_UCHAR AP_title_pres; /* present flag */
|
||||
MMS_OBJ_ID AP_title; /* AP title */
|
||||
ST_UCHAR AP_inv_id_pres; /* present flag */
|
||||
ST_INT32 AP_invoke_id; /* AP invocation ID */
|
||||
ST_UCHAR AE_qual_pres; /* present flag */
|
||||
ST_INT32 AE_qual; /* AE qualifier */
|
||||
ST_UCHAR AE_inv_id_pres; /* present flag */
|
||||
ST_INT32 AE_invoke_id; /* AE invocation ID */
|
||||
PRES_ADDR pres_addr; /* Presentation address. */
|
||||
} ;
|
||||
typedef struct dib_entry DIB_ENTRY;
|
||||
|
||||
/************************************************************************/
|
||||
/* Channel-oriented control structure used to hold connection-specific */
|
||||
/* information */
|
||||
/************************************************************************/
|
||||
|
||||
#define MAX_TX_OUT 10 /* max. outstanding TX requests allowed */
|
||||
|
||||
struct chanctrl
|
||||
{
|
||||
DIB_ENTRY *loc_de; /* Pointer to Local DIB Entry */
|
||||
DIB_ENTRY *rem_de; /* Pointer to Remote DIB Entry */
|
||||
} ;
|
||||
extern struct chanctrl *s_chan_ctrl;
|
||||
|
||||
/************************************************************************/
|
||||
/* Structure to store incoming associate indication in case no listen */
|
||||
/* channel is available */
|
||||
/************************************************************************/
|
||||
|
||||
extern ST_INT num_loc_dib_entries;
|
||||
extern ST_INT num_rem_dib_entries;
|
||||
extern DIB_ENTRY *loc_dib_table;
|
||||
extern DIB_ENTRY *rem_dib_table;
|
||||
|
||||
/************************************************************************/
|
||||
/* Event handling variables for WIN32 & OS2. */
|
||||
/************************************************************************/
|
||||
#ifdef _WIN32
|
||||
extern ST_CHAR *MMSEventName; /* Pointer to the globally unique name of Event Object */
|
||||
extern HANDLE hMMSEvent; /* Handle to Event Object to be signalled when */
|
||||
/* s_serve () needs to be called */
|
||||
#endif /* _WIN32 */
|
||||
#ifdef __OS2__
|
||||
extern ST_CHAR *MMSEventName; /* Pointer to the globally unique name of Event Object */
|
||||
extern HEV hMMSEvent; /* Handle to Event Object to be signalled when */
|
||||
/* s_serve () needs to be called */
|
||||
#endif /* __OS2__ */
|
||||
|
||||
/************************************************************************/
|
||||
/* Prototypes */
|
||||
/************************************************************************/
|
||||
ST_VOID s_reset_ctrl (ST_INT);
|
||||
ST_RET init_dirser (ST_VOID);
|
||||
DIB_ENTRY *find_dib_entry (ST_CHAR *);
|
||||
DIB_ENTRY *find_loc_dib_entry (ST_CHAR *ar_name);
|
||||
DIB_ENTRY *find_rem_dib_entry (ST_CHAR *ar_name);
|
||||
|
||||
ST_RET init_dirser_clt7 (ST_VOID);
|
||||
DIB_ENTRY *find_dib_entry_clt7 (ST_CHAR *);
|
||||
DIB_ENTRY *find_loc_dib_entry_clt7 (ST_CHAR *ar_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !LEAN_A_H */
|
||||
|
||||
|
||||
337
include/mmslite/llcio.h
Normal file
337
include/mmslite/llcio.h
Normal file
@@ -0,0 +1,337 @@
|
||||
#ifndef _LLCIO_H
|
||||
#define _LLCIO_H
|
||||
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1994, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : llcio.h */
|
||||
/* PRODUCT(S) : osillc.sys */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/21/98 IKE 03 Converted to 7.0 Data types, removed */
|
||||
/* underscores so it can be compiled */
|
||||
/* 11/02/95 DSF 02 Enhanced to retrieve stats information */
|
||||
/* 12/08/94 DSF 01 Added SET_OFFSET */
|
||||
/* 03/10/94 DSF Initial Release */
|
||||
/************************************************************************/
|
||||
|
||||
/*
|
||||
** User Functions
|
||||
*/
|
||||
|
||||
int LlcOpen (char *Name);
|
||||
int LlcClose (int fd);
|
||||
int LlcWrite (int fd, char *buffer, int size);
|
||||
int LlcRead (int fd, char *buffer, int size);
|
||||
int LlcIoctl (int fd, void *pArg, int size);
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** IOCTL Management
|
||||
*/
|
||||
|
||||
/*
|
||||
** LLC Driver IOCTL requests
|
||||
*/
|
||||
|
||||
|
||||
#define LLC_ADD_MULTI 1
|
||||
#define LLC_DEL_MULTI 2
|
||||
#define LLC_GET_HW_ADDR 3
|
||||
#define LLC_SET_FRAME_FILTER 4
|
||||
#define LLC_BIND_LSAP 5
|
||||
#define LLC_UNBIND_LSAP 6
|
||||
#define LLC_TRACE_ON 7
|
||||
#define LLC_TRACE_OFF 8
|
||||
#define LLC_DEBUG_ON 9
|
||||
#define LLC_DEBUG_OFF 10
|
||||
#define LLC_GET_PROTO_STATS 11
|
||||
#define LLC_GET_MAC_STATS 12
|
||||
#define LLC_ARM_SIGNAL 13
|
||||
#define LLC_ARM_POST 15
|
||||
#define LLC_GET_EMB_PHYS_ADDR 16
|
||||
#define LLC_SET_WRITE_CONFIRM_FLAG 17
|
||||
#define LLC_GET_DEBUG 18
|
||||
#define LLC_POST_BUFS 19
|
||||
#define LLC_SET_OFFSET 20
|
||||
#define LLC_GET_MAC_CHARS 21
|
||||
#define LLC_CLEAR_MAC_STATS 22
|
||||
#define LLC_CLEAR_PROTO_STATS 23
|
||||
|
||||
|
||||
/*
|
||||
** LLC Driver IOCTL Errors
|
||||
*/
|
||||
|
||||
#define LLCERR_NO_ERROR 0
|
||||
#define LLCERR_LSAP_BOUND 1
|
||||
#define LLCERR_LSAP_NOTBOUND 2
|
||||
#define LLCERR_ILLEGAL_OPERATION 3
|
||||
#define LLCERR_UNKNOWN_COMMAND 4
|
||||
|
||||
#define MAX_HWADDR_SIZE 12
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
} LLCGENERICIOCTL;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
int cSize;
|
||||
char Multicast[MAX_HWADDR_SIZE];
|
||||
} LLCADDMULTI;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
int cSize;
|
||||
char Multicast[MAX_HWADDR_SIZE];
|
||||
} LLCDELMULTI;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
int cSize;
|
||||
char HwAddr[MAX_HWADDR_SIZE];
|
||||
} LLCGETHWADDR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
unsigned Lsap;
|
||||
} LLCBINDLSAP;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
} LLCUNBINDLSAP;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
long EmbPhysAddr;
|
||||
long EmbSize;
|
||||
} LLCGETEMBPHYSADDR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
char far *pfWriteConfirm;
|
||||
} LLCSETWRITECONFIRMFLAG;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
int VxDID;
|
||||
} LLCARMPOST;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
long offset;
|
||||
} LLCSETOFFSET;
|
||||
|
||||
|
||||
typedef struct tagUSERBUFDESC
|
||||
{
|
||||
struct tagUSERBUFDESC far *Next;
|
||||
char far *pBuf;
|
||||
int cBufSize;
|
||||
int cDataSize;
|
||||
} USERBUFDESC;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
USERBUFDESC far *pBufDesc;
|
||||
} LLCPOSTBUFS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
int MessageNum;
|
||||
int Parm1;
|
||||
int Parm2;
|
||||
int Parm3;
|
||||
} LLCGETDEBUG;
|
||||
|
||||
|
||||
/*
|
||||
** NDIS Protocol Driver Stats
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
long nFramesReceived;
|
||||
long nReceiveLookaheadReceived;
|
||||
long nReceiveChainReceived;
|
||||
long nFramesDiscardedNotRecognized;
|
||||
long nFramesDiscardedOutOfResources;
|
||||
long nTransferDataFailed;
|
||||
long nTransmitChainIssued;
|
||||
long nTransmitChainFailed;
|
||||
long nFramesDelivered; /* DOS only */
|
||||
} LLCPROTOSTATS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
LLCPROTOSTATS ProtoStats;
|
||||
} LLCGETPROTOSTATS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
} LLCCLEARPROTOSTATS;
|
||||
|
||||
/*
|
||||
** NDIS MAC Driver Characteristics
|
||||
*/
|
||||
|
||||
typedef struct /* structure for MAC service specific info */
|
||||
{
|
||||
int cSize; /* length of the characteristic table */
|
||||
char TypeName[16]; /* name of the MAC type (eg. 802.3...) */
|
||||
int cStationAddr; /* length of station address (MAC) */
|
||||
char PermMACAddr[16]; /* hardware default MAC address */
|
||||
char CurrMACAddr[16]; /* current MAC address in use */
|
||||
long FunctionAddr; /* current functional address of adapter */
|
||||
long reserved; /* pointer to multicast table */
|
||||
long LinkSpeed; /* link speed bits/sec */
|
||||
long fMAC; /* flags of capabilities */
|
||||
int MaxFrameSize; /* maximum MAC frame which can be sent */
|
||||
long TotalTxSpace; /* total transmit buffer space */
|
||||
int cTxBlockSize; /* size of allocated transmission blocks */
|
||||
long TotalRxSpace; /*total reception buffer space */
|
||||
int cRxBlockSize; /*reception buffer alloc blk size */
|
||||
char VendorID[3]; /*vendor IEEE ID */
|
||||
char VendorAdapterDesc; /*vendor adapter description */
|
||||
long reserved2; /*pointer to vendor serial number */
|
||||
int IRQLevel; /*interrupt level */
|
||||
int TransmitQueueDepth;
|
||||
int nMaxDataBlocks;
|
||||
} LLCMACCHARS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
LLCMACCHARS MacChars;
|
||||
} LLCGETMACCHARS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int cSize; /*size of table */
|
||||
long LastDiagTime; /*seconds since 1-1-1970 of diags */
|
||||
long MACStatus; /*mac status, this is a bit mask */
|
||||
/* Bits 0-2: 0 - Hardware Not Installed */
|
||||
/* 1 - Hardware Failed Pwrup Diags */
|
||||
/* 2 - Hardware Failed CNFG Prob */
|
||||
/* 3 - Hardware Faulted */
|
||||
/* 4 - Hardware Marginally Operat */
|
||||
/* 7 - Fully Operational */
|
||||
/* Bit 3: MAC BOUND */
|
||||
/* Bit 4: MAC OPEN */
|
||||
/* Bit 5: DIAG_IN_PROGRESS */
|
||||
int CurrPacketFilter; /* Bit 1: Directed and Multicast Group */
|
||||
/* Bit 2: Broadcast */
|
||||
/* Bit 3: Promiscuous */
|
||||
/* Bit 4: All Source Routing */
|
||||
long reserved; /*pointer to media specific stats */
|
||||
long LastClearTime; /*seconds since 1-1-1970 */
|
||||
long nOkFramesReceived; /*total frames received ok */
|
||||
long nCrcErrorFrames; /*total frames received with crc errors */
|
||||
long nBytesReceived; /*total number of bytes recieved */
|
||||
long nFramesDiscarded; /*total number of frames discarded */
|
||||
long nMulticastFramesReceived; /*total number of multicast frames rxd OK */
|
||||
long nBroadcastFramesReceived; /*total number of broadcast frames rxd OK */
|
||||
long reserved1;
|
||||
long reserved2;
|
||||
long reserved3;
|
||||
long reserved4;
|
||||
long reserved5;
|
||||
long nFramesDiscardedHwError; /*total number of frames discarded due to HW err*/
|
||||
long nFramesTransmittedOk; /*total number of frames transmitted OK */
|
||||
long nBytesTransimittedOk; /*total number of bytes transmitted OK */
|
||||
long nMulticastFramesTransmitted; /*total number of multicast transmitted */
|
||||
long nBroadcastFramesTransmitted; /*total broadcast frame transmitted */
|
||||
long reserved6;
|
||||
long reserved7;
|
||||
long nFramesNotTransmittedTimeout; /*total frames not transmitted due to timeout */
|
||||
long nFramesNotTransmittedHwError; /*total frames not transmitted due to HW ERR */
|
||||
} LLCMACSTATS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
LLCMACSTATS MacStats;
|
||||
} LLCGETMACSTATS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int Opcode;
|
||||
int Status;
|
||||
} LLCCLEARMACSTATS;
|
||||
|
||||
typedef union
|
||||
{
|
||||
LLCADDMULTI AddMulti;
|
||||
LLCDELMULTI DelMulti;
|
||||
LLCGETHWADDR GetHwAddr;
|
||||
LLCBINDLSAP BindLsap;
|
||||
LLCUNBINDLSAP UnBindLsap;
|
||||
LLCGETEMBPHYSADDR GetEmbPhysAddr;
|
||||
LLCSETWRITECONFIRMFLAG SetWriteConfirmFlag;
|
||||
LLCPOSTBUFS PostBufs;
|
||||
LLCARMPOST ArmPost;
|
||||
LLCGETDEBUG GetDebug;
|
||||
LLCSETOFFSET SetOffset;
|
||||
LLCGETMACCHARS GetMacChars;
|
||||
LLCGETMACSTATS GetMacStats;
|
||||
LLCCLEARMACSTATS ClearMacStats;
|
||||
LLCGETPROTOSTATS GetProtoStats;
|
||||
LLCCLEARPROTOSTATS ClearProtoStats;
|
||||
} LLCIOCTL;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Function prototypes
|
||||
*/
|
||||
|
||||
int llc_getstats (LLCMACCHARS *MacChars,
|
||||
LLCMACSTATS *MacStats,
|
||||
LLCPROTOSTATS *ProtoStats);
|
||||
void llc_clearstats ();
|
||||
|
||||
|
||||
#endif
|
||||
121
include/mmslite/llcioctl.h
Normal file
121
include/mmslite/llcioctl.h
Normal file
@@ -0,0 +1,121 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1996, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : llcioctl.c */
|
||||
/* PRODUCT(S) : OSI LLC NDIS 3.1 VxD */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 06/16/97 DSF 05 Added stats */
|
||||
/* 09/10/96 DSF 04 Added Length field to SET_MULTI */
|
||||
/* 09/05/96 DSF 03 Added SET_FILTER */
|
||||
/* 08/14/96 DSF 02 Added Transmit Completion object */
|
||||
/* 04/01/96 DSF 01 Initial Release */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
#define IOCTL_BASE 0x8100
|
||||
#define IOCTL_GET_PHYS_ADDR (IOCTL_BASE + 1)
|
||||
#define IOCTL_SET_MULTI (IOCTL_BASE + 2)
|
||||
#define IOCTL_ARM_EVENT (IOCTL_BASE + 3)
|
||||
#define IOCTL_SEND (IOCTL_BASE + 4)
|
||||
#define IOCTL_RECEIVE (IOCTL_BASE + 5)
|
||||
#define IOCTL_ARM_COMPLETE (IOCTL_BASE + 6)
|
||||
#define IOCTL_SET_FILTER (IOCTL_BASE + 7)
|
||||
#define IOCTL_GET_STATS (IOCTL_BASE + 8)
|
||||
|
||||
|
||||
#define PHYS_ADDR_LENGTH 6
|
||||
typedef struct _GET_PHYS_ADDR
|
||||
{
|
||||
UINT Status;
|
||||
char PhysAddr[PHYS_ADDR_LENGTH];
|
||||
} GET_PHYS_ADDR;
|
||||
|
||||
|
||||
typedef struct _SET_MULTI
|
||||
{
|
||||
UINT Status;
|
||||
UINT Length;
|
||||
char MultiAddr[2 * PHYS_ADDR_LENGTH];
|
||||
} SET_MULTI;
|
||||
|
||||
typedef struct _SET_FILTER
|
||||
{
|
||||
UINT Status;
|
||||
} SET_FILTER;
|
||||
|
||||
typedef struct _ARM_EVENT
|
||||
{
|
||||
UINT Status;
|
||||
HANDLE EventHandle;
|
||||
} ARM_EVENT;
|
||||
|
||||
typedef struct _ARM_COMPLETE
|
||||
{
|
||||
UINT Status;
|
||||
HANDLE CompleteHandle;
|
||||
} ARM_COMPLETE;
|
||||
|
||||
#if !defined (GET_STATS_DEFINED)
|
||||
typedef struct _MAC_STATS
|
||||
{
|
||||
ULONG HardwareStatus;
|
||||
ULONG MaxLookahead;
|
||||
ULONG MaxFrameSize;
|
||||
ULONG LinkSpeed;
|
||||
ULONG TransmitBufferSpace;
|
||||
ULONG ReceiveBufferSpace;
|
||||
ULONG TransmitBlockSize;
|
||||
ULONG ReceiveBlockSize;
|
||||
ULONG MaximumTotalSize;
|
||||
ULONG MacOptions;
|
||||
ULONG ConnectStatus;
|
||||
ULONG XmitOk;
|
||||
ULONG RcvOk;
|
||||
ULONG XmitError;
|
||||
ULONG RcvError;
|
||||
ULONG RcvNoBuffer;
|
||||
ULONG RcvCrcError;
|
||||
ULONG TransmitQueueLength;
|
||||
} MAC_STATS;
|
||||
|
||||
typedef struct _PROTO_STATS
|
||||
{
|
||||
ULONG XmitOk;
|
||||
ULONG RcvOk;
|
||||
ULONG XmitError;
|
||||
ULONG RcvError;
|
||||
ULONG RcvUnknown;
|
||||
ULONG XmitInd;
|
||||
ULONG RcvInd;
|
||||
ULONG AllocError;
|
||||
} PROTO_STATS;
|
||||
|
||||
typedef struct _USER_STATS
|
||||
{
|
||||
ULONG XmitOk;
|
||||
ULONG RcvOk;
|
||||
ULONG XmitError;
|
||||
ULONG RcvError;
|
||||
ULONG RcvUnknown;
|
||||
} USER_STATS;
|
||||
|
||||
typedef struct _GET_STATS
|
||||
{
|
||||
UINT Status;
|
||||
MAC_STATS mac;
|
||||
PROTO_STATS proto;
|
||||
USER_STATS user;
|
||||
} GET_STATS;
|
||||
|
||||
#define GET_STATS_DEFINED
|
||||
#endif
|
||||
339
include/mmslite/mem_chk.h
Normal file
339
include/mmslite/mem_chk.h
Normal file
@@ -0,0 +1,339 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986-2004 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : mem_chk.h */
|
||||
/* PRODUCT(S) : General Use */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the declarations of the dynamic memory */
|
||||
/* handling functions. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 02/06/04 EJV 16 Added dyn_mem_ptr_status2. */
|
||||
/* 04/14/03 DSF 15 Cleanup */
|
||||
/* 04/08/03 DSF 14 added m_mem_crt_debug */
|
||||
/* 04/04/03 DSF 13 new/delete checks for MFC */
|
||||
/* 08/20/01 JRB 12 chk_* functions chged to nd_chk_*. */
|
||||
/* chk_* names are now ALWAYS macros. */
|
||||
/* Make 4 sets of macros depending on whether */
|
||||
/* DEBUG_SISCO and/or SMEM_ENABLE defined. */
|
||||
/* Don't define SMEM_ENABLE, do from makefiles. */
|
||||
/* Remove logging backward compatibility stuff. */
|
||||
/* 08/06/01 RKR 11 S_THISFILE was removed, need a thisFileName */
|
||||
/* 03/19/01 JRB 10 Move SMEM context defs to "smem.h". */
|
||||
/* 01/25/01 DSF 09 new/delete checks */
|
||||
/* 11/01/00 MDE 08 Additional SMEM work */
|
||||
/* 01/21/00 MDE 07 Added SMEM support */
|
||||
/* 09/13/99 MDE 06 Added SD_CONST modifiers */
|
||||
/* 01/26/98 MDE 05 Added 'chk_strdup' */
|
||||
/* 12/08/98 MDE 04 Added 'ST_BOOLEAN m_auto_hw_log' */
|
||||
/* 10/08/98 MDE 03 Migrated to updated SLOG interface */
|
||||
/* 10/14/97 DSF 02 m_bad_ptr_val is now a pointer */
|
||||
/* 09/16/97 DSF 01 chk_debug_en is UINT */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MEM_CHK_INCLUDED
|
||||
#define MEM_CHK_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef SMEM_ENABLE
|
||||
#include "smem.h"
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* MEM_CHK MACROS and FUNCTION PROTOTYPES */
|
||||
/* Memory allocation macros. There are 4 sets of macros depending on */
|
||||
/* DEBUG_SISCO and SMEM_ENABLE. Each set of macros calls a unique set */
|
||||
/* of functions. */
|
||||
/* The DEBUG macros use thisFileName (instead of __FILE__) to reduce */
|
||||
/* memory usage. Any file using these macros MUST contain the following */
|
||||
/* statement: */
|
||||
/* static char *thisFileName = __FILE__; */
|
||||
/************************************************************************/
|
||||
|
||||
#if defined(SMEM_ENABLE)
|
||||
#if defined(DEBUG_SISCO)
|
||||
#define M_MALLOC(ctx,x) x_m_malloc (ctx,x, thisFileName,__LINE__)
|
||||
#define M_CALLOC(ctx,x,y) x_m_calloc (ctx,x,y,thisFileName,__LINE__)
|
||||
#define M_REALLOC(ctx,x,y) x_m_realloc (ctx,x,y,thisFileName,__LINE__)
|
||||
#define M_STRDUP(ctx,x) x_m_strdup (ctx,x, thisFileName,__LINE__)
|
||||
#define M_FREE(ctx,x) x_m_free (ctx,x, thisFileName,__LINE__)
|
||||
|
||||
#define chk_malloc(x) x_m_malloc (MSMEM_GEN,x, thisFileName,__LINE__)
|
||||
#define chk_calloc(x,y) x_m_calloc (MSMEM_GEN,x,y,thisFileName,__LINE__)
|
||||
#define chk_realloc(x,y) x_m_realloc (MSMEM_GEN,x,y,thisFileName,__LINE__)
|
||||
#define chk_strdup(x) x_m_strdup (MSMEM_GEN,x, thisFileName,__LINE__)
|
||||
#define chk_free(x) x_m_free (MSMEM_GEN,x, thisFileName,__LINE__)
|
||||
|
||||
ST_VOID *x_m_malloc (SMEM_CONTEXT *smem_ctx, ST_UINT size,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
|
||||
ST_VOID *x_m_calloc (SMEM_CONTEXT *smem_ctx, ST_UINT num,
|
||||
ST_UINT size,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
|
||||
ST_VOID *x_m_realloc (SMEM_CONTEXT *smem_ctx, ST_VOID *old,
|
||||
ST_UINT size,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
ST_VOID x_m_free (SMEM_CONTEXT *smem_ctx, ST_VOID *ptr,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
ST_CHAR *x_m_strdup (SMEM_CONTEXT *smem_ctx, ST_CHAR *str,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
|
||||
#else /* !DEBUG_SISCO */
|
||||
|
||||
#define M_MALLOC(ctx,x) nd_m_malloc (ctx,x)
|
||||
#define M_CALLOC(ctx,x,y) nd_m_calloc (ctx,x,y)
|
||||
#define M_REALLOC(ctx,x,y) nd_m_realloc (ctx,x,y)
|
||||
#define M_STRDUP(ctx,x) nd_m_strdup (ctx,x)
|
||||
#define M_FREE(ctx,x) nd_m_free (ctx,x)
|
||||
|
||||
#define chk_malloc(x) nd_m_malloc (MSMEM_GEN,x)
|
||||
#define chk_calloc(x,y) nd_m_calloc (MSMEM_GEN,x,y)
|
||||
#define chk_realloc(x,y) nd_m_realloc (MSMEM_GEN,x,y)
|
||||
#define chk_strdup(x) nd_m_strdup (MSMEM_GEN,x)
|
||||
#define chk_free(x) nd_m_free (MSMEM_GEN,x)
|
||||
|
||||
ST_VOID *nd_m_malloc (SMEM_CONTEXT *smem_ctx, ST_UINT size);
|
||||
ST_VOID *nd_m_calloc (SMEM_CONTEXT *smem_ctx, ST_UINT num, ST_UINT size);
|
||||
ST_VOID *nd_m_realloc (SMEM_CONTEXT *smem_ctx, ST_VOID *old, ST_UINT size);
|
||||
ST_VOID nd_m_free (SMEM_CONTEXT *smem_ctx, ST_VOID *ptr);
|
||||
ST_CHAR *nd_m_strdup (SMEM_CONTEXT *smem_ctx, ST_CHAR *str);
|
||||
|
||||
#endif /* !DEBUG_SISCO */
|
||||
#else /* !SMEM_ENABLE */
|
||||
#if defined(DEBUG_SISCO)
|
||||
|
||||
#define M_MALLOC(ctx,x) x_chk_malloc (x, thisFileName,__LINE__)
|
||||
#define M_CALLOC(ctx,x,y) x_chk_calloc (x,y,thisFileName,__LINE__)
|
||||
#define M_REALLOC(ctx,x,y) x_chk_realloc (x,y,thisFileName,__LINE__)
|
||||
#define M_STRDUP(ctx,x) x_chk_strdup (x, thisFileName,__LINE__)
|
||||
#define M_FREE(ctx,x) x_chk_free (x, thisFileName,__LINE__)
|
||||
|
||||
#define chk_malloc(x) x_chk_malloc (x, thisFileName,__LINE__)
|
||||
#define chk_calloc(x,y) x_chk_calloc (x,y,thisFileName,__LINE__)
|
||||
#define chk_realloc(x,y) x_chk_realloc (x,y,thisFileName,__LINE__)
|
||||
#define chk_strdup(x) x_chk_strdup (x, thisFileName,__LINE__)
|
||||
#define chk_free(x) x_chk_free (x, thisFileName,__LINE__)
|
||||
|
||||
ST_VOID *x_chk_realloc (ST_VOID *old,
|
||||
ST_UINT size,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
ST_VOID *x_chk_malloc (ST_UINT size,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
ST_VOID *x_chk_calloc (ST_UINT num,
|
||||
ST_UINT size,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
ST_CHAR *x_chk_strdup (ST_CHAR *str,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
ST_VOID x_chk_free (ST_VOID *old,
|
||||
SD_CONST ST_CHAR *SD_CONST file,
|
||||
SD_CONST ST_INT line);
|
||||
|
||||
#else /* !DEBUG_SISCO */
|
||||
|
||||
#define M_MALLOC(ctx,x) nd_chk_malloc (x)
|
||||
#define M_CALLOC(ctx,x,y) nd_chk_calloc (x,y)
|
||||
#define M_REALLOC(ctx,x,y) nd_chk_realloc (x,y)
|
||||
#define M_STRDUP(ctx,x) nd_chk_strdup (x)
|
||||
#define M_FREE(ctx,x) nd_chk_free (x)
|
||||
|
||||
#define chk_malloc(x) nd_chk_malloc (x)
|
||||
#define chk_calloc(x,y) nd_chk_calloc (x,y)
|
||||
#define chk_realloc(x,y) nd_chk_realloc (x,y)
|
||||
#define chk_strdup(x) nd_chk_strdup (x)
|
||||
#define chk_free(x) nd_chk_free (x)
|
||||
|
||||
ST_VOID *nd_chk_malloc (ST_UINT size);
|
||||
ST_VOID *nd_chk_calloc (ST_UINT num, ST_UINT size);
|
||||
ST_VOID *nd_chk_realloc (ST_VOID *old, ST_UINT size);
|
||||
ST_CHAR *nd_chk_strdup (ST_CHAR *str);
|
||||
ST_VOID nd_chk_free (ST_VOID *ptr);
|
||||
|
||||
#endif /* !DEBUG_SISCO */
|
||||
#endif /* !SMEM_ENABLE */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* chk_debug_en bit assignments */
|
||||
/* These are the defines to be used by all new applications */
|
||||
#define MEM_LOG_ERR 0x0001
|
||||
#define MEM_LOG_CALLOC 0x0002
|
||||
#define MEM_LOG_MALLOC 0x0004
|
||||
#define MEM_LOG_REALLOC 0x0008
|
||||
#define MEM_LOG_FREE 0x0010
|
||||
|
||||
extern ST_UINT chk_debug_en;
|
||||
|
||||
/************************************************************************/
|
||||
/* Replacement Memory allocation functions. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID init_mem_chk (ST_VOID);
|
||||
ST_VOID dyn_mem_ptr_status (ST_VOID);
|
||||
ST_UINT dyn_mem_ptr_status2 (ST_VOID *marker_ptr);
|
||||
ST_VOID dyn_mem_ptr_statistics (ST_BOOLEAN log_to_screen);
|
||||
ST_VOID check_mem_list (ST_VOID);
|
||||
ST_RET chk_alloc_ptr (ST_VOID *ptr);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* fatal error service function pointers, used for unrecoverable errors */
|
||||
/************************************************************************/
|
||||
#define MEM_ERR_EXIT_CODE 2001
|
||||
|
||||
extern ST_VOID *(*m_memerr_fun)(ST_UINT size); /* for malloc */
|
||||
extern ST_VOID *(*c_memerr_fun)(ST_UINT num, ST_UINT size); /* for calloc */
|
||||
extern ST_VOID *(*r_memerr_fun)(ST_VOID *old, ST_UINT size); /* for realloc*/
|
||||
|
||||
/************************************************************************/
|
||||
/* statistics */
|
||||
/************************************************************************/
|
||||
extern ST_UINT32 chk_curr_mem_count;
|
||||
extern ST_UINT32 chk_max_dyn_mem_ptrs;
|
||||
extern ST_UINT32 chk_max_mem_allocated;
|
||||
extern ST_UINT32 chk_curr_mem_size;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* HEAP checking functions and macros */
|
||||
|
||||
/* These defines are used to control the level or print in chk_hp */
|
||||
#define DEBUG_HEAP_SUM 0x0001
|
||||
#define DEBUG_HEAP_ENTRY 0x0002
|
||||
#define DEBUG_HEAP_ALL 0x0003
|
||||
|
||||
#ifdef HEAP_CHECK_ENABLE
|
||||
#define HEAP_CHECK() chk_hp (0, (ST_CHAR *) __FILE__, __LINE__)
|
||||
#else
|
||||
#define HEAP_CHECK()
|
||||
#endif
|
||||
|
||||
ST_RET msoft_heap_check (ST_INT16);
|
||||
ST_RET chk_hp (ST_INT16 prt_mask,ST_CHAR *file,ST_INT line);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
extern ST_VOID *m_bad_ptr_val;
|
||||
|
||||
/* This variable used to enable MSOFT heap check calls on every alloc */
|
||||
/* and free call. Also sets the unused heap memory to 0x55's */
|
||||
extern ST_BOOLEAN m_heap_check_enable;
|
||||
|
||||
/* This variable used to enable list validation and overwrite checking */
|
||||
/* on every alloc and free call. */
|
||||
extern ST_BOOLEAN m_check_list_enable;
|
||||
|
||||
/* Set this = SD_FALSE to speed up the debug version. When SD_TRUE, it */
|
||||
/* enables searching the memory list for the element before accessing */
|
||||
/* the memory during chk_realloc and chk_free calls */
|
||||
extern ST_BOOLEAN m_find_node_enable;
|
||||
|
||||
/* This variable will cause chk_realloc to not realloc when the new */
|
||||
/* size is smaller than the old size */
|
||||
extern ST_BOOLEAN m_no_realloc_smaller;
|
||||
|
||||
/* Dump memory table whenever high water mark is advanced */
|
||||
extern ST_BOOLEAN m_auto_hw_log;
|
||||
|
||||
extern ST_CHAR *m_pad_string;
|
||||
extern ST_INT m_num_pad_bytes;
|
||||
|
||||
extern ST_BOOLEAN m_fill_en;
|
||||
extern ST_UCHAR m_fill_byte;
|
||||
|
||||
extern ST_BOOLEAN m_mem_debug;
|
||||
|
||||
extern ST_BOOLEAN m_mem_crt_debug;
|
||||
|
||||
/* This function pointer can be set to select a function to be called */
|
||||
/* in case of memory error. */
|
||||
|
||||
extern ST_VOID (*mem_chk_err)(ST_VOID);
|
||||
|
||||
/* Read only */
|
||||
extern ST_UINT m_mem_overhead;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
/************************************************************************/
|
||||
/* deal with new and delete */
|
||||
/************************************************************************/
|
||||
#if defined (DEBUG_SISCO) && defined (DEBUG_NEW_SISCO)
|
||||
|
||||
#include <new>
|
||||
|
||||
void * operator new(size_t nSize) throw (std::bad_alloc);
|
||||
void * operator new(size_t nSize, const char *fileName, const int lineNum) throw (std::bad_alloc);
|
||||
void * operator new(size_t nSize, const std::nothrow_t&) throw ();
|
||||
void * operator new[](size_t nSize) throw (std::bad_alloc);
|
||||
void * operator new[](size_t nSize, const char *fileName, const int lineNum) throw (std::bad_alloc);
|
||||
void * operator new[](size_t nSize, const std::nothrow_t&) throw ();
|
||||
void operator delete(void *p) throw ();
|
||||
void operator delete(void *p, const char *fileName, const int lineNum) throw ();
|
||||
void operator delete[](void *p) throw ();
|
||||
void operator delete[](void *p, const char *fileName, const int lineNum) throw ();
|
||||
|
||||
#ifndef MEM_CHK
|
||||
#define new new(thisFileName, __LINE__)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (DEBUG_SISCO) && defined (DEBUG_NEW_MFC)
|
||||
|
||||
#include <new>
|
||||
|
||||
#if !defined (__AFX_H__)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define THIS_FILE __FILE__
|
||||
|
||||
void* __cdecl operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
|
||||
#define DEBUG_NEW new(THIS_FILE, __LINE__)
|
||||
void __cdecl operator delete(void* p, LPCSTR lpszFileName, int nLine);
|
||||
|
||||
void * __cdecl operator new[](size_t);
|
||||
void* __cdecl operator new[](size_t nSize, LPCSTR lpszFileName, int nLine);
|
||||
void __cdecl operator delete[](void* p, LPCSTR lpszFileName, int nLine);
|
||||
void __cdecl operator delete[](void *);
|
||||
|
||||
#endif /* AFX */
|
||||
|
||||
#endif /* DEBUG_NEW_MFC */
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* mem_chk.h already included */
|
||||
201
include/mmslite/memlog.h
Normal file
201
include/mmslite/memlog.h
Normal file
@@ -0,0 +1,201 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986, 1987, 1988, 1989, 1990, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : memlog.h */
|
||||
/* PRODUCT(S) : General Use */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the declarations of the dynamic memory */
|
||||
/* handling functions. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/13/02 JRB 08 MEMLOG_PAUSE*, MEMLOG_LF macros do nothing. */
|
||||
/* 09/13/99 MDE 07 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 06 Migrated to updated SLOG interface */
|
||||
/* 04/17/96 JRB 05 Del #define THISFILE thisFileName. */
|
||||
/* 04/17/96 JRB 04 Del mem_sLogCtrl. Use new sLogCtrl in slog.c */
|
||||
/* 04/01/94 MDE 03 Removed THISFILE defines, changed THISFILE */
|
||||
/* to thisFileName */
|
||||
/* 03/29/94 DSF 02 Corrected definition for THISFILE */
|
||||
/* 12/10/93 DSF 01 Added MEMLOG_CHERR macro */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MEMLOG_INCLUDED
|
||||
#define MEMLOG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_calloc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_malloc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_realloc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_free_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_nerr_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mem_log_dump_logstr;
|
||||
|
||||
|
||||
#define MEMLOG_LF()
|
||||
|
||||
#define MEMLOG_CALLSTACK(a) slogCallStack (sLogCtrl,a);
|
||||
|
||||
#define MEMLOG_PAUSE(msg)
|
||||
#define MEMLOG_PAUSEERR(msg)
|
||||
|
||||
#define MEMLOG_MALLOC2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_MALLOC)\
|
||||
_slog (sLogCtrl,_mem_log_malloc_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CMALLOC1(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_MALLOC)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define MEMLOG_CMALLOC2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_MALLOC)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CMALLOC3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_MALLOC)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
|
||||
#define MEMLOG_CALLOC3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_CALLOC)\
|
||||
_slog (sLogCtrl,_mem_log_calloc_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define MEMLOG_CCALLOC1(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_CALLOC)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define MEMLOG_CCALLOC2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_CALLOC)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CCALLOC3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_CALLOC)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define MEMLOG_REALLOC3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_REALLOC)\
|
||||
_slog (sLogCtrl,_mem_log_realloc_logstr,\
|
||||
thisFileName,__LINE__,a,b,c,d);\
|
||||
}
|
||||
#define MEMLOG_CREALLOC1(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_REALLOC)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define MEMLOG_CREALLOC2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_REALLOC)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CREALLOC3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_REALLOC)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
|
||||
#define MEMLOG_FREE1(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_FREE)\
|
||||
_slog (sLogCtrl,_mem_log_free_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define MEMLOG_CFREE2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_FREE)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CFREE3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_FREE)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
|
||||
#define MEMLOG_ERR0(a) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slog (sLogCtrl,_mem_log_err_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define MEMLOG_ERR1(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slog (sLogCtrl,_mem_log_err_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define MEMLOG_ERR2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slog (sLogCtrl,_mem_log_err_logstr,\
|
||||
thisFileName,__LINE__,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CERR0(a) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define MEMLOG_CERR1(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define MEMLOG_CERR2(a,b,c) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CERR3(a,b,c,d) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
#define MEMLOG_CERR5(a,b,c,d,e,f) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e,f);\
|
||||
}
|
||||
#define MEMLOG_CERR6(a,b,c,d,e,f,g) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogc (sLogCtrl,a,b,c,d,e,f,g);\
|
||||
}
|
||||
#define MEMLOG_CHERR(a,b) {\
|
||||
if (chk_debug_en & MEM_LOG_ERR)\
|
||||
_slogHex (sLogCtrl,a,b);\
|
||||
}
|
||||
|
||||
#define MEMLOG_DUMP0(a) {\
|
||||
_slog (sLogCtrl,_mem_log_dump_logstr,\
|
||||
thisFileName,__LINE__,a);\
|
||||
}
|
||||
#define MEMLOG_DUMP1(a,b) {\
|
||||
_slog (sLogCtrl,_mem_log_dump_logstr,\
|
||||
thisFileName,__LINE__,a,b);\
|
||||
}
|
||||
#define MEMLOG_CDUMP4(a,b,c,d,e) {\
|
||||
_slogc (sLogCtrl,a,b,c,d,e);\
|
||||
}
|
||||
#define MEMLOG_CDUMP5(a,b,c,d,e,f) {\
|
||||
_slogc (sLogCtrl,a,b,c,d,e,f);\
|
||||
}
|
||||
#define MEMLOG_CDUMP0(a) {\
|
||||
_slogc (sLogCtrl,a);\
|
||||
}
|
||||
#define MEMLOG_CDUMP1(a,b) {\
|
||||
_slogc (sLogCtrl,a,b);\
|
||||
}
|
||||
#define MEMLOG_CDUMP2(a,b,c) {\
|
||||
_slogc (sLogCtrl,a,b,c);\
|
||||
}
|
||||
#define MEMLOG_CDUMP3(a,b,c,d) {\
|
||||
_slogc (sLogCtrl,a,b,c,d);\
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* memlog.h already included */
|
||||
|
||||
133
include/mmslite/memory_t.h
Normal file
133
include/mmslite/memory_t.h
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Copyright (c) 2001 - 2005 NetGroup, Politecnico di Torino (Italy)
|
||||
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Politecnico di Torino, CACE Technologies
|
||||
* nor the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __memory_t
|
||||
#define __memory_t
|
||||
|
||||
#define uint8 UCHAR
|
||||
#define int8 CHAR
|
||||
#define uint16 USHORT
|
||||
#define int16 SHORT
|
||||
#define uint32 ULONG
|
||||
#define int32 LONG
|
||||
#define uint64 ULONGLONG
|
||||
#define int64 LONGLONG
|
||||
|
||||
/*memory type*/
|
||||
typedef struct __MEM_TYPE
|
||||
{
|
||||
uint8 *buffer;
|
||||
uint32 size;
|
||||
} MEM_TYPE, *PMEM_TYPE;
|
||||
|
||||
#define LONG_AT(base,offset) (*(int32*)((uint8*)base+(uint32)offset))
|
||||
|
||||
#define ULONG_AT(base,offset) (*(uint32*)((uint8*)base+(uint32)offset))
|
||||
|
||||
#define SHORT_AT(base,offset) (*(int16*)((uint8*)base+(uint32)offset))
|
||||
|
||||
#define USHORT_AT(base,offset) (*(uint16*)((uint8*)base+(uint32)offset))
|
||||
|
||||
__inline int32 SW_LONG_AT(void *b, uint32 c)
|
||||
{
|
||||
return ((int32)*((uint8 *)b+c)<<24|
|
||||
(int32)*((uint8 *)b+c+1)<<16|
|
||||
(int32)*((uint8 *)b+c+2)<<8|
|
||||
(int32)*((uint8 *)b+c+3)<<0);
|
||||
}
|
||||
|
||||
|
||||
__inline uint32 SW_ULONG_AT(void *b, uint32 c)
|
||||
{
|
||||
return ((uint32)*((uint8 *)b+c)<<24|
|
||||
(uint32)*((uint8 *)b+c+1)<<16|
|
||||
(uint32)*((uint8 *)b+c+2)<<8|
|
||||
(uint32)*((uint8 *)b+c+3)<<0);
|
||||
}
|
||||
|
||||
__inline int16 SW_SHORT_AT(void *b, uint32 os)
|
||||
{
|
||||
return ((int16)
|
||||
((int16)*((uint8 *)b+os+0)<<8|
|
||||
(int16)*((uint8 *)b+os+1)<<0));
|
||||
}
|
||||
|
||||
__inline uint16 SW_USHORT_AT(void *b, uint32 os)
|
||||
{
|
||||
return ((uint16)
|
||||
((uint16)*((uint8 *)b+os+0)<<8|
|
||||
(uint16)*((uint8 *)b+os+1)<<0));
|
||||
}
|
||||
|
||||
__inline VOID SW_ULONG_ASSIGN(void *dst, uint32 src)
|
||||
{
|
||||
*((uint8*)dst+0)=*((uint8*)&src+3);
|
||||
*((uint8*)dst+1)=*((uint8*)&src+2);
|
||||
*((uint8*)dst+2)=*((uint8*)&src+1);
|
||||
*((uint8*)dst+3)=*((uint8*)&src+0);
|
||||
|
||||
}
|
||||
|
||||
#ifdef WIN_NT_DRIVER
|
||||
|
||||
#define ALLOCATE_MEMORY(dest,type,amount) \
|
||||
(dest)=ExAllocatePoolWithTag(NonPagedPool,sizeof(type)*(amount), '0TWA');
|
||||
#define ALLOCATE_ZERO_MEMORY(dest,type,amount) \
|
||||
{ \
|
||||
(dest)=ExAllocatePoolWithTag(NonPagedPool,sizeof(type)*(amount), '1TWA'); \
|
||||
if ((dest)!=NULL) \
|
||||
RtlZeroMemory((dest),sizeof(type)*(amount)); \
|
||||
}
|
||||
|
||||
#define FREE_MEMORY(dest) ExFreePool(dest);
|
||||
#define ZERO_MEMORY(dest,amount) RtlZeroMemory(dest,amount);
|
||||
#define COPY_MEMORY(dest,src,amount) RtlCopyMemory(dest,src,amount);
|
||||
|
||||
#else
|
||||
|
||||
#define ALLOCATE_MEMORY(dest,type,amount) \
|
||||
(dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
|
||||
#define ALLOCATE_ZERO_MEMORY(dest,type,amount) \
|
||||
(dest)=(type*)GlobalAlloc(GPTR, sizeof(type)*(amount));
|
||||
|
||||
#define FREE_MEMORY(dest) GlobalFree(dest);
|
||||
#define ZERO_MEMORY(dest,amount) RtlZeroMemory(dest,amount);
|
||||
#define COPY_MEMORY(dest,src,amount) RtlCopyMemory(dest,src,amount);
|
||||
|
||||
|
||||
#endif /*WIN_NT_DRIVER*/
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
297
include/mmslite/mloguser.h
Normal file
297
include/mmslite/mloguser.h
Normal file
@@ -0,0 +1,297 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2008 All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : mloguser.h */
|
||||
/* PRODUCT(S) : MMS-EASE 250-001 */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* ANSI Protytped Logging Functions for MMS-EASE user code. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/01/08 JRB 16 Del commented code. */
|
||||
/* 10/30/06 JRB 15 Add mlog_arb_log_ctrl extern. */
|
||||
/* 03/23/05 JRB 14 Del unused m_log_mllp* & m_log_llp* protos. */
|
||||
/* 06/10/04 EJV 13 Removed suicacse.h - lber.h conflict on AIX. */
|
||||
/* 04/05/02 MDE 12 Cleaned up MMS Lite use of MLOG */
|
||||
/* 11/04/98 DSF 11 Added m_get_mms_rej_text () */
|
||||
/* 08/13/98 MDE 10 Added m_log_tdl */
|
||||
/* 07/16/98 MDE 09 Added ml_log_dec_rslt declaration */
|
||||
/* 06/15/98 MDE 08 Changes to allow compile under C++ */
|
||||
/* 03/20/98 JRB 07 Del mmsop_en.h. Only user code needs it now. */
|
||||
/* 09/29/97 MDE 06 Don't need mlog_en.h */
|
||||
/* 08/15/97 MDE 05 BTOD handling changes */
|
||||
/* 08/14/97 MDE 04 Removed unused 'm_log_info_print' */
|
||||
/* 08/04/97 MDE 03 Added 'no log' function declarations */
|
||||
/* 08/04/97 MDE 02 Changes towards breakup */
|
||||
/* 06/09/97 MDE 01 Removed several mmv_v???.h includes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MLOGUSER_INCLUDED
|
||||
#define MLOGUSER_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mmslog.h"
|
||||
#include "mms_pcon.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "mms_pocs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "mms_psem.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "mms_pvmd.h"
|
||||
#include "mms_vvar.h"
|
||||
#if defined(MMS_LITE)
|
||||
#include "mmsintr2.h"
|
||||
#endif
|
||||
#include "sx_arb.h" /* needed for SXD_ARB_DATA_CTRL */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
|
||||
extern ST_VOID (*m_req_log_fun_tbl [MAX_MMSOP_DIS+1]) (ST_VOID *v);
|
||||
extern ST_VOID (*m_resp_log_fun_tbl [MAX_MMSOP_DIS+1]) (ST_VOID *v);
|
||||
|
||||
/* Request / Response Data Logging Functions */
|
||||
ST_VOID m_log_ackevnot_req (ACKEVNOT_REQ_INFO *info);
|
||||
ST_VOID m_log_altecm_req (ALTECM_REQ_INFO *info);
|
||||
ST_VOID m_log_altee_resp (ALTEE_RESP_INFO *info);
|
||||
ST_VOID m_log_altee_req (ALTEE_REQ_INFO *info);
|
||||
ST_VOID m_log_crepi_req (CREPI_REQ_INFO *info);
|
||||
ST_VOID m_log_cancel_req (ST_VOID);
|
||||
ST_VOID m_log_cancel_resp (ST_VOID);
|
||||
ST_VOID m_log_defea_req (DEFEA_REQ_INFO *info);
|
||||
ST_VOID m_log_defec_req (DEFEC_REQ_INFO *info);
|
||||
ST_VOID m_log_defee_req (DEFEE_REQ_INFO *info);
|
||||
ST_VOID m_log_defscat_req (DEFSCAT_REQ_INFO *info);
|
||||
ST_VOID m_log_defsem_req (DEFSEM_REQ_INFO *info);
|
||||
ST_VOID m_log_deftype_req (DEFTYPE_REQ_INFO *info);
|
||||
ST_VOID m_log_defvar_req (DEFVAR_REQ_INFO *info);
|
||||
ST_VOID m_log_defvlist_req (DEFVLIST_REQ_INFO *info);
|
||||
ST_VOID m_log_deldom_req (DELDOM_REQ_INFO *info);
|
||||
ST_VOID m_log_delea_resp (DELEA_RESP_INFO *info);
|
||||
ST_VOID m_log_delea_req (DELEA_REQ_INFO *info);
|
||||
ST_VOID m_log_delec_req (DELEC_REQ_INFO *info);
|
||||
ST_VOID m_log_delec_resp (DELEC_RESP_INFO *info);
|
||||
ST_VOID m_log_delee_resp (DELEE_RESP_INFO *info);
|
||||
ST_VOID m_log_delee_req (DELEE_REQ_INFO *info);
|
||||
ST_VOID m_log_delpi_req (DELPI_REQ_INFO *info);
|
||||
ST_VOID m_log_delsem_req (DELSEM_REQ_INFO *info);
|
||||
ST_VOID m_log_deltype_resp (DELTYPE_RESP_INFO *info);
|
||||
ST_VOID m_log_deltype_req (DELTYPE_REQ_INFO *info);
|
||||
ST_VOID m_log_delvar_resp (DELVAR_RESP_INFO *info);
|
||||
ST_VOID m_log_delvar_req (DELVAR_REQ_INFO *info);
|
||||
ST_VOID m_log_delvlist_resp (DELVLIST_RESP_INFO *info);
|
||||
ST_VOID m_log_delvlist_req (DELVLIST_REQ_INFO *info);
|
||||
ST_VOID m_log_download_resp (DOWNLOAD_RESP_INFO *info);
|
||||
ST_VOID m_log_download_req (DOWNLOAD_REQ_INFO *info);
|
||||
ST_VOID m_log_evnot_req (EVNOT_REQ_INFO *info);
|
||||
ST_VOID m_log_fclose_req (FCLOSE_REQ_INFO *info);
|
||||
ST_VOID m_log_fdelete_req (FDELETE_REQ_INFO *info);
|
||||
ST_VOID m_log_fdir_resp (FDIR_RESP_INFO *info);
|
||||
ST_VOID m_log_fdir_req (FDIR_REQ_INFO *info);
|
||||
ST_VOID m_log_fopen_resp (FOPEN_RESP_INFO *info);
|
||||
ST_VOID m_log_fopen_req (FOPEN_REQ_INFO *info);
|
||||
ST_VOID m_log_fread_resp (FREAD_RESP_INFO *info);
|
||||
ST_VOID m_log_fread_req (FREAD_REQ_INFO *info);
|
||||
ST_VOID m_log_frename_req (FRENAME_REQ_INFO *info);
|
||||
ST_VOID m_log_getaes_resp (GETAES_RESP_INFO *info);
|
||||
ST_VOID m_log_getaes_req (GETAES_REQ_INFO *info);
|
||||
ST_VOID m_log_getas_resp (GETAS_RESP_INFO *info);
|
||||
ST_VOID m_log_getas_req (GETAS_REQ_INFO *info);
|
||||
ST_VOID m_log_getcl_resp (GETCL_RESP_INFO *info);
|
||||
ST_VOID m_log_getcl_req (GETCL_REQ_INFO *info);
|
||||
ST_VOID m_log_getdom_resp (GETDOM_RESP_INFO *info);
|
||||
ST_VOID m_log_getdom_req (GETDOM_REQ_INFO *info);
|
||||
ST_VOID m_log_geteaa_resp (GETEAA_RESP_INFO *info);
|
||||
ST_VOID m_log_geteaa_req (GETEAA_REQ_INFO *info);
|
||||
ST_VOID m_log_geteca_resp (GETECA_RESP_INFO *info);
|
||||
ST_VOID m_log_geteca_req (GETECA_REQ_INFO *info);
|
||||
ST_VOID m_log_geteea_resp (GETEEA_RESP_INFO *info);
|
||||
ST_VOID m_log_geteea_req (GETEEA_REQ_INFO *info);
|
||||
ST_VOID m_log_getpi_resp (GETPI_RESP_INFO *info);
|
||||
ST_VOID m_log_getpi_req (GETPI_REQ_INFO *info);
|
||||
ST_VOID m_log_getscat_resp (GETSCAT_RESP_INFO *info);
|
||||
ST_VOID m_log_getscat_req (GETSCAT_REQ_INFO *info);
|
||||
ST_VOID m_log_gettype_resp (GETTYPE_RESP_INFO *info);
|
||||
ST_VOID m_log_gettype_req (GETTYPE_REQ_INFO *info);
|
||||
ST_VOID m_log_getvar_resp (GETVAR_RESP_INFO *info);
|
||||
ST_VOID m_log_getvar_req (GETVAR_REQ_INFO *info);
|
||||
ST_VOID m_log_getvlist_resp (GETVLIST_RESP_INFO *info);
|
||||
ST_VOID m_log_getvlist_req (GETVLIST_REQ_INFO *info);
|
||||
ST_VOID m_log_ident_resp (IDENT_RESP_INFO *info);
|
||||
ST_VOID m_log_info_req (INFO_REQ_INFO *info);
|
||||
ST_VOID m_log_initdown_req (INITDOWN_REQ_INFO *info);
|
||||
ST_VOID m_log_initupl_resp (INITUPL_RESP_INFO *info);
|
||||
ST_VOID m_log_initupl_req (INITUPL_REQ_INFO *info);
|
||||
ST_VOID m_log_init_info (INIT_INFO *info);
|
||||
ST_VOID m_log_input_resp (INPUT_RESP_INFO *info);
|
||||
ST_VOID m_log_input_req (INPUT_REQ_INFO *info);
|
||||
ST_VOID m_log_jcreate_req (JCREATE_REQ_INFO *info);
|
||||
ST_VOID m_log_jdelete_req (JDELETE_REQ_INFO *info);
|
||||
ST_VOID m_log_jinit_resp (JINIT_RESP_INFO *info);
|
||||
ST_VOID m_log_jinit_req (JINIT_REQ_INFO *info);
|
||||
ST_VOID m_log_jread_resp (JREAD_RESP_INFO *info);
|
||||
ST_VOID m_log_jread_req (JREAD_REQ_INFO *info);
|
||||
ST_VOID m_log_jstat_resp (JSTAT_RESP_INFO *info);
|
||||
ST_VOID m_log_jstat_req (JSTAT_REQ_INFO *info);
|
||||
ST_VOID m_log_jwrite_req (JWRITE_REQ_INFO *info);
|
||||
ST_VOID m_log_kill_req (KILL_REQ_INFO *info);
|
||||
ST_VOID m_log_loaddom_req (LOADDOM_REQ_INFO *info);
|
||||
ST_VOID m_log_namelist_resp (NAMELIST_RESP_INFO *info);
|
||||
ST_VOID m_log_namelist_req (NAMELIST_REQ_INFO *info);
|
||||
ST_VOID m_log_obtfile_req (OBTFILE_REQ_INFO *info);
|
||||
ST_VOID m_log_output_req (OUTPUT_REQ_INFO *info);
|
||||
ST_VOID m_log_rddwn_req (RDDWN_REQ_INFO *info);
|
||||
ST_VOID m_log_rdupl_req (RDUPL_REQ_INFO *info);
|
||||
ST_VOID m_log_read_resp (READ_RESP_INFO *info);
|
||||
ST_VOID m_log_read_req (READ_REQ_INFO *info);
|
||||
ST_VOID m_log_relctrl_req (RELCTRL_REQ_INFO *info);
|
||||
ST_VOID m_log_rename_req (RENAME_REQ_INFO *info);
|
||||
ST_VOID m_log_repeas_resp (REPEAS_RESP_INFO *info);
|
||||
ST_VOID m_log_repeas_req (REPEAS_REQ_INFO *info);
|
||||
ST_VOID m_log_repecs_resp (REPECS_RESP_INFO *info);
|
||||
ST_VOID m_log_repecs_req (REPECS_REQ_INFO *info);
|
||||
ST_VOID m_log_repees_resp (REPEES_RESP_INFO *info);
|
||||
ST_VOID m_log_repees_req (REPEES_REQ_INFO *info);
|
||||
ST_VOID m_log_reset_req (RESET_REQ_INFO *info);
|
||||
ST_VOID m_log_resume_req (RESUME_REQ_INFO *info);
|
||||
ST_VOID m_log_rsentry_resp (RSENTRY_RESP_INFO *info);
|
||||
ST_VOID m_log_rsentry_req (RSENTRY_REQ_INFO *info);
|
||||
ST_VOID m_log_rspool_resp (RSPOOL_RESP_INFO *info);
|
||||
ST_VOID m_log_rspool_req (RSPOOL_REQ_INFO *info);
|
||||
ST_VOID m_log_rsstat_resp (RSSTAT_RESP_INFO *info);
|
||||
ST_VOID m_log_rsstat_req (RSSTAT_REQ_INFO *info);
|
||||
ST_VOID m_log_start_req (START_REQ_INFO *info);
|
||||
ST_VOID m_log_status_resp (STATUS_RESP_INFO *info);
|
||||
ST_VOID m_log_status_req (STATUS_REQ_INFO *info);
|
||||
ST_VOID m_log_stop_req (STOP_REQ_INFO *info);
|
||||
ST_VOID m_log_storedom_req (STOREDOM_REQ_INFO *info);
|
||||
ST_VOID m_log_takectrl_resp (TAKECTRL_RESP_INFO *info);
|
||||
ST_VOID m_log_takectrl_req (TAKECTRL_REQ_INFO *info);
|
||||
ST_VOID m_log_termdown_req (TERMDOWN_REQ_INFO *info);
|
||||
ST_VOID m_log_termupl_req (TERMUPL_REQ_INFO *info);
|
||||
ST_VOID m_log_trige_req (TRIGE_REQ_INFO *info);
|
||||
ST_VOID m_log_upload_resp (UPLOAD_RESP_INFO *info);
|
||||
ST_VOID m_log_upload_req (UPLOAD_REQ_INFO *info);
|
||||
ST_VOID m_log_ustatus_req (USTATUS_REQ_INFO *info);
|
||||
ST_VOID m_log_write_resp (WRITE_RESP_INFO *info);
|
||||
ST_VOID m_log_write_req (WRITE_REQ_INFO *info);
|
||||
|
||||
/* common component logging */
|
||||
ST_VOID m_log_app_ref (APP_REF *info);
|
||||
ST_VOID m_log_asn1_app_ref (ST_UCHAR *buf_ptr, ST_INT buf_len);
|
||||
ST_VOID m_log_modifier (MODIFIER *info);
|
||||
ST_VOID m_log_tdl (ST_UCHAR *asn1, ST_INT asn1_len);
|
||||
|
||||
ST_VOID m_log_error_info (ERR_INFO *err_ptr);
|
||||
#if !defined(MMS_LITE)
|
||||
ST_VOID m_log_err_info (MMSREQ_PEND *req_ptr);
|
||||
#endif
|
||||
|
||||
ST_VOID m_no_log_resp (ST_VOID *resp);
|
||||
ST_VOID m_no_log_req (ST_VOID *req);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID m_get_mms_err_text (ST_INT eclass, ST_INT code,
|
||||
ST_CHAR *dest, ST_INT dest_len);
|
||||
|
||||
ST_VOID m_get_mms_rej_text (ST_INT rclass, ST_INT code,
|
||||
ST_CHAR *dest, ST_INT dest_len);
|
||||
|
||||
ST_VOID m_log_reject_info (REJECT_RESP_INFO *rej_ptr);
|
||||
|
||||
ST_VOID m_log_evtime (EVENT_TIME *info);
|
||||
ST_VOID m_log_evt_tod (MMS_BTOD *info);
|
||||
ST_VOID m_log_external (EXTERN_INFO *info);
|
||||
|
||||
ST_VOID m_log_objname (OBJECT_NAME *info);
|
||||
ST_VOID m_log_pi_state (ST_INT state);
|
||||
ST_VOID m_log_address (VAR_ACC_ADDR *info);
|
||||
ST_VOID m_log_var_list (VARIABLE_LIST *vl_ptr, ST_INT num_of_vars);
|
||||
ST_VOID m_log_var_spec (VARIABLE_SPEC *info);
|
||||
ST_VOID m_log_vaspec (VAR_ACC_SPEC *info);
|
||||
ST_VOID m_log_data (ST_INT asn1_data_len, ST_UCHAR *asn1_data);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
#if defined(MMS_LITE)
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET ml_log_dec_rslt (MMSDEC_INFO *rslt);
|
||||
|
||||
ST_VOID _ml_log_req_info (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
ST_VOID _ml_log_ind_info (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
ST_VOID _ml_log_resp_info (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
ST_VOID _ml_log_conf_info (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
ST_VOID _ml_log_unsol_req_info (ST_INT op, ST_VOID *info);
|
||||
ST_VOID _ml_log_unsol_ind_info (ST_INT op, ST_VOID *info);
|
||||
ST_VOID _ml_log_error_resp (ST_INT invokeId, ST_VOID *info);
|
||||
ST_VOID _ml_log_error_conf (ST_INT invokeId, ST_VOID *info);
|
||||
ST_VOID _ml_log_reject_send (ST_VOID *info);
|
||||
ST_VOID _ml_log_reject_recv (ST_VOID *info);
|
||||
|
||||
|
||||
/* MLOG integration */
|
||||
extern ST_VOID (*ml_log_req_info_fun) (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
extern ST_VOID (*ml_log_ind_info_fun) (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
|
||||
extern ST_VOID (*ml_log_resp_info_fun) (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
extern ST_VOID (*ml_log_conf_info_fun) (ST_INT invokeId, ST_INT op, ST_VOID *info);
|
||||
|
||||
extern ST_VOID (*ml_log_unsol_req_info_fun) (ST_INT op, ST_VOID *info);
|
||||
extern ST_VOID (*ml_log_unsol_ind_info_fun) (ST_INT op, ST_VOID *info);
|
||||
|
||||
extern ST_VOID (*ml_log_error_conf_fun) (ST_INT invokeId, ST_VOID *info);
|
||||
extern ST_VOID (*ml_log_error_resp_fun) (ST_INT invokeId, ST_VOID *info);
|
||||
|
||||
extern ST_VOID (*ml_log_reject_send_fun) (ST_VOID *info);
|
||||
extern ST_VOID (*ml_log_reject_recv_fun) (ST_VOID *info);
|
||||
|
||||
ST_VOID ml_mlog_install (ST_VOID);
|
||||
|
||||
/************************************************************************/
|
||||
#endif /* MMS_LITE */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
#if !defined(MMS_LITE)
|
||||
/************************************************************************/
|
||||
ST_VOID m_log_ureq_info (ST_INT chan, ST_INT op, ST_VOID *info);
|
||||
ST_VOID m_log_req_info (MMSREQ_PEND *req, ST_VOID *info);
|
||||
ST_VOID m_log_resp_info (MMSREQ_IND *ind, ST_VOID *info);
|
||||
ST_VOID m_log_ind_info (MMSREQ_IND *ind);
|
||||
ST_VOID m_log_conf_info (MMSREQ_PEND *conf);
|
||||
ST_VOID m_log_error_resp (MMSREQ_IND *ind, ST_INT16 eclass, ST_INT16 code);
|
||||
ST_RET m_mlog_install (ST_VOID);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Global variables. */
|
||||
/************************************************************************/
|
||||
extern SXD_ARB_DATA_CTRL mlog_arb_log_ctrl;
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#endif /* MLOGUSER_INCLUDED */
|
||||
|
||||
308
include/mmslite/mms_def2.h
Normal file
308
include/mmslite/mms_def2.h
Normal file
@@ -0,0 +1,308 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1993 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_def2.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains miscellaneous definitions and variables. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 11/12/07 MDE 11 Added MMSOP_RD_USR_HANDLED, etc.. */
|
||||
/* 04/24/03 JRB 10 Increase MAX_IDENT_LEN from 32 to 64. */
|
||||
/* 07/09/02 MDE 09 Fixed up opcode defines */
|
||||
/* 02/24/00 DSF 08 Bumped up MAX_FILES_OPEN to 100 */
|
||||
/* 10/06/99 GLB 07 Added file Rename and Obtain File */
|
||||
/* 09/13/99 MDE 06 Added SD_CONST modifiers */
|
||||
/* 04/14/98 JRB 05 Del MPARAM* defs. Still needed in mmsop_en.h */
|
||||
/* 04/03/98 JRB 04 Add check for obsolete version of mmsop_en.h */
|
||||
/* 03/20/98 JRB 03 Move defs from "mmsop_en.h" to here. */
|
||||
/* 08/15/97 MDE 02 Added xxx_DATA_SUPPORT defines, cleanup */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_DEF2_INCLUDED
|
||||
#define MMS_DEF2_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined (REQ_RESP_DIS) || defined (MAX_MMS_OPCODE)
|
||||
#error May have obsolete version of "mmsop_en.h". See Release Notes.
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* define the operation enable switches used by "mmsop_en.h" */
|
||||
/************************************************************************/
|
||||
#define REQ_RESP_DIS 0x00 /* no support for req or resp */
|
||||
#define REQ_EN 0x01 /* support for request */
|
||||
#define RESP_EN 0x02 /* support for response */
|
||||
#define REQ_RESP_EN 0x03 /* support for resp and req */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* The following character array is used to check if a MMS operation is */
|
||||
/* to be supported as requestor and/or responder, and whether to expect */
|
||||
/* a constructor or primitive after the invoke ID. The operation opcode */
|
||||
/* is used as an index into the table. */
|
||||
/************************************************************************/
|
||||
|
||||
#define MAX_MMS_OPCODE 77 /* highest MMS opcode */
|
||||
#define MAX_MMSOP_DIS 85 /* highest mmsop_en[] entry */
|
||||
|
||||
extern SD_CONST ST_UCHAR mmsop_en [MAX_MMSOP_DIS+1];
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* The following array is used to print the opcode description. The */
|
||||
/* operation opcode is used as an index into the table. */
|
||||
/************************************************************************/
|
||||
|
||||
extern ST_CHAR *mms_op_string[106];
|
||||
extern ST_INT m_num_mms_op_string;
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Define the MMS operation opcodes */
|
||||
/************************************************************************/
|
||||
#define MMSOP_STATUS 0 /* status */
|
||||
#define MMSOP_GET_NAMLIST 1 /* get name list */
|
||||
#define MMSOP_IDENTIFY 2 /* identify */
|
||||
#define MMSOP_RENAME 3 /* rename */
|
||||
#define MMSOP_READ 4 /* read */
|
||||
#define MMSOP_WRITE 5 /* write */
|
||||
#define MMSOP_GET_VAR 6 /* get variable name definition */
|
||||
#define MMSOP_DEF_VAR 7 /* define variable name */
|
||||
#define MMSOP_DEF_SCAT 8 /* define scattered access */
|
||||
#define MMSOP_GET_SCAT 9 /* get scattered access attributes */
|
||||
#define MMSOP_DEL_VAR 10 /* delete variable name definition */
|
||||
#define MMSOP_DEF_VLIST 11 /* define named variable list */
|
||||
#define MMSOP_GET_VLIST 12 /* get named variable list */
|
||||
#define MMSOP_DEL_VLIST 13 /* delete named variable list */
|
||||
#define MMSOP_DEF_TYPE 14 /* define type name */
|
||||
#define MMSOP_GET_TYPE 15 /* get type name definition */
|
||||
#define MMSOP_DEL_TYPE 16 /* delete type name */
|
||||
|
||||
#define MMSOP_INPUT 17 /* input */
|
||||
#define MMSOP_OUTPUT 18 /* output */
|
||||
|
||||
#define MMSOP_TAKE_CONTROL 19 /* take control */
|
||||
#define MMSOP_REL_CONTROL 20 /* relinquish control */
|
||||
#define MMSOP_DEFINE_SEM 21 /* define semaphore */
|
||||
#define MMSOP_DELETE_SEM 22 /* delete semaphore */
|
||||
#define MMSOP_REP_SEMSTAT 23 /* report semaphore status */
|
||||
#define MMSOP_REP_SEMPOOL 24 /* report semaphore pool status */
|
||||
#define MMSOP_REP_SEMENTRY 25 /* report semaphore entry status */
|
||||
|
||||
#define MMSOP_INIT_DOWNLOAD 26 /* initiate download sequence */
|
||||
#define MMSOP_DOWN_LOAD 27 /* download segment */
|
||||
#define MMSOP_TERM_DOWNLOAD 28 /* terminate download sequence */
|
||||
#define MMSOP_INIT_UPLOAD 29 /* initiate upload sequence */
|
||||
#define MMSOP_UP_LOAD 30 /* upload segment */
|
||||
#define MMSOP_TERM_UPLOAD 31 /* terminate upload sequence */
|
||||
#define MMSOP_REQ_DOM_DOWN 32 /* request domain download */
|
||||
#define MMSOP_REQ_DOM_UPL 33 /* request domain upload */
|
||||
#define MMSOP_LOAD_DOMAIN 34 /* load domain content */
|
||||
#define MMSOP_STORE_DOMAIN 35 /* store domain content */
|
||||
#define MMSOP_DELETE_DOMAIN 36 /* delete domain */
|
||||
#define MMSOP_GET_DOM_ATTR 37 /* get domain attribute */
|
||||
|
||||
#define MMSOP_CREATE_PI 38 /* create program invocation */
|
||||
#define MMSOP_DELETE_PI 39 /* delete program invocation */
|
||||
#define MMSOP_START 40 /* start */
|
||||
#define MMSOP_STOP 41 /* stop */
|
||||
#define MMSOP_RESUME 42 /* resume */
|
||||
#define MMSOP_RESET 43 /* reset */
|
||||
#define MMSOP_KILL 44 /* kill */
|
||||
#define MMSOP_GET_PI_ATTR 45 /* get program invocation attribute */
|
||||
|
||||
#define MMSOP_OBTAIN_FILE 46 /* obtain file */
|
||||
|
||||
#define MMSOP_DEF_EC 47 /* define event condition */
|
||||
#define MMSOP_DEL_EC 48 /* delete event condition */
|
||||
#define MMSOP_GET_EC_ATTR 49 /* get event condition attributes */
|
||||
#define MMSOP_REP_EC_STAT 50 /* report event condition status */
|
||||
#define MMSOP_ALT_EC_MON 51 /* alter event condition monitoring */
|
||||
#define MMSOP_TRIGGER_EV 52 /* trigger event */
|
||||
#define MMSOP_DEF_EA 53 /* define event action status */
|
||||
#define MMSOP_DEL_EA 54 /* delete event action */
|
||||
#define MMSOP_GET_EA_ATTR 55 /* get event action attributes */
|
||||
#define MMSOP_REP_EA_STAT 56 /* report event action status */
|
||||
#define MMSOP_DEF_EE 57 /* define event enrollment */
|
||||
#define MMSOP_DEL_EE 58 /* delete event enrollment */
|
||||
#define MMSOP_ALT_EE 59 /* alter event enrollment */
|
||||
#define MMSOP_REP_EE_STAT 60 /* report event enrollment status */
|
||||
#define MMSOP_GET_EE_ATTR 61 /* get event enrollment attributes */
|
||||
#define MMSOP_ACK_EVENT_NOT 62 /* acknowledge event notification */
|
||||
#define MMSOP_GET_ALARM_SUM 63 /* get alarm summary */
|
||||
#define MMSOP_GET_ALARM_ESUM 64 /* get alarm enrollment summary */
|
||||
|
||||
#define MMSOP_READ_JOURNAL 65 /* read journal */
|
||||
#define MMSOP_WRITE_JOURNAL 66 /* write journal */
|
||||
#define MMSOP_INIT_JOURNAL 67 /* initialize journal */
|
||||
#define MMSOP_STAT_JOURNAL 68 /* report journal status */
|
||||
#define MMSOP_CREATE_JOURNAL 69 /* create journal */
|
||||
#define MMSOP_DELETE_JOURNAL 70 /* delete journal */
|
||||
|
||||
#define MMSOP_GET_CAP_LIST 71 /* get capability list */
|
||||
|
||||
#define MMSOP_FILE_OPEN 72 /* file open */
|
||||
#define MMSOP_FILE_READ 73 /* file read */
|
||||
#define MMSOP_FILE_CLOSE 74 /* file close */
|
||||
#define MMSOP_FILE_RENAME 75 /* file rename */
|
||||
#define MMSOP_FILE_DELETE 76 /* file delete */
|
||||
#define MMSOP_FILE_DIR 77 /* file directory */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* The opcodes below are reserved for the unconfirmed services and are */
|
||||
/* NOT used on the wire. */
|
||||
/************************************************************************/
|
||||
#define MMSOP_USTATUS 78 /* unsolicited status, ucs 1 */
|
||||
#define MMSOP_INFO_RPT 79 /* information report, ucs 0 */
|
||||
#define MMSOP_EVENT_NOT 80 /* unsolicited status, ucs 2 */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* These are not really opcodes at all, but simply represent the bit */
|
||||
/* positions in the services supported bitstring */
|
||||
|
||||
#define _MMSOP_ATTACH_TO_EC 81 /* Attach to event condition */
|
||||
#define _MMSOP_ATTACH_TO_SEM 82 /* Attach to semaphore */
|
||||
|
||||
/************************************************************************/
|
||||
/* These opcodes are reserved for Initiate, Conclude, etc. and are */
|
||||
/* NOT used on the wire, since these operations do not take op codes. */
|
||||
/************************************************************************/
|
||||
|
||||
#define MMSOP_CONCLUDE 83 /* conclude */
|
||||
#define MMSOP_CANCEL 84 /* cancel */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* MVLU Internal Use */
|
||||
#define MMSOP_MVLU_RPT_VA 200
|
||||
#define MMSOP_MVLU_GOOSE_UPDATE 201
|
||||
#define MMSOP_RD_USR_HANDLED 202
|
||||
|
||||
/************************************************************************/
|
||||
/* The opcodes below are NOT used on the wire, only for completed */
|
||||
/* 'Macro' function complete flags. */
|
||||
/************************************************************************/
|
||||
#define MMSOP_INITIATE 85 /* initiate operation */
|
||||
|
||||
#define MMSOP_NAMED_READ 90 /* Named Read */
|
||||
#define MMSOP_NAMED_WRITE 91 /* Named Write */
|
||||
#define MMSOP_REM_FILE_OPEN 93 /* Remote File Open */
|
||||
#define MMSOP_REM_FILE_READ 94 /* Remote File Read */
|
||||
#define MMSOP_REM_FILE_CLOSE 95 /* Remote File Close */
|
||||
#define MMSOP_INIT_CONN 96 /* Initiate */
|
||||
#define MMSOP_REM_FILE_COPY 98 /* Remote file copy */
|
||||
#define MMSOP_MV_DOWNLOAD 99 /* VM Domain Download */
|
||||
#define MMSOP_MV_UPLOAD 100 /* VM Domain Upload */
|
||||
#define MMSOP_VM_VAR_READ 101 /* Var Read */
|
||||
#define MMSOP_VM_VAR_WRITE 102 /* Var Write */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Various MMS limitations, parameters, etc. */
|
||||
/************************************************************************/
|
||||
|
||||
#define SERVICE_RESP_SIZE 11 /* BYTE size of service resp array */
|
||||
|
||||
#define MAX_FILES_OPEN 100 /* maximum files open locally/remotely */
|
||||
#define MAX_FILE_NAME 255 /* maximum length of a file pathname */
|
||||
#define MAX_IDENT_LEN 64 /* length of an Identifier variable */
|
||||
#define MAX_AR_LEN 64 /* length of a AR name */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* This structure is used to support modifier handling. */
|
||||
/************************************************************************/
|
||||
|
||||
struct list_of_mods
|
||||
{
|
||||
ST_BOOLEAN info_pres; /* must be set to get info encoded */
|
||||
ST_INT num_of_mods; /* tells how many mods in the list */
|
||||
struct modifier *mod_list_ptr;/* ptr to array of contiguous modifiers */
|
||||
};
|
||||
typedef struct list_of_mods LIST_OF_MODS;
|
||||
|
||||
extern struct list_of_mods modifier_list;
|
||||
extern ST_INT m_max_mods;
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* COMPANION STANDARD HANDLING */
|
||||
/************************************************************************/
|
||||
/* This structure is used as a global input parameter to all MMS */
|
||||
/* requests and responses sent by the application. To send CS info, the */
|
||||
/* 'cs_pres' flag must be set SD_TRUE, the other components refer to the*/
|
||||
/* ASN.1 CS INFO to be sent. 'cs_pres' is reset after being used. */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
struct csi
|
||||
{
|
||||
ST_BOOLEAN cs_pres; /* SD_TRUE if CS info was received */
|
||||
ST_INT cs_len; /* length of ASN.1 */
|
||||
ST_UCHAR *cs_ptr; /* pointer to ASN.1 */
|
||||
};
|
||||
typedef struct csi CSI ;
|
||||
|
||||
extern struct csi cs_send; /* SEND CS info structure */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* These defines can be commented out to exclude support for some data */
|
||||
/* types if they are not required. */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
#define FLOAT_DATA_SUPPORT
|
||||
#define TIME_DATA_SUPPORT
|
||||
#define BTOD_DATA_SUPPORT
|
||||
#else
|
||||
#define FLOAT_DATA_SUPPORT
|
||||
#define TIME_DATA_SUPPORT
|
||||
#define BTOD_DATA_SUPPORT
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* These defines are the values that the domain state attribute */
|
||||
/* named_dom_ctrl.state can take on. */
|
||||
/************************************************************************/
|
||||
|
||||
#define DOM_NON_EXISTENT 0
|
||||
#define DOM_LOADING 1
|
||||
#define DOM_READY 2
|
||||
#define DOM_IN_USE 3
|
||||
#define DOM_COMPLETE 4
|
||||
#define DOM_INCOMPLETE 5
|
||||
|
||||
#define DOM_D1 7
|
||||
#define DOM_D2 8
|
||||
#define DOM_D3 9
|
||||
#define DOM_D4 10
|
||||
#define DOM_D5 11
|
||||
#define DOM_D6 12
|
||||
#define DOM_D7 13
|
||||
#define DOM_D8 14
|
||||
#define DOM_D9 15
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMS_DEF2_INCLUDED */
|
||||
|
||||
|
||||
212
include/mmslite/mms_dfun.h
Normal file
212
include/mmslite/mms_dfun.h
Normal file
@@ -0,0 +1,212 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_dfun.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the function declarations required to interface */
|
||||
/* with the primitive level decode routines. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 01 Convert to use ASN1R. */
|
||||
/* Add mms_err_invoke_fun proto. */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_DFUN_INCLUDED
|
||||
#define MMS_DFUN_INCLUDED
|
||||
|
||||
#include "asn1r.h" /* need ASN1_DEC_CTXT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* MMS service decode functions */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_reject (ASN1_DEC_CTXT *ac, ST_UINT16 id_code);
|
||||
ST_VOID mms_err_invoke_fun (ASN1_DEC_CTXT *aCtx, ST_UINT16);
|
||||
ST_VOID mms_status_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_status_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_status (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_ustatus_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_namelist_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_namelist_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_identify_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_identify_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rename_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_getcl_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_getcl_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_init_download_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_init_download_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_download_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_download_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_term_download_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_term_download_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_init_upload_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_init_upload_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_upload_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_upload_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_term_upload_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_term_upload_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rddwn_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rddwn_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rdupl_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rdupl_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_load_domain_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_load_domain_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_store_domain_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_store_domain_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delete_domain_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delete_domain_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_dom_attr_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_dom_attr_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_create_pi_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_create_pi_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delete_pi_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delete_pi_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_start_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_stop_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_stop_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_resume_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_resume_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_reset_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_reset_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_kill_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_kill_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_pi_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_pi_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_read_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_read_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_write_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_write_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_info_rpt_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_var_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_var_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_def_var_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_def_var_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_del_var_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_del_var_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_def_scat_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_scat_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_scat_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_def_vlist_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_vlist_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_vlist_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_del_vlist_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_del_vlist_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_type_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_get_type_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_def_type_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_def_type_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_del_type_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_del_type_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_takectrl_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_takectrl_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_relctrl_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_relctrl_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rsstat_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rsstat_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rspool_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rspool_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rsentry_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_rsentry_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_defsem_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_defsem_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delsem_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delsem_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_output_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_output_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_input_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_input_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_defec_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delec_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delec_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_geteca_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_geteca_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_repecs_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_repecs_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_altecm_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_trige_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_defea_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delea_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delea_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_geteaa_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_geteaa_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_repeas_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_repeas_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_defee_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delee_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_delee_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_altee_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_altee_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_repees_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_repees_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_geteea_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_geteea_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_evnot_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_ackevnot_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_ackevnot_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_getas_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_getas_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_getaes_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_getaes_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_jwrite_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jwrite_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jread_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jread_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jinit_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jinit_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jstat_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jstat_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jcreate_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_jdelete_req (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_obtain_file_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_obtain_file_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_open_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_open_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_read_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_read_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_close_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_close_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_rename_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_rename_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_delete_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_delete_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_dir_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_file_dir_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_conclude_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_conclude_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_cancel_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_cancel_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_init_req (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_init_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
ST_VOID mms_rsp_not_supp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID mms_req_not_supp (ASN1_DEC_CTXT *aCtx);
|
||||
ST_VOID _mms_null_pdu_dec (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMS_DFUN_INCLUDED */
|
||||
213
include/mmslite/mms_err.h
Normal file
213
include/mmslite/mms_err.h
Normal file
@@ -0,0 +1,213 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_err.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains structure & function definitions used for */
|
||||
/* decoding and encoding an error response. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 11/03/06 CRM 03 Add MMS_ERRCLASS_* and MMS_ERRCODE_*. */
|
||||
/* 12/20/01 JRB 02 Convert to use ASN1R. */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_ERR_INCLUDED
|
||||
#define MMS_ERR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* MMS Error Codes: */
|
||||
/************************************************************************/
|
||||
|
||||
#define MMS_ERRCODE_OTHER 0 /* same for all classes */
|
||||
|
||||
/* Defines for "VMD State" error class. */
|
||||
#define MMS_ERRCLASS_VMD_STATE 0
|
||||
#define MMS_ERRCODE_VMD_STATE_CONFLICT 1
|
||||
#define MMS_ERRCODE_VMD_OPERATIONAL_PROBLEM 2
|
||||
#define MMS_ERRCODE_DOMAIN_TRANSFER_PROBLEM 3
|
||||
#define MMS_ERRCODE_STATE_MACHINE_ID_INVALID 4
|
||||
|
||||
/* Defines for "Application Reference" error class.*/
|
||||
#define MMS_ERRCLASS_APP_REF 1
|
||||
#define MMS_ERRCODE_APP_UNREACHABLE 1
|
||||
#define MMS_ERRCODE_CONNECTION_LOST 2
|
||||
#define MMS_ERRCODE_APP_REF_INVALID 3
|
||||
#define MMS_ERRCODE_CONTEXT_UNSUPPORTED 4
|
||||
|
||||
/* Defines for "Definition" error class. */
|
||||
#define MMS_ERRCLASS_DEFINITION 2
|
||||
#define MMS_ERRCODE_OBJ_UNDEFINED 1
|
||||
#define MMS_ERRCODE_INVALID_ADDRESS 2
|
||||
#define MMS_ERRCODE_TYPE_UNSUPPORTED 3
|
||||
#define MMS_ERRCODE_TYPE_INCONSISTENT 4
|
||||
#define MMS_ERRCODE_OBJ_EXISTS 5
|
||||
#define MMS_ERRCODE_OBJ_ATTRIBUTE_INCONSISTENT 6
|
||||
|
||||
/* Defines for "Resource" error class. */
|
||||
#define MMS_ERRCLASS_RESOURCE 3
|
||||
#define MMS_ERRCODE_MEM_UNAVAILABLE 1
|
||||
#define MMS_ERRCODE_PROCESSOR_RESOURCE_UNAVAILABLE 2
|
||||
#define MMS_ERRCODE_MASS_STORAGE_UNAVAILABLE 3
|
||||
#define MMS_ERRCODE_CAPABILITY_UNAVAILABLE 4
|
||||
#define MMS_ERRCODE_CAPABILITY_UNKOWN 5
|
||||
|
||||
/* Defines for "Service" error class. */
|
||||
#define MMS_ERRCLASS_SERVICE 4
|
||||
#define MMS_ERRCODE_PRIMITIVES_OUT_OF_SEQ 1
|
||||
#define MMS_ERRCODE_OBJ_STATE_CONFLICT 2
|
||||
/* Value 3 reserved for further definition */
|
||||
#define MMS_ERRCODE_CONTINUATION_INVALID 4
|
||||
#define MMS_ERRCODE_OBJ_CONSTRAINT_CONFLICT 5
|
||||
|
||||
/* Defines for "Service Preempt" error class. */
|
||||
#define MMS_ERRCLASS_SERVICE_PREEMPT 5
|
||||
#define MMS_ERRCODE_TIMEOUT 1
|
||||
#define MMS_ERRCODE_DEADLOCK 2
|
||||
#define MMS_ERRCODE_CANCEL 3
|
||||
|
||||
/* Defines for "Time Resolution" error class. */
|
||||
#define MMS_ERRCLASS_TIME_RESOLUTION 6
|
||||
#define MMS_ERRCODE_UNSUPPORTABLE_TIME_RESOLUTION 1
|
||||
|
||||
/* Defines for "Access" error class. */
|
||||
#define MMS_ERRCLASS_ACCESS 7
|
||||
#define MMS_ERRCODE_OBJ_ACCESS_UNSUPPORTED 1
|
||||
#define MMS_ERRCODE_OBJ_NON_EXISTENT 2
|
||||
#define MMS_ERRCODE_OBJ_ACCESS_DENIED 3
|
||||
#define MMS_ERRCODE_OBJ_INVALIDATED 4
|
||||
|
||||
/* Defines for "Initiate" error class. */
|
||||
#define MMS_ERRCLASS_INITIATE 8
|
||||
/* Value 1 reserved for further definition */
|
||||
/* Value 2 reserved for further definition */
|
||||
#define MMS_ERRCODE_MAX_SRV_OUTSTD_CALLING_INSUFF 3
|
||||
#define MMS_ERRCODE_MAX_SRV_OUTSTD_CALLED_INSUFF 4
|
||||
#define MMS_ERRCODE_SERVICE_CBB_INSUFF 5
|
||||
#define MMS_ERRCODE_PARAM_CBB_INSUFF 6
|
||||
#define MMS_ERRCODE_NESTING_LEVEL_INSUFF 7
|
||||
|
||||
/* Defines for "Conclude" error class. */
|
||||
#define MMS_ERRCLASS_CONCLUDE 9
|
||||
#define MMS_ERRCODE_FURTHER_COMM_REQUIRED 1
|
||||
|
||||
/* Defines for "Cancel" error class. */
|
||||
#define MMS_ERRCLASS_CANCEL 10
|
||||
#define MMS_ERRCODE_INVOKE_ID_UNKNOWN 1
|
||||
#define MMS_ERRCODE_CANCEL_NOT_POSSIBLE 2
|
||||
|
||||
/* Defines for "File" error class. */
|
||||
#define MMS_ERRCLASS_FILE 11
|
||||
#define MMS_ERRCODE_FILENAME_AMBIGUOUS 1
|
||||
#define MMS_ERRCODE_FILE_BUSY 2
|
||||
#define MMS_ERRCODE_FILENAME_SYNTAX_ERROR 3
|
||||
#define MMS_ERRCODE_CONTENT_TYPE_INVALID 4
|
||||
#define MMS_ERRCODE_POSITION_INVALID 5
|
||||
#define MMS_ERRCODE_FILE_ACCESS_DENIED 6
|
||||
#define MMS_ERRCODE_FILE_NON_EXISTENT 7
|
||||
#define MMS_ERRCODE_DUPLICATE_FILENAME 8
|
||||
#define MMS_ERRCODE_INSUFF_SPACE_IN_FILESTORE 9
|
||||
|
||||
/************************************************************************/
|
||||
/* Additional Error Response Information - */
|
||||
/* This information is set whenever there is optional additional */
|
||||
/* error response information. */
|
||||
/************************************************************************/
|
||||
|
||||
struct adtnl_err_resp_info
|
||||
{
|
||||
ST_BOOLEAN mod_pos_pres;/* Confirmed-ErrorPDU only: modifier pos pres */
|
||||
ST_INT32 mod_pos; /* Confirmed-ErrorPDU only: modifier position */
|
||||
ST_BOOLEAN info_pres; /* global additional info present indicator */
|
||||
ST_BOOLEAN code_pres; /* additional code present indicator */
|
||||
ST_INT32 code; /* additional code */
|
||||
ST_BOOLEAN descr_pres;/* additional description present indicator */
|
||||
ST_CHAR *descr; /* pointer to the additional description */
|
||||
ST_BOOLEAN ssi_pres; /* service specific info present indicator */
|
||||
ST_INT16 service; /* number indicating the service (0-10) */
|
||||
ST_UINT32 ss_error_val; /* service specific error value, when service */
|
||||
/* is 0-7, or 9 (IS) */
|
||||
/* service specific object name, when service */
|
||||
/* is 8 (IS-Define Event Enrollment) */
|
||||
OBJECT_NAME ss_error_oname;
|
||||
/* service specific additional service error, */
|
||||
/* when service is 10 (IS-Companion Standard) */
|
||||
ST_INT ss_error_len; /* service specific additional service length */
|
||||
ST_UCHAR *ss_error_data;/* service specific additional service data ptr */
|
||||
};
|
||||
typedef struct adtnl_err_resp_info ADTNL_ERR_RESP_INFO;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* RECEIVED ERROR RESPONSE INFORMATION */
|
||||
/************************************************************************/
|
||||
/* The structure below is filled in when an error message is received, */
|
||||
/* before the u_xxxx_conf function is invoked. */
|
||||
/************************************************************************/
|
||||
|
||||
struct err_info
|
||||
{
|
||||
ST_INT16 eclass; /* error class */
|
||||
ST_INT16 code; /* error code */
|
||||
ADTNL_ERR_RESP_INFO adtnl; /* additional error information */
|
||||
};
|
||||
typedef struct err_info ERR_INFO;
|
||||
|
||||
/************************************************************************/
|
||||
/* Error Response Decode Function - */
|
||||
/* This routine is called to decode an error response PDU. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID mms_err_rsp (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
/************************************************************************/
|
||||
/* SEND ERROR RESPONSE INFORMATION */
|
||||
/************************************************************************/
|
||||
/* The structure below is filled in when an error response is to be */
|
||||
/* sent that includes the optional additional error information. */
|
||||
/* Note : this information must be set prior to issuing the call to */
|
||||
/* mp_err_resp, if it is to be included in the response. */
|
||||
/************************************************************************/
|
||||
|
||||
extern ADTNL_ERR_RESP_INFO adtnl_err_info;
|
||||
|
||||
/************************************************************************/
|
||||
/* Error Response Encode & Send Functions - */
|
||||
/* These routines are called to build and send error response PDU's, */
|
||||
/* one for the case of a Cancel indication, the other for all other */
|
||||
/* cases. The parameters are : a pointer to the request information, */
|
||||
/* the error class, and the error code. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_LITE
|
||||
ST_RET mp_err_resp (MMSREQ_IND *ind, ST_INT16 err_class, ST_INT16 code);
|
||||
ST_RET mp_init_err (MMSREQ_IND *ind, ST_INT16 err_class, ST_INT16 code);
|
||||
ST_RET mp_conclude_err (MMSREQ_IND *ind, ST_INT16 err_class, ST_INT16 code);
|
||||
ST_RET mp_cancel_err (MMSREQ_IND *ind, ST_INT16 err_class, ST_INT16 code);
|
||||
#else
|
||||
ST_RET mpl_err_resp (ST_INT op, ST_UINT32 invoke, ST_INT16 err_class, ST_INT16 code);
|
||||
ST_RET mpl_init_err (ST_INT16 err_class, ST_INT16 code);
|
||||
ST_RET mpl_conclude_err (ST_INT16 err_class, ST_INT16 code);
|
||||
ST_RET mpl_cancel_err (ST_UINT32 invoke, ST_INT16 err_class, ST_INT16 code);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMS_ERR_INCLUDED */
|
||||
109
include/mmslite/mms_log.h
Normal file
109
include/mmslite/mms_log.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1993 - 2003, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_log.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains MMS-EASE logging definitions */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/04/03 EJV 04 Chg mms_debug_sel to ST_UINT, and deleted */
|
||||
/* L suffix from MMS_LOG_... masks. */
|
||||
/* 03/15/01 JRB 03 Added user_debug_sel to control USER logging.*/
|
||||
/* 10/08/98 MDE 02 Migrated to updated SLOG interface */
|
||||
/* 06/09/97 MDE 01 Added 2 new Log macros */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_LOG_INCLUDED
|
||||
#define MMS_LOG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
#include "slog.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* mms_debug_sel bit assignments */
|
||||
#define MMS_LOG_DEC 0x00000001
|
||||
#define MMS_LOG_ENC 0x00000002
|
||||
#define MMS_LOG_ACSE 0x00000004
|
||||
#define MMS_LOG_LLC 0x00000008
|
||||
#define MMS_LOG_IQUE 0x00000010
|
||||
#define MMS_LOG_RQUE 0x00000020
|
||||
|
||||
/* Keep the next two reserved for the user (not used internally) */
|
||||
#define MMS_LOG_USR_IND 0x00000040
|
||||
#define MMS_LOG_USR_CONF 0x00000080
|
||||
|
||||
#define MMS_LOG_VM 0x00000100
|
||||
#define MMS_LOG_DATA 0x00000200
|
||||
|
||||
/* Defines used for selecting MMSEASE que servicing debug levels. */
|
||||
#define MMSREQQUE_HOLD 0x00004000
|
||||
#define MMSINDQUE_HOLD 0x00008000
|
||||
|
||||
#define MMS_LOG_ERR 0x00010000
|
||||
#define MMS_LOG_NERR 0x00020000
|
||||
#define MMS_LOG_PDU 0x00040000
|
||||
#define MMS_LOG_CONFIG 0x00080000
|
||||
|
||||
#define MMS_LOG_RT 0x00100000
|
||||
#define MMS_LOG_RTAA 0x00200000
|
||||
#define MMS_LOG_AA 0x00400000
|
||||
|
||||
#define MMS_LOG_REQ 0x01000000
|
||||
#define MMS_LOG_RESP 0x02000000
|
||||
#define MMS_LOG_IND 0x04000000
|
||||
#define MMS_LOG_CONF 0x08000000
|
||||
|
||||
/************************************************************************/
|
||||
/* These are S_LOG control items for MMS-EASE logging */
|
||||
|
||||
extern ST_UINT mms_debug_sel;
|
||||
|
||||
/************************************************************************/
|
||||
/* user_debug_sel bit assignments */
|
||||
#define USER_LOG_ERR 0x00000001
|
||||
#define USER_LOG_CLIENT 0x00000002
|
||||
#define USER_LOG_SERVER 0x00000004
|
||||
|
||||
extern ST_UINT user_debug_sel; /* global var to control USER logging */
|
||||
|
||||
/************************************************************************/
|
||||
/* User selectable function to log MMS actions (MLOG, for instance) */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
extern ST_VOID (*m_log_ureq_info_fun) (ST_INT chan, ST_INT op, ST_VOID *info);
|
||||
extern ST_VOID (*m_log_req_info_fun) (MMSREQ_PEND *req, ST_VOID *info);
|
||||
extern ST_VOID (*m_log_resp_info_fun) (MMSREQ_IND *ind, ST_VOID *info);
|
||||
extern ST_VOID (*m_log_ind_info_fun) (MMSREQ_IND *ind);
|
||||
extern ST_VOID (*m_log_conf_info_fun) (MMSREQ_PEND *conf);
|
||||
extern ST_VOID (*m_log_error_resp_fun) (MMSREQ_IND *ind, ST_INT16 err_class, ST_INT16 code);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Some SLOG Logging control macros */
|
||||
|
||||
#define MLOG_CLOSE_FILE() {slogCloseFile (sLogCtrl);}
|
||||
#define MLOG_DUMP_MEM_LOG() {slogDumpMem (sLogCtrl);}
|
||||
#define MLOG_STOP_FILE_LOGGING() {sLogCtrl->logCtrl &= ~LOG_FILE_EN;}
|
||||
#define MLOG_START_FILE_LOGGING() {sLogCtrl->logCtrl |= LOG_FILE_EN;}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
#endif /* End of MMS_LOG_INCLUDED */
|
||||
/************************************************************************/
|
||||
234
include/mmslite/mms_mp.h
Normal file
234
include/mmslite/mms_mp.h
Normal file
@@ -0,0 +1,234 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_mp.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the common data structures and general function */
|
||||
/* declarations required to interface with MMS at the primitive */
|
||||
/* level. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 05 Convert to use ASN1R. */
|
||||
/* 08/15/97 MDE 04 BTOD handling changes */
|
||||
/* 08/14/97 RKR 03 Format changes */
|
||||
/* 06/11/97 RKR 02 Added constants for EXTERNAL encoding tag */
|
||||
/* 06/09/97 MDE 01 MMS-LITE define changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_MP_INCLUDED
|
||||
#define MMS_MP_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "asn1defs.h"
|
||||
#ifndef MMS_LITE
|
||||
#include "mms_defs.h"
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* MMS-LITE specific defines */
|
||||
|
||||
#if defined(MMS_LITE)
|
||||
/* For MMS-LITE, we will use 'lite' versions of some data structures */
|
||||
#define USE_COMPACT_MMS_STRUCTS
|
||||
|
||||
/* For MMS-LITE, we will supply a single static decode info buffer */
|
||||
#define M_USR_DEC_BUF
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Common default values for priority and severity */
|
||||
/************************************************************************/
|
||||
|
||||
#define MMS_NORM_PRIORITY 64
|
||||
#define MMS_NORM_SEVERITY 64
|
||||
|
||||
/************************************************************************/
|
||||
/* Object Name - This structure is used to reference MMS objects */
|
||||
/************************************************************************/
|
||||
|
||||
/* These defines may be used for the object_tag element selector */
|
||||
#define VMD_SPEC 0
|
||||
#define DOM_SPEC 1
|
||||
#define AA_SPEC 2
|
||||
|
||||
#if !defined (USE_COMPACT_MMS_STRUCTS)
|
||||
|
||||
/* Standard form of object name */
|
||||
struct object_name
|
||||
{
|
||||
ST_INT object_tag; /* See above for legal values */
|
||||
union
|
||||
{
|
||||
ST_CHAR vmd_spec [MAX_IDENT_LEN+1]; /* vmd specific identifier */
|
||||
ST_CHAR item_id [MAX_IDENT_LEN+1]; /* item identifier */
|
||||
ST_CHAR aa_spec [MAX_IDENT_LEN+1]; /* aa specific identifier */
|
||||
} obj_name;
|
||||
ST_CHAR domain_id [MAX_IDENT_LEN+1]; /* domain identifier */
|
||||
SD_END_STRUCT
|
||||
}ALIGNPACKED;
|
||||
|
||||
#else /* Use compact form */
|
||||
|
||||
/* Compact form of object name */
|
||||
struct object_name
|
||||
{
|
||||
ST_INT object_tag; /* See above for legal values */
|
||||
union
|
||||
{
|
||||
ST_CHAR *vmd_spec; /* vmd specific identifier */
|
||||
ST_CHAR *item_id; /* item identifier */
|
||||
ST_CHAR *aa_spec; /* aa specific identifier */
|
||||
} obj_name;
|
||||
ST_CHAR *domain_id; /* domain identifier */
|
||||
SD_END_STRUCT
|
||||
}ALIGNPACKED;
|
||||
#endif
|
||||
|
||||
typedef struct object_name OBJECT_NAME;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* timeofday, event_time, attach_to_evcon, attach_to_semaphore and */
|
||||
/* modifier structure definitions. */
|
||||
/************************************************************************/
|
||||
|
||||
struct event_time
|
||||
{
|
||||
ST_INT16 evtime_tag; /* event time tag */
|
||||
/* 0: time of day */
|
||||
/* 1: time sequence identifier */
|
||||
/* 2: undefined */
|
||||
union
|
||||
{
|
||||
MMS_BTOD time_of_day; /* time of day */
|
||||
ST_UINT32 time_seq_id; /* time sequence identifier */
|
||||
} evtime;
|
||||
};
|
||||
typedef struct event_time EVENT_TIME;
|
||||
|
||||
struct attach_to_evcon
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_UCHAR causing_transitions; /* causing transitions: */
|
||||
/* bitstring */
|
||||
/* 0 : idle to disabled */
|
||||
/* 1 : active to disabled */
|
||||
/* 2 : disabled to idle */
|
||||
/* 3 : active to idle */
|
||||
/* 4 : disabled to active */
|
||||
/* 5 : idle to active */
|
||||
/* 6 : any to deleted */
|
||||
ST_BOOLEAN acc_delay_pres; /* acceptable delay present */
|
||||
ST_UINT32 acc_delay; /* acceptable delay */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct attach_to_evcon ATTACH_TO_EVCON;
|
||||
|
||||
struct attach_to_semaphore
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
ST_BOOLEAN named_token_pres; /* named token present ind */
|
||||
ST_CHAR named_token[MAX_IDENT_LEN+1];/* named token */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal (default) */
|
||||
/* 127 - lowest */
|
||||
ST_BOOLEAN acc_delay_pres; /* acceptable delay present */
|
||||
ST_UINT32 acc_delay; /* acceptable delay */
|
||||
ST_BOOLEAN ctrl_timeout_pres; /* control timeout present */
|
||||
ST_UINT32 ctrl_timeout; /* control timeout */
|
||||
ST_BOOLEAN abrt_on_timeout_pres; /* Abort On Timeout present */
|
||||
ST_BOOLEAN abrt_on_timeout; /* Abort On Timeout */
|
||||
ST_BOOLEAN rel_conn_lost; /* relinquish if connection */
|
||||
SD_END_STRUCT
|
||||
}; /* lost (default = true) */
|
||||
typedef struct attach_to_semaphore ATTACH_TO_SEMAPHORE;
|
||||
|
||||
struct modifier
|
||||
{
|
||||
ST_INT modifier_tag; /* modifier tag */
|
||||
/* 0:attach to event condition */
|
||||
/* 1:attach to semaphore */
|
||||
union
|
||||
{
|
||||
ATTACH_TO_EVCON atec; /* attach to event condition */
|
||||
ATTACH_TO_SEMAPHORE atsem; /* attach to semaphore */
|
||||
} mod;
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct modifier MODIFIER;
|
||||
|
||||
/************************************************************************/
|
||||
/* File Name */
|
||||
/************************************************************************/
|
||||
|
||||
struct file_name
|
||||
{
|
||||
ST_INT fn_len; /* The length of the string */
|
||||
ST_CHAR *fname; /* pointer to actual filename string */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct file_name FILE_NAME;
|
||||
|
||||
/************************************************************************/
|
||||
/* Values for the encoding_tag of an EXTERN_INFO */
|
||||
/************************************************************************/
|
||||
|
||||
#define M_EXT_TAG_ANY 0
|
||||
#define M_EXT_TAG_OCT_ALIGNED 1
|
||||
#define M_EXT_TAG_ARB 2
|
||||
|
||||
/************************************************************************/
|
||||
/* EXTERNAL */
|
||||
/* The structure below is used to store ASN.1 type EXTERNAL in "C" */
|
||||
/* format. */
|
||||
/************************************************************************/
|
||||
|
||||
struct extern_info
|
||||
{
|
||||
ST_BOOLEAN dir_ref_pres; /* direct reference present */
|
||||
MMS_OBJ_ID dir_ref;
|
||||
|
||||
ST_BOOLEAN indir_ref_pres; /* indirect reference present */
|
||||
ST_INT32 indir_ref; /* indirect reference value */
|
||||
|
||||
ST_BOOLEAN dv_descr_pres; /* data value descript pres */
|
||||
ST_INT dv_descr_len; /* data value descr. len */
|
||||
ST_UCHAR *dv_descr; /* data value descr. ptr */
|
||||
|
||||
ST_CHAR encoding_tag; /* type of encoding */
|
||||
ST_INT num_bits; /* for arbitrary only */
|
||||
ST_INT data_len; /* # bytes of data */
|
||||
ST_UCHAR *data_ptr; /* data pointer */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct extern_info EXTERN_INFO;
|
||||
|
||||
|
||||
ST_RET ms_encode_extern (EXTERN_INFO *src,
|
||||
ST_UCHAR *asn1dest, ST_INT destlen,
|
||||
ST_INT *len_out, ST_UCHAR **asn1_start_out);
|
||||
|
||||
ST_RET ms_decode_extern (ST_UCHAR *asn1, ST_INT asn1len, EXTERN_INFO *dest);
|
||||
|
||||
ST_VOID wr_external (ASN1_ENC_CTXT *aCtx, EXTERN_INFO *ext);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMS_MP_INCLUDED */
|
||||
294
include/mmslite/mms_pcon.h
Normal file
294
include/mmslite/mms_pcon.h
Normal file
@@ -0,0 +1,294 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pcon.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS context management services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 07/13/05 MDE 07 Added defines for reject class and code */
|
||||
/* 03/23/05 JRB 06 Include asn1r instead of suicacse because */
|
||||
/* APP_REF moved to asn1r. */
|
||||
/* 07/10/02 JRB 05 Clarify description of maxreq_calling/called.*/
|
||||
/* 12/10/97 MDE 04 Changed max_nest to ST_INT8 */
|
||||
/* 11/06/97 MDE 03 Added suicacse.h, use APP_REF typedef */
|
||||
/* 08/13/97 RKR 02 Format changes */
|
||||
/* 07/29/97 DSF 01 Moved APP_REF to SUIC */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PCON_INCLUDED
|
||||
#define MMS_PCON_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_err.h"
|
||||
#include "mms_mp.h"
|
||||
#include "asn1r.h" /* need APP_REF */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* CONTEXT MANAGEMENT SERVICES */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass CONTEXT MANAGEMENT information */
|
||||
/* to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* INITIATE */
|
||||
/************************************************************************/
|
||||
|
||||
struct init_rslt
|
||||
{
|
||||
ST_BOOLEAN accept_context; /* SD_TRUE if not error */
|
||||
ST_BOOLEAN err_info_pres; /* error information available */
|
||||
ERR_INFO err; /* otherwise look here */
|
||||
};
|
||||
typedef struct init_rslt INIT_RSLT;
|
||||
|
||||
|
||||
/* This structure is used for non-core MMS-EASE P-Context's. */
|
||||
/* It is attached to the primary initiate info structure as an array */
|
||||
|
||||
struct cs_init_info
|
||||
{
|
||||
ST_UINT p_context; /* P-Context for this init */
|
||||
ST_BOOLEAN local_detail_pres; /* flag if local_detail is present */
|
||||
ST_INT32 local_detail; /* local detail */
|
||||
ST_INT16 maxreq_calling; /* max outst. "ind" allowed at "calling" app*/
|
||||
/* DEBUG: chg name to max_ind_calling? */
|
||||
ST_INT16 maxreq_called; /* max outst. "ind" allowed at "called" app*/
|
||||
/* DEBUG: chg name to max_ind_called? */
|
||||
ST_BOOLEAN max_nest_pres; /* indicates if max_nest is present */
|
||||
ST_INT8 max_nest; /* maximum data nesting */
|
||||
ST_INT init_detail_len; /* init detail */
|
||||
ST_UCHAR *init_detail; /* this is an ASN.1 encoded sequence */
|
||||
INIT_RSLT rslt;
|
||||
};
|
||||
typedef struct cs_init_info CS_INIT_INFO;
|
||||
|
||||
|
||||
/* REQUEST & RESPONSE : */
|
||||
|
||||
struct init_info
|
||||
{ /* Proposed (req) / Negiotiated (resp) */
|
||||
ST_BOOLEAN mms_p_context_pres;/* MMS Core context used */
|
||||
ST_BOOLEAN max_segsize_pres; /* flag if max_segsize is present */
|
||||
ST_INT32 max_segsize; /* maximum segment size */
|
||||
ST_INT16 maxreq_calling; /* max outst. "ind" allowed at "calling" app*/
|
||||
/* DEBUG: chg name to max_ind_calling? */
|
||||
ST_INT16 maxreq_called; /* max outst. "ind" allowed at "called" app*/
|
||||
/* DEBUG: chg name to max_ind_called? */
|
||||
ST_BOOLEAN max_nest_pres; /* indicates if max_nest is present */
|
||||
ST_INT8 max_nest; /* maximum data nesting */
|
||||
ST_BOOLEAN mms_detail_pres; /* mms init detail enable */
|
||||
ST_INT16 version; /* version */
|
||||
ST_UCHAR param_supp[2]; /* parameter support options: bitstring */
|
||||
ST_UCHAR serv_supp[11]; /* service support options: bitstring */
|
||||
INIT_RSLT rslt; /* success/failure & error info */
|
||||
ST_INT num_cs_init; /* number of CS init info's attached */
|
||||
ST_INT core_position; /* Position for CORE CONTEXT in list */
|
||||
/* (0 = first, num_cs_init = last, etc. */
|
||||
/* followed by CS_INIT_INFO cs_init[num_cs_init] */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct init_info INIT_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_init (ST_INT chan, ST_CHAR *partner, INIT_INFO *info_ptr);
|
||||
ST_RET mp_init_resp (MMSREQ_IND *indptr, INIT_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_init (INIT_INFO *info);
|
||||
ST_RET mpl_cs_init (CS_INIT_INFO *info);
|
||||
ST_RET mpl_init_resp (INIT_INFO *info);
|
||||
ST_RET mpl_cs_init_resp (CS_INIT_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* CONCLUDE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : NULL */
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_conclude (ST_INT chan);
|
||||
ST_RET mp_conclude_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_conclude (ST_VOID);
|
||||
ST_RET mpl_conclude_resp (ST_VOID);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* CANCEL */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : NULL */
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_cancel (MMSREQ_PEND *req);
|
||||
ST_RET mp_cancel_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_cancel (ST_VOID);
|
||||
ST_RET mpl_cancel_resp (ST_VOID);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REJECT */
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
#define MMS_REJ_CLASS_CONFIRMED_REQUEST_PDU 1
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_UNRECOGNIZED_SERVICE 1
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_UNRECOGNIZED_MODIFIER 2
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_INVALID_INVOKEID 3
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_INVALID_ARGUMENT 4
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_INVALID_MODIFIER 5
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_MAX_SERV_OUTSTANDING_EXCEEDED 6
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_MAX_RECURSION_EXCEEDED 8
|
||||
#define MMS_REJ_CODE_CONFIRMED_REQUEST_PDU_VALUE_OUT_OF_RANGE 9
|
||||
|
||||
#define MMS_REJ_CLASS_CONFIRMED_RESPONSE_PDU 2
|
||||
#define MMS_REJ_CODE_CONFIRMED_RESPONSE_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CONFIRMED_RESPONSE_PDU_UNRECOGNIZED_SERVICE 1
|
||||
#define MMS_REJ_CODE_CONFIRMED_RESPONSE_PDU_INVALID_INVOKEID 2
|
||||
#define MMS_REJ_CODE_CONFIRMED_RESPONSE_PDU_INVALID_RESULT 3
|
||||
#define MMS_REJ_CODE_CONFIRMED_RESPONSE_PDU_MAX_RECURSION_EXCEEDED 5
|
||||
#define MMS_REJ_CODE_CONFIRMED_RESPONSE_PDU_VALUE_OUT_OF_RANGE 6
|
||||
|
||||
#define MMS_REJ_CLASS_CONFIRMED_ERROR_PDU 3
|
||||
#define MMS_REJ_CODE_CONFIRMED_ERROR_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CONFIRMED_ERROR_PDU_UNRECOGNIZED_SERVICE 1
|
||||
#define MMS_REJ_CODE_CONFIRMED_ERROR_PDU_INVALID_INVOKEID 2
|
||||
#define MMS_REJ_CODE_CONFIRMED_ERROR_PDU_INVALID_SERVICEERROR 3
|
||||
#define MMS_REJ_CODE_CONFIRMED_ERROR_PDU_VALUE_OUT_OF_RANGE 4
|
||||
|
||||
#define MMS_REJ_CLASS_UNCONFIRMED_PDU 4
|
||||
#define MMS_REJ_CODE_UNCONFIRMED_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_UNCONFIRMED_PDU_UNRECOGNIZED_SERVICE 1
|
||||
#define MMS_REJ_CODE_UNCONFIRMED_PDU_INVALID_ARGUMENT 2
|
||||
#define MMS_REJ_CODE_UNCONFIRMED_PDU_MAX_RECURSION_EXCEEDED 3
|
||||
#define MMS_REJ_CODE_UNCONFIRMED_PDU_VALUE_OUT_OF_RANGE 4
|
||||
|
||||
#define MMS_REJ_CLASS_PDU_ERROR 5
|
||||
#define MMS_REJ_CODE_PDU_ERROR_UNKNOWN_PDU_TYPE 0
|
||||
#define MMS_REJ_CODE_PDU_ERROR_INVALID_PDU 1
|
||||
#define MMS_REJ_CODE_PDU_ERROR_ILLEGAL_ACSE_MAPPING 2
|
||||
|
||||
#define MMS_REJ_CLASS_CANCEL_REQUEST_PDU 6
|
||||
#define MMS_REJ_CODE_CANCEL_REQUEST_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CANCEL_REQUEST_PDU_INVALID_INVOKEID 1
|
||||
|
||||
#define MMS_REJ_CLASS_CANCEL_RESPONSE_PDU 7
|
||||
#define MMS_REJ_CODE_CANCEL_RESPONSE_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CANCEL_RESPONSE_PDU_INVALID_INVOKEID 1
|
||||
|
||||
#define MMS_REJ_CLASS_CANCEL_ERROR_PDU 8
|
||||
#define MMS_REJ_CODE_CANCEL_ERROR_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CANCEL_ERROR_PDU_INVALID_INVOKEID 1
|
||||
#define MMS_REJ_CODE_CANCEL_ERROR_PDU_INVALID_SERVICEERROR 2
|
||||
#define MMS_REJ_CODE_CANCEL_ERROR_PDU_VALUE_OUT_OF_RANGE 3
|
||||
|
||||
#define MMS_REJ_CLASS_CONCLUDE_REQUEST_PDU 9
|
||||
#define MMS_REJ_CODE_CONCLUDE_REQUEST_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CONCLUDE_REQUEST_PDU_INVALID_ARGUMENT 1
|
||||
|
||||
#define MMS_REJ_CLASS_CONCLUDE_RESPONSE_PDU 10
|
||||
#define MMS_REJ_CODE_CONCLUDE_RESPONSE_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CONCLUDE_RESPONSE_PDU_INVALID_RESULT 1
|
||||
|
||||
#define MMS_REJ_CLASS_CONCLUDE_ERROR_PDU 11
|
||||
#define MMS_REJ_CODE_CONCLUDE_ERROR_PDU_OTHER 0
|
||||
#define MMS_REJ_CODE_CONCLUDE_ERROR_PDU_INVALID_SERVICEERROR 1
|
||||
#define MMS_REJ_CODE_CONCLUDE_ERROR_PDU_VALUE_OUT_OF_RANGE 2
|
||||
|
||||
|
||||
struct reject_resp_info
|
||||
{
|
||||
ST_BOOLEAN detected_here; /* flag indicating where error occurred */
|
||||
ST_BOOLEAN invoke_known; /* flag indicating if invoke ID known */
|
||||
ST_UINT32 invoke; /* invoke ID of service rejected */
|
||||
ST_INT pdu_type; /* pdu type of service rejected */
|
||||
ST_INT16 rej_class; /* reject class */
|
||||
ST_INT16 rej_code; /* reject code */
|
||||
};
|
||||
typedef struct reject_resp_info REJECT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
ST_RET mp_reject_resp (ST_INT chan, REJECT_RESP_INFO *info);
|
||||
ST_RET mp_reject_ind (MMSREQ_IND *ind,REJECT_RESP_INFO *info);
|
||||
ST_RET mp_reject_conf (MMSREQ_PEND *req,REJECT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_reject_resp (REJECT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* ABORT REQUEST FUNCTION */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET mp_abort (ST_INT chan, ST_INT reason);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* This function is used to convert convert an AR Name into an ASN.1 */
|
||||
/* encoded ApplicationReference based on the TPY DIB information */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET ms_arname_to_asn1 (ST_CHAR *arname, ST_UCHAR *asn1_buf, ST_INT asn1_buf_len,
|
||||
ST_UCHAR **asn1_out, ST_INT *asn1_len_out);
|
||||
|
||||
/* This function is used to convert an ASN.1 encoded */
|
||||
/* ApplicationReference to the AR Name */
|
||||
ST_RET ms_asn1_to_arname (ST_CHAR *arname, ST_UCHAR *asn1, ST_INT asn1len);
|
||||
|
||||
/* This function is used to find an AR Name based on the app_ref */
|
||||
/* information. */
|
||||
ST_RET ms_appref_to_arname (ST_CHAR *arname, APP_REF *appref);
|
||||
|
||||
/* This function is used to transition between an AR Name and its' */
|
||||
/* corresponding app_ref information. */
|
||||
ST_RET ms_arname_to_appref (ST_CHAR *arname, APP_REF **appref_out);
|
||||
|
||||
/* This function is used to convert to an ApplicationReference to ASN.1 */
|
||||
ST_RET ms_appref_to_asn1 (APP_REF *appref, ST_UCHAR *dest, ST_INT dest_len,
|
||||
ST_UCHAR **asn1_out, ST_INT *asn1_len_out);
|
||||
|
||||
/* This function is used to convert ASN.1 encoded ApplicationReference */
|
||||
/* data to an intermediate form. */
|
||||
ST_RET ms_asn1_to_appref (APP_REF *appref, ST_UCHAR *asn1, ST_INT asn1len);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMS_PCON_INCLUDED */
|
||||
|
||||
419
include/mmslite/mms_pdom.h
Normal file
419
include/mmslite/mms_pdom.h
Normal file
@@ -0,0 +1,419 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pdom.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS domain management services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/13/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PDOM_INCLUDED
|
||||
#define MMS_PDOM_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_err.h" /* need for service error definition */
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* DOMAIN MANAGEMENT SERVICES */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass DOMAIN MANAGEMENT information */
|
||||
/* to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
/* use these defines to determine whether load data is coded or not */
|
||||
/* If coded, the data pointer points to a complete ASN.1 EXTERNAL */
|
||||
|
||||
#define LOAD_DATA_NON_CODED 0
|
||||
#define LOAD_DATA_CODED 1
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* INITIATE DOWNLOAD SEQUENCE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct initdown_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
ST_BOOLEAN sharable; /* boolean, no default */
|
||||
ST_INT num_of_capab; /* number of capabilities */
|
||||
/* list of capabilities */
|
||||
/* ST_CHAR * capab_list [num_of_capab]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct initdown_req_info INITDOWN_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_initdown (ST_INT chan, INITDOWN_REQ_INFO *info);
|
||||
ST_RET mp_initdown_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_initdown (INITDOWN_REQ_INFO *info);
|
||||
ST_RET mpl_initdown_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DOWNLOAD SEGMENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct download_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
};
|
||||
typedef struct download_req_info DOWNLOAD_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
|
||||
struct download_resp_info
|
||||
{
|
||||
ST_INT load_data_type; /* coded/non-coded */
|
||||
ST_INT load_data_len; /* number of load data octets */
|
||||
ST_UCHAR *load_data; /* pointer to load data octets */
|
||||
ST_BOOLEAN more_follows; /* boolean, default to true */
|
||||
};
|
||||
typedef struct download_resp_info DOWNLOAD_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_download (ST_INT chan, DOWNLOAD_REQ_INFO *info);
|
||||
ST_RET mp_download_resp (MMSREQ_IND *ind, DOWNLOAD_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_download (DOWNLOAD_REQ_INFO *info);
|
||||
ST_RET mpl_download_resp (ST_UINT32 invoke, DOWNLOAD_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* TERMINATE DOWNLOAD SEQUENCE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct termdown_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
ST_BOOLEAN discarded; /* boolean, default to false */
|
||||
ERR_INFO *err; /* points to service error */
|
||||
}; /* (IS only, for discarded != 0 */
|
||||
typedef struct termdown_req_info TERMDOWN_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_termdown (ST_INT chan, TERMDOWN_REQ_INFO *info);
|
||||
ST_RET mp_termdown_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_termdown (TERMDOWN_REQ_INFO *info);
|
||||
ST_RET mpl_termdown_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* INITIATE UPLOAD SEQUENCE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct initupl_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
};
|
||||
typedef struct initupl_req_info INITUPL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct initupl_resp_info
|
||||
{
|
||||
ST_INT32 ulsmid; /* upload state machine id */
|
||||
ST_INT num_of_capab; /* number of capabilities */
|
||||
/* list of capabilities */
|
||||
/* ST_CHAR *capab_list [num_of_capab]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct initupl_resp_info INITUPL_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_initupl (ST_INT chan, INITUPL_REQ_INFO *info);
|
||||
ST_RET mp_initupl_resp (MMSREQ_IND *ind, INITUPL_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_initupl (INITUPL_REQ_INFO *info);
|
||||
ST_RET mpl_initupl_resp (ST_UINT32 invoke, INITUPL_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* UPLOAD SEGMENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct upload_req_info
|
||||
{
|
||||
ST_INT32 ulsmid; /* upload state machine id */
|
||||
};
|
||||
typedef struct upload_req_info UPLOAD_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct upload_resp_info
|
||||
{
|
||||
ST_INT load_data_type; /* coded/non-coded */
|
||||
ST_INT load_data_len; /* number of load data octets */
|
||||
ST_UCHAR *load_data; /* pointer to load data octets */
|
||||
ST_BOOLEAN more_follows; /* boolean, default to true */
|
||||
};
|
||||
typedef struct upload_resp_info UPLOAD_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_upload (ST_INT chan, UPLOAD_REQ_INFO *info);
|
||||
ST_RET mp_upload_resp (MMSREQ_IND *ind, UPLOAD_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_upload (UPLOAD_REQ_INFO *info);
|
||||
ST_RET mpl_upload_resp (ST_UINT32 invoke, UPLOAD_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* TERMINATE UPLOAD SEQUENCE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct termupl_req_info
|
||||
{
|
||||
ST_INT32 ulsmid; /* upload state machine id */
|
||||
};
|
||||
typedef struct termupl_req_info TERMUPL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_termupl (ST_INT chan, TERMUPL_REQ_INFO *info);
|
||||
ST_RET mp_termupl_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_termupl (TERMUPL_REQ_INFO *info);
|
||||
ST_RET mpl_termupl_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REQUEST DOMAIN DOWNLOAD */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct rddwn_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
ST_BOOLEAN sharable; /* boolean, no default */
|
||||
ST_INT num_of_capab; /* number of capabilities */
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
/* list of capabilities */
|
||||
/* ST_CHAR * capab_list [num_of_capab]; */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rddwn_req_info RDDWN_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_rddwn (ST_INT chan, RDDWN_REQ_INFO *info);
|
||||
ST_RET mp_rddwn_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_rddwn (RDDWN_REQ_INFO *info);
|
||||
ST_RET mpl_rddwn_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REQUEST DOMAIN UPLOAD */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct rdupl_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rdupl_req_info RDUPL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_rdupl (ST_INT chan, RDUPL_REQ_INFO *info);
|
||||
ST_RET mp_rdupl_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_rdupl (RDUPL_REQ_INFO *info);
|
||||
ST_RET mpl_rdupl_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* LOAD DOMAIN CONTENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct loaddom_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
ST_BOOLEAN sharable; /* boolean, no default */
|
||||
ST_BOOLEAN third_pty_pres; /* third party used */
|
||||
ST_INT third_pty_len; /* the length of third party */
|
||||
ST_UCHAR *third_pty; /* ptr to third party ASN.1 */
|
||||
ST_INT num_of_capab; /* number of capabilities */
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
/* list of capabilities */
|
||||
/* ST_CHAR *capab_list [num_of_capab]; */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct loaddom_req_info LOADDOM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_loaddom (ST_INT chan, LOADDOM_REQ_INFO *info);
|
||||
ST_RET mp_loaddom_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_loaddom (LOADDOM_REQ_INFO *info);
|
||||
ST_RET mpl_loaddom_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* STORE DOMAIN CONTENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct storedom_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
ST_BOOLEAN third_pty_pres; /* third party used */
|
||||
ST_INT third_pty_len; /* the length of third party */
|
||||
ST_UCHAR *third_pty; /* ptr to third party ASN.1 */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct storedom_req_info STOREDOM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_storedom (ST_INT chan, STOREDOM_REQ_INFO *info);
|
||||
ST_RET mp_storedom_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_storedom (STOREDOM_REQ_INFO *info);
|
||||
ST_RET mpl_storedom_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE DOMAIN */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct deldom_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
};
|
||||
typedef struct deldom_req_info DELDOM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_deldom (ST_INT chan, DELDOM_REQ_INFO *info);
|
||||
ST_RET mp_deldom_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_deldom (DELDOM_REQ_INFO *info);
|
||||
ST_RET mpl_deldom_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET DOMAIN ATTRIBUTE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getdom_req_info
|
||||
{
|
||||
ST_CHAR dname [MAX_IDENT_LEN +1]; /* domain name */
|
||||
};
|
||||
typedef struct getdom_req_info GETDOM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getdom_resp_info
|
||||
{
|
||||
ST_INT num_of_capab; /* number of capabilities */
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable, no default */
|
||||
ST_BOOLEAN sharable; /* boolean, no default */
|
||||
ST_INT num_of_pinames; /* number of pi names */
|
||||
ST_INT16 state; /* 0 : non-existent */
|
||||
/* 1 : loaded */
|
||||
/* 2 : ready */
|
||||
/* 3 : in use */
|
||||
/* 4 : complete */
|
||||
/* 5 : incomplete */
|
||||
/* 6-15 : d1-d8 (IS) */
|
||||
ST_INT8 upload_in_progress; /* upload in progress */
|
||||
/* list of pointers to capabilities */
|
||||
/* ST_CHAR *capab_list [num_of_capab]; */
|
||||
/* list of pointers to program invocation names */
|
||||
/* ST_CHAR *pinames_list [num_of_pinames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct getdom_resp_info GETDOM_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getdom (ST_INT chan, GETDOM_REQ_INFO *info);
|
||||
ST_RET mp_getdom_resp (MMSREQ_IND *ind, GETDOM_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getdom (GETDOM_REQ_INFO *info);
|
||||
ST_RET mpl_getdom_resp (ST_UINT32 invoke, GETDOM_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PDOM_INCLUDED */
|
||||
|
||||
248
include/mmslite/mms_perr.h
Normal file
248
include/mmslite/mms_perr.h
Normal file
@@ -0,0 +1,248 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2007, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_perr.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains structure & function definitions used for */
|
||||
/* decoding and encoding an error response. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/05/07 EJV 03 Removed obsolete LLC30_LLP Type code. */
|
||||
/* 07/02/98 NAV 02 Add MVE_JOURNAL_NAME error code */
|
||||
/* 06/09/97 MDE 01 Fixed indenting */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PERR_INCLUDED
|
||||
#define MMS_PERR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Global MMS operation error code, written when error is detected in */
|
||||
/* functions which return pointers. */
|
||||
/************************************************************************/
|
||||
|
||||
extern ST_RET mms_op_err;
|
||||
|
||||
/************************************************************************/
|
||||
/* Error Codes */
|
||||
/* MMSEASE error codes start at E_MMS_GEN(found in glberror.h). */
|
||||
/* When the return valus from a user accessable function is a pointer, */
|
||||
/* an error is indicated by a pointer value of 0L. In this case the */
|
||||
/* error code may be found in the global variable 'mms_op_err'. */
|
||||
/* */
|
||||
/* Note that SUIC error codes are passed through, and are in the range */
|
||||
/* 1 - 99. Refer to SUIC documentation for specific error definitions. */
|
||||
/* */
|
||||
/* */
|
||||
/* Error codes returned from any request or response function */
|
||||
/************************************************************************/
|
||||
|
||||
#define ME_CHAN_STATE 0x6401
|
||||
#define ME_CHAN_NUM 0x6402
|
||||
#define ME_TITLE_LEN 0x6403
|
||||
#define ME_SEND_SIZE 0x6404
|
||||
#define ME_REQ_PEND_COUNT 0x6405
|
||||
#define ME_INACTIVE_IND 0x6406
|
||||
#define ME_PARTNER_NAME 0x6407
|
||||
#define ME_AR_NAME 0x6408
|
||||
#define ME_OBJ_ID_ERR 0x6409
|
||||
#define ME_SEND_ERROR 0x640A
|
||||
#define ME_ACSE_CHAN_RANGE 0x640B
|
||||
#define ME_LLC_CHAN_RANGE 0x640D
|
||||
#define ME_LLP_TYPE 0x640E
|
||||
#define ME_TRANS_ID_UNAVAILABLE 0x640F
|
||||
#define ME_CHAN_TYPE 0x6410
|
||||
#define ME_TOO_MANY_CONTEXTS 0x6411
|
||||
#define ME_UNKNOWN_P_CONTEXT 0x6412
|
||||
#define ME_P_CONTEXT_ERROR 0x6413
|
||||
#define ME_ASN1_ENCODE_OVERRUN 0x6414
|
||||
|
||||
/************************************************************************/
|
||||
/* Error codes returned from mp_xxx_req functions */
|
||||
/* Values begin from E_MMS_PPI(found in glberror.h). */
|
||||
/************************************************************************/
|
||||
|
||||
#define ME_QUEFULL 0x6501
|
||||
|
||||
/************************************************************************/
|
||||
/* Error codes found in resp_err */
|
||||
/* Values begin from E_MMS_RESP(found in glberror.h). */
|
||||
/************************************************************************/
|
||||
|
||||
#define CNF_RESP_OK 0
|
||||
#define CNF_PARSE_ERR 0x6601
|
||||
#define CNF_REJ_ERR 0x6602
|
||||
#define CNF_ERR_OK 0x6603
|
||||
#define CNF_DISCONNECTED 0x6604
|
||||
#define CNF_CHAN_OP_ERR 0x6605
|
||||
#define CNF_CANST_ERR 0x6606
|
||||
#define CNF_ASS_REQ_REJECTED 0x6607
|
||||
#define CNF_ASS_RESP_PARAM 0x6608
|
||||
#define CNF_ASS_USER_REJ_CONF 0x6609
|
||||
#define CNF_REM_FOPEN 0x660A
|
||||
#define CNF_INIT_PARAM 0x660B
|
||||
#define CNF_REM_FREAD 0x660C
|
||||
#define CNF_LOC_FWRITE 0x660D
|
||||
#define CNF_REM_FCLOSE 0x660E
|
||||
#define CNF_LOC_FCLOSE 0x660F
|
||||
#define CNF_MVREAD_RESP_PARAM 0x6610
|
||||
#define CNF_VM_RESP_ERR 0x6611
|
||||
#define CNF_LLC_SEND_ERROR 0x6612
|
||||
#define CNF_REQ_NOT_DONE 0x6613
|
||||
|
||||
/************************************************************************/
|
||||
/* Error codes returned from 'mv_xxxx_resp' functions. */
|
||||
/* Values begin from E_MMS_VMI(found in glberror.h). */
|
||||
/************************************************************************/
|
||||
|
||||
#define MVE_VARNAME 0x6701
|
||||
#define MVE_TYPENAME 0x6702
|
||||
#define MVE_ADDR 0x6703
|
||||
#define MVE_FOPEN 0x6704
|
||||
#define MVE_REM_FILE_COUNT 0x6705
|
||||
#define MVE_LOC_FILE_COUNT 0x6706
|
||||
#define MVE_FILE_REFNUM 0x6707
|
||||
#define MVE_FRENAME 0x6708
|
||||
#define MVE_FDELETE 0x6709
|
||||
#define MVE_FDIR 0x670A
|
||||
#define MVE_LOC_FOPEN 0x670B
|
||||
#define MVE_CANCEL_STATE 0x670C
|
||||
#define MVE_DOM_ERR 0x670D
|
||||
#define MVE_RT_TYPE 0x670E
|
||||
#define MVE_DOM_STATE 0x670F
|
||||
#define MVE_AT_UPPER_LIMIT 0x6710
|
||||
#define MVE_DATA_CONVERT 0x6711
|
||||
#define MVE_VM_SERVICE_NOTSUPP 0x6712
|
||||
#define MVE_MVWRITE_REQ_PARAM 0x6713
|
||||
#define MVE_DOMAIN_NAME 0x6714
|
||||
#define MVE_OBJECT_SCOPE 0x6715
|
||||
#define MVE_VAR_LIST 0x6716
|
||||
#define MVE_VAR_NUMBER 0x6717
|
||||
#define MVE_NOT_NAMED_VAR 0x6718
|
||||
#define MVE_WRONG_OP 0x6719
|
||||
#define MVE_MVINFO_ACCESS_ERR 0x671A
|
||||
#define MVE_TYPEDEF_LEN0 0x671B
|
||||
#define MVE_TYPEDEF_SYM_GT 0x671C
|
||||
#define MVE_TYPEDEF_SYM_LT 0x671D
|
||||
#define MVE_TYPEDEF_OBJNAME 0x671E
|
||||
#define MVE_TYPEDEF_SYM_RBRACE 0x671F
|
||||
#define MVE_TYPEDEF_SYM_LBRACE 0x6720
|
||||
#define MVE_TYPEDEF_SYM_COMMA 0x6721
|
||||
#define MVE_TYPEDEF_SYM_RPAREN 0x6722
|
||||
#define MVE_TYPEDEF_SYM_LPAREN 0x6723
|
||||
#define MVE_TYPEDEF_SYM_P 0x6724
|
||||
#define MVE_TYPEDEF_SYM_PLUS 0x6725
|
||||
#define MVE_TYPEDEF_SYM_MINUS 0x6726
|
||||
#define MVE_TYPEDEF_SYM_T 0x6727
|
||||
#define MVE_TYPEDEF_BADLEN3 0x6728
|
||||
#define MVE_TYPEDEF_BADLEN4 0x6729
|
||||
#define MVE_TYPEDEF_BADLEN5 0x672A
|
||||
#define MVE_TYPEDEF_BADLEN7 0x672B
|
||||
#define MVE_TYPEDEF_BADTYPE 0x672C
|
||||
#define MVE_TYPEDEF_SYM_COLON 0x672D
|
||||
#define MVE_TYPEDEF_SYM_RBRACKET 0x672E
|
||||
#define MVE_TYPEDEF_SYM_LBRACKET 0x672F
|
||||
#define MVE_TYPEDEF_NUM_ELTS 0x6730
|
||||
#define MVE_TYPEDEF_SYM_DIGIT 0x6731
|
||||
#define MVE_TYPEDEF_SYM_OTHER 0x6732
|
||||
#define MVE_DATA_SPACE 0x6733
|
||||
#define MVE_VM_REQ_ERR 0x6734
|
||||
#define MVE_VMD_NOT_EMPTY 0x6735
|
||||
#define MVE_BAD_APP_REF_FORM 0x6736
|
||||
#define MVE_ASN1_TO_RT 0x6737
|
||||
#define MVE_ASN1_ENCODE_ERR 0x6738
|
||||
#define MVE_ASN1_DECODE_ERR 0x6739
|
||||
#define MVE_FP_SAVE_REQ_ERR 0x673A
|
||||
#define MVE_FP_REQ_DONE_ERR 0x673B
|
||||
#define MVE_LLP_DIB_FOPEN_ERR 0x673C
|
||||
#define MVE_ADD_APPREF_ERR 0x673D
|
||||
#define MVE_RESP_NOT_SUPP 0x673E
|
||||
#define MVE_REQ_NOT_SUPP 0x673F
|
||||
#define MVE_INVALID_PDU 0x6740
|
||||
#define MVE_DOM_DISCARDED 0x6741
|
||||
#define MVE_DOM_PROTECTED 0x6742
|
||||
#define MVE_DOM_DEL_ERR 0x6743
|
||||
#define MVE_DEL_PI_ERR 0x6744
|
||||
#define MVE_RTAA_TYPE 0x6745
|
||||
#define MVE_RTAA_SIZE 0x6746
|
||||
#define MVE_AA_SELECT 0x6747
|
||||
#define MVE_INVALID_ADL 0x6748
|
||||
#define MVE_DATA_TO_RT 0x6749
|
||||
#define MVE_LOC_FILE_READ 0x6750
|
||||
|
||||
/************************************************************************/
|
||||
/* Errors related to VM Program Invocation handling */
|
||||
|
||||
#define PI_NAME 0x6770
|
||||
#define PI_STATE 0x6771
|
||||
#define PI_NOT_REUSABLE 0x6772
|
||||
#define PI_NOT_DELETABLE 0x6773
|
||||
#define ME_PI_PROTECTION 0x6774
|
||||
#define ME_PI_INVALID_ID 0x6775
|
||||
|
||||
/************************************************************************/
|
||||
/* Errors related to VM Journal handling */
|
||||
|
||||
#define MVE_JOURNAL_NAME 0x6776
|
||||
#define MVE_INVALID_DOMAIN_OBJ 0x6777
|
||||
|
||||
/************************************************************************/
|
||||
/* ACSE ERROR CODES */
|
||||
/* The codes below are used in the info.ACSE.err_code in the case where */
|
||||
/* the event is an ACSE_ERROR. The user defined function */
|
||||
/* 'u_llp_error_ind' is called with these codes when this occurs. */
|
||||
/* Values begin from E_LLP_ACSE(found in glberror.h). */
|
||||
/************************************************************************/
|
||||
|
||||
#define ACSE_RECEIVE_ERR 0x6901L
|
||||
#define ACSE_LISTEN_ERR 0x6902L
|
||||
#define ACSE_DISCONNECT_RCV_ERR 0x6903L
|
||||
#define ACSE_STOP_LISTEN_ERR 0x6904L
|
||||
#define ACSE_ASS_REQ_ERR 0x6905L
|
||||
#define ACSE_ASS_RESP_ERR 0x6906L
|
||||
#define ACSE_REL_RESP_ERR 0x6907L
|
||||
#define ACSE_REL_REQ_ERR 0x6908L
|
||||
#define ACSE_SEND_REQ_ERR 0x6909L
|
||||
#define ACSE_SET_DEBUG_ERR 0x690AL
|
||||
#define ACSE_ABORT_ERR 0x690BL
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* MMS Exception Codes */
|
||||
/* These codes are passed to the user when the user exception function */
|
||||
/* (u_mmsexcept_ind) is called. */
|
||||
/* Values begin from E_MMS_EXCPT(found in glberror.h). */
|
||||
/************************************************************************/
|
||||
|
||||
#define MX_REJECT 0x6801
|
||||
#define MX_BOARD_ERR 0x6802
|
||||
#define MX_LLP_EVENT_ERROR 0x6803
|
||||
#define MX_MEMORY_ALLOC 0x6804
|
||||
#define MX_RUNTIME_TDEF 0x6805
|
||||
#define MX_LLP_QUE_OVERFLOW 0x6806
|
||||
#define MX_MMSIND_QUE 0x6807
|
||||
#define MX_MMSCONF_QUE 0x6808
|
||||
#define MX_INTERNAL_ERROR 0x6809
|
||||
#define MX_LLP_ADD_INFO_ALLOC 0x680A
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PERR_INCLUDED */
|
||||
|
||||
|
||||
|
||||
956
include/mmslite/mms_pevn.h
Normal file
956
include/mmslite/mms_pevn.h
Normal file
@@ -0,0 +1,956 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pevn.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS event management services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/12/02 JRB 03 Add ASN1_ENC_CTXT arg to mpl_evnot */
|
||||
/* 07/15/97 MDE 02 Added cur_state defines */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PEVN_INCLUDED
|
||||
#define MMS_PEVN_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_pvar.h" /* needed for variable specification defs */
|
||||
#include "mms_err.h" /* needed for service error definitions */
|
||||
#include "mms_mp.h"
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* Event cur_state defines */
|
||||
|
||||
#define EC_STATE_DISABLED 0
|
||||
#define EC_STATE_IDLE 1
|
||||
#define EC_STATE_ACTIVE 2
|
||||
|
||||
#define EC_STATE_ACTIVE_NOACK_A 3
|
||||
#define EC_STATE_IDLE_NOACK_I 4
|
||||
#define EC_STATE_IDLE_NOACK_A 5
|
||||
#define EC_STATE_IDLE_ACKED 6
|
||||
#define EC_STATE_ACTIVE_ACKED 7
|
||||
|
||||
/************************************************************************/
|
||||
/* EVENT MANAGEMENT FUNCTIONS */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass EVENT MANAGEMENT operation */
|
||||
/* information to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
struct event_enrollment
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
ST_CHAR evcon_name_tag; /* 0 : event condition name */
|
||||
/* 1 : undefined */
|
||||
OBJECT_NAME evcon_name; /* event condition name - for */
|
||||
/* evcon_name_tag = 0 only */
|
||||
ST_BOOLEAN evact_name_pres; /* event action name present */
|
||||
ST_CHAR evact_name_tag; /* 0 : event action name */
|
||||
/* 1 : undefined */
|
||||
OBJECT_NAME evact_name; /* event action name - for */
|
||||
/* evact_name_tag = 0 only */
|
||||
ST_BOOLEAN client_app_pres; /* client application present */
|
||||
ST_INT client_app_len; /* client application length */
|
||||
ST_UCHAR *client_app; /* client application reference */
|
||||
ST_BOOLEAN mms_deletable; /* mms deletable (def = false) */
|
||||
ST_INT16 ee_class; /* event enrollment class: */
|
||||
/* 0 - modifier */
|
||||
/* 1 - notification */
|
||||
ST_INT16 duration; /* duration: */
|
||||
/* 0 - current (default) */
|
||||
/* 1 - permanent */
|
||||
ST_BOOLEAN invoke_id_pres; /* invoke id present */
|
||||
ST_UINT32 invoke_id; /* invoke id */
|
||||
ST_BOOLEAN rem_acc_delay_pres; /* rem acceptable delay present */
|
||||
ST_UINT32 rem_acc_delay; /* remaining acceptable delay */
|
||||
ST_BOOLEAN addl_detail_pres; /* additional detail present */
|
||||
ST_INT addl_detail_len; /* length of additional detail */
|
||||
ST_UCHAR *addl_detail; /* pointer to additional detail */
|
||||
ST_BOOLEAN ackec_name_pres; /* ack event cond name present */
|
||||
ST_CHAR ackec_name_tag; /* 0 : ack event condition name */
|
||||
/* 1 : undefined */
|
||||
OBJECT_NAME ackec_name; /* ack event cond name - for */
|
||||
/* ackec_name_tag = 0 only */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct event_enrollment EVENT_ENROLLMENT;
|
||||
|
||||
struct alarm_summary
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_UCHAR severity; /* severity */
|
||||
ST_INT16 cur_state; /* current state */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
ST_INT16 unack_state; /* unacknowledged state */
|
||||
/* 0 : none */
|
||||
/* 1 : active */
|
||||
/* 2 : idle */
|
||||
/* 3 : both */
|
||||
ST_BOOLEAN addl_detail_pres; /* additional detail present */
|
||||
ST_INT addl_detail_len; /* length of additional detail */
|
||||
ST_UCHAR *addl_detail; /* pointer to additional detail */
|
||||
ST_BOOLEAN tta_time_pres; /* transition to active time */
|
||||
/* present */
|
||||
EVENT_TIME tta_time; /* transition to active time */
|
||||
ST_BOOLEAN tti_time_pres; /* transition to idle time */
|
||||
/* present */
|
||||
EVENT_TIME tti_time; /* transition to idle time */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct alarm_summary ALARM_SUMMARY;
|
||||
|
||||
struct alarm_enroll_summary
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
ST_BOOLEAN client_app_pres; /* client application present */
|
||||
ST_INT client_app_len; /* client application length */
|
||||
ST_UCHAR *client_app; /* client application reference */
|
||||
ST_UCHAR severity; /* severity */
|
||||
ST_INT16 cur_state; /* current state */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
ST_BOOLEAN addl_detail_pres; /* additional detail present */
|
||||
ST_INT addl_detail_len; /* length of additional detail */
|
||||
ST_UCHAR *addl_detail; /* pointer to additional detail */
|
||||
ST_BOOLEAN not_lost; /* notification lost */
|
||||
/* (default = false) */
|
||||
ST_INT16 alarm_ack_rule; /* alarm acknowledgment rule */
|
||||
/* 0 : none */
|
||||
/* 1 : simple */
|
||||
/* 2 : ack active */
|
||||
/* 3 : ack all */
|
||||
ST_BOOLEAN ee_state_pres; /* enrollment state present */
|
||||
ST_INT16 ee_state; /* enrollment state */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
/* 3 : active, no ack a */
|
||||
/* 4 : idle, no ack i */
|
||||
/* 5 : idle, no ack a */
|
||||
/* 6 : idle, acked */
|
||||
/* 7 : active, acked */
|
||||
ST_BOOLEAN tta_time_pres; /* transition to active time */
|
||||
/* present */
|
||||
EVENT_TIME tta_time; /* transition to active time */
|
||||
ST_BOOLEAN aack_time_pres; /* active acknowledgment time */
|
||||
/* present */
|
||||
EVENT_TIME aack_time; /* active acknowledgment time */
|
||||
ST_BOOLEAN tti_time_pres; /* transition to idle time */
|
||||
/* present */
|
||||
EVENT_TIME tti_time; /* transition to idle time */
|
||||
ST_BOOLEAN iack_time_pres; /* idle acknowledgment time */
|
||||
/* present */
|
||||
EVENT_TIME iack_time; /* idle acknowledgment time */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct alarm_enroll_summary ALARM_ENROLL_SUMMARY;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* DEFINE EVENT CONDITION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defec_req_info
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_INT16 eclass; /* event condition class: */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal (default) */
|
||||
/* 127 - lowest */
|
||||
ST_UCHAR severity; /* severity (default = 64) */
|
||||
ST_BOOLEAN as_reports_pres; /* alarm summaray rpts present */
|
||||
ST_BOOLEAN as_reports; /* alarm summaray reports */
|
||||
ST_BOOLEAN mon_var_pres; /* monitored variable present */
|
||||
VARIABLE_SPEC var_ref; /* variable reference */
|
||||
ST_BOOLEAN eval_int_pres; /* evaluation interval present */
|
||||
ST_UINT32 eval_interval; /* evaluation interval */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct defec_req_info DEFEC_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defec (ST_INT chan, DEFEC_REQ_INFO *info);
|
||||
ST_RET mp_defec_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_defec (DEFEC_REQ_INFO *info);
|
||||
ST_RET mpl_defec_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE EVENT CONDITION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct delec_req_info
|
||||
{
|
||||
ST_INT16 req_tag; /* request tag */
|
||||
/* 0 : specific */
|
||||
/* 1 : aa specific */
|
||||
/* 2 : domain */
|
||||
/* 3 : vmd */
|
||||
ST_CHAR dname [MAX_IDENT_LEN+1]; /* domain name, if req_tag = 2 */
|
||||
ST_INT num_of_names; /* number of names, if tag = 0 */
|
||||
/* list of object names */
|
||||
/* OBJECT_NAME name_list [num_of_names]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct delec_req_info DELEC_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct delec_resp_info
|
||||
{
|
||||
ST_UINT32 cand_not_deleted; /* canditates not deleted */
|
||||
};
|
||||
typedef struct delec_resp_info DELEC_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delec (ST_INT chan, DELEC_REQ_INFO *info);
|
||||
ST_RET mp_delec_resp (MMSREQ_IND *ind, DELEC_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_delec (DELEC_REQ_INFO *info);
|
||||
ST_RET mpl_delec_resp (ST_UINT32 invoke, DELEC_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET EVENT CONDITION ATTRIBUTES */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct geteca_req_info
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
};
|
||||
typedef struct geteca_req_info GETECA_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct geteca_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* mms deletable */
|
||||
ST_INT16 eclass; /* event condition class: */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal (default) */
|
||||
/* 127 - lowest */
|
||||
ST_UCHAR severity; /* severity */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal (default) */
|
||||
/* 127 - lowest */
|
||||
ST_BOOLEAN as_reports; /* alarm summaray reports */
|
||||
ST_BOOLEAN mon_var_pres; /* monitored variable present */
|
||||
ST_INT16 mon_var_tag; /* monitored variable tag */
|
||||
/* 0 : variable reference */
|
||||
/* 1 : undefined (NULL) */
|
||||
VARIABLE_SPEC var_ref; /* variable reference */
|
||||
ST_BOOLEAN eval_int_pres; /* evaluation interval present */
|
||||
ST_UINT32 eval_interval; /* evaluation interval */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct geteca_resp_info GETECA_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_geteca (ST_INT chan, GETECA_REQ_INFO *info);
|
||||
ST_RET mp_geteca_resp (MMSREQ_IND *ind, GETECA_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_geteca (GETECA_REQ_INFO *info);
|
||||
ST_RET mpl_geteca_resp (ST_UINT32 invoke, GETECA_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT EVENT CONDITION STATUS */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct repecs_req_info
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
};
|
||||
typedef struct repecs_req_info REPECS_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct repecs_resp_info
|
||||
{
|
||||
ST_INT16 cur_state; /* event condition state: */
|
||||
/* 0 - disabled */
|
||||
/* 1 - idle */
|
||||
/* 2 - active */
|
||||
ST_UINT32 num_of_ev_enroll; /* number of event enrollments */
|
||||
ST_BOOLEAN enabled_pres; /* enabled indicator present */
|
||||
ST_BOOLEAN enabled; /* enabled indicator */
|
||||
ST_BOOLEAN tta_time_pres; /* transition to active present */
|
||||
EVENT_TIME tta_time; /* transition to active time */
|
||||
ST_BOOLEAN tti_time_pres; /* transition to idle present */
|
||||
EVENT_TIME tti_time; /* transition to idle time */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct repecs_resp_info REPECS_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_repecs (ST_INT chan, REPECS_REQ_INFO *info);
|
||||
ST_RET mp_repecs_resp (MMSREQ_IND *ind, REPECS_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_repecs (REPECS_REQ_INFO *info);
|
||||
ST_RET mpl_repecs_resp (ST_UINT32 invoke, REPECS_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* ALTER EVENT CONDITION MONITORING */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct altecm_req_info
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_BOOLEAN enabled_pres; /* enabled present */
|
||||
ST_BOOLEAN enabled; /* enabled */
|
||||
ST_BOOLEAN priority_pres; /* priority present */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal */
|
||||
/* 127 - lowest */
|
||||
ST_BOOLEAN as_reports_pres; /* alarm summaray rpts present */
|
||||
ST_BOOLEAN as_reports; /* alarm summaray reports */
|
||||
ST_BOOLEAN eval_int_pres; /* evaluation interval present */
|
||||
ST_UINT32 eval_int; /* evaluation interval */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct altecm_req_info ALTECM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_altecm (ST_INT chan, ALTECM_REQ_INFO *info);
|
||||
ST_RET mp_altecm_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_altecm (ALTECM_REQ_INFO *info);
|
||||
ST_RET mpl_altecm_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* TRIGGER EVENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct trige_req_info
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_BOOLEAN priority_pres; /* priority present */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal */
|
||||
/* 127 - lowest */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct trige_req_info TRIGE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_trige (ST_INT chan, TRIGE_REQ_INFO *info);
|
||||
ST_RET mp_trige_resp (MMSREQ_IND *info);
|
||||
#else
|
||||
ST_RET mpl_trige (TRIGE_REQ_INFO *info);
|
||||
ST_RET mpl_trige_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE EVENT ACTION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defea_req_info
|
||||
{
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
ST_INT conf_serv_req_len; /* confirmed service req length */
|
||||
ST_UCHAR *conf_serv_req; /* confirmed service request */
|
||||
ST_BOOLEAN modlist_pres; /* list of modifiers present */
|
||||
ST_INT num_of_modifiers; /* number of modifiers */
|
||||
ST_BOOLEAN cs_rdetail_pres; /* CS request detail present */
|
||||
ST_INT cs_rdetail_len; /* CS request detail length */
|
||||
ST_UCHAR *cs_rdetail; /* CS request detail pointer */
|
||||
/* list of modifiers */
|
||||
/* MODIFIER mod_list [num_of_modifiers]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct defea_req_info DEFEA_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defea (ST_INT chan, DEFEA_REQ_INFO *info);
|
||||
ST_RET mp_defea_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_defea (DEFEA_REQ_INFO *info);
|
||||
ST_RET mpl_defea_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE EVENT ACTION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct delea_req_info
|
||||
{
|
||||
ST_INT16 req_tag; /* request tag */
|
||||
/* 0 : specific */
|
||||
/* 1 : aa specific */
|
||||
/* 2 : domain */
|
||||
/* 3 : vmd */
|
||||
ST_CHAR dname [MAX_IDENT_LEN+1]; /* domain name, if req_tag = 2 */
|
||||
ST_INT num_of_names; /* number of names, if tag = 0 */
|
||||
/* list of object names */
|
||||
/* OBJECT_NAME name_list [num_of_names]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct delea_req_info DELEA_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct delea_resp_info
|
||||
{
|
||||
ST_UINT32 cand_not_deleted; /* canditates not deleted */
|
||||
};
|
||||
typedef struct delea_resp_info DELEA_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delea (ST_INT chan, DELEA_REQ_INFO *info);
|
||||
ST_RET mp_delea_resp (MMSREQ_IND *ind, DELEA_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_delea (DELEA_REQ_INFO *info);
|
||||
ST_RET mpl_delea_resp (ST_UINT32 invoke, DELEA_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET EVENT ACTION ATTRIBUTES */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct geteaa_req_info
|
||||
{
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
};
|
||||
typedef struct geteaa_req_info GETEAA_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct geteaa_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* mms deletable (def = false) */
|
||||
ST_INT conf_serv_req_len; /* confirmed service req length */
|
||||
ST_UCHAR *conf_serv_req; /* confirmed service request */
|
||||
ST_BOOLEAN cs_rdetail_pres; /* CS request detail present */
|
||||
ST_INT cs_rdetail_len; /* CS request detail length */
|
||||
ST_UCHAR *cs_rdetail; /* CS request detail pointer */
|
||||
ST_INT num_of_modifiers; /* number of modifiers */
|
||||
/* list of modifiers */
|
||||
/* MODIFIER mod_list [num_of_modifiers]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct geteaa_resp_info GETEAA_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_geteaa (ST_INT chan, GETEAA_REQ_INFO *info);
|
||||
ST_RET mp_geteaa_resp (MMSREQ_IND *ind, GETEAA_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_geteaa (GETEAA_REQ_INFO *info);
|
||||
ST_RET mpl_geteaa_resp (ST_UINT32 invoke, GETEAA_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT EVENT ACTION STATUS */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct repeas_req_info
|
||||
{
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
};
|
||||
typedef struct repeas_req_info REPEAS_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct repeas_resp_info
|
||||
{
|
||||
ST_UINT32 num_of_ev_enroll; /* number of event enrollments */
|
||||
};
|
||||
typedef struct repeas_resp_info REPEAS_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_repeas (ST_INT chan, REPEAS_REQ_INFO *info);
|
||||
ST_RET mp_repeas_resp (MMSREQ_IND *ind, REPEAS_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_repeas (REPEAS_REQ_INFO *info);
|
||||
ST_RET mpl_repeas_resp (ST_UINT32 invoke, REPEAS_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE EVENT ENROLLMENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defee_req_info
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_UCHAR ec_transitions; /* causing transitions: */
|
||||
/* bitstring */
|
||||
/* 0 : idle to disabled */
|
||||
/* 1 : active to disabled */
|
||||
/* 2 : disabled to idle */
|
||||
/* 3 : active to idle */
|
||||
/* 4 : disabled to active */
|
||||
/* 5 : idle to active */
|
||||
/* 6 : any to deleted */
|
||||
ST_INT16 alarm_ack_rule; /* alarm acknowledgment rule */
|
||||
/* 0 : none */
|
||||
/* 1 : simple */
|
||||
/* 2 : ack active */
|
||||
/* 3 : ack all */
|
||||
ST_BOOLEAN evact_name_pres; /* event action name present */
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
ST_BOOLEAN client_app_pres; /* client application present */
|
||||
ST_INT client_app_len; /* client application length */
|
||||
ST_UCHAR *client_app; /* client application reference */
|
||||
ST_BOOLEAN ackec_name_pres; /* ack event cond name present */
|
||||
OBJECT_NAME ackec_name; /* acknowledge event cond name */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct defee_req_info DEFEE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defee (ST_INT chan, DEFEE_REQ_INFO *info);
|
||||
ST_RET mp_defee_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_defee (DEFEE_REQ_INFO *info);
|
||||
ST_RET mpl_defee_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE EVENT ENROLLMENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct delee_req_info
|
||||
{
|
||||
ST_INT16 req_tag; /* request tag */
|
||||
/* 0 : specific */
|
||||
/* 1 : event condition */
|
||||
/* 2 : event action */
|
||||
union
|
||||
{
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
ST_INT num_of_names; /* number of object names */
|
||||
} sod;
|
||||
/* list of object names */
|
||||
/* OBJECT_NAME name_list [num_of_names]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct delee_req_info DELEE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct delee_resp_info
|
||||
{
|
||||
ST_UINT32 cand_not_deleted; /* canditates not deleted */
|
||||
};
|
||||
typedef struct delee_resp_info DELEE_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delee (ST_INT chan, DELEE_REQ_INFO *info);
|
||||
ST_RET mp_delee_resp (MMSREQ_IND *ind, DELEE_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_delee (DELEE_REQ_INFO *info);
|
||||
ST_RET mpl_delee_resp (ST_UINT32 invoke, DELEE_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET EVENT ENROLLMENT ATTRIBUTES */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct geteea_req_info
|
||||
{
|
||||
ST_INT16 scope_of_req; /* scope of request */
|
||||
/* 0 : specific */
|
||||
/* 1 : client (default) */
|
||||
/* 2 : event condition */
|
||||
/* 3 : event action */
|
||||
ST_BOOLEAN client_app_pres; /* client application present */
|
||||
ST_INT client_app_len; /* client application length */
|
||||
ST_UCHAR *client_app; /* client application reference */
|
||||
ST_BOOLEAN evcon_name_pres; /* event condition name present */
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_BOOLEAN evact_name_pres; /* event action name present */
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
ST_BOOLEAN ca_name_pres; /* continue after name present */
|
||||
OBJECT_NAME ca_name; /* continue after name */
|
||||
ST_BOOLEAN eenames_pres; /* event enroll names present */
|
||||
ST_INT num_of_eenames; /* number of event enroll names */
|
||||
/* list of event enroll names */
|
||||
/* OBJECT_NAME name_list [num_of_eenames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct geteea_req_info GETEEA_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct geteea_resp_info
|
||||
{
|
||||
ST_BOOLEAN more_follows; /* default = false */
|
||||
ST_INT num_of_evenroll; /* number of event enrollments */
|
||||
/* list of event enrollments */
|
||||
/* EVENT_ENROLLMENT evenroll_list [num_of_evenroll]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct geteea_resp_info GETEEA_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_geteea (ST_INT chan, GETEEA_REQ_INFO *info);
|
||||
ST_RET mp_geteea_resp (MMSREQ_IND *ind, GETEEA_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_geteea (GETEEA_REQ_INFO *info);
|
||||
ST_RET mpl_geteea_resp (ST_UINT32 invoke, GETEEA_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT EVENT ENROLLMENT STATUS */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct repees_req_info
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
};
|
||||
typedef struct repees_req_info REPEES_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct repees_resp_info
|
||||
{
|
||||
ST_UCHAR ec_transitions; /* event condition transitions: */
|
||||
/* bitstring */
|
||||
/* 0 : idle to disabled */
|
||||
/* 1 : active to disabled */
|
||||
/* 2 : disabled to idle */
|
||||
/* 3 : active to idle */
|
||||
/* 4 : disabled to active */
|
||||
/* 5 : idle to active */
|
||||
/* 6 : any to deleted */
|
||||
ST_UCHAR not_lost; /* notification lost */
|
||||
/* (default = false) */
|
||||
ST_INT16 duration; /* duration: */
|
||||
/* 0 - current (default) */
|
||||
/* 1 - permanent */
|
||||
ST_BOOLEAN alarm_ack_rule_pres; /* alarm ack rule present */
|
||||
ST_INT16 alarm_ack_rule; /* alarm acknowledgment rule */
|
||||
/* 0 : none */
|
||||
/* 1 : simple */
|
||||
/* 2 : ack active */
|
||||
/* 3 : ack all */
|
||||
ST_INT16 cur_state; /* current state */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
/* 3 : active, no ack a */
|
||||
/* 4 : idle, no ack i */
|
||||
/* 5 : idle, no ack a */
|
||||
/* 6 : idle, acked */
|
||||
/* 7 : active, acked */
|
||||
};
|
||||
typedef struct repees_resp_info REPEES_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_repees (ST_INT chan, REPEES_REQ_INFO *info);
|
||||
ST_RET mp_repees_resp (MMSREQ_IND *ind, REPEES_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_repees (REPEES_REQ_INFO *info);
|
||||
ST_RET mpl_repees_resp (ST_UINT32 invoke, REPEES_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* ALTER EVENT ENROLLMENT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct altee_req_info
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
ST_BOOLEAN ec_transitions_pres; /* ec transitions present */
|
||||
ST_UCHAR ec_transitions; /* event condition transitions: */
|
||||
/* bitstring */
|
||||
/* 0 : idle to disabled */
|
||||
/* 1 : active to disabled */
|
||||
/* 2 : disabled to idle */
|
||||
/* 3 : active to idle */
|
||||
/* 4 : disabled to active */
|
||||
/* 5 : idle to active */
|
||||
/* 6 : any to deleted */
|
||||
ST_BOOLEAN alarm_ack_rule_pres; /* alarm ack rule present */
|
||||
ST_INT16 alarm_ack_rule; /* alarm acknowledgment rule */
|
||||
/* 0 : none */
|
||||
/* 1 : simple */
|
||||
/* 2 : ack active */
|
||||
/* 3 : ack all */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct altee_req_info ALTEE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct altee_resp_info
|
||||
{
|
||||
ST_INT16 cur_state_tag; /* current state tag */
|
||||
/* 0 : state */
|
||||
/* 1 : undefined */
|
||||
ST_INT16 state; /* state, if cur_state_tag = 0 */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
/* 3 : active, no ack a */
|
||||
/* 4 : idle, no ack i */
|
||||
/* 5 : idle, no ack a */
|
||||
/* 6 : idle, acked */
|
||||
/* 7 : active, acked */
|
||||
EVENT_TIME trans_time; /* transition time */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct altee_resp_info ALTEE_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_altee (ST_INT chan, ALTEE_REQ_INFO *info);
|
||||
ST_RET mp_altee_resp (MMSREQ_IND *ind, ALTEE_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_altee (ALTEE_REQ_INFO *info);
|
||||
ST_RET mpl_altee_resp (ST_UINT32 invoke, ALTEE_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* EVENT NOTIFICATION, Conformance: MCW1 (EVN3) */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct evnot_req_info
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_UCHAR severity; /* severity */
|
||||
ST_BOOLEAN cur_state_pres; /* current state enable */
|
||||
ST_INT16 cur_state; /* current state */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
EVENT_TIME trans_time; /* transition time */
|
||||
ST_UCHAR not_lost; /* notification lost */
|
||||
/* (default = false) */
|
||||
ST_BOOLEAN alarm_ack_rule_pres; /* alarm acknowledge rule pres */
|
||||
ST_INT16 alarm_ack_rule; /* alarm acknowledgment rule */
|
||||
/* 0 : none */
|
||||
/* 1 : simple */
|
||||
/* 2 : ack-active */
|
||||
/* 3 : ack-all */
|
||||
ST_BOOLEAN evact_result_pres; /* action result present */
|
||||
OBJECT_NAME evact_name; /* event action name */
|
||||
ST_INT16 evact_result_tag; /* event action result tag */
|
||||
/* 0 : success */
|
||||
/* 1 : failure */
|
||||
ST_INT conf_serv_resp_len; /* success: conf serv resp len */
|
||||
ST_UCHAR *conf_serv_resp; /* success: conf serv resp ptr */
|
||||
ST_BOOLEAN cs_rdetail_pres; /* success: CS resp detail pres */
|
||||
ST_INT cs_rdetail_len; /* success: CS resp detail len */
|
||||
ST_UCHAR *cs_rdetail; /* success: CS resp detail ptr */
|
||||
|
||||
ST_BOOLEAN mod_pos_pres; /* failure: mod pos present */
|
||||
ST_UINT32 mod_pos; /* failure: modifier position */
|
||||
ERR_INFO *serv_err; /* failure: service error ptr */
|
||||
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct evnot_req_info EVNOT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NONE (unconfirmed) */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
ST_RET mp_evnot (ST_INT chan, EVNOT_REQ_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_evnot (ASN1_ENC_CTXT *aCtx, EVNOT_REQ_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* ACKNOWLEDGE EVENT NOTIFICATION, Conformance: MCW1 (EVN3) */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct ackevnot_req_info
|
||||
{
|
||||
OBJECT_NAME evenroll_name; /* event enrollment name */
|
||||
ST_INT16 ack_state; /* acknowledge state */
|
||||
EVENT_TIME evtime; /* event time */
|
||||
ST_BOOLEAN ackec_name_pres; /* ack event cond name present */
|
||||
OBJECT_NAME ackec_name; /* acknowledge event cond name */
|
||||
};
|
||||
typedef struct ackevnot_req_info ACKEVNOT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_ackevnot (ST_INT chan, ACKEVNOT_REQ_INFO *info);
|
||||
ST_RET mp_ackevnot_resp (MMSREQ_IND *info);
|
||||
#else
|
||||
ST_RET mpl_ackevnot (ACKEVNOT_REQ_INFO *info);
|
||||
ST_RET mpl_ackevnot_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET ALARM SUMMARY, Conformance: EVN5 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getas_req_info
|
||||
{
|
||||
ST_BOOLEAN enroll_only; /* enrollments only */
|
||||
/* (default = true) */
|
||||
ST_BOOLEAN act_alarms_only; /* active alarms only */
|
||||
/* (default = true) */
|
||||
ST_INT16 ack_filter; /* acknowledgement filter */
|
||||
/* 0 : not acked (default) */
|
||||
/* 1 : acked */
|
||||
/* 2 : all */
|
||||
/* severity filter */
|
||||
ST_UCHAR most_sev_filter; /* most severe (default=0) */
|
||||
ST_UCHAR least_sev_filter; /* least severe (default=127) */
|
||||
ST_BOOLEAN ca_pres; /* continue after name present */
|
||||
OBJECT_NAME ca_name; /* continue after name */
|
||||
};
|
||||
typedef struct getas_req_info GETAS_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getas_resp_info
|
||||
{
|
||||
ST_BOOLEAN more_follows; /* default = false */
|
||||
ST_INT num_of_alarm_sum; /* number of alarm summary */
|
||||
/* list of alarm summary data */
|
||||
/* ALARM_SUMMARY alarm_sum [num_of_alarm_sum]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct getas_resp_info GETAS_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getas (ST_INT chan, GETAS_REQ_INFO *info);
|
||||
ST_RET mp_getas_resp (MMSREQ_IND *ind, GETAS_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getas (GETAS_REQ_INFO *info);
|
||||
ST_RET mpl_getas_resp (ST_UINT32 invoke, GETAS_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET ALARM ENROLLMENT SUMMARY */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getaes_req_info
|
||||
{
|
||||
ST_BOOLEAN enroll_only; /* enrollments only */
|
||||
/* (default = true) */
|
||||
ST_BOOLEAN act_alarms_only; /* active alarms only */
|
||||
/* (default = true) */
|
||||
ST_INT16 ack_filter; /* acknowledgement filter */
|
||||
/* 0 : not acked (default) */
|
||||
/* 1 : acked */
|
||||
/* 2 : all */
|
||||
/* severity filter */
|
||||
ST_UCHAR most_sev_filter; /* most severe (default=0) */
|
||||
ST_UCHAR least_sev_filter; /* least severe (default=127) */
|
||||
ST_BOOLEAN ca_name_pres; /* continue after name present */
|
||||
OBJECT_NAME ca_name; /* continue after name */
|
||||
};
|
||||
typedef struct getaes_req_info GETAES_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getaes_resp_info
|
||||
{
|
||||
ST_BOOLEAN more_follows; /* default = false */
|
||||
ST_INT num_of_alarm_esum; /* # of alarm enroll summary */
|
||||
/* list of alarm enroll summary */
|
||||
/* ALARM_ENROLL_SUMMARY alarm_enroll_sum [num_of_alarm_esum]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct getaes_resp_info GETAES_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getaes (ST_INT chan, GETAES_REQ_INFO *info);
|
||||
ST_RET mp_getaes_resp (MMSREQ_IND *ind, GETAES_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getaes (GETAES_REQ_INFO *info);
|
||||
ST_RET mpl_getaes_resp (ST_UINT32 invoke, GETAES_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PEVN_INCLUDED */
|
||||
297
include/mmslite/mms_pfil.h
Normal file
297
include/mmslite/mms_pfil.h
Normal file
@@ -0,0 +1,297 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pfil.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS file services at the primitive */
|
||||
/* level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PFIL_INCLUDED
|
||||
#define MMS_PFIL_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* FILE MANAGEMENT SERVICES */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass FILE MANAGEMENT information */
|
||||
/* to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
#define MFSTAT_NO_ACT 0
|
||||
#define MFSTAT_PEND_OPEN 1
|
||||
#define MFSTAT_OPENED 2
|
||||
#define MFSTAT_PEND_CLOSE 3
|
||||
|
||||
/************************************************************************/
|
||||
/* OBTAIN FILE, Conformance: FIL1 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct obtfile_req_info
|
||||
{
|
||||
ST_BOOLEAN ar_title_pres; /* application title present */
|
||||
ST_INT ar_len; /* length of app proc title */
|
||||
ST_UCHAR *ar_title; /* application process title */
|
||||
ST_INT num_of_src_fname; /* num of source fname elements */
|
||||
ST_INT num_of_dest_fname; /* num of dest. fname elements */
|
||||
/* list of source file names */
|
||||
/* FILE_NAME src_fname_list[ num_of_src_fname ]; */
|
||||
/* list of dest. file names */
|
||||
/* FILE_NAME dest_fname_list[ num_of_dest_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct obtfile_req_info OBTFILE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_obtfile (ST_INT chan, OBTFILE_REQ_INFO *info);
|
||||
ST_RET mp_obtfile_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_obtfile (OBTFILE_REQ_INFO *info);
|
||||
ST_RET mpl_obtfile_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* FILE OPEN, Conformance: FIL2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct fopen_req_info
|
||||
{
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
ST_UINT32 init_pos; /* initial position */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct fopen_req_info FOPEN_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct file_attr
|
||||
{
|
||||
ST_UINT32 fsize; /* file size (# bytes) */
|
||||
ST_BOOLEAN mtimpres; /* last modified time present */
|
||||
time_t mtime; /* last modified time */
|
||||
};
|
||||
typedef struct file_attr FILE_ATTR;
|
||||
|
||||
struct fopen_resp_info
|
||||
{
|
||||
ST_INT32 frsmid; /* file read state machine ID */
|
||||
FILE_ATTR ent; /* file attributes */
|
||||
};
|
||||
typedef struct fopen_resp_info FOPEN_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_fopen (ST_INT chan, FOPEN_REQ_INFO *info);
|
||||
ST_RET mp_fopen_resp (MMSREQ_IND *ind, FOPEN_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_fopen (FOPEN_REQ_INFO *info);
|
||||
ST_RET mpl_fopen_resp (ST_UINT32 invoke, FOPEN_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* FILE READ, Conformance: FIL2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct fread_req_info
|
||||
{
|
||||
ST_INT32 frsmid; /* file read state maching ID */
|
||||
};
|
||||
typedef struct fread_req_info FREAD_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct fread_resp_info
|
||||
{
|
||||
ST_INT fd_len; /* length of file data octets */
|
||||
ST_UCHAR *filedata; /* pointer to file data octets */
|
||||
ST_BOOLEAN more_follows; /* additional file content */
|
||||
/* default: SD_TRUE */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct fread_resp_info FREAD_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_fread (ST_INT chan,FREAD_REQ_INFO *info);
|
||||
ST_RET mp_fread_resp (MMSREQ_IND *ind, FREAD_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_fread (FREAD_REQ_INFO *info);
|
||||
ST_RET mpl_fread_resp (ST_UINT32 invoke, FREAD_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* FILE CLOSE, Conformance: FIL2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct fclose_req_info
|
||||
{
|
||||
ST_INT32 frsmid; /* file read state maching ID */
|
||||
};
|
||||
typedef struct fclose_req_info FCLOSE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_fclose (ST_INT chan, FCLOSE_REQ_INFO *info);
|
||||
ST_RET mp_fclose_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_fclose (FCLOSE_REQ_INFO *info);
|
||||
ST_RET mpl_fclose_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* FILE RENAME, Conformance: FIL3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct frename_req_info
|
||||
{
|
||||
ST_INT num_of_cur_fname; /* num of current fname elements*/
|
||||
ST_INT num_of_new_fname; /* num of new fname elements */
|
||||
/* list of current file names */
|
||||
/* FILE_NAME cur_fname_list[ num_of_cur_fname ]; */
|
||||
/* list of new file names */
|
||||
/* FILE_NAME new_fname_list[ num_of_new_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct frename_req_info FRENAME_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_frename (ST_INT chan, FRENAME_REQ_INFO *info);
|
||||
ST_RET mp_frename_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_frename (FRENAME_REQ_INFO *info);
|
||||
ST_RET mpl_frename_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* FILE DELETE, Conformance: FIL3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct fdelete_req_info
|
||||
{
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct fdelete_req_info FDELETE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_fdelete (ST_INT chan, FDELETE_REQ_INFO *info);
|
||||
ST_RET mp_fdelete_resp (MMSREQ_IND *info);
|
||||
#else
|
||||
ST_RET mpl_fdelete (FDELETE_REQ_INFO *info);
|
||||
ST_RET mpl_fdelete_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* FILE DIRECTORY, Conformance: FIL3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct fdir_req_info
|
||||
{
|
||||
ST_BOOLEAN filespec_pres; /* file specification present */
|
||||
ST_BOOLEAN cont_after_pres; /* continue after name present */
|
||||
ST_INT num_of_fs_fname; /* num of fname elements */
|
||||
ST_INT num_of_ca_fname; /* num of cont after elements */
|
||||
/* list of current file names */
|
||||
/* FILE_NAME fs_fname_list[ num_of_fs_fname ]; */
|
||||
/* list of new file names */
|
||||
/* FILE_NAME ca_fname_list[ num_of_ca_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct fdir_req_info FDIR_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct fdir_dir_ent
|
||||
{
|
||||
ST_UINT32 fsize; /* file size (# bytes) */
|
||||
ST_BOOLEAN mtimpres; /* last modified time present */
|
||||
time_t mtime; /* last modified time */
|
||||
ST_INT num_of_fname; /* num of fname elements */
|
||||
/* list of file names */
|
||||
/* FILE_NAME fname_list[ num_of_fname ]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct fdir_dir_ent FDIR_DIR_ENT;
|
||||
|
||||
struct fdir_resp_info
|
||||
{
|
||||
ST_INT num_dir_ent; /* number of directory entries */
|
||||
ST_BOOLEAN more_follows; /* more dir entries follow */
|
||||
/* default: SD_FALSE */
|
||||
/* list of directory entries */
|
||||
/* FDIR_DIR_ENT dir_ent_list [num_dir_ent] */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct fdir_resp_info FDIR_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_fdir (ST_INT chan,FDIR_REQ_INFO *info);
|
||||
ST_RET mp_fdir_resp (MMSREQ_IND *ind, FDIR_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_fdir (FDIR_REQ_INFO *info);
|
||||
ST_RET mpl_fdir_resp (ST_UINT32 invoke, FDIR_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PFIL_INCLUDED */
|
||||
|
||||
|
||||
299
include/mmslite/mms_pjou.h
Normal file
299
include/mmslite/mms_pjou.h
Normal file
@@ -0,0 +1,299 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pjou.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS journal management services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 07/15/98 MDE 03 Added entry_form_tag defines */
|
||||
/* 08/15/97 MDE 02 BTOD handling changes */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PJOU_INCLUDED
|
||||
#define MMS_PJOU_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_pvar.h"
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* JOURNAL MANAGEMENT SERVICES */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass JOURNAL MANAGEMENT information */
|
||||
/* to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
/* entry_form_tag value defines */
|
||||
#define JE_FORM_DATA 2
|
||||
#define JE_FORM_ANNOTATION 3
|
||||
|
||||
struct var_info
|
||||
{
|
||||
ST_CHAR *var_tag; /* variable tag */
|
||||
VAR_ACC_DATA value_spec; /* value specification data */
|
||||
};
|
||||
typedef struct var_info VAR_INFO;
|
||||
|
||||
struct entry_content
|
||||
{
|
||||
MMS_BTOD occur_time; /* occurrence time */
|
||||
ST_BOOLEAN addl_detail_pres; /* additional detail present */
|
||||
ST_INT addl_detail_len; /* length of additional detail */
|
||||
ST_UCHAR *addl_detail; /* pointer to additional detail */
|
||||
ST_INT16 entry_form_tag; /* entry form tag */
|
||||
union
|
||||
{
|
||||
struct /* entry form is DATA */
|
||||
{
|
||||
ST_BOOLEAN event_pres; /* event present */
|
||||
OBJECT_NAME evcon_name; /* event condition name */
|
||||
ST_INT16 cur_state; /* current state */
|
||||
/* 0 : disabled */
|
||||
/* 1 : idle */
|
||||
/* 2 : active */
|
||||
ST_BOOLEAN list_of_var_pres; /* list of variables present */
|
||||
ST_INT num_of_var; /* number of variables */
|
||||
} data;
|
||||
ST_CHAR *annotation; /* pointer to annotation */
|
||||
}ef;
|
||||
/* for form == DATA, need a */
|
||||
/* list of variables */
|
||||
/* VAR_INFO list_of_var [num_of_var]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct entry_content ENTRY_CONTENT;
|
||||
|
||||
struct journal_entry
|
||||
{
|
||||
ST_INT entry_id_len; /* length of entry identifier */
|
||||
ST_UCHAR *entry_id; /* ptr to entry identifier */
|
||||
ST_INT orig_ae_len; /* originating app entity len */
|
||||
ST_UCHAR *orig_ae; /* originating app entity */
|
||||
ENTRY_CONTENT ent_content; /* entry content */
|
||||
};
|
||||
typedef struct journal_entry JOURNAL_ENTRY;
|
||||
|
||||
/************************************************************************/
|
||||
/* READ JOURNAL, Conformance: JOU2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct jread_req_info
|
||||
{
|
||||
OBJECT_NAME jou_name; /* journal name */
|
||||
ST_BOOLEAN range_start_pres; /* range start spec present */
|
||||
ST_INT16 start_tag; /* start tag */
|
||||
/* 0 - starting time */
|
||||
/* 1 - starting entry */
|
||||
MMS_BTOD start_time; /* range starting time */
|
||||
ST_INT start_entry_len; /* length of starting entry */
|
||||
ST_UCHAR *start_entry; /* pointer to starting entry */
|
||||
ST_BOOLEAN range_stop_pres; /* range stop spec present */
|
||||
ST_INT16 stop_tag; /* stop tag */
|
||||
/* 0 - ending time */
|
||||
/* 1 - number of entries */
|
||||
MMS_BTOD end_time; /* range ending time */
|
||||
ST_INT32 num_of_entries; /* number of entries */
|
||||
ST_BOOLEAN list_of_var_pres; /* list of variables present */
|
||||
ST_INT num_of_var; /* number of variables */
|
||||
ST_BOOLEAN sa_entry_pres; /* start after entry present */
|
||||
MMS_BTOD time_spec; /* time specification */
|
||||
ST_INT entry_spec_len; /* entry specification length */
|
||||
ST_UCHAR *entry_spec; /* entry specification */
|
||||
/* list of pointers to variables*/
|
||||
/* ST_CHAR *list_of_var [num_of_var]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct jread_req_info JREAD_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct jread_resp_info
|
||||
{
|
||||
ST_INT num_of_jou_entry; /* number of journal entries */
|
||||
ST_BOOLEAN more_follows; /* default = false */
|
||||
/* list of journal entries */
|
||||
/* JOURNAL_ENTRY list_of_jou_entry [num_of_jou_entry]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct jread_resp_info JREAD_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_jread (ST_INT chan, JREAD_REQ_INFO *info);
|
||||
ST_RET mp_jread_resp (MMSREQ_IND *ind, JREAD_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_jread (JREAD_REQ_INFO *info);
|
||||
ST_RET mpl_jread_resp (ST_UINT32 invoke, JREAD_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* WRITE JOURNAL, Conformance: JOU1 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct jwrite_req_info
|
||||
{
|
||||
OBJECT_NAME jou_name; /* journal name */
|
||||
ST_INT num_of_jou_entry; /* number of journal entries */
|
||||
/* list of journal entries */
|
||||
/* ENTRY_CONTENT list_of_jou_entry [num_of_jou_entry]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct jwrite_req_info JWRITE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_jwrite (ST_INT chan, JWRITE_REQ_INFO *info);
|
||||
ST_RET mp_jwrite_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_jwrite (JWRITE_REQ_INFO *info);
|
||||
ST_RET mpl_jwrite_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* INITIALIZE JOURNAL, Conformance: JOU2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct jinit_req_info
|
||||
{
|
||||
OBJECT_NAME jou_name; /* journal name */
|
||||
ST_BOOLEAN limit_spec_pres; /* limit specification present */
|
||||
MMS_BTOD limit_time; /* limiting time */
|
||||
ST_BOOLEAN limit_entry_pres; /* limiting entry present */
|
||||
ST_INT limit_entry_len; /* length of limiting entry */
|
||||
ST_UCHAR *limit_entry; /* pointer to limiting entry */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct jinit_req_info JINIT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct jinit_resp_info
|
||||
{
|
||||
ST_UINT32 del_entries; /* deleted entries */
|
||||
};
|
||||
typedef struct jinit_resp_info JINIT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_jinit (ST_INT chan, JINIT_REQ_INFO *info);
|
||||
ST_RET mp_jinit_resp (MMSREQ_IND *ind, JINIT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_jinit (JINIT_REQ_INFO *info);
|
||||
ST_RET mpl_jinit_resp (ST_UINT32 invoke, JINIT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT JOURNAL STATUS, Conformance: JOU2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct jstat_req_info
|
||||
{
|
||||
OBJECT_NAME jou_name; /* journal name */
|
||||
};
|
||||
typedef struct jstat_req_info JSTAT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct jstat_resp_info
|
||||
{
|
||||
ST_UINT32 cur_entries; /* current entries */
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct jstat_resp_info JSTAT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_jstat (ST_INT chan, JSTAT_REQ_INFO *info);
|
||||
ST_RET mp_jstat_resp (MMSREQ_IND *ind, JSTAT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_jstat (JSTAT_REQ_INFO *info);
|
||||
ST_RET mpl_jstat_resp (ST_UINT32 invoke, JSTAT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* CREATE JOURNAL */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct jcreate_req_info
|
||||
{
|
||||
OBJECT_NAME jou_name; /* journal name */
|
||||
};
|
||||
typedef struct jcreate_req_info JCREATE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_jcreate (ST_INT chan, JCREATE_REQ_INFO *info);
|
||||
ST_RET mp_jcreate_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_jcreate (JCREATE_REQ_INFO *info);
|
||||
ST_RET mpl_jcreate_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE JOURNAL */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct jdelete_req_info
|
||||
{
|
||||
OBJECT_NAME jou_name; /* journal name */
|
||||
};
|
||||
typedef struct jdelete_req_info JDELETE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_jdelete (ST_INT chan, JDELETE_REQ_INFO *info);
|
||||
ST_RET mp_jdelete_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_jdelete (JDELETE_REQ_INFO *info);
|
||||
ST_RET mpl_jdelete_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PJOU_INCLUDED */
|
||||
120
include/mmslite/mms_pocs.h
Normal file
120
include/mmslite/mms_pocs.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pocs.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS operator communication services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_POCS_INCLUDED
|
||||
#define MMS_POCS_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* OPERATOR COMMUNICATION FUNCTIONS */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass OPERATOR COMMUNICATION */
|
||||
/* operation information to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* OUTPUT OPERATION, Conformance: OCS1 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct output_req_info
|
||||
{
|
||||
ST_CHAR station_name [MAX_IDENT_LEN+1]; /* operator station name */
|
||||
ST_INT data_count; /* number of data strings */
|
||||
/* list of pointers to the output data */
|
||||
/* ST_CHAR *output_data [data_count]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct output_req_info OUTPUT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_output (ST_INT chan, OUTPUT_REQ_INFO *info);
|
||||
ST_RET mp_output_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_output (OUTPUT_REQ_INFO *info);
|
||||
ST_RET mpl_output_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* INPUT OPERATION, Conformance: OCS2 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct input_req_info
|
||||
{
|
||||
ST_CHAR station_name [MAX_IDENT_LEN+1]; /* operator station name */
|
||||
ST_BOOLEAN echo; /* echo, default: SD_TRUE */
|
||||
ST_BOOLEAN timeout_pres; /* input timeout present ind */
|
||||
ST_UINT32 timeout; /* input timeout */
|
||||
ST_BOOLEAN prompt_pres; /* prompt data present ind */
|
||||
ST_INT prompt_count; /* number of prompt strings */
|
||||
/* list of pointers to the prompt data */
|
||||
/* ST_CHAR *prompt_data [prompt_count]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct input_req_info INPUT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct input_resp_info
|
||||
{
|
||||
ST_CHAR *input_resp; /* input response */
|
||||
};
|
||||
typedef struct input_resp_info INPUT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_input (ST_INT chan, INPUT_REQ_INFO *info);
|
||||
ST_RET mp_input_resp (MMSREQ_IND *ind, INPUT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_input (INPUT_REQ_INFO *info);
|
||||
ST_RET mpl_input_resp (ST_UINT32 invoke, INPUT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_POCS_INCLUDED */
|
||||
287
include/mmslite/mms_pprg.h
Normal file
287
include/mmslite/mms_pprg.h
Normal file
@@ -0,0 +1,287 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pprg.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS program invocation management */
|
||||
/* services at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 08/14/97 RKR 02 Format changes */
|
||||
/* 06/09/97 MDE 01 Added PI State defines (from mms_vprg.h) */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PPRG_INCLUDED
|
||||
#define MMS_PPRG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* PROGRAM INVOCATION MANAGEMENT SERVICES */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass PROGRAM INVOCATION MANAGEMENT */
|
||||
/* information to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
/* use these defines to determine whether string is simple or encoded */
|
||||
/* If encoded, the data pointer points to a complete ASN.1 EXTERNAL */
|
||||
|
||||
#define ARG_TYPE_SIMPLE 0
|
||||
#define ARG_TYPE_ENCODED 1
|
||||
|
||||
/************************************************************************/
|
||||
/* CREATE PROGRAM INVOCATION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct crepi_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
ST_INT num_of_dnames; /* number of domain names */
|
||||
ST_BOOLEAN reusable;
|
||||
ST_BOOLEAN monitor_pres; /* monitoring present */
|
||||
ST_BOOLEAN monitor; /* SD_TRUE : permanent monitoring */
|
||||
/* SD_FALSE: current monitoring */
|
||||
|
||||
/* list of ptrs to domain names */
|
||||
/* ST_CHAR *dnames_list [num_of_dnames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct crepi_req_info CREPI_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_crepi (ST_INT chan, CREPI_REQ_INFO *info);
|
||||
ST_RET mp_crepi_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_crepi (CREPI_REQ_INFO *info);
|
||||
ST_RET mpl_crepi_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE PROGRAM INVOCATION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct delpi_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
};
|
||||
typedef struct delpi_req_info DELPI_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delpi (ST_INT chan, DELPI_REQ_INFO *info);
|
||||
ST_RET mp_delpi_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_delpi (DELPI_REQ_INFO *info);
|
||||
ST_RET mpl_delpi_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* START */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct start_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
|
||||
ST_INT16 start_arg_type; /* start argument present */
|
||||
ST_BOOLEAN start_arg_pres; /* start argument present */
|
||||
ST_INT start_arg_len; /* Only used for ENCODED */
|
||||
ST_UCHAR *start_arg; /* pointer to start argument */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct start_req_info START_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_start (ST_INT chan, START_REQ_INFO *info);
|
||||
ST_RET mp_start_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_start (START_REQ_INFO *info);
|
||||
ST_RET mpl_start_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* STOP */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct stop_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
};
|
||||
typedef struct stop_req_info STOP_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_stop (ST_INT chan, STOP_REQ_INFO *info);
|
||||
ST_RET mp_stop_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_stop (STOP_REQ_INFO *info);
|
||||
ST_RET mpl_stop_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* RESUME */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct resume_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
|
||||
ST_INT16 resume_arg_type; /* resume argument present */
|
||||
ST_BOOLEAN resume_arg_pres; /* resume argument present */
|
||||
ST_INT resume_arg_len; /* Only used for ENCODED */
|
||||
ST_UCHAR *resume_arg; /* pointer to resume argument */
|
||||
};
|
||||
typedef struct resume_req_info RESUME_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_resume (ST_INT chan, RESUME_REQ_INFO *info);
|
||||
ST_RET mp_resume_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_resume (RESUME_REQ_INFO *info);
|
||||
ST_RET mpl_resume_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* RESET */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct reset_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
};
|
||||
typedef struct reset_req_info RESET_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_reset (ST_INT chan, RESET_REQ_INFO *info);
|
||||
ST_RET mp_reset_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_reset (RESET_REQ_INFO *info);
|
||||
ST_RET mpl_reset_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* KILL */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct kill_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
};
|
||||
typedef struct kill_req_info KILL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_kill (ST_INT chan, KILL_REQ_INFO *info);
|
||||
ST_RET mp_kill_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_kill (KILL_REQ_INFO *info);
|
||||
ST_RET mpl_kill_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET PROGRAM INVOCATION ATTRIBUTE */
|
||||
/************************************************************************/
|
||||
|
||||
#define PI_NON_EXISTENT 0
|
||||
#define PI_UNRUNNABLE 1
|
||||
#define PI_IDLE 2
|
||||
#define PI_RUNNING 3
|
||||
#define PI_STOPPED 4
|
||||
#define PI_STARTING 5
|
||||
#define PI_STOPPING 6
|
||||
#define PI_RESUMING 7
|
||||
#define PI_RESETTING 8
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getpi_req_info
|
||||
{
|
||||
ST_CHAR piname [MAX_IDENT_LEN+1]; /* program invocation name */
|
||||
};
|
||||
typedef struct getpi_req_info GETPI_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getpi_resp_info
|
||||
{
|
||||
ST_INT16 state; /* program invocation state */
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable */
|
||||
ST_BOOLEAN reusable; /* Reusable */
|
||||
ST_BOOLEAN monitor; /* SD_TRUE : permanent monitoring */
|
||||
/* SD_FALSE: current monitoring */
|
||||
|
||||
ST_INT16 start_arg_type; /* start argument present */
|
||||
ST_INT start_arg_len; /* Only used for ENCODED */
|
||||
ST_UCHAR *start_arg; /* pointer to start argument */
|
||||
|
||||
ST_INT num_of_dnames; /* number of domain names */
|
||||
/* list of ptrs to domain names */
|
||||
/* ST_CHAR *dnames_list [num_of_dnames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct getpi_resp_info GETPI_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getpi (ST_INT chan, GETPI_REQ_INFO *info);
|
||||
ST_RET mp_getpi_resp (MMSREQ_IND *ind, GETPI_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getpi (GETPI_REQ_INFO *info);
|
||||
ST_RET mpl_getpi_resp (ST_UINT32 invoke, GETPI_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PPRG_INCLUDED */
|
||||
338
include/mmslite/mms_psem.h
Normal file
338
include/mmslite/mms_psem.h
Normal file
@@ -0,0 +1,338 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_psem.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS semaphore management services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/10/97 MDE 02 Changed entry_class to ST_INT8 */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PSEM_INCLUDED
|
||||
#define MMS_PSEM_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* SEMAPHORE MANAGEMENT FUNCTIONS */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass SEMAPHORE MANAGEMENT operation */
|
||||
/* information to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
/************************************************************************/
|
||||
/* TAKE CONTROL, Conformance: SEM1/SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct takectrl_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
ST_BOOLEAN named_token_pres; /* named token present ind */
|
||||
ST_CHAR named_token[MAX_IDENT_LEN+1]; /* named token */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal (default) */
|
||||
/* 127 - lowest */
|
||||
ST_BOOLEAN acc_delay_pres; /* acceptable delay present ind */
|
||||
ST_UINT32 acc_delay; /* acceptable delay */
|
||||
ST_BOOLEAN ctrl_timeout_pres; /* control timeout present */
|
||||
ST_UINT32 ctrl_timeout; /* control timeout */
|
||||
ST_BOOLEAN abrt_on_timeout_pres; /* Abort on Timeout present */
|
||||
ST_BOOLEAN abrt_on_timeout; /* Abort on Timeout */
|
||||
ST_BOOLEAN rel_conn_lost; /* relenquish if connection lost*/
|
||||
ST_BOOLEAN app_preempt_pres; /* app preempt present ind */
|
||||
ST_INT app_len; /* length of app. to preempt */
|
||||
ST_UCHAR *app_preempt; /* application to preempt */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct takectrl_req_info TAKECTRL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct takectrl_resp_info
|
||||
{
|
||||
ST_INT16 resp_tag; /* response tag */
|
||||
/* 0 : NULL response */
|
||||
/* 1 : named token response */
|
||||
ST_CHAR named_token [MAX_IDENT_LEN+1]; /* named token identifier */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct takectrl_resp_info TAKECTRL_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_takectrl (ST_INT chan, TAKECTRL_REQ_INFO *info);
|
||||
ST_RET mp_takectrl_resp (MMSREQ_IND *ind, TAKECTRL_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_takectrl (TAKECTRL_REQ_INFO *info);
|
||||
ST_RET mpl_takectrl_resp (ST_UINT32 invoke, TAKECTRL_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* RELINQUISH CONTROL, Conformance: SEM1/SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct relctrl_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
ST_BOOLEAN named_token_pres; /* named token present ind */
|
||||
ST_CHAR named_token [MAX_IDENT_LEN+1];/* named token */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct relctrl_req_info RELCTRL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_relctrl (ST_INT chan, RELCTRL_REQ_INFO *info);
|
||||
ST_RET mp_relctrl_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_relctrl (RELCTRL_REQ_INFO *info);
|
||||
ST_RET mpl_relctrl_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT SEMAPHORE STATUS, Conformance: SEM1/SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct rsstat_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
};
|
||||
typedef struct rsstat_req_info RSSTAT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct rsstat_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* mms deletable */
|
||||
ST_INT16 tclass; /* class: token (0) or pool (1) */
|
||||
ST_UINT16 num_of_tokens; /* number of tokens */
|
||||
ST_UINT16 num_of_owned; /* number of owned tokens */
|
||||
ST_UINT16 num_of_hung; /* number of hung tokens */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rsstat_resp_info RSSTAT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_rsstat (ST_INT chan, RSSTAT_REQ_INFO *info);
|
||||
ST_RET mp_rsstat_resp (MMSREQ_IND *ind, RSSTAT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_rsstat (RSSTAT_REQ_INFO *info);
|
||||
ST_RET mpl_rsstat_resp (ST_UINT32 invoke, RSSTAT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT POOL SEMAPHORE STATUS, Conformance: SEM1/SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct rspool_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
ST_BOOLEAN start_after_pres; /* start after name present ind */
|
||||
ST_CHAR start_after [MAX_IDENT_LEN+1]; /* name to start after */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rspool_req_info RSPOOL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
#if !defined (USE_COMPACT_MMS_STRUCTS)
|
||||
|
||||
struct token_id
|
||||
{
|
||||
ST_INT16 token_tag; /* named token tag */
|
||||
/* 0 : free named token */
|
||||
/* 1 : owned named token */
|
||||
/* 2 : hung named token */
|
||||
ST_CHAR named_token[MAX_IDENT_LEN+1];/* named token id */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
|
||||
#else /* Use compact form */
|
||||
|
||||
struct token_id
|
||||
{
|
||||
ST_INT16 token_tag; /* named token tag */
|
||||
/* 0 : free named token */
|
||||
/* 1 : owned named token */
|
||||
/* 2 : hung named token */
|
||||
ST_CHAR *named_token; /* named token id */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
#endif
|
||||
|
||||
typedef struct token_id TOKEN_ID;
|
||||
|
||||
struct rspool_resp_info
|
||||
{
|
||||
ST_INT16 num_of_tokens; /* number of named tokens */
|
||||
ST_BOOLEAN more_follows; /* more follows indicator */
|
||||
/* list of named tokens */
|
||||
/* TOKEN_ID named_token_list [num_of_tokens]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rspool_resp_info RSPOOL_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_rspool (ST_INT chan, RSPOOL_REQ_INFO *info);
|
||||
ST_RET mp_rspool_resp (MMSREQ_IND *ind, RSPOOL_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_rspool (RSPOOL_REQ_INFO *info);
|
||||
ST_RET mpl_rspool_resp (ST_UINT32 invoke, RSPOOL_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* REPORT SEMAPHORE ENTRY STATUS, Conformance: SEM1/SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct rsentry_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
ST_INT16 state; /* state: 0 : queued */
|
||||
/* 1 : owner */
|
||||
/* 2 : hung */
|
||||
ST_BOOLEAN start_after_pres; /* start after id present ind */
|
||||
ST_INT sa_len; /* length of entry id to start */
|
||||
/* after */
|
||||
ST_UCHAR *start_after; /* pointer to entry id to start */
|
||||
/* after */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rsentry_req_info RSENTRY_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct semaphore_entry
|
||||
{
|
||||
ST_INT ei_len; /* entry id length */
|
||||
ST_UCHAR *entry_id; /* entry id */
|
||||
ST_INT8 entry_class; /* entry class */
|
||||
ST_INT app_ref_len; /* app ref length (obj ident) */
|
||||
ST_UCHAR *app_ref; /* application reference */
|
||||
ST_BOOLEAN named_token_pres; /* named token present ind */
|
||||
ST_CHAR named_token[MAX_IDENT_LEN+1];/* named token */
|
||||
ST_UCHAR priority; /* priority */
|
||||
/* 0 - highest */
|
||||
/* 64 - normal (default) */
|
||||
/* 127 - lowest */
|
||||
ST_BOOLEAN rem_timeout_pres; /* relinquish timeout present */
|
||||
ST_UINT32 rem_timeout; /* relinquish timeout */
|
||||
ST_BOOLEAN abrt_on_timeout_pres; /* Abort On Timeout present */
|
||||
ST_BOOLEAN abrt_on_timeout; /* Abort On Timeout */
|
||||
ST_BOOLEAN rel_conn_lost; /* relenquish if connection lost*/
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct semaphore_entry SEMAPHORE_ENTRY;
|
||||
|
||||
struct rsentry_resp_info
|
||||
{
|
||||
ST_INT num_of_sent; /* number of semaphore entries */
|
||||
ST_BOOLEAN more_follows; /* more follows indicator */
|
||||
/* list of semaphore entries */
|
||||
/* SEMAPHORE_ENTRY sent_list [num_of_sent]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rsentry_resp_info RSENTRY_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_rsentry (ST_INT chan, RSENTRY_REQ_INFO *info);
|
||||
ST_RET mp_rsentry_resp (MMSREQ_IND *ind, RSENTRY_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_rsentry (RSENTRY_REQ_INFO *info);
|
||||
ST_RET mpl_rsentry_resp (ST_UINT32 invoke, RSENTRY_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE SEMAPHORE, Conformance: SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defsem_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
ST_UINT16 num_of_tokens; /* number of tokens */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct defsem_req_info DEFSEM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defsem (ST_INT chan, DEFSEM_REQ_INFO *info);
|
||||
ST_RET mp_defsem_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_defsem (DEFSEM_REQ_INFO *info);
|
||||
ST_RET mpl_defsem_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE SEMAPHORE, Conformance: SEM3 */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct delsem_req_info
|
||||
{
|
||||
OBJECT_NAME sem_name; /* semaphore name */
|
||||
};
|
||||
typedef struct delsem_req_info DELSEM_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delsem (ST_INT chan, DELSEM_REQ_INFO *info);
|
||||
ST_RET mp_delsem_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_delsem (DELSEM_REQ_INFO *info);
|
||||
ST_RET mpl_delsem_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PSEM_INCLUDED */
|
||||
683
include/mmslite/mms_pvar.h
Normal file
683
include/mmslite/mms_pvar.h
Normal file
@@ -0,0 +1,683 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pvar.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS variable access services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/04/06 JRB 03 Add ARE_OBJ_VALUE_INVALID (new in MMS V2). */
|
||||
/* 12/12/02 JRB 02 Add ASN1_ENC_CTXT arg to mpl_info */
|
||||
/* 08/13/97 RKR 01 format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PVAR_INCLUDED
|
||||
#define MMS_PVAR_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* DEFINES FOR THE VARIABLE ACCESS SERVICES */
|
||||
/************************************************************************/
|
||||
|
||||
/* defines to be used for addr_tag */
|
||||
#define NUM_ADDR 0 /* numeric address */
|
||||
#define SYM_ADDR 1 /* symbolic address */
|
||||
#define UNCON_ADDR 2 /* unconstrained address */
|
||||
|
||||
/* #defines to be used for var_spec_tag */
|
||||
#define VA_SPEC_NAMED 0
|
||||
#define VA_SPEC_ADDRESSED 1
|
||||
#define VA_SPEC_DESCRIBED 2
|
||||
#define VA_SPEC_SCATTERED 3
|
||||
#define VA_SPEC_INVALIDATED 4
|
||||
|
||||
/* #defines to be used for var_acc_tag */
|
||||
#define VAR_ACC_VARLIST 0 /* list of variables */
|
||||
#define VAR_ACC_NAMEDLIST 1 /* variable list name */
|
||||
|
||||
/* defines to be used for 'access result' */
|
||||
#define ACC_RSLT_SUCCESS 1
|
||||
#define ACC_RSLT_FAILURE 0
|
||||
|
||||
/* defines to be used for DataAccessError codes */
|
||||
#define ARE_OBJ_INVALIDATED 0
|
||||
#define ARE_HW_FAULT 1
|
||||
#define ARE_TEMP_UNAVAIL 2
|
||||
#define ARE_OBJ_ACCESS_DENIED 3
|
||||
#define ARE_OBJ_UNDEFINED 4
|
||||
#define ARE_INVAL_ADDR 5
|
||||
#define ARE_TYPE_UNSUPPORTED 6
|
||||
#define ARE_TYPE_INCONSISTENT 7
|
||||
#define ARE_OBJ_ATTR_INCONSISTENT 8
|
||||
#define ARE_OBJ_ACC_UNSUPPORTED 9
|
||||
#define ARE_OBJ_NONEXISTENT 10
|
||||
#define ARE_OBJ_VALUE_INVALID 11
|
||||
|
||||
/* #defines to be used for 'resp_tag' (write response) */
|
||||
#define WR_RSLT_SUCCESS 1
|
||||
#define WR_RSLT_FAILURE 0
|
||||
|
||||
/* #defines to be used for 'scope' selector (used for delete var, */
|
||||
/* varlist, type requests) */
|
||||
#define SPECIFIC_SCOPE 0
|
||||
#define ALL_AA_SCOPE 1
|
||||
#define ALL_DOM_SCOPE 2
|
||||
#define ALL_VMD_SCOPE 3
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass VARIABLE ACCESS information */
|
||||
/* to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
struct unconst_addr
|
||||
{
|
||||
ST_INT unc_len; /* unconstrained address length */
|
||||
ST_UCHAR *unc_ptr; /* unconstrained address ptr */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct unconst_addr UNCONST_ADDR;
|
||||
|
||||
struct var_acc_addr
|
||||
{
|
||||
ST_INT16 addr_tag; /* address tag */
|
||||
union
|
||||
{
|
||||
ST_UINT32 num_addr; /* numeric address */
|
||||
ST_CHAR *sym_addr; /* symbolic address */
|
||||
UNCONST_ADDR unc_addr; /* unconstrained address */
|
||||
} addr;
|
||||
};
|
||||
typedef struct var_acc_addr VAR_ACC_ADDR;
|
||||
|
||||
struct var_acc_data
|
||||
{
|
||||
ST_INT len; /* len of variable access data */
|
||||
ST_UCHAR *data; /* ptr to variable access data */
|
||||
};
|
||||
typedef struct var_acc_data VAR_ACC_DATA;
|
||||
|
||||
struct var_acc_tspec
|
||||
{
|
||||
ST_INT len; /* len of type specification */
|
||||
ST_UCHAR *data; /* ptr to type specification */
|
||||
};
|
||||
typedef struct var_acc_tspec VAR_ACC_TSPEC;
|
||||
|
||||
struct scattered_access
|
||||
{
|
||||
ST_INT len; /* len of scattered access descr*/
|
||||
ST_UCHAR *data; /* ptr to scattered access descr*/
|
||||
};
|
||||
typedef struct scattered_access SCATTERED_ACCESS;
|
||||
|
||||
struct alternate_access
|
||||
{
|
||||
ST_INT len; /* len of alternate access data */
|
||||
ST_UCHAR *data; /* ptr to alternate access data */
|
||||
};
|
||||
typedef struct alternate_access ALTERNATE_ACCESS;
|
||||
|
||||
struct variable_descr
|
||||
{
|
||||
VAR_ACC_ADDR address; /* variable address */
|
||||
VAR_ACC_TSPEC type; /* variable type */
|
||||
};
|
||||
typedef struct variable_descr VARIABLE_DESCR;
|
||||
|
||||
struct variable_spec
|
||||
{
|
||||
ST_INT16 var_spec_tag; /* variable specification tag */
|
||||
union
|
||||
{
|
||||
OBJECT_NAME name; /* name */
|
||||
VAR_ACC_ADDR address; /* address */
|
||||
VARIABLE_DESCR var_descr; /* variable description */
|
||||
SCATTERED_ACCESS sa_descr; /* scattered access description */
|
||||
} vs;
|
||||
};
|
||||
typedef struct variable_spec VARIABLE_SPEC;
|
||||
|
||||
struct variable_list
|
||||
{
|
||||
VARIABLE_SPEC var_spec; /* variable access specification*/
|
||||
ST_BOOLEAN alt_access_pres; /* alternate access present */
|
||||
ALTERNATE_ACCESS alt_access; /* alternate access */
|
||||
};
|
||||
typedef struct variable_list VARIABLE_LIST;
|
||||
|
||||
struct var_acc_spec
|
||||
{
|
||||
ST_INT16 var_acc_tag; /* variable access tag */
|
||||
OBJECT_NAME vl_name; /* variable list name */
|
||||
ST_INT num_of_variables; /* number of variables */
|
||||
/* list of variables */
|
||||
/* VARIABLE_LIST var_list [num_of_variables]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct var_acc_spec VAR_ACC_SPEC;
|
||||
|
||||
struct access_result
|
||||
{
|
||||
ST_INT16 acc_rslt_tag; /* access result tag */
|
||||
ST_INT16 failure; /* data access error */
|
||||
VAR_ACC_DATA va_data; /* success data */
|
||||
};
|
||||
typedef struct access_result ACCESS_RESULT;
|
||||
|
||||
struct write_result
|
||||
{
|
||||
ST_INT16 resp_tag; /* response tag */
|
||||
ST_INT16 failure; /* data access error */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct write_result WRITE_RESULT;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* VARIABLE READ */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct read_req_info
|
||||
{
|
||||
ST_BOOLEAN spec_in_result; /* specification with result, */
|
||||
/* default to false */
|
||||
VAR_ACC_SPEC va_spec; /* variable access spec */
|
||||
/* which "includes" */
|
||||
/* a list of variables */
|
||||
/* VARIABLE_LIST var_list [va_spec.num_of_variables]; */
|
||||
/* SD_END_STRUCT */
|
||||
};
|
||||
typedef struct read_req_info READ_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct read_resp_info
|
||||
{
|
||||
ST_BOOLEAN va_spec_pres; /* variable access spec present */
|
||||
ST_INT num_of_acc_result; /* number of access result */
|
||||
ACCESS_RESULT *acc_rslt_list; /* ptr to list of access result */
|
||||
VAR_ACC_SPEC va_spec; /* variable access spec */
|
||||
/* which "includes" */
|
||||
/* a list of variables */
|
||||
/* VARIABLE_LIST var_list [va_spec.num_of_variables]; */
|
||||
/* list of access result */
|
||||
/* ACCESS_RESULT acc_result_list [num_of_acc_result]; */
|
||||
/* SD_END_STRUCT */
|
||||
};
|
||||
typedef struct read_resp_info READ_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_read (ST_INT chan, READ_REQ_INFO *info);
|
||||
ST_RET mp_read_resp (MMSREQ_IND *ind, READ_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_read (READ_REQ_INFO *info);
|
||||
ST_RET mpl_read_resp (ST_UINT32 invoke, READ_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* VARIABLE WRITE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct write_req_info
|
||||
{
|
||||
ST_INT num_of_data; /* number of data */
|
||||
VAR_ACC_DATA *va_data; /* ptr to list of variable data */
|
||||
VAR_ACC_SPEC va_spec; /* variable access spec */
|
||||
/* which "includes" */
|
||||
/* a list of variables */
|
||||
/* VARIABLE_LIST var_list [va_spec.num_of_variables]; */
|
||||
/* list of variable data */
|
||||
/* VAR_ACC_DATA var_data_list [num_of_data]; */
|
||||
};
|
||||
typedef struct write_req_info WRITE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct write_resp_info
|
||||
{
|
||||
ST_INT num_of_result;
|
||||
/* WRITE_RESULT wr_result[num_of_result] */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
/* Where: */
|
||||
/* num_of_result = The number of members in wr_result. This */
|
||||
/* number should match the number of */
|
||||
/* variables included in the Write request. */
|
||||
/* */
|
||||
/* wr_result = Array of structures of type write_result */
|
||||
/* containing the results of the write */
|
||||
/* (success or failure) for each variable */
|
||||
/* written. The result array members should */
|
||||
/* align with the var_list members that were */
|
||||
/* included in the Write request. */
|
||||
typedef struct write_resp_info WRITE_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_write (ST_INT chan, WRITE_REQ_INFO *info);
|
||||
ST_RET mp_write_resp (MMSREQ_IND *ind, WRITE_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_write (WRITE_REQ_INFO *info);
|
||||
ST_RET mpl_write_resp (ST_UINT32 invoke, WRITE_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* INFORMATION REPORT */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct info_req_info
|
||||
{
|
||||
ST_INT num_of_acc_result; /* number of access result */
|
||||
ACCESS_RESULT *acc_rslt_list; /* ptr to list of access result */
|
||||
VAR_ACC_SPEC va_spec; /* variable access spec */
|
||||
/* which "includes" */
|
||||
/* a list of variables */
|
||||
/* VARIABLE_LIST var_list [va_spec.num_of_variables]; */
|
||||
/* list of access result */
|
||||
/* ACCESS_RESULT acc_result_list [num_of_acc_result]; */
|
||||
/* SD_END_STRUCT */
|
||||
};
|
||||
typedef struct info_req_info INFO_REQ_INFO;
|
||||
|
||||
/* No Response : (unsolicited) */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
ST_RET mp_info (ST_INT chan, INFO_REQ_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_info (ASN1_ENC_CTXT *aCtx, INFO_REQ_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE VARIABLE NAME */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defvar_req_info
|
||||
{
|
||||
OBJECT_NAME name; /* object name */
|
||||
VAR_ACC_ADDR address; /* address */
|
||||
ST_BOOLEAN type_spec_pres; /* type specification present */
|
||||
VAR_ACC_TSPEC type_spec; /* type specification */
|
||||
};
|
||||
typedef struct defvar_req_info DEFVAR_REQ_INFO;
|
||||
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defvar (ST_INT chan, DEFVAR_REQ_INFO *info);
|
||||
ST_RET mp_defvar_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_defvar (DEFVAR_REQ_INFO *info);
|
||||
ST_RET mpl_defvar_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET VARIABLE NAME DEFINITION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
#define GETVAR_NAME 0
|
||||
#define GETVAR_ADDR 1
|
||||
|
||||
struct getvar_req_info
|
||||
{
|
||||
ST_INT16 req_tag; /* request tag */
|
||||
/* 0 : object name request */
|
||||
/* 1 : address request */
|
||||
OBJECT_NAME name; /* object name */
|
||||
VAR_ACC_ADDR address; /* address */
|
||||
};
|
||||
typedef struct getvar_req_info GETVAR_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getvar_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable */
|
||||
ST_BOOLEAN address_pres; /* address present */
|
||||
VAR_ACC_ADDR address; /* address */
|
||||
VAR_ACC_TSPEC type_spec; /* type specification */
|
||||
};
|
||||
typedef struct getvar_resp_info GETVAR_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getvar (ST_INT chan, GETVAR_REQ_INFO *info);
|
||||
ST_RET mp_getvar_resp (MMSREQ_IND *ind, GETVAR_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getvar (GETVAR_REQ_INFO *info);
|
||||
ST_RET mpl_getvar_resp (ST_UINT32 invoke, GETVAR_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE VARIABLE NAME */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
#define DELVAR_SPEC 0
|
||||
#define DELVAR_AA 1
|
||||
#define DELVAR_DOM 2
|
||||
#define DELVAR_VMD 3
|
||||
|
||||
struct delvar_req_info
|
||||
{
|
||||
ST_INT16 scope; /* scope of delete (see above) */
|
||||
ST_BOOLEAN dname_pres; /* domain name present */
|
||||
ST_CHAR dname [MAX_IDENT_LEN+1]; /* domain name */
|
||||
ST_BOOLEAN vnames_pres; /* variable names present */
|
||||
ST_INT num_of_vnames; /* number of variable names */
|
||||
/* list of variable names */
|
||||
/* OBJECT_NAME vname_list [num_of_vnames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct delvar_req_info DELVAR_REQ_INFO;
|
||||
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct delvar_resp_info
|
||||
{
|
||||
ST_UINT32 num_matched; /* Number matched */
|
||||
ST_UINT32 num_deleted; /* Number deleted */
|
||||
};
|
||||
typedef struct delvar_resp_info DELVAR_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delvar (ST_INT chan, DELVAR_REQ_INFO *info);
|
||||
ST_RET mp_delvar_resp (MMSREQ_IND *ind,DELVAR_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_delvar (DELVAR_REQ_INFO *info);
|
||||
ST_RET mpl_delvar_resp (ST_UINT32 invoke, DELVAR_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE SCATTERED ACCESS */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defscat_req_info
|
||||
{
|
||||
OBJECT_NAME sa_name; /* scattered access name */
|
||||
SCATTERED_ACCESS sa_descr; /* scattered access description */
|
||||
};
|
||||
typedef struct defscat_req_info DEFSCAT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defscat (ST_INT chan, DEFSCAT_REQ_INFO *info);
|
||||
ST_RET mp_defscat_resp (MMSREQ_IND *info);
|
||||
#else
|
||||
ST_RET mpl_defscat (DEFSCAT_REQ_INFO *info);
|
||||
ST_RET mpl_defscat_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET SCATTERED ACCESS ATTRIBUTES */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getscat_req_info
|
||||
{
|
||||
OBJECT_NAME sa_name; /* scattered access name */
|
||||
};
|
||||
typedef struct getscat_req_info GETSCAT_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getscat_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable */
|
||||
SCATTERED_ACCESS sa_descr; /* scattered access description */
|
||||
};
|
||||
typedef struct getscat_resp_info GETSCAT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getscat (ST_INT chan, GETSCAT_REQ_INFO *info);
|
||||
ST_RET mp_getscat_resp (MMSREQ_IND *ind, GETSCAT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getscat (GETSCAT_REQ_INFO *info);
|
||||
ST_RET mpl_getscat_resp (ST_UINT32 invoke, GETSCAT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE NAMED VARIABLE LIST */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct defvlist_req_info
|
||||
{
|
||||
OBJECT_NAME vl_name; /* variable list name */
|
||||
ST_INT num_of_variables; /* number of variables */
|
||||
/* list of variables */
|
||||
/* VARIABLE_LIST var_list [num_of_variables]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct defvlist_req_info DEFVLIST_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_defvlist (ST_INT chan, DEFVLIST_REQ_INFO *info);
|
||||
ST_RET mp_defvlist_resp (MMSREQ_IND *info);
|
||||
#else
|
||||
ST_RET mpl_defvlist (DEFVLIST_REQ_INFO *info);
|
||||
ST_RET mpl_defvlist_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET NAMED VARIABLE LIST ATTRIBUTES */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getvlist_req_info
|
||||
{
|
||||
OBJECT_NAME vl_name; /* variable list name */
|
||||
};
|
||||
typedef struct getvlist_req_info GETVLIST_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getvlist_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable */
|
||||
ST_INT num_of_variables; /* number of variables */
|
||||
/* list of variables */
|
||||
/* VARIABLE_LIST var_list [num_of_variables]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct getvlist_resp_info GETVLIST_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getvlist (ST_INT chan, GETVLIST_REQ_INFO *info);
|
||||
ST_RET mp_getvlist_resp (MMSREQ_IND *ind, GETVLIST_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getvlist (GETVLIST_REQ_INFO *info);
|
||||
ST_RET mpl_getvlist_resp (ST_UINT32 invoke, GETVLIST_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE NAMED VARIABLE LIST */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
#define DELVL_SPEC 0
|
||||
#define DELVL_AA 1
|
||||
#define DELVL_DOM 2
|
||||
#define DELVL_VMD 3
|
||||
|
||||
struct delvlist_req_info
|
||||
{
|
||||
ST_INT16 scope; /* scope of delete (see above) */
|
||||
ST_BOOLEAN dname_pres; /* domain name present */
|
||||
ST_CHAR dname [MAX_IDENT_LEN+1]; /* domain name */
|
||||
ST_BOOLEAN vnames_pres; /* variable names present */
|
||||
ST_INT num_of_vnames; /* number of var list names */
|
||||
/* list of var list names */
|
||||
/* OBJECT_NAME vname_list [num_of_vnames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct delvlist_req_info DELVLIST_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct delvlist_resp_info
|
||||
{
|
||||
ST_UINT32 num_matched; /* Number matched */
|
||||
ST_UINT32 num_deleted; /* Number deleted */
|
||||
};
|
||||
typedef struct delvlist_resp_info DELVLIST_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_delvlist (ST_INT chan, DELVLIST_REQ_INFO *info);
|
||||
ST_RET mp_delvlist_resp (MMSREQ_IND *ind, DELVLIST_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_delvlist (DELVLIST_REQ_INFO *info);
|
||||
ST_RET mpl_delvlist_resp (ST_UINT32 invoke, DELVLIST_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFINE TYPE */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct deftype_req_info
|
||||
{
|
||||
OBJECT_NAME type_name; /* object name */
|
||||
VAR_ACC_TSPEC type_spec; /* type specification */
|
||||
};
|
||||
typedef struct deftype_req_info DEFTYPE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_deftype (ST_INT chan, DEFTYPE_REQ_INFO *info);
|
||||
ST_RET mp_deftype_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_deftype (DEFTYPE_REQ_INFO *info);
|
||||
ST_RET mpl_deftype_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET TYPE NAME DEFINITION */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct gettype_req_info
|
||||
{
|
||||
OBJECT_NAME type_name; /* object name */
|
||||
};
|
||||
typedef struct gettype_req_info GETTYPE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct gettype_resp_info
|
||||
{
|
||||
ST_BOOLEAN mms_deletable; /* MMS deletable */
|
||||
VAR_ACC_TSPEC type_spec; /* type specification */
|
||||
};
|
||||
typedef struct gettype_resp_info GETTYPE_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_gettype (ST_INT chan, GETTYPE_REQ_INFO *info);
|
||||
ST_RET mp_gettype_resp (MMSREQ_IND *ind, GETTYPE_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_gettype (GETTYPE_REQ_INFO *info);
|
||||
ST_RET mpl_gettype_resp (ST_UINT32 invoke, GETTYPE_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* DELETE TYPE NAME */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
#define DELTYPE_SPEC 0
|
||||
#define DELTYPE_AA 1
|
||||
#define DELTYPE_DOM 2
|
||||
#define DELTYPE_VMD 3
|
||||
|
||||
struct deltype_req_info
|
||||
{
|
||||
ST_INT16 scope; /* scope of delete (see above) */
|
||||
ST_BOOLEAN dname_pres; /* domain name present */
|
||||
ST_CHAR dname [MAX_IDENT_LEN+1]; /* domain name */
|
||||
ST_BOOLEAN tnames_pres; /* type names present */
|
||||
ST_INT num_of_tnames; /* number of type names */
|
||||
/* list of type names */
|
||||
/* OBJECT_NAME tname_list [num_of_tnames]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct deltype_req_info DELTYPE_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct deltype_resp_info
|
||||
{
|
||||
ST_UINT32 num_matched; /* Number matched */
|
||||
ST_UINT32 num_deleted; /* Number deleted */
|
||||
};
|
||||
typedef struct deltype_resp_info DELTYPE_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_deltype (ST_INT chan, DELTYPE_REQ_INFO *info);
|
||||
ST_RET mp_deltype_resp (MMSREQ_IND *ind, DELTYPE_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_deltype (DELTYPE_REQ_INFO *info);
|
||||
ST_RET mpl_deltype_resp (ST_UINT32 invoke, DELTYPE_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PVAR_INCLUDED */
|
||||
291
include/mmslite/mms_pvmd.h
Normal file
291
include/mmslite/mms_pvmd.h
Normal file
@@ -0,0 +1,291 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mms_pvmd.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the data structures and function definitions */
|
||||
/* required to interface with MMS vmd management services */
|
||||
/* at the primitive level. */
|
||||
/* */
|
||||
/* Parameters : In general, the first parameter is the channel */
|
||||
/* that the request or response is to be sent over. */
|
||||
/* For Responses, the second parameter is the Invoke */
|
||||
/* ID to be used. The last parameter is used to pass */
|
||||
/* operation specific information by pointer. */
|
||||
/* */
|
||||
/* Return */
|
||||
/* Values : Request functions return a pointer to the pending */
|
||||
/* request tracking structure, of type MMSREQ_PEND. */
|
||||
/* In case of error, the pointer is returned == 0 */
|
||||
/* and mms_op_err is written with the err code. */
|
||||
/* Response functions return 0 if OK, else an error */
|
||||
/* code. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/12/02 JRB 02 Add ASN1_ENC_CTXT arg to mpl_ustatus */
|
||||
/* 09/09/97 MDE 02 Added 'mms_class' defines */
|
||||
/* 08/14/97 RKR 01 Format changes */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_PVMD_INCLUDED
|
||||
#define MMS_PVMD_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_mp.h"
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* VMD MANAGEMENT SERVICES */
|
||||
/************************************************************************/
|
||||
/* The structures below are used to pass VMD MANAGEMENT information */
|
||||
/* to/from the MMS primitives. */
|
||||
/************************************************************************/
|
||||
|
||||
/* Defines for 'mms_class' for GNL and RENAME */
|
||||
#define MMS_CLASS_VAR 0
|
||||
#define MMS_CLASS_SCAT_ACC 1
|
||||
#define MMS_CLASS_VARLIST 2
|
||||
#define MMS_CLASS_TYPE 3
|
||||
#define MMS_CLASS_SEM 4
|
||||
#define MMS_CLASS_EV_COND 5
|
||||
#define MMS_CLASS_EV_ACT 6
|
||||
#define MMS_CLASS_EV_ENROLL 7
|
||||
#define MMS_CLASS_JOU 8
|
||||
#define MMS_CLASS_DOM 9
|
||||
#define MMS_CLASS_PI 10
|
||||
#define MMS_CLASS_OPER_STA 11
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* STATUS */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
#define MAX_STAT_DTL_LEN 16
|
||||
|
||||
struct status_req_info
|
||||
{
|
||||
ST_BOOLEAN extended; /* flag indicating if extended status */
|
||||
}; /* is desired */
|
||||
typedef struct status_req_info STATUS_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct status_resp_info
|
||||
{
|
||||
ST_INT16 logical_stat; /* logical status - not optional */
|
||||
ST_INT16 physical_stat; /* physical status - not optional */
|
||||
ST_BOOLEAN local_detail_pres; /* flag if logical detail is present */
|
||||
ST_INT local_detail_len; /* length of logical detail (in bits) */
|
||||
ST_UCHAR local_detail[MAX_STAT_DTL_LEN]; /* vendor-specific detailed info*/
|
||||
};
|
||||
typedef struct status_resp_info STATUS_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_status (ST_INT chan,STATUS_REQ_INFO *info);
|
||||
ST_RET mp_status_resp (MMSREQ_IND *ind,STATUS_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_status (STATUS_REQ_INFO *info);
|
||||
ST_RET mpl_status_resp (ST_UINT32 invoke, STATUS_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* UNSOLICITED STATUS */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct ustatus_req_info
|
||||
{
|
||||
ST_INT16 logical_stat; /* logical status - not optional */
|
||||
ST_INT16 physical_stat; /* physical status - not optional */
|
||||
ST_BOOLEAN local_detail_pres; /* flag if logical detail is present */
|
||||
ST_INT local_detail_len; /* length of logical detail (in bits) */
|
||||
ST_UCHAR local_detail[MAX_STAT_DTL_LEN]; /* vendor-specific detailed info*/
|
||||
};
|
||||
typedef struct ustatus_req_info USTATUS_REQ_INFO;
|
||||
|
||||
/* RESPONSE : No response (unsolicited) */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
ST_RET mp_ustatus (ST_INT chan,USTATUS_REQ_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_ustatus (ASN1_ENC_CTXT *aCtx, USTATUS_REQ_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET NAME LIST */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct namelist_req_info
|
||||
{
|
||||
ST_BOOLEAN cs_objclass_pres; /* set for use CS object class */
|
||||
union
|
||||
{
|
||||
ST_INT16 mms_class; /* object class */
|
||||
struct /* CS context object sel */
|
||||
{
|
||||
ST_INT len; /* length of ASN.1 CS class */
|
||||
ST_UCHAR *cs_class; /* CS object class ASN.1 */
|
||||
} cs;
|
||||
} obj;
|
||||
|
||||
ST_INT16 objscope; /* object scope */
|
||||
ST_CHAR dname[MAX_IDENT_LEN+1]; /* domain name, for scope = dom */
|
||||
ST_BOOLEAN cont_after_pres; /* flag if continue param pres. */
|
||||
ST_CHAR continue_after[MAX_IDENT_LEN+1]; /* continue-after name */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct namelist_req_info NAMELIST_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct namelist_resp_info
|
||||
{
|
||||
ST_BOOLEAN more_follows; /* end of list boolean value */
|
||||
ST_INT num_names; /* number of names */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
/* ST_CHAR *name_list[]; */ /* array of pointers to object names */
|
||||
|
||||
/* NOTE: Immediately below this structure (contiguous in memory) is a */
|
||||
/* list of character pointers, one for each name in the name list. */
|
||||
/* Essentially the structure and name pointers are allocated in a */
|
||||
/* single call to malloc of size: (sizeof(NAMELIST_RESP_INFO) */
|
||||
/* + num_names * sizeof(ST_CHAR *)). The requesting user makes use of */
|
||||
/* the contiguous list of pointers as appropriate. The responding */
|
||||
/* user must pass the mp_namelist_resp function a pointer to a contig- */
|
||||
/* uous block of memory containing the namelist_resp_info structure at */
|
||||
/* the top and the list of character pointers below it. */
|
||||
typedef struct namelist_resp_info NAMELIST_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_namelist (ST_INT chan,NAMELIST_REQ_INFO *info);
|
||||
ST_RET mp_namelist_resp (MMSREQ_IND *ind,NAMELIST_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_namelist (NAMELIST_REQ_INFO *info);
|
||||
ST_RET mpl_namelist_resp (ST_UINT32 invoke, NAMELIST_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* IDENTIFY */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : NULL */
|
||||
/* RESPONSE : */
|
||||
|
||||
/* This is the structure used for the info pass to/from the MMS prims */
|
||||
|
||||
#define MAX_VEND_LEN 64 /* vendor name max len */
|
||||
#define MAX_REV_LEN 16 /* revision max len */
|
||||
#define MAX_MOD_LEN 16 /* model max len */
|
||||
|
||||
struct ident_resp_info
|
||||
{
|
||||
ST_CHAR vend[MAX_VEND_LEN+1]; /* vendor */
|
||||
ST_CHAR model[MAX_MOD_LEN+1]; /* model */
|
||||
ST_CHAR rev[MAX_REV_LEN+1]; /* revision */
|
||||
ST_INT num_as; /* number abstract syntax's */
|
||||
/* this structure may be followed by the abstract syntax's */
|
||||
/* MMS_OBJ_ID as[num_as]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct ident_resp_info IDENT_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_ident (ST_INT chan);
|
||||
ST_RET mp_ident_resp (MMSREQ_IND *ind,IDENT_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_ident (ST_VOID);
|
||||
ST_RET mpl_ident_resp (ST_UINT32 invoke, IDENT_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* RENAME */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct rename_req_info
|
||||
{
|
||||
ST_BOOLEAN cs_objclass_pres; /* set for use CS object class */
|
||||
union
|
||||
{
|
||||
ST_INT16 mms_class; /* object class */
|
||||
struct /* CS context object sel */
|
||||
{
|
||||
ST_INT len; /* length of ASN.1 CS class */
|
||||
ST_UCHAR *cs_class; /* CS object class ASN.1 */
|
||||
} cs;
|
||||
} obj;
|
||||
|
||||
OBJECT_NAME cur_name; /* current name */
|
||||
ST_CHAR new_ident [MAX_IDENT_LEN+1]; /* new identifier */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct rename_req_info RENAME_REQ_INFO;
|
||||
|
||||
/* RESPONSE : NULL */
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_rename (ST_INT chan,RENAME_REQ_INFO *info);
|
||||
ST_RET mp_rename_resp (MMSREQ_IND *ind);
|
||||
#else
|
||||
ST_RET mpl_rename (RENAME_REQ_INFO *info);
|
||||
ST_RET mpl_rename_resp (ST_UINT32 invoke);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* GET CAPABILITY LIST */
|
||||
/************************************************************************/
|
||||
|
||||
/* REQUEST : */
|
||||
|
||||
struct getcl_req_info
|
||||
{
|
||||
ST_BOOLEAN cont_after_pres; /* flag if continue param pres. */
|
||||
ST_CHAR *continue_after; /* pointer continue-after name */
|
||||
};
|
||||
typedef struct getcl_req_info GETCL_REQ_INFO;
|
||||
|
||||
/* RESPONSE : */
|
||||
|
||||
struct getcl_resp_info
|
||||
{
|
||||
ST_BOOLEAN more_follows; /* end of list boolean value */
|
||||
ST_INT num_of_capab; /* number of capabilities */
|
||||
/* list of capabilities */
|
||||
/* ST_CHAR * capab_list [num_of_capab]; */
|
||||
SD_END_STRUCT
|
||||
};
|
||||
typedef struct getcl_resp_info GETCL_RESP_INFO;
|
||||
|
||||
#ifndef MMS_LITE
|
||||
MMSREQ_PEND *mp_getcl (ST_INT chan,GETCL_REQ_INFO *info);
|
||||
ST_RET mp_getcl_resp (MMSREQ_IND *ind,GETCL_RESP_INFO *info);
|
||||
#else
|
||||
ST_RET mpl_getcl (GETCL_REQ_INFO *info);
|
||||
ST_RET mpl_getcl_resp (ST_UINT32 invoke, GETCL_RESP_INFO *info);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #define MMS_PVMD_INCLUDED */
|
||||
|
||||
1090
include/mmslite/mms_vvar.h
Normal file
1090
include/mmslite/mms_vvar.h
Normal file
File diff suppressed because it is too large
Load Diff
235
include/mmslite/mmsdefs.h
Normal file
235
include/mmslite/mmsdefs.h
Normal file
@@ -0,0 +1,235 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2004, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mmsdefs.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This include file is for MMS-EASE or SMALL-MMS programmer use, */
|
||||
/* and calls out all needed include files. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/09/07 JRB 14 Add forward references. */
|
||||
/* 04/09/07 MDE 13 Enhanced filtered logging */
|
||||
/* 09/17/04 EJV 12 Added mms_chk_resource. */
|
||||
/* 10/13/03 EJV 11 Moved MMSEASE_VERSION define to mms_defs.h. */
|
||||
/* 10/07/03 EJV 10 Added MMSEASE_VERSION define. */
|
||||
/* 12/12/02 JRB 09 Add ASN1_ENC_CTXT arg to _mms_unconf_req_fin */
|
||||
/* 01/18/02 JRB 08 Replace _ms_fin_pdu_debug with _ms_fin_pdu */
|
||||
/* and _ms_fin_pdu_log. */
|
||||
/* 12/20/01 JRB 07 Convert to use ASN1R. */
|
||||
/* 09/26/00 JRB 06 Add SD_CONST on ms_mk_rt_aa* */
|
||||
/* 06/01/00 RKR 05 Removed prot mms_null_pdu_dec use mms_dfun.h */
|
||||
/* 03/23/99 MDE 04 Changes to decode buffer allocation scheme */
|
||||
/* 06/15/98 MDE 03 More changes to allow compile under C++ */
|
||||
/* 06/15/98 MDE 02 Changes to allow compile under C++ */
|
||||
/* 03/20/98 JRB 01 Del mmsop_en.h. Only user code needs it now. */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMSDEFS_INCLUDED
|
||||
#define MMSDEFS_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "glberror.h"
|
||||
|
||||
#ifndef MMS_LITE
|
||||
#include "gen_list.h"
|
||||
#include "mem_chk.h"
|
||||
#include "mms_defs.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "mms_vvar.h"
|
||||
#include "mmsintrn.h"
|
||||
#include "mms_mp.h"
|
||||
#include "mms_mv.h"
|
||||
#include "mms_err.h"
|
||||
#else
|
||||
#include "mem_chk.h"
|
||||
#include "mms_def2.h"
|
||||
#include "mms_pvar.h"
|
||||
#include "mms_vvar.h"
|
||||
#include "mmsintr2.h"
|
||||
#include "mms_mp.h"
|
||||
#include "mmsldefs.h"
|
||||
#endif
|
||||
|
||||
#include "mms_dfun.h"
|
||||
#include "mms_perr.h"
|
||||
#include "mms_log.h"
|
||||
#include "mmslog.h"
|
||||
|
||||
#include "mms_pcon.h"
|
||||
#include "mms_pdom.h"
|
||||
#include "mms_pevn.h"
|
||||
#include "mms_pfil.h"
|
||||
#include "mms_pjou.h"
|
||||
#include "mms_pocs.h"
|
||||
#include "mms_pprg.h"
|
||||
#include "mms_psem.h"
|
||||
#include "mms_pvmd.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* For use when global variables cannot be initialized at compile time */
|
||||
|
||||
#if defined (NO_GLB_VAR_INIT)
|
||||
ST_VOID m_init_glb_vars (ST_VOID);
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
ST_VOID _ms_wr_service_err (ASN1_ENC_CTXT *ac, ST_INT16 eclass, ST_INT16 code,
|
||||
ADTNL_ERR_RESP_INFO *adtnl_info);
|
||||
|
||||
/************************************************************************/
|
||||
/* Variable Access Functions. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _mms_get_service_err (ASN1_DEC_CTXT *ac, ERR_INFO *dest);
|
||||
ST_VOID _ms_get_mms_fname (ASN1_DEC_CTXT *ac, FILE_NAME *dest, ST_INT max_fnames, ST_INT *num_out);
|
||||
ST_VOID _ms_get_mms_app_ref (ASN1_DEC_CTXT *ac, ST_UCHAR **dest, ST_INT *dest_size, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_mms_evtime (ASN1_DEC_CTXT *ac, EVENT_TIME *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_mms_modlist (ASN1_DEC_CTXT *ac, MODIFIER *dest, ST_INT *num_out, ST_INT max_mods, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_mms_objname (ASN1_DEC_CTXT *ac, OBJECT_NAME *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_jou_ent_cont (ASN1_DEC_CTXT *ac, ENTRY_CONTENT *dest, ST_INT dest_size, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_address (ASN1_DEC_CTXT *ac, VAR_ACC_ADDR *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_access_rslt (ASN1_DEC_CTXT *ac, ACCESS_RESULT *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_data (ASN1_DEC_CTXT *ac, VAR_ACC_DATA *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_type_spec (ASN1_DEC_CTXT *ac, VAR_ACC_TSPEC *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_scat_access (ASN1_DEC_CTXT *ac, SCATTERED_ACCESS *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_alt_access (ASN1_DEC_CTXT *ac, ALTERNATE_ACCESS *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_var_spec (ASN1_DEC_CTXT *ac, VARIABLE_SPEC *dest, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_var_list (ASN1_DEC_CTXT *ac, VARIABLE_LIST *dest, ST_INT *num_out, ST_INT max_num, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_get_va_spec (ASN1_DEC_CTXT *ac, VAR_ACC_SPEC *dest, ST_INT max_vars, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
|
||||
ST_VOID _ms_wr_mms_fname (ASN1_ENC_CTXT *ac, FILE_NAME *src, ST_INT num);
|
||||
ST_VOID _ms_wr_mms_evtime (ASN1_ENC_CTXT *ac, EVENT_TIME *src);
|
||||
ST_VOID _ms_wr_mms_modlist (ASN1_ENC_CTXT *ac, MODIFIER *src, ST_INT num);
|
||||
ST_VOID _ms_wr_mms_objname (ASN1_ENC_CTXT *ac, OBJECT_NAME *src);
|
||||
ST_VOID _ms_wr_jou_ent_cont (ASN1_ENC_CTXT *ac, ENTRY_CONTENT *src);
|
||||
ST_VOID _ms_wr_va_address (ASN1_ENC_CTXT *ac, VAR_ACC_ADDR *src);
|
||||
ST_VOID _ms_wr_va_access_rslt (ASN1_ENC_CTXT *ac, ACCESS_RESULT *src);
|
||||
ST_VOID _ms_wr_va_data (ASN1_ENC_CTXT *ac, VAR_ACC_DATA *src);
|
||||
ST_VOID _ms_wr_va_type_spec (ASN1_ENC_CTXT *ac, VAR_ACC_TSPEC *src);
|
||||
ST_VOID _ms_wr_va_scat_access (ASN1_ENC_CTXT *ac, SCATTERED_ACCESS *src);
|
||||
ST_VOID _ms_wr_va_alt_access (ASN1_ENC_CTXT *ac, ALTERNATE_ACCESS *src);
|
||||
ST_VOID _ms_wr_va_var_spec (ASN1_ENC_CTXT *ac, VARIABLE_SPEC *src);
|
||||
ST_VOID _ms_wr_va_var_list (ASN1_ENC_CTXT *ac, VARIABLE_LIST *src, ST_INT num);
|
||||
ST_VOID _ms_wr_va_spec (ASN1_ENC_CTXT *ac, VAR_ACC_SPEC *src);
|
||||
|
||||
ST_VOID _mms_init_dec (ASN1_DEC_CTXT *ac, ST_BOOLEAN req);
|
||||
|
||||
/************************************************************************/
|
||||
/* Alternate Access Functions */
|
||||
/************************************************************************/
|
||||
ST_VOID _ms_log_runtime_aa (RT_AA_CTRL *rt_aa, ST_INT num_aa);
|
||||
|
||||
ST_RET _ms_mk_rt_aa_all (SD_CONST RUNTIME_TYPE *rt_head, ST_INT rt_num,
|
||||
RT_AA_CTRL **rt_aa_out, ST_INT *num_aa_out);
|
||||
|
||||
ST_RET _ms_mk_rt_aa (SD_CONST RUNTIME_TYPE *rt, ST_INT rt_num,
|
||||
ALT_ACCESS *alt_acc,
|
||||
RT_AA_CTRL **rt_aa_out, ST_INT *num_aa_out);
|
||||
|
||||
ST_INT _ms_get_rtaa_data_size (RT_AA_CTRL *runtime_aa, ST_INT num_rt_aa);
|
||||
|
||||
/************************************************************************/
|
||||
/* Special ASN.1 buffer handling functions for VM operations where */
|
||||
/* a series of ASN.1 encoded AA must be created. */
|
||||
|
||||
ST_UCHAR *_m_get_aa_asn1_buf (ST_INT *size_out);
|
||||
ST_VOID _m_free_aa_asn1_buf (ST_VOID);
|
||||
ST_VOID _m_set_aa_asn1_buf_end (ST_UCHAR *new_end);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* General function declarations used by the mp_xxx series. */
|
||||
/* These are not of general use to the application programmer. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_VOID _ms_chk_for_extern (ASN1_DEC_CTXT *ac, ST_INT *len_ptr, ST_UCHAR **buf_ptr, ST_VOID (*done)(ASN1_DEC_CTXT *ac));
|
||||
ST_VOID _ms_set_cs_check (ASN1_DEC_CTXT *ac);
|
||||
ST_VOID _ms_set_cs_check2 (ASN1_DEC_CTXT *ac);
|
||||
ST_VOID _mms_dec_done_ok (ASN1_DEC_CTXT *ac);
|
||||
|
||||
ST_UCHAR *_ms_fin_pdu (ASN1_ENC_CTXT *aCtx, ST_INT type, ST_INT *pPduLen);
|
||||
#ifdef DEBUG_SISCO
|
||||
ST_VOID _ms_fin_pdu_log (ST_INT type, ST_CHAR *txt,
|
||||
ST_UCHAR *pduPtr, ST_INT pduLen);
|
||||
#endif
|
||||
|
||||
ST_VOID _mms_dec_buf_free (ASN1_DEC_CTXT *ac, ST_RET err_code);
|
||||
#ifndef MMS_LITE
|
||||
ST_RET _mms_send_null_resp (MMSREQ_IND *indptr, ST_INT opcode);
|
||||
MMSREQ_PEND *_mms_send_null_req (ST_INT chan, ST_INT opcode);
|
||||
|
||||
MMSREQ_PEND *_mms_req_send (ST_INT opcode,
|
||||
ST_VOID (*mk_ptr)(ASN1_ENC_CTXT *, ST_CHAR *),
|
||||
ST_INT chan,
|
||||
ST_CHAR *info_ptr);
|
||||
|
||||
ST_INT _mms_chk_resource (ST_INT chan);
|
||||
ST_RET _mms_unconf_req_send (ST_INT opcode,
|
||||
ST_VOID (*mk_ptr)(ASN1_ENC_CTXT *, ST_CHAR *),
|
||||
ST_INT chan,
|
||||
ST_CHAR *info_ptr);
|
||||
|
||||
ST_RET _mms_resp_send (ST_INT opcode,
|
||||
MMSREQ_IND *indptr,
|
||||
ST_VOID (*mk_fun)(ASN1_ENC_CTXT *, ST_CHAR *),
|
||||
ST_CHAR *info_ptr);
|
||||
|
||||
#else
|
||||
ST_RET _mms_fin_null_resp (ST_UINT32 invoke_id, ST_INT opcode);
|
||||
ST_RET _mms_fin_null_req (ST_INT opcode);
|
||||
|
||||
ST_RET _mms_resp_fin (ST_INT opcode, ST_UINT32 invoke_id,
|
||||
ST_VOID (*mk_fun)(ASN1_ENC_CTXT *, ST_CHAR *),
|
||||
ST_CHAR *info_ptr);
|
||||
|
||||
ST_RET _mms_req_fin (ST_INT opcode,
|
||||
ST_VOID (*mk_ptr)(ASN1_ENC_CTXT *, ST_CHAR *),
|
||||
ST_CHAR *info_ptr);
|
||||
|
||||
ST_RET _mms_unconf_req_fin (ASN1_ENC_CTXT *aCtx, ST_INT opcode,
|
||||
ST_VOID (*mk_ptr)(ASN1_ENC_CTXT *, ST_CHAR *),
|
||||
ST_CHAR *info_ptr);
|
||||
|
||||
struct mvl_req_pend; /* forward reference */
|
||||
struct mvl_ind_pend; /* forward reference */
|
||||
struct mvl_net_info; /* forward reference */
|
||||
|
||||
ST_VOID mpl_req_log (struct mvl_req_pend *reqCtrl, ST_VOID *reqInfo);
|
||||
ST_VOID mpl_resp_log (struct mvl_ind_pend *indCtrl, ST_VOID *respInfo);
|
||||
ST_VOID mpl_unsol_req_log (struct mvl_net_info *netInfo, ST_INT op, ST_VOID *reqInfo);
|
||||
|
||||
#endif
|
||||
|
||||
/* A casting aid ... */
|
||||
#define M_CAST_MK_FUN(x) ((ST_VOID(*)(ASN1_ENC_CTXT *, ST_CHAR *)) x)
|
||||
|
||||
|
||||
#ifndef MMS_LITE
|
||||
#include "mms_llp.h"
|
||||
#include "mmsllp.h"
|
||||
#endif
|
||||
|
||||
#include "mmsefun.h" /* Bruder moved this here */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMSDEFS_INCLUDED */
|
||||
|
||||
|
||||
188
include/mmslite/mmsefun.h
Normal file
188
include/mmslite/mmsefun.h
Normal file
@@ -0,0 +1,188 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mmsefun.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This file has the function declarations used by the primitive */
|
||||
/* level encode routines (mp_xxxx). */
|
||||
/* */
|
||||
/* Parameters : pointer to the operation specific data structure. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/20/01 JRB 02 Convert to use ASN1R. */
|
||||
/* 06/15/98 MDE 01 Changes to allow compile under C++ */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMSEFUN_INCLUDED
|
||||
#define MMSEFUN_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* primitive encode functions */
|
||||
/************************************************************************/
|
||||
|
||||
ST_UCHAR *_ms_mk_init (ASN1_ENC_CTXT *ac, ST_UCHAR *buf_ptr, ST_INT buf_len,
|
||||
INIT_INFO *info_ptr, ST_INT pdutype,
|
||||
ST_BOOLEAN cs_init);
|
||||
|
||||
ST_UCHAR *_ms_mk_conclude (ASN1_ENC_CTXT *ac, ST_UCHAR *buf_ptr,ST_INT buf_len,ST_INT pdutype);
|
||||
|
||||
ST_UCHAR *_ms_mk_cancel (ASN1_ENC_CTXT *ac, ST_BOOLEAN request, ST_UCHAR *msg_ptr,
|
||||
ST_INT buf_len, ST_UINT32 id);
|
||||
|
||||
ST_UCHAR *_ms_mk_reject (ASN1_ENC_CTXT *ac, ST_UCHAR *msg_ptr, ST_INT buf_len,
|
||||
REJECT_RESP_INFO *info_ptr);
|
||||
|
||||
ST_UCHAR *_ms_mk_err_resp (ASN1_ENC_CTXT *ac, ST_UCHAR *buf_ptr, ST_INT buf_len, ST_INT op,
|
||||
ST_UINT32 id, ST_INT16 err_class, ST_INT16 code);
|
||||
|
||||
ST_VOID _ms_mk_stat_req (ASN1_ENC_CTXT *ac, STATUS_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_stat_resp (ASN1_ENC_CTXT *ac, STATUS_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_ustat_req (ASN1_ENC_CTXT *ac, USTATUS_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_namel_req (ASN1_ENC_CTXT *ac, NAMELIST_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_namel_resp (ASN1_ENC_CTXT *ac, NAMELIST_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_ident_resp (ASN1_ENC_CTXT *ac, IDENT_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_rename_req (ASN1_ENC_CTXT *ac, RENAME_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getcl_req (ASN1_ENC_CTXT *ac, GETCL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getcl_resp (ASN1_ENC_CTXT *ac, GETCL_RESP_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_initdown_req (ASN1_ENC_CTXT *ac, INITDOWN_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_initdown_resp (ASN1_ENC_CTXT *ac, ST_VOID *dummy_info);
|
||||
ST_VOID _ms_mk_download_req (ASN1_ENC_CTXT *ac, DOWNLOAD_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_download_resp (ASN1_ENC_CTXT *ac, DOWNLOAD_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_termdown_req (ASN1_ENC_CTXT *ac, TERMDOWN_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_initupl_req (ASN1_ENC_CTXT *ac, INITUPL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_initupl_resp (ASN1_ENC_CTXT *ac, INITUPL_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_upload_req (ASN1_ENC_CTXT *ac, UPLOAD_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_upload_resp (ASN1_ENC_CTXT *ac, UPLOAD_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_termupl_req (ASN1_ENC_CTXT *ac, TERMUPL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_rddwn_req (ASN1_ENC_CTXT *ac, RDDWN_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_rdupl_req (ASN1_ENC_CTXT *ac, RDUPL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_loaddom_req (ASN1_ENC_CTXT *ac, LOADDOM_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_storedom_req (ASN1_ENC_CTXT *ac, STOREDOM_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_deldom_req (ASN1_ENC_CTXT *ac, DELDOM_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getdom_req (ASN1_ENC_CTXT *ac, GETDOM_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getdom_resp (ASN1_ENC_CTXT *ac, GETDOM_RESP_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_crepi_req (ASN1_ENC_CTXT *ac, CREPI_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delpi_req (ASN1_ENC_CTXT *ac, DELPI_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_start_req (ASN1_ENC_CTXT *ac, START_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_stop_req (ASN1_ENC_CTXT *ac, STOP_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_resume_req (ASN1_ENC_CTXT *ac, RESUME_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_reset_req (ASN1_ENC_CTXT *ac, RESET_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_kill_req (ASN1_ENC_CTXT *ac, KILL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getpi_req (ASN1_ENC_CTXT *ac, GETPI_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getpi_resp (ASN1_ENC_CTXT *ac, GETPI_RESP_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_read_req (ASN1_ENC_CTXT *ac, READ_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_read_resp (ASN1_ENC_CTXT *ac, READ_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_write_req (ASN1_ENC_CTXT *ac, WRITE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_write_resp (ASN1_ENC_CTXT *ac, WRITE_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_info_req (ASN1_ENC_CTXT *ac, INFO_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getvar_req (ASN1_ENC_CTXT *ac, GETVAR_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getvar_resp (ASN1_ENC_CTXT *ac, GETVAR_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_defvar_req (ASN1_ENC_CTXT *ac, DEFVAR_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delvar_req (ASN1_ENC_CTXT *ac, DELVAR_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delvar_resp (ASN1_ENC_CTXT *ac, DELVAR_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_defscat_req (ASN1_ENC_CTXT *ac, DEFSCAT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getscat_req (ASN1_ENC_CTXT *ac, GETSCAT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getscat_resp (ASN1_ENC_CTXT *ac, GETSCAT_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_defvlist_req (ASN1_ENC_CTXT *ac, DEFVLIST_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getvlist_req (ASN1_ENC_CTXT *ac, GETVLIST_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getvlist_resp (ASN1_ENC_CTXT *ac, GETVLIST_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_delvlist_req (ASN1_ENC_CTXT *ac, DELVLIST_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delvlist_resp (ASN1_ENC_CTXT *ac, DELVLIST_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_gettype_req (ASN1_ENC_CTXT *ac, GETTYPE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_gettype_resp (ASN1_ENC_CTXT *ac, GETTYPE_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_deftype_req (ASN1_ENC_CTXT *ac, DEFTYPE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_deltype_req (ASN1_ENC_CTXT *ac, DELTYPE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_deltype_resp (ASN1_ENC_CTXT *ac, DELTYPE_RESP_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_takectrl_req (ASN1_ENC_CTXT *ac, TAKECTRL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_takectrl_resp (ASN1_ENC_CTXT *ac, TAKECTRL_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_relctrl_req (ASN1_ENC_CTXT *ac, RELCTRL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_rsstat_req (ASN1_ENC_CTXT *ac, RSSTAT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_rsstat_resp (ASN1_ENC_CTXT *ac, RSSTAT_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_rspool_req (ASN1_ENC_CTXT *ac, RSPOOL_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_rspool_resp (ASN1_ENC_CTXT *ac, RSPOOL_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_rsentry_req (ASN1_ENC_CTXT *ac, RSENTRY_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_rsentry_resp (ASN1_ENC_CTXT *ac, RSENTRY_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_defsem_req (ASN1_ENC_CTXT *ac, DEFSEM_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delsem_req (ASN1_ENC_CTXT *ac, DELSEM_REQ_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_output_req (ASN1_ENC_CTXT *ac, OUTPUT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_input_req (ASN1_ENC_CTXT *ac, INPUT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_input_resp (ASN1_ENC_CTXT *ac, INPUT_RESP_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_defec_req (ASN1_ENC_CTXT *ac, DEFEC_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delec_req (ASN1_ENC_CTXT *ac, DELEC_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delec_resp (ASN1_ENC_CTXT *ac, DELEC_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_geteca_req (ASN1_ENC_CTXT *ac, GETECA_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_geteca_resp (ASN1_ENC_CTXT *ac, GETECA_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_repecs_req (ASN1_ENC_CTXT *ac, REPECS_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_repecs_resp (ASN1_ENC_CTXT *ac, REPECS_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_altecm_req (ASN1_ENC_CTXT *ac, ALTECM_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_trige_req (ASN1_ENC_CTXT *ac, TRIGE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_defea_req (ASN1_ENC_CTXT *ac, DEFEA_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delea_req (ASN1_ENC_CTXT *ac, DELEA_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delea_resp (ASN1_ENC_CTXT *ac, DELEA_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_geteaa_req (ASN1_ENC_CTXT *ac, GETEAA_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_geteaa_resp (ASN1_ENC_CTXT *ac, GETEAA_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_repeas_req (ASN1_ENC_CTXT *ac, REPEAS_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_repeas_resp (ASN1_ENC_CTXT *ac, REPEAS_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_defee_req (ASN1_ENC_CTXT *ac, DEFEE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delee_req (ASN1_ENC_CTXT *ac, DELEE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_delee_resp (ASN1_ENC_CTXT *ac, DELEE_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_altee_req (ASN1_ENC_CTXT *ac, ALTEE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_altee_resp (ASN1_ENC_CTXT *ac, ALTEE_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_repees_req (ASN1_ENC_CTXT *ac, REPEES_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_repees_resp (ASN1_ENC_CTXT *ac, REPEES_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_geteea_req (ASN1_ENC_CTXT *ac, GETEEA_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_geteea_resp (ASN1_ENC_CTXT *ac, GETEEA_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_evnot_req (ASN1_ENC_CTXT *ac, EVNOT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_ackevnot_req (ASN1_ENC_CTXT *ac, ACKEVNOT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getas_req (ASN1_ENC_CTXT *ac, GETAS_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getas_resp (ASN1_ENC_CTXT *ac, GETAS_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_getaes_req (ASN1_ENC_CTXT *ac, GETAES_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_getaes_resp (ASN1_ENC_CTXT *ac, GETAES_RESP_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_jwrite_req (ASN1_ENC_CTXT *ac, JWRITE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_jread_req (ASN1_ENC_CTXT *ac, JREAD_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_jread_resp (ASN1_ENC_CTXT *ac, JREAD_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_jinit_req (ASN1_ENC_CTXT *ac, JINIT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_jinit_resp (ASN1_ENC_CTXT *ac, JINIT_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_jstat_req (ASN1_ENC_CTXT *ac, JSTAT_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_jstat_resp (ASN1_ENC_CTXT *ac, JSTAT_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_jcreate_req (ASN1_ENC_CTXT *ac, JCREATE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_jdelete_req (ASN1_ENC_CTXT *ac, JDELETE_REQ_INFO *info);
|
||||
|
||||
ST_VOID _ms_mk_obtfile_req (ASN1_ENC_CTXT *ac, OBTFILE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_fopen_req (ASN1_ENC_CTXT *ac, FOPEN_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_fopen_resp (ASN1_ENC_CTXT *ac, FOPEN_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_fread_req (ASN1_ENC_CTXT *ac, FREAD_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_fread_resp (ASN1_ENC_CTXT *ac, FREAD_RESP_INFO *info);
|
||||
ST_VOID _ms_mk_fclose_req (ASN1_ENC_CTXT *ac, FCLOSE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_frename_req (ASN1_ENC_CTXT *ac, FRENAME_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_fdelete_req (ASN1_ENC_CTXT *ac, FDELETE_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_fdir_req (ASN1_ENC_CTXT *ac, FDIR_REQ_INFO *info);
|
||||
ST_VOID _ms_mk_fdir_resp (ASN1_ENC_CTXT *ac, FDIR_RESP_INFO *info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMSEFUN_INCLUDED */
|
||||
317
include/mmslite/mmsintr2.h
Normal file
317
include/mmslite/mmsintr2.h
Normal file
@@ -0,0 +1,317 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1993 - 2001, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mmsintr2.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Functions and variables below this point are typically not */
|
||||
/* used by the application, and need not be exposed. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 03/04/02 JRB 11 Use SD_CONST on ALL (RUNTIME_TYPE *) vars. */
|
||||
/* 12/20/01 JRB 10 Convert to use ASN1R. */
|
||||
/* 04/19/00 JRB 09 Fix SD_CONST for decode funct ptr arrays. */
|
||||
/* 09/13/99 MDE 08 Added SD_CONST modifiers */
|
||||
/* 03/23/99 MDE 07 Changes to decode buffer allocation scheme */
|
||||
/* 03/19/98 JRB 06 Move ASN.1 error codes to "asn1defs.h". */
|
||||
/* 03/12/98 MDE 05 '_ms_m_get_rt_info' use change */
|
||||
/* 02/10/98 MDE 04 Removed unused 'm_cl_max_event_attributes' */
|
||||
/* 07/16/97 MDE 03 Added m_param, m_service_resp for MMS_LITE */
|
||||
/* 07/03/97 MDE 02 Removed CALLOC_OS */
|
||||
/* 06/09/97 MDE 01 Added decode buffer size control variables */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMSINTR2_INCLUDED
|
||||
#define MMSINTR2_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Defines for Modifier and Companion Standard support. */
|
||||
/* MMSEASE defaults to supporting both, MMSEASE-LITE defaults to */
|
||||
/* supporting neither. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMS_LITE
|
||||
#define MOD_SUPPORT /* MMSEASE - support modifiers */
|
||||
#define CS_SUPPORT /* MMSEASE - support companion standards */
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Operation Specific Decode Buffer Management */
|
||||
|
||||
extern ST_VOID *(*m_calloc_os_fun)(ST_UINT num, ST_UINT size);
|
||||
extern ST_VOID *(*m_realloc_os_fun)(ST_VOID *old, ST_UINT new_size);
|
||||
extern ST_VOID (*m_free_os_fun)(ST_VOID *buf);
|
||||
|
||||
ST_VOID *_m_get_dec_buf (ASN1_DEC_CTXT *aCtx, ST_UINT size);
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Defines for the fourteen types of MMS PDUs */
|
||||
/************************************************************************/
|
||||
|
||||
#define MMSREQ 0 /* MMS request PDU for normal confirmed services */
|
||||
#define MMSRESP 1 /* MMS response PDU for normal confirmed services*/
|
||||
#define MMSERROR 2 /* MMS error PDU for normal confirmed services */
|
||||
#define MMSUNREQ 3 /* MMS response PDU for unconfirmed services */
|
||||
#define MMSREJECT 4 /* MMS reject PDU */
|
||||
#define MMSCANREQ 5 /* MMS request PDU for Cancel service */
|
||||
#define MMSCANRESP 6 /* MMS response PDU for Cancel service */
|
||||
#define MMSCANERR 7 /* MMS error PDU for Cancel service */
|
||||
#define MMSINITREQ 8 /* MMS request PDU for Initiate service */
|
||||
#define MMSINITRESP 9 /* MMS response PDU for Initiate service */
|
||||
#define MMSINITERR 10 /* MMS error PDU for Initiate service */
|
||||
#define MMSCNCLREQ 11 /* MMS request PDU for Conclude service */
|
||||
#define MMSCNCLRESP 12 /* MMS response PDU for Conclude service */
|
||||
#define MMSCNCLERR 13 /* MMS error PDU for Conclude service */
|
||||
#define UNKNOWNTYPE 14 /* not known - used in reject info structure */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* Define base reserved invoke IDs for the Initiate and Conclude */
|
||||
/* services. Allows for up to 4096 associations with reserved */
|
||||
/* invoke IDs. */
|
||||
/************************************************************************/
|
||||
|
||||
#define INIT_INVOKE_ID 0x8000 /* base invoke ID for Initiate requests */
|
||||
#define CONCL_INVOKE_ID 0x9000 /* base invoke ID for Conclude requests */
|
||||
|
||||
/************************************************************************/
|
||||
/* Define the reserved invoke ID for unconfirmed requests. */
|
||||
/************************************************************************/
|
||||
|
||||
#define UNREQ_INVOKE 0xFFFF /* reserved invoke ID for unconf req's */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* The following function pointer arrays are used for the request and */
|
||||
/* response decode functions. The operation opcode is used as the index */
|
||||
/* into the table. */
|
||||
/************************************************************************/
|
||||
|
||||
#define MAX_REQ_DFUN 85 /* highest request decode array entry */
|
||||
#define MAX_RSP_DFUN 85 /* highest response decode array entry */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* This structure is used to return the results of a MMS PDU decode. */
|
||||
/* The user passes a pointer to a struct of this type to decode_mms, */
|
||||
/* and when the decode is complete, the struct info will be filled in. */
|
||||
/* */
|
||||
/* dec_level : */
|
||||
/* 0 - Nothing valid */
|
||||
/* 1 - type valid */
|
||||
/* 2 - type, invoke ID valid */
|
||||
/* 3 - type, invoke ID, op valid */
|
||||
/************************************************************************/
|
||||
|
||||
struct mmsdec_info
|
||||
{
|
||||
ST_RET err_code; /* decode error code (NO_DECODE_ERR) */
|
||||
ST_INT dec_level; /* indicates valid members */
|
||||
ST_INT type; /* MMS pdu type (req,resp,err,rej) */
|
||||
ST_INT op; /* operation opcode */
|
||||
ST_UINT32 id; /* invoke ID */
|
||||
struct list_of_mods mods; /* tracking of modifiers */
|
||||
struct csi cs; /* Companion Standard Info */
|
||||
ST_BOOLEAN data_pres; /* flag to indicate data buffer present */
|
||||
ST_VOID *data_ptr; /* pointer to data if present */
|
||||
};
|
||||
typedef struct mmsdec_info MMSDEC_INFO;
|
||||
|
||||
extern ST_VOID (* SD_CONST mms_req_decode_fun [MAX_REQ_DFUN+1]) (ASN1_DEC_CTXT *aCtx);
|
||||
extern ST_VOID (* SD_CONST mms_rsp_decode_fun [MAX_RSP_DFUN+1]) (ASN1_DEC_CTXT *aCtx);
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* _ms_mms_decode is used at MMS decode level, not generally used by */
|
||||
/* application directly. */
|
||||
/************************************************************************/
|
||||
|
||||
ST_RET _ms_mms_decode (ST_UCHAR *ptr, ST_INT len, MMSDEC_INFO *rslt);
|
||||
|
||||
extern MMSDEC_INFO *_mmsdec_rslt;
|
||||
extern ST_UINT _mmsdec_ctxt; /* default to core context */
|
||||
extern ST_INT _mmsdec_msglen; /* MMS decode message length */
|
||||
extern ST_UCHAR *_mmsdec_msgptr; /* MMS decode message ptr */
|
||||
extern ST_BOOLEAN _mms_dec_info_pres;
|
||||
extern ST_VOID *_mms_dec_info; /* operation specific info */
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* These variables are used help control decode operation specific data */
|
||||
/* structure allocation. For MMS-LITE (M_USR_DEC_BUF), these variables */
|
||||
/* are used to tell the decode system how many objects the allocated */
|
||||
/* buffer (_mms_dec_info). For MMS-EASE, these are normally not used; */
|
||||
/* if they are set non-zero, they will be used in calculating the size */
|
||||
/* of the dec info buffer to be allocated. */
|
||||
|
||||
/* Client Decode Limits. */
|
||||
extern ST_INT m_cl_read_spec_in_result;
|
||||
extern ST_INT m_cl_max_read_var_spec;
|
||||
extern ST_INT m_cl_max_read_acc_rslt;
|
||||
extern ST_INT m_cl_max_info_var_spec;
|
||||
extern ST_INT m_cl_max_info_acc_rslt;
|
||||
extern ST_INT m_cl_max_getvla_vars;
|
||||
extern ST_INT m_cl_max_write_rslts;
|
||||
extern ST_INT m_cl_max_namel_names;
|
||||
extern ST_INT m_cl_max_getcl_cap;
|
||||
extern ST_INT m_cl_max_getpi_doms;
|
||||
extern ST_INT m_cl_max_getdom_cap;
|
||||
extern ST_INT m_cl_max_getdom_pi;
|
||||
extern ST_INT m_cl_max_initupl_cap;
|
||||
extern ST_INT m_cl_max_alarm_summary;
|
||||
extern ST_INT m_cl_max_journal_entries;
|
||||
extern ST_INT m_cl_max_entry_content;
|
||||
extern ST_INT m_cl_max_semaphore_entries;
|
||||
extern ST_INT m_cl_max_named_tokens;
|
||||
extern ST_INT m_cl_max_file_directory;
|
||||
extern ST_INT m_cl_max_event_enrollment;
|
||||
extern ST_INT m_cl_max_enrollment_summary;
|
||||
|
||||
/* Server Decode Limits. */
|
||||
extern ST_INT m_sv_max_loadd_cap;
|
||||
extern ST_INT m_sv_max_read_var_spec;
|
||||
extern ST_INT m_sv_max_write_var_spec;
|
||||
extern ST_INT m_sv_max_write_data;
|
||||
extern ST_INT m_sv_max_rqdlnl_cap;
|
||||
extern ST_INT m_sv_max_initdnld_cap;
|
||||
extern ST_INT m_sv_max_vstr;
|
||||
extern ST_INT m_sv_max_file_names;
|
||||
extern ST_INT m_sv_max_obj_name;
|
||||
extern ST_INT m_sv_max_prompt_count;
|
||||
extern ST_INT m_sv_max_num_vars;
|
||||
extern ST_INT m_sv_max_data_count;
|
||||
extern ST_INT m_sv_max_entry_content;
|
||||
extern ST_INT m_sv_max_data_vars;
|
||||
extern ST_INT m_sv_max_jread_vars;
|
||||
|
||||
/************************************************************************/
|
||||
/* These bitstrings are located in mmsop_en.c and indicate which */
|
||||
/* services and CBB's are supported by this application. */
|
||||
#ifdef MMS_LITE
|
||||
extern SD_CONST ST_UCHAR m_param[2]; /* parameter support */
|
||||
/* services supported as responder */
|
||||
extern SD_CONST ST_UCHAR m_service_resp[11];
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* This variable can be set to force use of the DIS MMS floating point */
|
||||
/* type protocol (used in any over the wire and internal ASN.1 type */
|
||||
/* definitions). */
|
||||
|
||||
extern ST_BOOLEAN m_use_dis_float; /* = SD_FALSE; */
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* ALTERNATE ACCESS */
|
||||
|
||||
/* This structure is used to control the creation of RTAA types */
|
||||
/* and contains state information for the various functions to use */
|
||||
/* during the process. */
|
||||
|
||||
struct aa_apply_ctrl
|
||||
{
|
||||
/* Alternate Access spec */
|
||||
ST_INT num_aa; /* # elements in AA table */
|
||||
struct alt_acc_el *aa_head; /* Head of AA table */
|
||||
struct alt_acc_el *aa_end; /* Last element in AA table */
|
||||
struct alt_acc_el *curr_aa; /* Current location in table */
|
||||
|
||||
/* 'All'runtime aa */
|
||||
ST_INT num_all_rtaa;
|
||||
struct rt_aa_ctrl *all_rtaa_head;
|
||||
struct rt_aa_ctrl *all_rtaa_end;
|
||||
|
||||
/* New (output) runtime aa */
|
||||
ST_INT num_rtaa;
|
||||
struct rt_aa_ctrl *rtaa_head;
|
||||
struct rt_aa_ctrl *curr_rtaa;
|
||||
|
||||
/* Nest Level */
|
||||
ST_INT nest;
|
||||
};
|
||||
typedef struct aa_apply_ctrl AA_APPLY_CTRL;
|
||||
|
||||
/************************************************************************/
|
||||
/* Floating point type ASN.1 definition values */
|
||||
|
||||
#define SNGL_WHOLE 32
|
||||
#define SNGL_FRACT 23
|
||||
#define SNGL_EXP 8
|
||||
|
||||
#define DOUBL_WHOLE 64
|
||||
#define DOUBL_FRACT 52
|
||||
#define DOUBL_EXP 11
|
||||
|
||||
/* Used to determine number of bytes required to hold a number of bits */
|
||||
#define CALC_BIT_LEN(x) (((x)+7)/8)
|
||||
|
||||
/************************************************************************/
|
||||
ST_RET _ms_m_get_rt_info (SD_CONST RUNTIME_TYPE *rt,
|
||||
ST_INT *algn_out,
|
||||
ST_INT *ellen_out);
|
||||
|
||||
/************************************************************************/
|
||||
/* Function pointers for Variable manipulation functions. */
|
||||
/* User exposed functions (i.e. ms_add_named_var, etc.) call these */
|
||||
/* function pointers which should point to "linked list" functions */
|
||||
/* by default (see "_ms_ll_*" functions below). If the "ms_bs_init" */
|
||||
/* function is called, these will point to "binary search" functions */
|
||||
/* (see "_ms_bs_*" functions below). */
|
||||
/************************************************************************/
|
||||
#ifndef MMS_LITE
|
||||
|
||||
extern NAMED_VAR *(*_ms_fp_add_named_var) (DOMAIN_OBJS *dom, ST_CHAR *name,
|
||||
OBJECT_NAME *type, VAR_ACC_ADDR *addr, ST_INT chan);
|
||||
extern NAMED_VAR *(*_ms_fp_add_var) (DOMAIN_OBJS *dom, ST_CHAR *name,
|
||||
NAMED_TYPE *type_ptr, VAR_ACC_ADDR *addr, ST_INT chan);
|
||||
extern NAMED_VAR *(*_ms_fp_find_named_var)
|
||||
(DOMAIN_OBJS *dom, ST_CHAR *name);
|
||||
extern ST_RET (*_ms_fp_del_named_var) (DOMAIN_OBJS *dom, ST_CHAR *name);
|
||||
extern ST_VOID (*_ms_fp_del_all_named_vars) (DOMAIN_OBJS *dom);
|
||||
extern ST_VOID (*_ms_fp_del_deletable_named_vars) (DOMAIN_OBJS *, DELVAR_RESP_INFO *);
|
||||
extern NAMED_VAR_LIST *(*_ms_fp_add_nvlist) (DOMAIN_OBJS *dom,
|
||||
ST_CHAR *name, ST_INT num_vars, VARIABLE_LIST *var_list);
|
||||
extern NAMED_VAR_LIST *(*_ms_fp_find_nvlist) (DOMAIN_OBJS *dom, ST_CHAR *name);
|
||||
extern ST_RET (*_ms_fp_del_nvlist) (DOMAIN_OBJS *dom, ST_CHAR *name);
|
||||
extern ST_VOID (*_ms_fp_del_all_nvlists) (DOMAIN_OBJS *dom);
|
||||
extern ST_VOID (*_ms_fp_del_deletable_nvlists) (DOMAIN_OBJS *, DELVLIST_RESP_INFO *);
|
||||
|
||||
extern NAMED_DOM_CTRL *(*_ms_fp_add_named_domain) (INITDOWN_REQ_INFO *dom_info,
|
||||
ST_UCHAR pro);
|
||||
extern NAMED_DOM_CTRL *(*_ms_fp_find_named_dom)(ST_CHAR dname[MAX_IDENT_LEN+1]);
|
||||
extern ST_RET (*_ms_fp_del_named_dom) (ST_CHAR *dname);
|
||||
extern ST_VOID (*_ms_fp_del_all_named_doms)(NAMED_DOM_CTRL *head_of_dom_list);
|
||||
|
||||
extern ST_VOID (*_ms_fp_write_object_names) (ST_VOID *dom_or_vmd,
|
||||
NAMELIST_REQ_INFO *reqinfo, NAMELIST_RESP_INFO *respinfo,
|
||||
ST_INT max_names);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMSINTR2_INCLUDED */
|
||||
91
include/mmslite/mmsldefs.h
Normal file
91
include/mmslite/mmsldefs.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1993 - 2005, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mmsldefs.h */
|
||||
/* PRODUCT(S) : MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Functions and variables below this point are used by the */
|
||||
/* application. */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 12/01/08 GLB 23 Updated version. */
|
||||
/* 11/10/08 GLB 22 Updated version. */
|
||||
/* 04/23/08 GLB 21 Updated version. */
|
||||
/* 01/02/07 JRB 20 Updated version. */
|
||||
/* 04/10/06 RKR 19 Updated copyright and version for SMV Beta */
|
||||
/* 10/28/05 EJV 18 Update ver to 5.0250 for MMS-LITE-SECURE rel.*/
|
||||
/* 09/09/05 JRB 17 Update ver to 5.02 & Copyright info. */
|
||||
/* BUILD_NUM is OBSOLETE. */
|
||||
/* 04/28/05 PLM 16 Update ver to 5.01 Build 1 */
|
||||
/* 07/21/04 DWL 15 Update to 5.0052 */
|
||||
/* 02/20/04 ASK 14 Chg ver to 5.0051 for USPS release */
|
||||
/* 01/26/04 DWL 13 Update copyright date to 2004. */
|
||||
/* 09/10/03 EJV 12 Chg ver to 5.0050 (Security ready MMS-LITE) */
|
||||
/* 04/29/03 DWL 11 Updated build number */
|
||||
/* 04/08/03 DWL 10 Updated copyright/version/build number */
|
||||
/* 12/20/02 DWL 09 Updated version/build number */
|
||||
/* 03/22/02 DWL 08 Updated build number */
|
||||
/* 03/12/02 DWL 07 Updated version */
|
||||
/* 02/25/02 MDE 06 Removed mmsl_max_msg_size */
|
||||
/* 10/09/01 JRB 05 Add MMSLITE_* product identification defines.*/
|
||||
/* 02/20/98 MDE 04 Fixed __cplusplus problem */
|
||||
/* 11/05/97 MDE 03 Changed mmsl_msg_start to ST_UCHAR * */
|
||||
/* 08/24/97 MDE 02 Added 'mmsl_max_msg_size', 'ml_init_buffers' */
|
||||
/* 11/10/93 DGE 01 Initial MMSEASE-LITE Release. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef LMMSDEFS_INCLUDED
|
||||
#define LMMSDEFS_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
/* Defines for Product Identification. */
|
||||
/* Write these parameters on screen and in log file at startup. */
|
||||
/* Use MMSLITE_NAME & MMSLITE_VERSION in MMS Identify response. */
|
||||
/************************************************************************/
|
||||
#define MMSLITE_COPYRIGHT "Copyright (c) 1986-2008 SISCO, Inc. All Rights Reserved."
|
||||
#define MMSLITE_NAME "MMS-LITE-80X-001"
|
||||
#define MMSLITE_VERSION "5.1002"
|
||||
#define MMSLITE_BUILD_NUM 0 /* OBSOLETE: for backward compatibility only*/
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* MMSEASE-LITE specific Global Variables */
|
||||
/************************************************************************/
|
||||
#define MMS_PCI 0x0001
|
||||
|
||||
extern ST_INT mmsl_enc_buf_size;
|
||||
extern ST_UCHAR *mmsl_enc_buf;
|
||||
extern ST_INT mmsl_dec_info_size;
|
||||
|
||||
extern ST_INT16 mmsl_version;
|
||||
extern ST_UINT32 mmsl_invoke_id;
|
||||
|
||||
extern ST_UCHAR *mmsl_msg_start;
|
||||
extern ST_INT mmsl_msg_len;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* This function initializes the encode/decode buffers and the decode */
|
||||
/* object limitations, and is normally generated using the 'mbufcalc' */
|
||||
/* utility program. */
|
||||
|
||||
ST_VOID ml_init_buffers (ST_VOID);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMSLDEFS_INCLUDED */
|
||||
735
include/mmslite/mmslog.h
Normal file
735
include/mmslite/mmslog.h
Normal file
@@ -0,0 +1,735 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1993 - 2007, All Rights Reserved. */
|
||||
/* */
|
||||
/* PROPRIETARY AND CONFIDENTIAL */
|
||||
/* */
|
||||
/* MODULE NAME : mmslog.h */
|
||||
/* PRODUCT(S) : MMSEASE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains MMS-EASE logging macros used */
|
||||
/* internally by MMS-EASE for SLOGGING */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 09/05/07 EJV 07 Removed obsolete LLC30_LLP code. */
|
||||
/* 11/01/04 JRB 06 Use new "Base" macros SLOG_*, SLOGC_*, SLOGH.*/
|
||||
/* Change MLOG_ALWAYS* like SLOGALWAYS*. */
|
||||
/* 03/13/02 JRB 05 MLOG_PAUSE* macros do nothing. */
|
||||
/* 10/05/01 EJV 04 Corrected comment. */
|
||||
/* 03/15/01 JRB 03 Added USER log macros. */
|
||||
/* 09/13/99 MDE 02 Added SD_CONST modifiers */
|
||||
/* 10/08/98 MDE 01 Migrated to updated SLOG interface */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMSLOG_INCLUDED
|
||||
#define MMSLOG_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_dec_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_enc_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_acse_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_ique_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_rque_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_ind_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_conf_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_vm_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_nerr_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_pdu_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_config_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _mms_log_always_logstr;
|
||||
|
||||
extern SD_CONST ST_CHAR *SD_CONST _user_err_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _user_client_logstr;
|
||||
extern SD_CONST ST_CHAR *SD_CONST _user_server_logstr;
|
||||
|
||||
/*********************** PAUSE Macros ***********************************/
|
||||
#define MLOG_PAUSEDEC(msg)
|
||||
#define MLOG_PAUSEENC(msg)
|
||||
#define MLOG_PAUSEIQUE(msg)
|
||||
#define MLOG_PAUSERQUE(msg)
|
||||
#define MLOG_PAUSEPDU(msg)
|
||||
|
||||
/*********************** DECODE Macros **********************************/
|
||||
#define MLOG_DEC0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a)
|
||||
#define MLOG_DEC1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b)
|
||||
#define MLOG_DEC2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c)
|
||||
#define MLOG_DEC3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c,d)
|
||||
#define MLOG_DEC4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c,d,e)
|
||||
#define MLOG_DEC5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_DEC6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_DEC7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_DEC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_DEC,_mms_log_dec_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CDEC0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_DEC,a)
|
||||
#define MLOG_CDEC1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_DEC,a,b)
|
||||
#define MLOG_CDEC2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_DEC,a,b,c)
|
||||
#define MLOG_CDEC3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_DEC,a,b,c,d)
|
||||
#define MLOG_CDEC4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_DEC,a,b,c,d,e)
|
||||
#define MLOG_CDEC5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_DEC,a,b,c,d,e,f)
|
||||
#define MLOG_CDEC6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_DEC,a,b,c,d,e,f,g)
|
||||
#define MLOG_CDEC7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_DEC,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CDEC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_DEC,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_DECH(a,b) \
|
||||
|
||||
/*********************** ENCODE Macros **********************************/
|
||||
#define MLOG_ENC0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a)
|
||||
#define MLOG_ENC1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b)
|
||||
#define MLOG_ENC2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c)
|
||||
#define MLOG_ENC3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c,d)
|
||||
#define MLOG_ENC4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c,d,e)
|
||||
#define MLOG_ENC5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_ENC6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_ENC7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_ENC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_ENC,_mms_log_enc_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CENC0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_ENC,a)
|
||||
#define MLOG_CENC1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_ENC,a,b)
|
||||
#define MLOG_CENC2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_ENC,a,b,c)
|
||||
#define MLOG_CENC3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_ENC,a,b,c,d)
|
||||
#define MLOG_CENC4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_ENC,a,b,c,d,e)
|
||||
#define MLOG_CENC5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_ENC,a,b,c,d,e,f)
|
||||
#define MLOG_CENC6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_ENC,a,b,c,d,e,f,g)
|
||||
#define MLOG_CENC7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_ENC,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CENC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_ENC,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_ENCH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_ENC,a,b)
|
||||
|
||||
/*********************** ACSE Macros ***********************************/
|
||||
#define MLOG_ACSE0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a)
|
||||
#define MLOG_ACSE1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b)
|
||||
#define MLOG_ACSE2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c)
|
||||
#define MLOG_ACSE3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c,d)
|
||||
#define MLOG_ACSE4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c,d,e)
|
||||
#define MLOG_ACSE5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_ACSE6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_ACSE7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_ACSE8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_ACSE,_mms_log_acse_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CACSE0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_ACSE,a)
|
||||
#define MLOG_CACSE1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_ACSE,a,b)
|
||||
#define MLOG_CACSE2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_ACSE,a,b,c)
|
||||
#define MLOG_CACSE3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_ACSE,a,b,c,d)
|
||||
#define MLOG_CACSE4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_ACSE,a,b,c,d,e)
|
||||
#define MLOG_CACSE5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_ACSE,a,b,c,d,e,f)
|
||||
#define MLOG_CACSE6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_ACSE,a,b,c,d,e,f,g)
|
||||
#define MLOG_CACSE7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_ACSE,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CACSE8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_ACSE,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_ACSEH(a,b) \
|
||||
|
||||
/*********************** IQUE Macros **************************************/
|
||||
#define MLOG_IQUE0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a)
|
||||
#define MLOG_IQUE1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b)
|
||||
#define MLOG_IQUE2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c)
|
||||
#define MLOG_IQUE3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c,d)
|
||||
#define MLOG_IQUE4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c,d,e)
|
||||
#define MLOG_IQUE5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_IQUE6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_IQUE7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_IQUE8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_IQUE,_mms_log_ique_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CIQUE0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_IQUE,a)
|
||||
#define MLOG_CIQUE1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_IQUE,a,b)
|
||||
#define MLOG_CIQUE2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_IQUE,a,b,c)
|
||||
#define MLOG_CIQUE3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_IQUE,a,b,c,d)
|
||||
#define MLOG_CIQUE4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_IQUE,a,b,c,d,e)
|
||||
#define MLOG_CIQUE5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_IQUE,a,b,c,d,e,f)
|
||||
#define MLOG_CIQUE6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_IQUE,a,b,c,d,e,f,g)
|
||||
#define MLOG_CIQUE7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_IQUE,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CIQUE8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_IQUE,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_IQUEH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_IQUE,a,b)
|
||||
|
||||
/*********************** RQUE Macros **************************************/
|
||||
#define MLOG_RQUE0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a)
|
||||
#define MLOG_RQUE1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b)
|
||||
#define MLOG_RQUE2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c)
|
||||
#define MLOG_RQUE3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c,d)
|
||||
#define MLOG_RQUE4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c,d,e)
|
||||
#define MLOG_RQUE5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_RQUE6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_RQUE7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_RQUE8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_RQUE,_mms_log_rque_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CRQUE0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_RQUE,a)
|
||||
#define MLOG_CRQUE1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_RQUE,a,b)
|
||||
#define MLOG_CRQUE2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_RQUE,a,b,c)
|
||||
#define MLOG_CRQUE3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_RQUE,a,b,c,d)
|
||||
#define MLOG_CRQUE4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_RQUE,a,b,c,d,e)
|
||||
#define MLOG_CRQUE5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_RQUE,a,b,c,d,e,f)
|
||||
#define MLOG_CRQUE6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_RQUE,a,b,c,d,e,f,g)
|
||||
#define MLOG_CRQUE7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_RQUE,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CRQUE8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_RQUE,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_RQUEH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_RQUE,a,b)
|
||||
|
||||
/*********************** REQ Macros **************************************/
|
||||
#define MLOG_REQ0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a)
|
||||
#define MLOG_REQ1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b)
|
||||
#define MLOG_REQ2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c)
|
||||
#define MLOG_REQ3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c,d)
|
||||
#define MLOG_REQ4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c,d,e)
|
||||
#define MLOG_REQ5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_REQ6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_REQ7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_REQ8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_REQ,_mms_log_req_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* DEBUG: Add Continuation log macros? */
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_REQH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_REQ,a,b)
|
||||
|
||||
/*********************** IND Macros **************************************/
|
||||
#define MLOG_IND0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a)
|
||||
#define MLOG_IND1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b)
|
||||
#define MLOG_IND2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c)
|
||||
#define MLOG_IND3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c,d)
|
||||
#define MLOG_IND4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c,d,e)
|
||||
#define MLOG_IND5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_IND6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_IND7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_IND8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_IND,_mms_log_ind_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* DEBUG: Add Continuation log macros? */
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_INDH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_IND,a,b)
|
||||
|
||||
/*********************** RESP Macros **************************************/
|
||||
#define MLOG_RESP0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a)
|
||||
#define MLOG_RESP1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b)
|
||||
#define MLOG_RESP2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c)
|
||||
#define MLOG_RESP3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c,d)
|
||||
#define MLOG_RESP4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c,d,e)
|
||||
#define MLOG_RESP5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_RESP6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_RESP7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_RESP8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_RESP,_mms_log_resp_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* DEBUG: Add Continuation log macros? */
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_RESPH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_RESP,a,b)
|
||||
|
||||
/*********************** CONF Macros **************************************/
|
||||
#define MLOG_CONF0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a)
|
||||
#define MLOG_CONF1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b)
|
||||
#define MLOG_CONF2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c)
|
||||
#define MLOG_CONF3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c,d)
|
||||
#define MLOG_CONF4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c,d,e)
|
||||
#define MLOG_CONF5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_CONF6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_CONF7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CONF8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_CONF,_mms_log_conf_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
|
||||
/* DEBUG: Add Continuation log macros? */
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_CONFH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_CONF,a,b)
|
||||
|
||||
/*********************** VM Macros **************************************/
|
||||
#define MLOG_VM0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a)
|
||||
#define MLOG_VM1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b)
|
||||
#define MLOG_VM2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c)
|
||||
#define MLOG_VM3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c,d)
|
||||
#define MLOG_VM4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c,d,e)
|
||||
#define MLOG_VM5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_VM6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_VM7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_VM8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_VM,_mms_log_vm_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* DEBUG: Add Continuation log macros? */
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_VMH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_VM,a,b)
|
||||
|
||||
/*********************** ERR Macros **************************************/
|
||||
#define MLOG_ERR0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a)
|
||||
#define MLOG_ERR1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b)
|
||||
#define MLOG_ERR2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c)
|
||||
#define MLOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c,d)
|
||||
#define MLOG_ERR4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c,d,e)
|
||||
#define MLOG_ERR5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_ERR6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_ERR7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_ERR8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_ERR,_mms_log_err_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CERR0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_ERR,a)
|
||||
#define MLOG_CERR1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_ERR,a,b)
|
||||
#define MLOG_CERR2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_ERR,a,b,c)
|
||||
#define MLOG_CERR3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_ERR,a,b,c,d)
|
||||
#define MLOG_CERR4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_ERR,a,b,c,d,e)
|
||||
#define MLOG_CERR5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_ERR,a,b,c,d,e,f)
|
||||
#define MLOG_CERR6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_ERR,a,b,c,d,e,f,g)
|
||||
#define MLOG_CERR7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_ERR,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CERR8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_ERR,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_ERRH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_ERR,a,b)
|
||||
|
||||
/*********************** NERR Macros *************************************/
|
||||
#define MLOG_NERR0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a)
|
||||
#define MLOG_NERR1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b)
|
||||
#define MLOG_NERR2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c)
|
||||
#define MLOG_NERR3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c,d)
|
||||
#define MLOG_NERR4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c,d,e)
|
||||
#define MLOG_NERR5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_NERR6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_NERR7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_NERR8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_NERR,_mms_log_nerr_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CNERR0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_NERR,a)
|
||||
#define MLOG_CNERR1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_NERR,a,b)
|
||||
#define MLOG_CNERR2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_NERR,a,b,c)
|
||||
#define MLOG_CNERR3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_NERR,a,b,c,d)
|
||||
#define MLOG_CNERR4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_NERR,a,b,c,d,e)
|
||||
#define MLOG_CNERR5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_NERR,a,b,c,d,e,f)
|
||||
#define MLOG_CNERR6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_NERR,a,b,c,d,e,f,g)
|
||||
#define MLOG_CNERR7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_NERR,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CNERR8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_NERR,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_NERRH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_NERR,a,b)
|
||||
|
||||
/*********************** PDU Macros **************************************/
|
||||
#define MLOG_PDU0(a) \
|
||||
SLOG_0 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a)
|
||||
#define MLOG_PDU1(a,b) \
|
||||
SLOG_1 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b)
|
||||
#define MLOG_PDU2(a,b,c) \
|
||||
SLOG_2 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c)
|
||||
#define MLOG_PDU3(a,b,c,d) \
|
||||
SLOG_3 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c,d)
|
||||
#define MLOG_PDU4(a,b,c,d,e) \
|
||||
SLOG_4 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c,d,e)
|
||||
#define MLOG_PDU5(a,b,c,d,e,f) \
|
||||
SLOG_5 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c,d,e,f)
|
||||
#define MLOG_PDU6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c,d,e,f,g)
|
||||
#define MLOG_PDU7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_PDU8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (mms_debug_sel & MMS_LOG_PDU,_mms_log_pdu_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define MLOG_CPDU0(a) \
|
||||
SLOGC_0 (mms_debug_sel & MMS_LOG_PDU,a)
|
||||
#define MLOG_CPDU1(a,b) \
|
||||
SLOGC_1 (mms_debug_sel & MMS_LOG_PDU,a,b)
|
||||
#define MLOG_CPDU2(a,b,c) \
|
||||
SLOGC_2 (mms_debug_sel & MMS_LOG_PDU,a,b,c)
|
||||
#define MLOG_CPDU3(a,b,c,d) \
|
||||
SLOGC_3 (mms_debug_sel & MMS_LOG_PDU,a,b,c,d)
|
||||
#define MLOG_CPDU4(a,b,c,d,e) \
|
||||
SLOGC_4 (mms_debug_sel & MMS_LOG_PDU,a,b,c,d,e)
|
||||
#define MLOG_CPDU5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (mms_debug_sel & MMS_LOG_PDU,a,b,c,d,e,f)
|
||||
#define MLOG_CPDU6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (mms_debug_sel & MMS_LOG_PDU,a,b,c,d,e,f,g)
|
||||
#define MLOG_CPDU7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (mms_debug_sel & MMS_LOG_PDU,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_CPDU8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (mms_debug_sel & MMS_LOG_PDU,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define MLOG_PDUH(a,b) \
|
||||
SLOGH (mms_debug_sel & MMS_LOG_PDU,a,b)
|
||||
|
||||
|
||||
/*********************** ALWAYS Macros *********************************/
|
||||
/* DEBUG: these are same as "SLOGALWAYS*" except header txt */
|
||||
/* "mms_log_always_logstr". If text is not important, just remap */
|
||||
/* "MLOG_ALWAYS*" like this (#define MLOG_ALWAYS0 SLOGALWAYS0). */
|
||||
#if defined(DEBUG_SISCO)
|
||||
#define MLOG_ALWAYS0(a) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a)
|
||||
#define MLOG_ALWAYS1(a,b) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b)
|
||||
#define MLOG_ALWAYS2(a,b,c) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c)
|
||||
#define MLOG_ALWAYS3(a,b,c,d) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c,d)
|
||||
#define MLOG_ALWAYS4(a,b,c,d,e) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c,d,e)
|
||||
#define MLOG_ALWAYS5(a,b,c,d,e,f) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c,d,e,f)
|
||||
#define MLOG_ALWAYS6(a,b,c,d,e,f,g) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c,d,e,f,g)
|
||||
#define MLOG_ALWAYS7(a,b,c,d,e,f,g,h) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c,d,e,f,g,h)
|
||||
#define MLOG_ALWAYS8(a,b,c,d,e,f,g,h,i) \
|
||||
_slog (sLogCtrl,_mms_log_always_logstr, thisFileName,__LINE__,a,b,c,d,e,f,g,h,i)
|
||||
#else /* !DEBUG_SISCO */
|
||||
#define MLOG_ALWAYS0(a)
|
||||
#define MLOG_ALWAYS1(a,b)
|
||||
#define MLOG_ALWAYS2(a,b,c)
|
||||
#define MLOG_ALWAYS3(a,b,c,d)
|
||||
#define MLOG_ALWAYS4(a,b,c,d,e)
|
||||
#define MLOG_ALWAYS5(a,b,c,d,e,f)
|
||||
#define MLOG_ALWAYS6(a,b,c,d,e,f,g)
|
||||
#define MLOG_ALWAYS7(a,b,c,d,e,f,g,h)
|
||||
#define MLOG_ALWAYS8(a,b,c,d,e,f,g,h,i)
|
||||
#endif /* !DEBUG_SISCO */
|
||||
|
||||
/* Continuation & Hex macros are exactly the same as "SLOG*" macros, so just remap to them.*/
|
||||
#define MLOG_CALWAYS0 SLOGCALWAYS0
|
||||
#define MLOG_CALWAYS1 SLOGCALWAYS1
|
||||
#define MLOG_CALWAYS2 SLOGCALWAYS2
|
||||
#define MLOG_CALWAYS3 SLOGCALWAYS3
|
||||
#define MLOG_CALWAYS4 SLOGCALWAYS4
|
||||
#define MLOG_CALWAYS5 SLOGCALWAYS5
|
||||
#define MLOG_CALWAYS6 SLOGCALWAYS6
|
||||
#define MLOG_CALWAYS7 SLOGCALWAYS7
|
||||
#define MLOG_CALWAYS8 SLOGCALWAYS8
|
||||
|
||||
#define MLOG_ALWAYSH SLOGALWAYSH
|
||||
|
||||
|
||||
/*********************** USER ERR Macros********************************/
|
||||
#define USER_LOG_ERR0(a) \
|
||||
SLOG_0 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a)
|
||||
#define USER_LOG_ERR1(a,b) \
|
||||
SLOG_1 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b)
|
||||
#define USER_LOG_ERR2(a,b,c) \
|
||||
SLOG_2 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c)
|
||||
#define USER_LOG_ERR3(a,b,c,d) \
|
||||
SLOG_3 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c,d)
|
||||
#define USER_LOG_ERR4(a,b,c,d,e) \
|
||||
SLOG_4 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c,d,e)
|
||||
#define USER_LOG_ERR5(a,b,c,d,e,f) \
|
||||
SLOG_5 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c,d,e,f)
|
||||
#define USER_LOG_ERR6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c,d,e,f,g)
|
||||
#define USER_LOG_ERR7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c,d,e,f,g,h)
|
||||
#define USER_LOG_ERR8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (user_debug_sel & USER_LOG_ERR,_user_err_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define USER_LOG_ERRC0(a) \
|
||||
SLOGC_0 (user_debug_sel & USER_LOG_ERR,a)
|
||||
#define USER_LOG_ERRC1(a,b) \
|
||||
SLOGC_1 (user_debug_sel & USER_LOG_ERR,a,b)
|
||||
#define USER_LOG_ERRC2(a,b,c) \
|
||||
SLOGC_2 (user_debug_sel & USER_LOG_ERR,a,b,c)
|
||||
#define USER_LOG_ERRC3(a,b,c,d) \
|
||||
SLOGC_3 (user_debug_sel & USER_LOG_ERR,a,b,c,d)
|
||||
#define USER_LOG_ERRC4(a,b,c,d,e) \
|
||||
SLOGC_4 (user_debug_sel & USER_LOG_ERR,a,b,c,d,e)
|
||||
#define USER_LOG_ERRC5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (user_debug_sel & USER_LOG_ERR,a,b,c,d,e,f)
|
||||
#define USER_LOG_ERRC6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (user_debug_sel & USER_LOG_ERR,a,b,c,d,e,f,g)
|
||||
#define USER_LOG_ERRC7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (user_debug_sel & USER_LOG_ERR,a,b,c,d,e,f,g,h)
|
||||
#define USER_LOG_ERRC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (user_debug_sel & USER_LOG_ERR,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define USER_LOG_ERRH(a,b) \
|
||||
SLOGH (user_debug_sel & USER_LOG_ERR,a,b)
|
||||
|
||||
/*********************** USER Client Macros ****************************/
|
||||
#define USER_LOG_CLIENT0(a) \
|
||||
SLOG_0 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a)
|
||||
#define USER_LOG_CLIENT1(a,b) \
|
||||
SLOG_1 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b)
|
||||
#define USER_LOG_CLIENT2(a,b,c) \
|
||||
SLOG_2 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c)
|
||||
#define USER_LOG_CLIENT3(a,b,c,d) \
|
||||
SLOG_3 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c,d)
|
||||
#define USER_LOG_CLIENT4(a,b,c,d,e) \
|
||||
SLOG_4 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c,d,e)
|
||||
#define USER_LOG_CLIENT5(a,b,c,d,e,f) \
|
||||
SLOG_5 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c,d,e,f)
|
||||
#define USER_LOG_CLIENT6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c,d,e,f,g)
|
||||
#define USER_LOG_CLIENT7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c,d,e,f,g,h)
|
||||
#define USER_LOG_CLIENT8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (user_debug_sel & USER_LOG_CLIENT,_user_client_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define USER_LOG_CLIENTC0(a) \
|
||||
SLOGC_0 (user_debug_sel & USER_LOG_CLIENT,a)
|
||||
#define USER_LOG_CLIENTC1(a,b) \
|
||||
SLOGC_1 (user_debug_sel & USER_LOG_CLIENT,a,b)
|
||||
#define USER_LOG_CLIENTC2(a,b,c) \
|
||||
SLOGC_2 (user_debug_sel & USER_LOG_CLIENT,a,b,c)
|
||||
#define USER_LOG_CLIENTC3(a,b,c,d) \
|
||||
SLOGC_3 (user_debug_sel & USER_LOG_CLIENT,a,b,c,d)
|
||||
#define USER_LOG_CLIENTC4(a,b,c,d,e) \
|
||||
SLOGC_4 (user_debug_sel & USER_LOG_CLIENT,a,b,c,d,e)
|
||||
#define USER_LOG_CLIENTC5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (user_debug_sel & USER_LOG_CLIENT,a,b,c,d,e,f)
|
||||
#define USER_LOG_CLIENTC6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (user_debug_sel & USER_LOG_CLIENT,a,b,c,d,e,f,g)
|
||||
#define USER_LOG_CLIENTC7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (user_debug_sel & USER_LOG_CLIENT,a,b,c,d,e,f,g,h)
|
||||
#define USER_LOG_CLIENTC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (user_debug_sel & USER_LOG_CLIENT,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define USER_LOG_CLIENTH(a,b) \
|
||||
SLOGH (user_debug_sel & USER_LOG_CLIENT,a,b)
|
||||
|
||||
/*********************** USER Server Macros ****************************/
|
||||
#define USER_LOG_SERVER0(a) \
|
||||
SLOG_0 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a)
|
||||
#define USER_LOG_SERVER1(a,b) \
|
||||
SLOG_1 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b)
|
||||
#define USER_LOG_SERVER2(a,b,c) \
|
||||
SLOG_2 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c)
|
||||
#define USER_LOG_SERVER3(a,b,c,d) \
|
||||
SLOG_3 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c,d)
|
||||
#define USER_LOG_SERVER4(a,b,c,d,e) \
|
||||
SLOG_4 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c,d,e)
|
||||
#define USER_LOG_SERVER5(a,b,c,d,e,f) \
|
||||
SLOG_5 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c,d,e,f)
|
||||
#define USER_LOG_SERVER6(a,b,c,d,e,f,g) \
|
||||
SLOG_6 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c,d,e,f,g)
|
||||
#define USER_LOG_SERVER7(a,b,c,d,e,f,g,h) \
|
||||
SLOG_7 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c,d,e,f,g,h)
|
||||
#define USER_LOG_SERVER8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOG_8 (user_debug_sel & USER_LOG_SERVER,_user_server_logstr,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Continuation log macros */
|
||||
#define USER_LOG_SERVERC0(a) \
|
||||
SLOGC_0 (user_debug_sel & USER_LOG_SERVER,a)
|
||||
#define USER_LOG_SERVERC1(a,b) \
|
||||
SLOGC_1 (user_debug_sel & USER_LOG_SERVER,a,b)
|
||||
#define USER_LOG_SERVERC2(a,b,c) \
|
||||
SLOGC_2 (user_debug_sel & USER_LOG_SERVER,a,b,c)
|
||||
#define USER_LOG_SERVERC3(a,b,c,d) \
|
||||
SLOGC_3 (user_debug_sel & USER_LOG_SERVER,a,b,c,d)
|
||||
#define USER_LOG_SERVERC4(a,b,c,d,e) \
|
||||
SLOGC_4 (user_debug_sel & USER_LOG_SERVER,a,b,c,d,e)
|
||||
#define USER_LOG_SERVERC5(a,b,c,d,e,f) \
|
||||
SLOGC_5 (user_debug_sel & USER_LOG_SERVER,a,b,c,d,e,f)
|
||||
#define USER_LOG_SERVERC6(a,b,c,d,e,f,g) \
|
||||
SLOGC_6 (user_debug_sel & USER_LOG_SERVER,a,b,c,d,e,f,g)
|
||||
#define USER_LOG_SERVERC7(a,b,c,d,e,f,g,h) \
|
||||
SLOGC_7 (user_debug_sel & USER_LOG_SERVER,a,b,c,d,e,f,g,h)
|
||||
#define USER_LOG_SERVERC8(a,b,c,d,e,f,g,h,i) \
|
||||
SLOGC_8 (user_debug_sel & USER_LOG_SERVER,a,b,c,d,e,f,g,h,i)
|
||||
|
||||
/* Hex log macro */
|
||||
#define USER_LOG_SERVERH(a,b) \
|
||||
SLOGH (user_debug_sel & USER_LOG_SERVER,a,b)
|
||||
|
||||
#define USER_LOG_SERVER_HEX USER_LOG_SERVERH /* for backward compatibility*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************/
|
||||
#endif /* End of MMS_LOG_INCLUDED */
|
||||
/************************************************************************/
|
||||
|
||||
58
include/mmslite/mmslusec.h
Normal file
58
include/mmslite/mmslusec.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 2003 - 2004, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mmslusec.h */
|
||||
/* PRODUCT(S) : MMS-EASE Lite with LITESECURE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* Prototypes for Security related user functions. */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 01/20/04 EJV 03 ulFreeAssocSecurity: del cc param. */
|
||||
/* 01/06/04 EJV 02 Merged with MMS-EASE mms_usec.h. */
|
||||
/* 07/08/03 EJV 01 Adopted from MMS-EASE mms_usec.h. */
|
||||
/************************************************************************/
|
||||
#ifndef MMS_USEC_H
|
||||
#define MMS_USEC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
/* NOTE: The MMS-EASE Lite Secured applications (Client, Server) */
|
||||
/* are designed to work with Security Toolkit for MMS-EASE Lite */
|
||||
/* (LITESECURE-000-001). */
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#if defined(S_SEC_ENABLED)
|
||||
|
||||
#include "acseauth.h"
|
||||
#include "ssec.h"
|
||||
|
||||
|
||||
ST_RET ulSetSecurityCalling (ST_CHAR *locArName,
|
||||
ST_CHAR *remArName,
|
||||
S_SEC_LOC_AR **locArSecOut,
|
||||
S_SEC_REM_AR **remArSecOut,
|
||||
ACSE_AUTH_INFO *locAuthInfo,
|
||||
S_SEC_ENCRYPT_CTRL *encryptCtrl);
|
||||
ST_RET ulCheckSecureAssocConf (MVL_NET_INFO *cc);
|
||||
ST_RET ulCheckSecureAssocInd (MVL_NET_INFO *cc, ACSE_AUTH_INFO *rspAuthInfo);
|
||||
ST_RET ulFreeAssocSecurity (ACSE_AUTH_INFO *authInfo);
|
||||
ST_RET ulCheckSecurityConfiguration (ST_VOID);
|
||||
|
||||
#endif /* defined(S_SEC_ENABLED) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMS_USEC_H */
|
||||
2
include/mmslite/mmsop_en/CVS/Entries
Normal file
2
include/mmslite/mmsop_en/CVS/Entries
Normal file
@@ -0,0 +1,2 @@
|
||||
/mmsop_en.h/1.1/Thu Sep 5 08:21:46 2013//
|
||||
D
|
||||
1
include/mmslite/mmsop_en/CVS/Entries.Extra
Normal file
1
include/mmslite/mmsop_en/CVS/Entries.Extra
Normal file
@@ -0,0 +1 @@
|
||||
/mmsop_en.h////*////
|
||||
1
include/mmslite/mmsop_en/CVS/Entries.Extra.Old
Normal file
1
include/mmslite/mmsop_en/CVS/Entries.Extra.Old
Normal file
@@ -0,0 +1 @@
|
||||
/mmsop_en.h////*////
|
||||
2
include/mmslite/mmsop_en/CVS/Entries.Old
Normal file
2
include/mmslite/mmsop_en/CVS/Entries.Old
Normal file
@@ -0,0 +1,2 @@
|
||||
/mmsop_en.h/0/dummy timestamp//
|
||||
D
|
||||
1
include/mmslite/mmsop_en/CVS/Repository
Normal file
1
include/mmslite/mmsop_en/CVS/Repository
Normal file
@@ -0,0 +1 @@
|
||||
jspqfe/src/pt61850netd_pqfe/source/include/mmslite/mmsop_en
|
||||
1
include/mmslite/mmsop_en/CVS/Root
Normal file
1
include/mmslite/mmsop_en/CVS/Root
Normal file
@@ -0,0 +1 @@
|
||||
:ext:lizhongming@10.0.0.2:/JoyProject
|
||||
0
include/mmslite/mmsop_en/CVS/Template
Normal file
0
include/mmslite/mmsop_en/CVS/Template
Normal file
185
include/mmslite/mmsop_en/mmsop_en.h
Normal file
185
include/mmslite/mmsop_en/mmsop_en.h
Normal file
@@ -0,0 +1,185 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 1997, All Rights Reserved. */
|
||||
/* */
|
||||
/* MODULE NAME : mmsop_en.h */
|
||||
/* PRODUCT(S) : MMSEASE, MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* This module contains the operation enable switches used to */
|
||||
/* configure the decode system, the user service system, & the */
|
||||
/* supported services bit strings. */
|
||||
/* */
|
||||
/* Note that by enabling (or disabling) only the desired MMS */
|
||||
/* operations, a limited subset may be created (the subset */
|
||||
/* creation module is mmsop_en.c), thus allowing the creation of */
|
||||
/* a smaller executable because: */
|
||||
/* 1) references to the various MMS-EASE functions are removed */
|
||||
/* and therefore are not included from the library, and */
|
||||
/* 2) operation specific user application code is eliminated. */
|
||||
/* */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 04/14/98 JRB 04 Put "MPARAM*" defines back. */
|
||||
/* Only user code needs them. */
|
||||
/* 03/20/98 JRB 03 Move defines used by libraries to mms_def2.h */
|
||||
/* Only user code needs this file now. */
|
||||
/* 09/16/97 DSF 02 Fixed comments */
|
||||
/* 08/18/97 MDE 01 Added parameter support defines */
|
||||
/* 04/02/97 DTL 7.00 MMSEASE 7.0 release. See MODL70.DOC for */
|
||||
/* history. */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MMSOP_EN_INCLUDED
|
||||
#define MMSOP_EN_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "mms_def2.h" /* for REQ_RESP_EN, etc. */
|
||||
|
||||
/************************************************************************/
|
||||
/* define the opcode enable switches */
|
||||
/************************************************************************/
|
||||
#define MMS_INIT_EN REQ_RESP_EN
|
||||
#define MMS_CONCLUDE_EN REQ_RESP_EN
|
||||
#define MMS_CANCEL_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_STATUS_EN REQ_RESP_EN
|
||||
#define MMS_USTATUS_EN REQ_RESP_EN
|
||||
#define MMS_GETNAMES_EN REQ_RESP_EN
|
||||
#define MMS_IDENT_EN REQ_RESP_EN
|
||||
#define MMS_RENAME_EN REQ_RESP_EN
|
||||
#define MMS_GETCL_EN REQ_RESP_EN
|
||||
#define MMS_VMD_EN 0
|
||||
|
||||
#define MMS_NAMED_DOM_EN 0
|
||||
#define MMS_MV_DWN_EN REQ_RESP_EN /* VM download */
|
||||
#define MMS_INIT_DWN_EN REQ_RESP_EN
|
||||
#define MMS_DWN_LOAD_EN REQ_RESP_EN
|
||||
#define MMS_TERM_DWN_EN REQ_RESP_EN
|
||||
#define MMS_MV_UPL_EN REQ_RESP_EN /* VM upload */
|
||||
#define MMS_INIT_UPL_EN REQ_RESP_EN
|
||||
#define MMS_UP_LOAD_EN REQ_RESP_EN
|
||||
#define MMS_TERM_UPL_EN REQ_RESP_EN
|
||||
#define MMS_RDDWN_EN REQ_RESP_EN
|
||||
#define MMS_RDUPL_EN REQ_RESP_EN
|
||||
#define MMS_LOAD_DOM_EN REQ_RESP_EN
|
||||
#define MMS_STR_DOM_EN REQ_RESP_EN
|
||||
#define MMS_DEL_DOM_EN REQ_RESP_EN
|
||||
#define MMS_GET_DOM_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_CRE_PI_EN REQ_RESP_EN
|
||||
#define MMS_DEL_PI_EN REQ_RESP_EN
|
||||
#define MMS_START_EN REQ_RESP_EN
|
||||
#define MMS_STOP_EN REQ_RESP_EN
|
||||
#define MMS_RESUME_EN REQ_RESP_EN
|
||||
#define MMS_RESET_EN REQ_RESP_EN
|
||||
#define MMS_KILL_EN REQ_RESP_EN
|
||||
#define MMS_GET_PI_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_VA_EN 1
|
||||
#define MMS_MV_READ_EN REQ_RESP_EN /* VM Read variable(s) */
|
||||
#define MMS_MV_RDVARS_EN REQ_RESP_EN /* General VM Rd var's */
|
||||
#define MMS_READ_EN REQ_RESP_EN
|
||||
#define MMS_MV_WRITE_EN REQ_RESP_EN /* VM Write variable(s) */
|
||||
#define MMS_MV_WRVARS_EN REQ_RESP_EN /* General VM WR var's */
|
||||
#define MMS_WRITE_EN REQ_RESP_EN
|
||||
#define MMS_INFO_EN REQ_RESP_EN
|
||||
#define MMS_GETVAR_EN REQ_RESP_EN
|
||||
#define MMS_DEFVAR_EN REQ_RESP_EN
|
||||
#define MMS_DEFSCAT_EN REQ_RESP_EN
|
||||
#define MMS_GETSCAT_EN REQ_RESP_EN
|
||||
#define MMS_DELVAR_EN REQ_RESP_EN
|
||||
#define MMS_DEFVLIST_EN REQ_RESP_EN
|
||||
#define MMS_GETVLIST_EN REQ_RESP_EN
|
||||
#define MMS_DELVLIST_EN REQ_RESP_EN
|
||||
#define MMS_MV_DEFTYPE_EN REQ_RESP_EN /* VM DefineType */
|
||||
#define MMS_DEFTYPE_EN REQ_RESP_EN
|
||||
#define MMS_GETTYPE_EN REQ_RESP_EN
|
||||
#define MMS_DELTYPE_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_TAKECTRL_EN REQ_RESP_EN
|
||||
#define MMS_RELCTRL_EN REQ_RESP_EN
|
||||
#define MMS_DEFINE_SEM_EN REQ_RESP_EN
|
||||
#define MMS_DELETE_SEM_EN REQ_RESP_EN
|
||||
#define MMS_REP_SEMSTAT_EN REQ_RESP_EN
|
||||
#define MMS_REP_SEMPOOL_EN REQ_RESP_EN
|
||||
#define MMS_REP_SEMENTRY_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_JREAD_EN REQ_RESP_EN
|
||||
#define MMS_JWRITE_EN REQ_RESP_EN
|
||||
#define MMS_JINIT_EN REQ_RESP_EN
|
||||
#define MMS_JSTAT_EN REQ_RESP_EN
|
||||
#define MMS_JCREATE_EN REQ_RESP_EN
|
||||
#define MMS_JDELETE_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_DEFEC_EN REQ_RESP_EN
|
||||
#define MMS_DELEC_EN REQ_RESP_EN
|
||||
#define MMS_GETECA_EN REQ_RESP_EN
|
||||
#define MMS_REPECS_EN REQ_RESP_EN
|
||||
#define MMS_ALTECM_EN REQ_RESP_EN
|
||||
#define MMS_TRIGE_EN REQ_RESP_EN
|
||||
#define MMS_DEFEA_EN REQ_RESP_EN
|
||||
#define MMS_DELEA_EN REQ_RESP_EN
|
||||
#define MMS_GETEAA_EN REQ_RESP_EN
|
||||
#define MMS_REPEAS_EN REQ_RESP_EN
|
||||
#define MMS_DEFEE_EN REQ_RESP_EN
|
||||
#define MMS_DELEE_EN REQ_RESP_EN
|
||||
#define MMS_GETEEA_EN REQ_RESP_EN
|
||||
#define MMS_REPEES_EN REQ_RESP_EN
|
||||
#define MMS_ALTEE_EN REQ_RESP_EN
|
||||
#define MMS_EVNOT_EN REQ_RESP_EN
|
||||
#define MMS_ACKEVNOT_EN REQ_RESP_EN
|
||||
#define MMS_GETAS_EN REQ_RESP_EN
|
||||
#define MMS_GETAES_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_INPUT_EN REQ_RESP_EN
|
||||
#define MMS_OUTPUT_EN REQ_RESP_EN
|
||||
|
||||
#define MMS_MV_FOPEN_EN REQ_RESP_EN /* VM FileOpen */
|
||||
#define MMS_MV_FREAD_EN REQ_RESP_EN /* VM FileRead */
|
||||
#define MMS_MV_FCLOSE_EN REQ_RESP_EN /* VM FileClose */
|
||||
#define MMS_MV_FCOPY_EN REQ_RESP_EN /* VM FileCopy */
|
||||
#define MMS_OBTAINFILE_EN REQ_RESP_EN
|
||||
#define MMS_FOPEN_EN REQ_RESP_EN
|
||||
#define MMS_FREAD_EN REQ_RESP_EN
|
||||
#define MMS_FCLOSE_EN REQ_RESP_EN
|
||||
#define MMS_FRENAME_EN REQ_RESP_EN
|
||||
#define MMS_FDELETE_EN REQ_RESP_EN
|
||||
#define MMS_FDIR_EN REQ_RESP_EN
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/************************************************************************/
|
||||
/* PARAMETER SUPPORTED BITSTRING VALUES */
|
||||
/************************************************************************/
|
||||
|
||||
#define MPARAM_STR1 0x80 /* 0x80 arrays */
|
||||
#define MPARAM_STR2 0x40 /* 0x40 structures */
|
||||
#define MPARAM_VNAM 0x20 /* 0x20 named variables */
|
||||
#define MPARAM_VALT 0x10 /* 0x10 alternate access */
|
||||
#define MPARAM_VADR 0x08 /* 0x08 address formed variables */
|
||||
#define MPARAM_VSCA 0x00 /* 0x04 scattered access */
|
||||
#define MPARAM_TPY 0x02 /* 0x02 third party */
|
||||
#define MPARAM_VLIS 0x01 /* 0x01 variable list */
|
||||
#define MPARAM_REAL 0x00 /* 0x80 real data type */
|
||||
#define MPARAM_AKEC 0x00 /* 0x40 ack event cond. */
|
||||
#define MPARAM_CEI 0x00 /* 0x20 cond. eval. interval */
|
||||
|
||||
#define MPARAM0 MPARAM_STR1 | MPARAM_STR2 | MPARAM_VNAM | MPARAM_VALT |\
|
||||
MPARAM_VADR | MPARAM_VSCA | MPARAM_TPY | MPARAM_VLIS
|
||||
#define MPARAM1 MPARAM_REAL | MPARAM_AKEC | MPARAM_CEI
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MMSOP_EN_INCLUDED */
|
||||
|
||||
132
include/mmslite/msjexhnd.h
Normal file
132
include/mmslite/msjexhnd.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1997-2001, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : msjexhnd.cpp */
|
||||
/* PRODUCT(S) : */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : Unhandled Exception Hanlder */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/14/02 DSF 02 Added support for PDBs */
|
||||
/* 02/08/02 MDE 01 Added Debug Exception and Slog support */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef __MSJEXHND_H__
|
||||
#define __MSJEXHND_H__
|
||||
|
||||
#define EXCEPTION_DIAGNOSTIC_DEBUG 0xE0000001
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
class MSJExceptionHandler
|
||||
{
|
||||
public:
|
||||
|
||||
MSJExceptionHandler( );
|
||||
~MSJExceptionHandler( );
|
||||
|
||||
void SetLogFileName( PTSTR pszLogFileName );
|
||||
#ifdef DEBUG_SISCO
|
||||
static void SetLogCtrl (LOG_CTRL *pLogCtrl);
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
// entry point where control comes on an unhandled exception
|
||||
static LONG WINAPI MSJUnhandledExceptionFilter(PEXCEPTION_POINTERS pExceptionInfo );
|
||||
|
||||
// where report info is extracted and generated
|
||||
static void GenerateExceptionReport( PEXCEPTION_POINTERS pExceptionInfo );
|
||||
|
||||
// Helper functions
|
||||
static LPTSTR GetExceptionString( DWORD dwCode );
|
||||
static BOOL GetLogicalAddress( PVOID addr, PTSTR szModule, DWORD len,
|
||||
DWORD& section, DWORD& offset );
|
||||
static void IntelStackWalk( PCONTEXT pContext );
|
||||
#if 1
|
||||
static void ImagehlpStackWalk( PCONTEXT pContext );
|
||||
#endif
|
||||
static int __cdecl _tprintf(const TCHAR * format, ...);
|
||||
|
||||
#if 1
|
||||
static BOOL InitImagehlpFunctions( void );
|
||||
#endif
|
||||
|
||||
// Variables used by the class
|
||||
static TCHAR m_szPath[MAX_PATH];
|
||||
static TCHAR m_szLogFileName[MAX_PATH];
|
||||
static LPTOP_LEVEL_EXCEPTION_FILTER m_previousFilter;
|
||||
#ifdef DEBUG_SISCO
|
||||
static LOG_CTRL *m_pLogCtrl;
|
||||
#endif
|
||||
static HANDLE m_hReportFile;
|
||||
static BOOL m_bDebugExcept;
|
||||
static BOOL m_bFirstTime;
|
||||
|
||||
#if 1
|
||||
// Make typedefs for some IMAGEHLP.DLL functions so that we can use them
|
||||
// with GetProcAddress
|
||||
typedef BOOL (__stdcall * SYMINITIALIZEPROC)( HANDLE, LPSTR, BOOL );
|
||||
typedef BOOL (__stdcall *SYMCLEANUPPROC)( HANDLE );
|
||||
|
||||
typedef BOOL (__stdcall * STACKWALKPROC)
|
||||
( DWORD, HANDLE, HANDLE, LPSTACKFRAME, LPVOID,
|
||||
PREAD_PROCESS_MEMORY_ROUTINE,PFUNCTION_TABLE_ACCESS_ROUTINE,
|
||||
PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE );
|
||||
|
||||
typedef LPVOID (__stdcall *SYMFUNCTIONTABLEACCESSPROC)( HANDLE, DWORD );
|
||||
|
||||
typedef DWORD (__stdcall *SYMGETMODULEBASEPROC)( HANDLE, DWORD );
|
||||
|
||||
typedef BOOL (__stdcall *SYMGETSYMFROMADDRPROC) ( HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL );
|
||||
|
||||
typedef BOOL (__stdcall *SYMGETSEARCHPATHPROC) ( HANDLE, PSTR, DWORD );
|
||||
typedef BOOL (__stdcall *SYMSETSEARCHPATHPROC) ( HANDLE, PSTR );
|
||||
|
||||
typedef DWORD (__stdcall *SYMGETOPTIONSPROC) ();
|
||||
typedef DWORD (__stdcall *SYMSETOPTIONSPROC) (DWORD);
|
||||
typedef BOOL (__stdcall *SYMGETLINEFROMADDRPROC) (HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
|
||||
|
||||
static SYMINITIALIZEPROC _SymInitialize;
|
||||
static SYMCLEANUPPROC _SymCleanup;
|
||||
static STACKWALKPROC _StackWalk;
|
||||
static SYMFUNCTIONTABLEACCESSPROC _SymFunctionTableAccess;
|
||||
static SYMGETMODULEBASEPROC _SymGetModuleBase;
|
||||
static SYMGETSYMFROMADDRPROC _SymGetSymFromAddr;
|
||||
static SYMGETSEARCHPATHPROC _SymGetSearchPath;
|
||||
static SYMSETSEARCHPATHPROC _SymSetSearchPath;
|
||||
|
||||
static SYMGETOPTIONSPROC _SymGetOptions;
|
||||
static SYMSETOPTIONSPROC _SymSetOptions;
|
||||
static SYMGETLINEFROMADDRPROC _SymGetLineFromAddr;
|
||||
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
extern MSJExceptionHandler g_MSJExceptionHandler; // global instance of class
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ExpInit ();
|
||||
void ExpRaiseDebugException ();
|
||||
#ifdef DEBUG_SISCO
|
||||
void ExpSetLogCtrl (LOG_CTRL *pLogCtrl);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
234
include/mmslite/mvl_acse.h
Normal file
234
include/mmslite/mvl_acse.h
Normal file
@@ -0,0 +1,234 @@
|
||||
/************************************************************************/
|
||||
/* SISCO SOFTWARE MODULE HEADER *****************************************/
|
||||
/************************************************************************/
|
||||
/* (c) Copyright Systems Integration Specialists Company, Inc., */
|
||||
/* 1986 - 2005, All Rights Reserved */
|
||||
/* */
|
||||
/* MODULE NAME : mvl_acse.h */
|
||||
/* PRODUCT(S) : MMSEASE-LITE */
|
||||
/* */
|
||||
/* MODULE DESCRIPTION : */
|
||||
/* */
|
||||
/* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : */
|
||||
/* NONE */
|
||||
/* */
|
||||
/* MODIFICATION LOG : */
|
||||
/* Date Who Rev Comments */
|
||||
/* -------- --- ------ ------------------------------------------- */
|
||||
/* 05/10/05 EJV 26 Moved up osicfgx proto. */
|
||||
/* 04/06/05 EJV 25 Added MMSEASE_MOSI. */
|
||||
/* 03/28/05 JRB 24 Del suicacse header. */
|
||||
/* 08/11/04 JRB 23 Del global funct ptr u_mvl_connect_ind_fun. */
|
||||
/* Fix mvl_abort_req_ex return (ST_RET). */
|
||||
/* 07/08/04 JRB 22 Del unused global var mvl_local_cl_ar_name. */
|
||||
/* 07/23/03 MDE 21 Removed ACSE_AUTH_ENABLED */
|
||||
/* 06/16/03 EJV 20 Removed m_match.h, s_match.h includes */
|
||||
/* Chg M_MATCH_CTRL to DIB_MATCH_CTRL. */
|
||||
/* 06/10/03 MDE 19 Added address matching */
|
||||
/* 10/11/02 ASK 18 Added mvla_initiate_req_ex and */
|
||||
/* u_mvl_connect_*_ex */
|
||||
/* 05/13/02 MDE 17 Added structure element comments */
|
||||
/* 05/03/02 MDE 16 Added mvl_add_bind_ctrl, associated changes */
|
||||
/* 02/25/02 MDE 15 More changes to MVL_CFG_INFO */
|
||||
/* 02/20/02 MDE 14 Changes to new MVL_CFG_INFO, for mult. bind */
|
||||
/* 02/07/02 JRB 13 Define MVL_CFG_INFO & pass to mvl_start_acse.*/
|
||||
/* Move osicfgx proto here, add MVL_CFG_INFO arg*/
|
||||
/* Del global var mvl_local_ar_name. */
|
||||
/* 01/29/02 JRB 12 Replace mvl_init_cl_netinfo funct with */
|
||||
/* mvl_init_audt_addr. */
|
||||
/* 11/28/01 MDE 11 mvl_set_num_connections,mvl_set_max_msg_size */
|
||||
/* 01/05/01 MDE 10 Changes for use over Marben */
|
||||
/* 06/26/00 JRB 09 Del "#define MVL_ACSE". Not used. */
|
||||
/* Move "#define COACSE" to mvl_defs.h (avoids */
|
||||
/* mvl_defs.h dependence on mvl_acse.h). */
|
||||
/* 03/09/00 MDE 08 Added _mvl_init_conn_ctrl */
|
||||
/* 07/30/99 JRB 07 Chg ma_clbind_ctrl from static to global. */
|
||||
/* 04/13/99 MDE 06 Added '_mvla_initiate_locDe' */
|
||||
/* 03/18/99 MDE 05 Made connection limits runtime settable */
|
||||
/* 11/16/98 MDE 04 Removed mvl_release, mvla_release (obsolete) */
|
||||
/* 07/16/98 MDE 03 Addded 'mvl_dib_entry_to_app_ref' */
|
||||
/* 06/19/98 JRB 02 Add tp_type, etc. to NET_BIND_CTRL. */
|
||||
/* 09/10/97 MDE 01 MMS-LITE V4.0 Release */
|
||||
/************************************************************************/
|
||||
|
||||
#ifndef MVL_ACSE_INCLUDED
|
||||
#define MVL_ACSE_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(MMSEASE_MOSI)
|
||||
/* min includes */
|
||||
#include "mms_def2.h"
|
||||
#else
|
||||
#include "acse2usr.h"
|
||||
#include "mvl_defs.h"
|
||||
|
||||
/************************************************************************/
|
||||
/* Some error return codes */
|
||||
#define REQ_INCOMPLETE 0x100
|
||||
#define LOCAL_NAME_NOT_FOUND 0x101
|
||||
#define REMOTE_NAME_NOT_FOUND 0x102
|
||||
|
||||
#define MVLE_LOCAL_NAME 0x101
|
||||
#define MVLE_REMOTE_NAME 0x102
|
||||
#define MVLE_NUM_CONNECTIONS 0x103
|
||||
|
||||
/************************************************************************/
|
||||
/* Bind and Connection control structures */
|
||||
|
||||
struct dib_entry; /* Forward declaration */
|
||||
#endif /* !defined(MMSEASE_MOSI) */
|
||||
|
||||
typedef struct net_bind_ctrl
|
||||
{
|
||||
/* These parameters must be set before using in mvl_start_acse */
|
||||
ST_CHAR ar_name[MAX_AR_LEN+1];
|
||||
ST_INT num_calling;
|
||||
ST_INT num_called;
|
||||
|
||||
/* Internal */
|
||||
ST_VOID *user_info;
|
||||
#ifdef LEAN_T
|
||||
ST_INT tp_type;
|
||||
ST_INT32 copp_bind_id_tcp;
|
||||
ST_INT32 copp_bind_id_tp4;
|
||||
#else
|
||||
ST_INT32 copp_bind_id;
|
||||
#endif
|
||||
ST_INT32 clpp_bind_id;
|
||||
struct dib_entry *de;
|
||||
} NET_BIND_CTRL;
|
||||
|
||||
/************************************************************************/
|
||||
/* MVL configuration information. Filled in by user or configuration */
|
||||
/* and passed to mvl_start_acse. */
|
||||
/************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ST_INT max_msg_size; /* Max MMS message size */
|
||||
ST_INT num_calling; /* total number of calling connections */
|
||||
ST_INT num_called; /* total number of called connections */
|
||||
|
||||
/* Used for single local address binding (LEAN-T) */
|
||||
ST_CHAR local_ar_name[MAX_AR_LEN+1];
|
||||
|
||||
/* Used for multiple local address binding only (MARBEN) */
|
||||
#ifdef MAP30_ACSE /* Select bind mode */
|
||||
ST_BOOLEAN use_bind_ctrl; /* Set to 0 for single local */
|
||||
#endif
|
||||
|
||||
/* User sets these only when use_bind_ctrl is SD_TRUE (MARBEN) */
|
||||
ST_INT max_bind_ctrl; /* Max allowed */
|
||||
ST_INT num_bind_ctrl; /* Active bindings */
|
||||
NET_BIND_CTRL *bind_ctrl; /* Array of NET_BIND_CTRL */
|
||||
|
||||
/* Internal use */
|
||||
ST_INT calling_used; /* Number mvl_calling_conn_ctrl bound */
|
||||
ST_INT called_used; /* Number mvl_called_conn_ctrl bound */
|
||||
} MVL_CFG_INFO;
|
||||
|
||||
/* Persistant config information; set by MVL during mvl_start_acse */
|
||||
extern MVL_CFG_INFO *mvl_cfg_info;
|
||||
|
||||
ST_RET osicfgx (ST_CHAR *xml_filename, MVL_CFG_INFO *mvlCfg);
|
||||
|
||||
#if !defined(MMSEASE_MOSI)
|
||||
|
||||
/************************************************************************/
|
||||
/* Global configuration variables */
|
||||
|
||||
extern INIT_INFO *mvl_init_resp_info;
|
||||
extern NET_BIND_CTRL ma_clbind_ctrl; /* to save clpp_bind info. */
|
||||
|
||||
#if defined(MAP30_ACSE)
|
||||
extern ST_INT mvl_num_bind_ctrl;
|
||||
extern NET_BIND_CTRL *mvl_bind_ctrl;
|
||||
#endif
|
||||
ST_RET mvla_set_init_ar (ST_CHAR *ar_name);
|
||||
|
||||
/************************************************************************/
|
||||
/* ACSE interface related MVL ACSE functions */
|
||||
|
||||
ST_VOID mvl_set_max_msg_size (ST_INT max_msg_size);
|
||||
|
||||
ST_RET mvl_start_acse (MVL_CFG_INFO *cfgInfo);
|
||||
ST_RET mvl_end_acse (ST_VOID);
|
||||
|
||||
|
||||
ST_VOID _mvl_init_conn_ctrl (ST_VOID);
|
||||
|
||||
ST_RET mvl_initiate_req (ST_CHAR *remAr,
|
||||
INIT_INFO *req_info,
|
||||
INIT_INFO *resp_info,
|
||||
MVL_NET_INFO **net_info_out);
|
||||
|
||||
ST_RET mvla_initiate_req (ST_CHAR *remAr,
|
||||
INIT_INFO *req_info,
|
||||
INIT_INFO *resp_info,
|
||||
MVL_NET_INFO **net_info_out,
|
||||
MVL_REQ_PEND **req_out);
|
||||
|
||||
ST_INT mvla_initiate_req_ex (ST_CHAR *remAr,
|
||||
INIT_INFO *req_info,
|
||||
INIT_INFO *resp_info,
|
||||
MVL_NET_INFO **net_info_out,
|
||||
MVL_REQ_PEND **req_out,
|
||||
ACSE_AUTH_INFO *auth_info,
|
||||
S_SEC_ENCRYPT_CTRL *encrypt_info);
|
||||
|
||||
/* If this variable is not NULL, MVL will use it as the source for the */
|
||||
/* local dib entry for an initiate request. */
|
||||
extern struct dib_entry *_mvla_initiate_locDe;
|
||||
|
||||
ST_RET mvl_abort_req (MVL_NET_INFO *cc);
|
||||
ST_RET mvl_abort_req_ex (MVL_NET_INFO *cc,
|
||||
ST_BOOLEAN diagnostic_pres,
|
||||
ST_ACSE_AUTH diagnostic);
|
||||
|
||||
ST_RET mvl_init_audt_addr (AUDT_APDU *audt, ST_CHAR *locArName, ST_CHAR *remArName);
|
||||
ST_VOID mvl_dib_entry_to_app_ref (struct dib_entry *de, struct app_ref *appRef);
|
||||
ST_RET mvl_add_bind_ctrl (NET_BIND_CTRL *bc);
|
||||
|
||||
/************************************************************************/
|
||||
/* User defined function pointer to handle disconnect indications */
|
||||
|
||||
#define MVL_ACSE_RELEASE_IND 1
|
||||
#define MVL_ACSE_ABORT_IND 2
|
||||
extern ST_VOID (*u_mvl_disc_ind_fun) (MVL_NET_INFO *cc, ST_INT discType);
|
||||
|
||||
/************************************************************************/
|
||||
/* User defined functions to handle connect indications & confirms. */
|
||||
/* User must supply these functions. */
|
||||
|
||||
extern ST_ACSE_AUTH u_mvl_connect_ind_ex (MVL_NET_INFO *cc, INIT_INFO *init_info, ACSE_AUTH_INFO *req_auth_info, ACSE_AUTH_INFO *rsp_auth_info);
|
||||
extern ST_ACSE_AUTH u_mvl_connect_cnf_ex (MVL_NET_INFO *cc, AARE_APDU *ass_rsp_info);
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
/* MVL level address matching functions */
|
||||
ST_RET mvl_match_remote_ar (DIB_MATCH_CTRL *matchCtrl, struct mvl_net_info *cc,
|
||||
struct dib_entry **dib_entry_out);
|
||||
ST_RET mvl_match_local_ar (DIB_MATCH_CTRL *matchCtrl, struct mvl_net_info *cc,
|
||||
struct dib_entry **dib_entry_out);
|
||||
ST_INT mvl_cmp_local_addr (DIB_MATCH_CTRL *matchCtrl, struct mvl_net_info *cc,
|
||||
struct dib_entry *dib_entry);
|
||||
ST_INT mvl_cmp_remote_addr (DIB_MATCH_CTRL *matchCtrl, struct mvl_net_info *cc,
|
||||
struct dib_entry *dib_entry);
|
||||
|
||||
#if defined(MAP30_ACSE)
|
||||
ST_RET mvl_net_info_to_chan (MVL_NET_INFO *cc, ST_INT *chanOut);
|
||||
#endif
|
||||
|
||||
#endif /* !defined(MMSEASE_MOSI) */
|
||||
|
||||
/************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MVL_ACSE_INCLUDED */
|
||||
/************************************************************************/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user