int	find_outbound_cclink(BYTE chl);/* find outbound changeover link */
int search_outbound_link(BYTE ls);
int pc_length(BYTE	nw);
void send_mtp_msg(int outlink, BYTE	*msgptr);
void send_snm_msg(BYTE ls,BYTE *msgptr);
void hmrt_srm_msg(BYTE linkset, BYTE MsgType, long dst);
int	check_outbound_route(BYTE sio, long dpc, BYTE sls);
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,BYTE ls);
int find_direct_ls_to_dst(long dst, BYTE nw);
void mtp2_mtp3_internal_msg(BYTE *msgptr);
void hmdt_test_msg(BYTE *msgptr);
void hmrt_tra_msg(BYTE linkset);
void sd_STM_msg(BYTE 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(BYTE dst, BYTE nw);
void hmrt_sltc_signalling_link_test_ack(BYTE chl);
void hmrt_sltc_signalling_link_test_msg(BYTE chl);
void hmrt_tcbc_changeback_ack(BYTE chl);
void hmrt_tcbc_changeback_declaration(BYTE chl);
void hmrt_tcoc_changeover_ack(BYTE chl);
void hmrt_tcoc_changeover_order(BYTE chl);
void hmrt_tcoc_emergency_changeover_ack(BYTE chl);
void hmrt_tcoc_emergency_changeover_order(BYTE chl);
void hmrt_tcbc_update_routing_tables(BYTE chl);
void hmrt_tcoc_update_routing_tables(BYTE chl);
void hmrt_tlac_emergency_changeover_ack(BYTE chl);
void hmrt_tlac_force_uninhibit_signalling_link(BYTE chl);
void hmrt_tlac_inhibit_ack(BYTE chl);
void hmrt_tlac_inhibit_denied(BYTE chl);
void hmrt_tlac_local_inhibit_test(BYTE chl);
void hmrt_tlac_remote_inhibit_test(BYTE chl);
void hmrt_tlac_uninhibit_ack(BYTE chl);
void send_command_to_mtp2(BYTE chl, BYTE command);
void update_nid_table(BYTE ls, long dst, BYTE place);
void update_aid_table(BYTE 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(DWORD ip_port);
void m3ua_timer();
int GetM3uaMsg(DWORD 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(BYTE	chl);
void lsac_proc(BYTE chl);
void rtpc_proc(BYTE nw,BYTE	dst);
void rtac_proc(BYTE nw,BYTE dst);
void tsrc_proc(BYTE chl);
void tlac_proc(BYTE chl);
void tcoc_proc(BYTE chl);
void tcbc_proc(BYTE chl);
void tprc_mgmt_signalling_point_restart_indication();
void tprc_proc();
void taprc_proc(BYTE linkset);/* adjacent sp restart control */
void mtp_send_error(char *object,int chl, char *err_str);
void mtp_send_error2(BYTE *msg,BYTE sio,DWORD dpc,char *err_str,BYTE from);
int	mtp_debug_set();
void mtp_m_rt();
void mtp_put_error(BYTE type,BYTE chl);
void mtp3_readpara_from_disk();
BOOL iptrans_msg_flow(BYTE *msg,BYTE pclen,int direction,DWORD dest_ip);
BOOL iptrans_msg_flow_2(up_message *up_msg_ptr);
void mtp_prompt(char *object, BYTE value);
void set_heartbeat(BYTE reason,BYTE 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(BYTE i);
int pc_length(BYTE	nw);
void mtp3_showbuf(int n,BYTE *msg,int len);
int mtp3lite_updateStatus(BYTE chl, BYTE new_l2_state,BYTE alarmCode);
void mtp3lite_upd_route_status(BYTE chl, BYTE flag);
int Mtp3BinSearchValue(BYTE low, BYTE high,BYTE nw,DWORD key);
void mtp3_send_mtp2_alarm(WORD component,BYTE alarm);
BYTE MTP3_LINK_TYPE(BYTE Link);
int Mtp3AddSortRec(BYTE nw,DWORD dpc, DWORD real_index);
void mtp3_send_mtp2_alarm(WORD component,BYTE alarm);
