int	find_outbound_cclink(WORD chl);/* find outbound changeover link */
int search_outbound_link(WORD ls);
int pc_length(BYTE	nw);
void send_mtp_msg(int outlink, BYTE	*msgptr);
void send_snm_msg(WORD ls,BYTE *msgptr);
void hmrt_srm_msg(WORD linkset, BYTE MsgType, long dst);
int	check_outbound_route(BYTE sio, long dpc, WORD sls, long opc);
int	send_to_tup(BYTE *msgptr);/* send tup msg to tele user part */
int	send_to_isup(BYTE *msgptr);/* send isup msg to tele user part */
int	send_to_bicc(BYTE *msgptr);/* send bicc msg to tele user part */
int	send_to_sccp(BYTE *msgptr);/* send sccp msg to tele user part */
int	send_to_sccp_lite(up_message *msgptr);/* send sccp-lite msg to sccp */
int get_tup(up_message *GetTup);
int get_isup(up_message *GetIsup);
int get_bicc(up_message_2 *GetBicc);
int get_sccp(up_message *GetSccp);
int	find_dst_place(long	dst,WORD ls);
int find_direct_ls_to_dst(long dst, BYTE nw, long opc);
void mtp2_mtp3_internal_msg(BYTE *msgptr);
void hmdt_test_msg(BYTE *msgptr);
void hmrt_tra_msg(WORD linkset);
void sd_STM_msg(WORD chl, BYTE MsgType);
void hmrt_xxxx_adjacent_sp_restart(ls_info *ls);
void hmrt_hmdc_message_for_routing(ls_info *ls);
void hmrt_xxxx_signalling_link_management_message(ls_info *ls);
void hmrt_xxxx_signalling_route_management_message(ls_info *ls);
void hmrt_xxxx_mtp_testing_user_part_message(ls_info *ls);
void hmrt_tprc_restart_begins(ls_info *ls);
void hmrt_tprc_restart_ends(ls_info *ls);
void hmrt_tfrc_update_routing_tables(WORD dst, BYTE nw);
void hmrt_sltc_signalling_link_test_ack(WORD chl);
void hmrt_sltc_signalling_link_test_msg(WORD chl);
void hmrt_tcbc_changeback_ack(WORD chl);
void hmrt_tcbc_changeback_declaration(WORD chl);
void hmrt_tcoc_changeover_ack(WORD chl);
void hmrt_tcoc_changeover_order(WORD chl);
void hmrt_tcoc_emergency_changeover_ack(WORD chl);
void hmrt_tcoc_emergency_changeover_order(WORD chl);
void hmrt_tcbc_update_routing_tables(WORD chl);
void hmrt_tcoc_update_routing_tables(WORD chl);
void hmrt_tlac_emergency_changeover_ack(WORD chl);
void hmrt_tlac_force_uninhibit_signalling_link(WORD chl);
void hmrt_tlac_inhibit_ack(WORD chl);
void hmrt_tlac_inhibit_denied(WORD chl);
void hmrt_tlac_local_inhibit_test(WORD chl);
void hmrt_tlac_remote_inhibit_test(WORD chl);
void hmrt_tlac_uninhibit_ack(WORD chl);
void send_command_to_mtp2(WORD chl, BYTE command);
void update_nid_table(WORD ls, long dst, BYTE place);
void update_aid_table(WORD ls, long dst, BYTE place);
void get_para_from_disk();
int mtp_setmib(BYTE oidlen, DWORD *oid, BYTE *pdata,WORD datalen);
int mtp_getmib(BYTE oidlen, DWORD *oid, BYTE *pdata,BYTE *vartype);
void mtp_snmp_init();
void tup_shm_init();
void isup_shm_init();
void sccp_shm_init();
int GetMtp2Msg(ulong ip_port);
void m3ua_timer();
int GetM3uaMsg(ulong port);
int tup_GetMsg(up_message *msgptr);
int isup_GetMsg(up_message *msgptr);
int sccp_GetMsg(up_message *msgptr);
int tup_to_mtp3(up_message *msgptr);
int isup_to_mtp3(up_message *msgptr);
int sccp_to_mtp3(up_message *msgptr);
void sltc_proc(WORD	chl);
void lsac_proc(WORD chl);
void rtpc_proc(BYTE nw,WORD	dst);
void rtac_proc(BYTE nw,WORD dst);
void tsrc_proc(WORD chl);
void tlac_proc(WORD chl);
void tcoc_proc(WORD chl);
void tcbc_proc(WORD chl);
void tprc_mgmt_signalling_point_restart_indication();
void tprc_proc();
void taprc_proc(WORD linkset);/* adjacent sp restart control */
void mtp_send_error(char *object,int chl, char *err_str);
void mtp_send_error2(BYTE *msg,BYTE sio,ulong dpc,char *err_str,BYTE from);
int	mtp_debug_set();
void mtp_m_rt();
void mtp_put_error(BYTE type,WORD chl);
void mtp3_readpara_from_disk();
BOOL iptrans_msg_flow(BYTE *msg,BYTE pclen,int direction,ulong dest_ip);
BOOL iptrans_msg_flow_2(up_message *up_msg_ptr);
void mtp_prompt(char *object, BYTE value);
void set_heartbeat(BYTE reason,WORD object);
void mtp3_send_alarm(WORD component_id,BYTE alarm_code);
void update_sls_to_link_table(int ls);
int  update_ls_slc_table(int link);
void mtp3_debug(int n,const char *fmt,...);
void reset_mtp3();
void mtp3Timer_proc(WORD i);
int pc_length(BYTE	nw);
void mtp3_showbuf(int n,BYTE *msg,int len);
int mtp3lite_updateStatus(WORD chl, BYTE new_l2_state,BYTE alarmCode);
void mtp3lite_upd_route_status(WORD chl, BYTE flag);
int Mtp3BinSearchValue(WORD low, WORD high,BYTE nw,ull key);
void mtp3_send_mtp2_alarm(WORD component,BYTE alarm);
BYTE MTP3_LINK_TYPE(WORD Link);
int Mtp3AddSortRec(BYTE nw,ulong dpc, ulong real_index, ulong opc);
void mtp3_send_mtp2_alarm(WORD component,BYTE alarm);
