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

Function process_command

src/socket.cpp:290–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290static bool process_command(char* command)
291{
292 trim(command);
293
294 char *rest = strchr(command, ' ');
295 if (rest) {
296 *rest++ = '\0';
297 trim(rest);
298 }
299
300 if (!rest) {
301 WARNING("The %s command requires at least one argument", command);
302 } else if (!strcmp(command, "set")) {
303 process_set(rest);
304 } else if (!strcmp(command, "trace")) {
305 process_trace(rest);
306 } else if (!strcmp(command, "dump")) {
307 process_dump(rest);
308 } else if (!strcmp(command, "reset")) {
309 process_reset(rest);
310 } else {
311 WARNING("Unrecognized command: \"%s\"", command);
312 }
313
314 return false;
315}
316
317int command_mode = 0;
318char *command_buffer = nullptr;

Callers 2

get_inet_addressFunction · 0.85
handle_stdin_socketFunction · 0.85

Calls 6

WARNINGFunction · 0.85
process_setFunction · 0.85
process_traceFunction · 0.85
process_dumpFunction · 0.85
process_resetFunction · 0.85
trimFunction · 0.70

Tested by

no test coverage detected