void ini_portforward_server(int service_id, Protocol *proto, TCFBroadcastGroup * bcg) {
    char * service_name = loc_alloc(strlen("PortServer") + 30);
    if (service_id != 0) sprintf(service_name, "PortServer@%d", service_id);
    else sprintf(service_name, "PortServer");
    add_command_handler(proto, service_name, "create", port_server_cmd_create);
    add_command_handler(proto, service_name, "delete", port_server_cmd_delete);
}
Exemple #2
0
void ini_terminals_service(Protocol * proto) {
    add_channel_close_listener(channel_close_listener);

    add_command_handler(proto, TERMINALS, "getContext", command_get_context);
    add_command_handler(proto, TERMINALS, "launch", command_launch);
    add_command_handler(proto, TERMINALS, "exit", command_exit);
    add_command_handler(proto, TERMINALS, "setWinSize", command_set_win_size);
}
Exemple #3
0
void ini_context_reset_service(Protocol * proto) {
    static ContextEventListener listener = {
        .context_disposed = event_context_disposed
    };
    add_context_event_listener(&listener, NULL);
    context_extension_offset = context_extension(sizeof(ContextExtensionRS));
    add_command_handler(proto, CONTEXT_RESET, "getCapabilities", command_get_capabilities);
    add_command_handler(proto, CONTEXT_RESET, "reset", command_reset);
}
Exemple #4
0
void ini_port_server_service(const char * name_ext, Protocol * proto, TCFBroadcastGroup * bcg) {
    char * service_name = (char *)loc_alloc(strlen("PortServer") + (name_ext == NULL ? 1 : strlen(name_ext) + 1));
    sprintf(service_name, "PortServer%s", name_ext == NULL ? "" : name_ext);
    add_command_handler(proto, service_name, "getConfig", port_server_cmd_get_config);
    add_command_handler(proto, service_name, "create", port_server_cmd_create);
    add_command_handler(proto, service_name, "list", port_server_cmd_list);
    add_command_handler(proto, service_name, "delete", port_server_cmd_delete);
    add_command_handler(proto, service_name, "getCapabilities", port_server_cmd_get_capabilities);
}
Exemple #5
0
urg_client_t::urg_client_t(char* ini_file) {
	if (_ini_config.Load(ini_file)) {
		all::core::ip_address_t server_address;
		server_address.hostname = _ini_config.GetStringAsChar("server:address", "127.0.0.1");
		server_address.port = _ini_config.GetInt("server:port", 12345);
		set_server_addr(server_address);
	}

	add_command_handler("scanData", boost::bind(&urg_client_t::save_scan_data, this, _1));
	add_command_handler("multiScanData", boost::bind(&urg_client_t::save_multi_scan_data, this, _1));

}
void ini_disassembly_service(Protocol * proto) {
    static ContextEventListener listener = {
        NULL,
        NULL,
        NULL,
        NULL,
        NULL,
        event_context_disposed
    };
    add_context_event_listener(&listener, NULL);
    context_extension_offset = context_extension(sizeof(ContextExtensionDS));
    add_command_handler(proto, DISASSEMBLY, "getCapabilities", command_get_capabilities);
    add_command_handler(proto, DISASSEMBLY, "disassemble", command_disassemble);
}
void ini_memory_service(Protocol * proto, TCFBroadcastGroup * bcg) {
    static ContextEventListener listener = {
        event_context_created,
        event_context_exited,
        NULL,
        NULL,
        event_context_changed
    };
    broadcast_group = bcg;
    add_context_event_listener(&listener, NULL);
    add_command_handler(proto, MEMORY, "getContext", command_get_context);
    add_command_handler(proto, MEMORY, "getChildren", command_get_children);
    add_command_handler(proto, MEMORY, "set", command_set);
    add_command_handler(proto, MEMORY, "get", command_get);
    add_command_handler(proto, MEMORY, "fill", command_fill);
}
Exemple #8
0
void ini_registers_service(Protocol * proto, TCFBroadcastGroup * bcg) {
    broadcast_group = bcg;
    add_command_handler(proto, REGISTERS, "getContext", command_get_context);
    add_command_handler(proto, REGISTERS, "getChildren", command_get_children);
    add_command_handler(proto, REGISTERS, "get", command_get);
    add_command_handler(proto, REGISTERS, "set", command_set);
    add_command_handler(proto, REGISTERS, "getm", command_getm);
    add_command_handler(proto, REGISTERS, "setm", command_setm);
    add_command_handler(proto, REGISTERS, "search", command_search);
}
void ini_streams_service(Protocol * proto) {
    int i;

    list_init(&clients);
    list_init(&streams);
    list_init(&subscriptions);
    for (i = 0; i < HANDLE_HASH_SIZE; i++) {
        list_init(&handle_hash[i]);
    }

    add_channel_close_listener(channel_close_listener);

    add_command_handler(proto, STREAMS, "subscribe", command_subscribe);
    add_command_handler(proto, STREAMS, "unsubscribe", command_unsubscribe);
    add_command_handler(proto, STREAMS, "read", command_read);
    add_command_handler(proto, STREAMS, "write", command_write);
    add_command_handler(proto, STREAMS, "eos", command_eos);
    add_command_handler(proto, STREAMS, "connect", command_connect);
    add_command_handler(proto, STREAMS, "disconnect", command_disconnect);
}
void ini_run_ctrl_service(Protocol * proto, TCFBroadcastGroup * bcg, TCFSuspendGroup * spg) {
    static ContextEventListener listener = {
        event_context_created,
        event_context_exited,
        event_context_stopped,
        event_context_started,
        event_context_changed
    };
    suspend_group = spg;
    add_context_event_listener(&listener, bcg);
    add_command_handler(proto, RUN_CONTROL, "getContext", command_get_context);
    add_command_handler(proto, RUN_CONTROL, "getChildren", command_get_children);
    add_command_handler(proto, RUN_CONTROL, "getState", command_get_state);
    add_command_handler(proto, RUN_CONTROL, "resume", command_resume);
    add_command_handler(proto, RUN_CONTROL, "suspend", command_suspend);
    add_command_handler(proto, RUN_CONTROL, "terminate", command_terminate);
}
void ini_file_system_service(Protocol * proto) {
    int i;

    add_channel_close_listener(channel_close_listener);
    list_init(&file_info_ring);
    for (i = 0; i < HANDLE_HASH_SIZE; i++) {
        list_init(&handle_hash[i]);
    }

    add_command_handler(proto, FILE_SYSTEM, "open", command_open);
    add_command_handler(proto, FILE_SYSTEM, "close", command_close);
    add_command_handler(proto, FILE_SYSTEM, "read", command_read);
    add_command_handler(proto, FILE_SYSTEM, "write", command_write);
    add_command_handler(proto, FILE_SYSTEM, "stat", command_stat);
    add_command_handler(proto, FILE_SYSTEM, "lstat", command_lstat);
    add_command_handler(proto, FILE_SYSTEM, "fstat", command_fstat);
    add_command_handler(proto, FILE_SYSTEM, "setstat", command_setstat);
    add_command_handler(proto, FILE_SYSTEM, "fsetstat", command_fsetstat);
    add_command_handler(proto, FILE_SYSTEM, "opendir", command_opendir);
    add_command_handler(proto, FILE_SYSTEM, "readdir", command_readdir);
    add_command_handler(proto, FILE_SYSTEM, "remove", command_remove);
    add_command_handler(proto, FILE_SYSTEM, "rmdir", command_rmdir);
    add_command_handler(proto, FILE_SYSTEM, "mkdir", command_mkdir);
    add_command_handler(proto, FILE_SYSTEM, "realpath", command_realpath);
    add_command_handler(proto, FILE_SYSTEM, "rename", command_rename);
    add_command_handler(proto, FILE_SYSTEM, "readlink", command_readlink);
    add_command_handler(proto, FILE_SYSTEM, "symlink", command_symlink);
    add_command_handler(proto, FILE_SYSTEM, "copy", command_copy);
    add_command_handler(proto, FILE_SYSTEM, "user", command_user);
    add_command_handler(proto, FILE_SYSTEM, "roots", command_roots);
}
void ini_symbols_service(Protocol * proto) {
    ini_symbols_lib();
    add_command_handler(proto, SYMBOLS, "getContext", command_get_context);
    add_command_handler(proto, SYMBOLS, "getChildren", command_get_children);
}
Exemple #13
0
void ini_symbols_service(Protocol * proto) {
    static int ini_done = 0;
    if (!ini_done) {
        ini_symbols_lib();
        ini_done = 1;
    }
    add_command_handler(proto, SYMBOLS, "getContext", command_get_context);
    add_command_handler(proto, SYMBOLS, "getChildren", command_get_children);
    add_command_handler(proto, SYMBOLS, "find", command_find_first);
    add_command_handler(proto, SYMBOLS, "findByName", command_find_by_name);
    add_command_handler(proto, SYMBOLS, "findByAddr", command_find_by_addr);
    add_command_handler(proto, SYMBOLS, "findInScope", command_find_in_scope);
    add_command_handler(proto, SYMBOLS, "list", command_list);
    add_command_handler(proto, SYMBOLS, "getArrayType", command_get_array_type);
    add_command_handler(proto, SYMBOLS, "getLocationInfo", command_get_location_info);
    add_command_handler(proto, SYMBOLS, "findFrameInfo", command_find_frame_info); /* Deprecated, use findFrameProps */
    add_command_handler(proto, SYMBOLS, "findFrameProps", command_find_frame_props);
    add_command_handler(proto, SYMBOLS, "getSymFileInfo", command_get_sym_file_info);
    add_command_handler(proto, SYMBOLS, "getAddressInfo", command_get_address_info);
}
void ini_processes_service(Protocol * proto) {
#if defined(_WRS_KERNEL)
    prs_list_lock = semMCreate(SEM_Q_PRIORITY);
    if (prs_list_lock == NULL) check_error(errno);
    if (taskCreateHookAdd((FUNCPTR)task_create_hook) != OK) check_error(errno);
    if (taskDeleteHookAdd((FUNCPTR)task_delete_hook) != OK) check_error(errno);
#endif
    list_init(&prs_list);
    add_waitpid_listener(waitpid_listener, NULL);
    add_command_handler(proto, PROCESSES, "getContext", command_get_context);
    add_command_handler(proto, PROCESSES, "getChildren", command_get_children);
    add_command_handler(proto, PROCESSES, "attach", command_attach);
    add_command_handler(proto, PROCESSES, "detach", command_detach);
    add_command_handler(proto, PROCESSES, "terminate", command_terminate);
    add_command_handler(proto, PROCESSES, "signal", command_signal);
    add_command_handler(proto, PROCESSES, "getSignalList", command_get_signal_list);
    add_command_handler(proto, PROCESSES, "getSignalMask", command_get_signal_mask);
    add_command_handler(proto, PROCESSES, "setSignalMask", command_set_signal_mask);
    add_command_handler(proto, PROCESSES, "getEnvironment", command_get_environment);
    add_command_handler(proto, PROCESSES, "start", command_start);
}
//-------------------------------------------------------------------
  void saliency_server_t::register_()
  {
    add_command_handler("update_saliency",boost::bind(&saliency_server_t::update_saliency_data_
      ,this,_1,_2));
  }