MCPcopy Create free account
hub / github.com/SIPp/sipp / help

Function help

src/sipp.cpp:869–938  ·  view source on GitHub ↗

Help screen */

Source from the content-addressed store, hash-verified

867
868/* Help screen */
869static void help()
870{
871 int i, max;
872
873 pid_t pager = begin_pager();
874
875 printf
876 ("\n"
877 "Usage:\n"
878 "\n"
879 " sipp remote_host[:remote_port] [options]\n"
880 "\n"
881 "Example:\n"
882 "\n"
883 " Run SIPp with embedded server (uas) scenario:\n"
884 " ./sipp -sn uas\n"
885 " On the same host, run SIPp with embedded client (uac) scenario:\n"
886 " ./sipp -sn uac 127.0.0.1\n"
887 "\n"
888 " Available options:\n"
889 "\n");
890
891 /* We automatically generate the help messages based on the options array.
892 * This should hopefully encourage people to write help text when they
893 * introduce a new option and keep the code a bit cleaner. */
894 max = sizeof(options_table) / sizeof(options_table[0]);
895 for (i = 0; i < max; i++) {
896 char *formatted;
897 if (!options_table[i].help) {
898 continue;
899 }
900 formatted = wrap(options_table[i].help, 22, 77);
901 if (options_table[i].type == SIPP_HELP_TEXT_HEADER) {
902 printf("\n*** %s\n\n", formatted);
903 } else {
904 printf(" -%-16s: %s\n", options_table[i].option, formatted);
905 }
906 free(formatted);
907 }
908
909 printf
910 (
911 "\n\nSignal handling:\n"
912 "\n"
913 " SIPp can be controlled using POSIX signals. The following signals\n"
914 " are handled:\n"
915 " USR1: Similar to pressing the 'q' key. It triggers a soft exit\n"
916 " of SIPp. No more new calls are placed and all ongoing calls\n"
917 " are finished before SIPp exits.\n"
918 " Example: kill -SIGUSR1 732\n"
919 " USR2: Triggers a dump of all statistics screens in\n"
920 " <scenario_name>_<pid>_screens.log file. Especially useful \n"
921 " in background mode to know what the current status is.\n"
922 " Example: kill -SIGUSR2 732\n"
923 "\n"
924 "Exit codes:\n"
925 "\n"
926 " Upon exit (on fatal error or when the number of asked calls (-m\n"

Callers 1

mainFunction · 0.85

Calls 3

begin_pagerFunction · 0.85
wrapFunction · 0.85
end_pagerFunction · 0.85

Tested by

no test coverage detected