APing: APPC Ping Sample for Testing Connectivity

Click to open or copy the files for the APing sample.

Click to open or copy the Shared directory (required).

The sample code for APing and APingD is ported from code on the IBM APPC/CPI-C disk. They are end-to-end connectivity testers; they simply show that the configuration is correct by exchanging bytes of data across the link. APing is the invoking (local) half and attempts to contact APingD, which is written here as a Windows NT service so it can be installed as an invokable TP on the remote computer.

For more information, see APING and APINGD in Microsoft SNA Server.

Aping.c performs an echo test to a specified destination. APING can be used when you are first installing APPC on your computer to make sure you can connect to another computer in the network.  APING can also be used to get an estimate of the delay time or throughput to another computer in the network.

ApingD echos whatever is sent by APING.  Keep receiving until you get permission to send. Send the same number of same size records

There is a Snaenv.bat file to set environment variables, available via the SNA Samples topic.

Building SDK Samples

This sample uses the following keywords:

alloc_cpic_buffer; atol; cmaccp; cmallc; cmcfmd; cmdeal; cmepln; cmsdt; cmsend; cmsltp; cmsptr; cmssl; cmsst; cmwait; controlhandler; cpicerr_destroy; cpicerr_exchange_version; cpicerr_exchange_version_plus; cpicerr_handle_rc; cpicerr_new; cpicerr_set_conv_id; cpicerr_set_log_file_name; cpicerr_set_log_file_path; cpicerr_set_major_version; cpicerr_set_minor_version; cpicerr_set_program_info; cpicerr_set_program_name; cpicinit_default_mode_name; cpicinit_default_sym_dest_name; cpicinit_default_tp_name; cpicinit_destroy; cpicinit_get_password; cpicinit_new; cpicinit_query_password_needed; cpicinit_set_destination; cpicinit_set_mode_name; cpicinit_set_password; cpicinit_set_security_type; cpicinit_set_tp_name; cpicinit_set_userid; cpicinit_setup_conversation; debugbreak; defined; do_aping; do_exit; fclose; fopen; get_time; getlasterror; getopt; memset; process_arguments; registerservicectrlhandler; servicemain; setbuf; setservicestatus; show_info; startservicectrldispatcher; tpstart; wincpicstartup; write_error; write_log; write_output