boolean_t cli_disallow_mupip_set(void) { int disallow_return_value = 0; boolean_t p1, p2, p3; *cli_err_str_ptr = 0; p1 = d_c_cli_present("FILE"); p2 = d_c_cli_present("REGION"); p3 = d_c_cli_present("JNLFILE"); /* any MUPIP SET command should contain at LEAST one of the above qualifiers */ disallow_return_value = !(p1 || p2 || p3); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* any MUPIP SET command should contain at MOST one of the above qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(3) p1, p2, p3); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("JOURNAL.ON") && d_c_cli_present("JOURNAL.OFF")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("JOURNAL.DISABLE") && (d_c_cli_present("JOURNAL.ON") || d_c_cli_present("JOURNAL.OFF") || d_c_cli_present("JOURNAL.ENABLE") || d_c_cli_present("JOURNAL.BEFORE_IMAGES") || d_c_cli_negated("JOURNAL.BEFORE_IMAGES") || d_c_cli_present("JOURNAL.FILENAME") || d_c_cli_present("JOURNAL.ALLOCATION") || d_c_cli_present("JOURNAL.EXTENSION") || d_c_cli_present("JOURNAL.BUFFER_SIZE") || d_c_cli_present("JOURNAL.ALIGNSIZE") || d_c_cli_present("JOURNAL.EPOCH_INTERVAL") || d_c_cli_present("JOURNAL.AUTOSWITCHLIMIT"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!(!d_c_cli_present("JOURNAL") || d_c_cli_present("DISABLE") || d_c_cli_present("OFF") || d_c_cli_present("JOURNAL.BEFORE_IMAGES") || d_c_cli_negated("JOURNAL.BEFORE_IMAGES"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("REPLICATION.ON") && d_c_cli_present("REPLICATION.OFF")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("REPLICATION.ON") && (d_c_cli_present("JOURNAL.OFF") || d_c_cli_present("JOURNAL.DISABLE") || d_c_cli_negated("JOURNAL"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("PREVJNLFILE") && !(d_c_cli_present("JNLFILE"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("VERSION") && (d_c_cli_present("ACCESS_METHOD") || d_c_cli_present("GLOBAL_BUFFERS") || d_c_cli_present("RESERVED_BYTES") || d_c_cli_present("FLUSH_TIME") || d_c_cli_present("LOCK_SPACE") || d_c_cli_present("DEFER_TIME") || d_c_cli_present("WAIT_DISK") || d_c_cli_present("PARTIAL_RECOV_BYPASS"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("INST_FREEZE_ON_ERROR") && p3); CLI_DIS_CHECK_N_RESET; p1 = d_c_cli_present("KEY_SIZE"); p2 = d_c_cli_present("RECORD_SIZE"); p3 = d_c_cli_present("RESERVED_BYTES"); disallow_return_value = cli_check_any2(VARLSTCNT(3) p1, p2, p3); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_find(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4; *cli_err_str_ptr = 0; p1 = d_c_cli_present("BLOCK"); p2 = d_c_cli_present("FREEBLOCK"); p3 = d_c_cli_present("KEY"); p4 = d_c_cli_present("REGION"); disallow_return_value = cli_check_any2(VARLSTCNT(4) p1, p2, p3, p4); CLI_DIS_CHECK_N_RESET; disallow_return_value = ( d_c_cli_present("EXHAUSTIVE") || d_c_cli_present("SIBLINGS")) && ( d_c_cli_present("FREEBLOCK") || d_c_cli_present("KEY") || d_c_cli_present("REGION")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("HINT") && !d_c_cli_present("FREEBLOCK"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("FREEBLOCK") && !d_c_cli_present("HINT"); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_dump(void) { int disallow_return_value = 0; boolean_t p1, p2, p3; *cli_err_str_ptr = 0; p1 = d_c_cli_present("RECORD"); p2 = d_c_cli_present("OFFSET"); p3 = d_c_cli_present("FILEHEADER"); disallow_return_value = cli_check_any2(VARLSTCNT(3) p1, p2, p3); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("FILEHEADER") && (d_c_cli_present("BLOCK") || d_c_cli_present("HEADER") || d_c_cli_present("COUNT") || d_c_cli_present("GLO") || d_c_cli_present("ZWR")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("GLO") && d_c_cli_present("ZWR"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("GLO") && d_c_cli_present("HEADER"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ZWR") && d_c_cli_present("HEADER"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("COUNT") && !d_c_cli_present("HEADER") && !(d_c_cli_present("RECORD") || d_c_cli_present("OFFSET")) && !d_c_cli_present("BLOCK"); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_replic_receive(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4, p5, p6; *cli_err_str_ptr = 0; p1 = d_c_cli_present("START"); p2 = d_c_cli_present("SHUTDOWN"); p3 = d_c_cli_present("CHECKHEALTH"); p4 = d_c_cli_present("STATSLOG"); p5 = d_c_cli_present("SHOWBACKLOG"); p6 = d_c_cli_present("CHANGELOG"); /* any MUPIP REPLIC -RECEIVE command should contain at LEAST one of the above qualifiers */ disallow_return_value = !(p1 || p2 || p3 || p4 || p5 || p6); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* any MUPIP REPLIC -RECEIVE command should contain at MOST one of the above qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(6) p1, p2, p3, p4, p5, p6); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("START") && !(d_c_cli_present("LISTENPORT") || d_c_cli_present("UPDATEONLY") || d_c_cli_present("HELPERS"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("START") && d_c_cli_present("LISTENPORT") && !d_c_cli_present("LOG")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!d_c_cli_present("START") && (d_c_cli_present("LISTENPORT") || d_c_cli_present("UPDATERESYNC") || d_c_cli_present("NORESYNC"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("UPDATERESYNC") && d_c_cli_present("NORESYNC")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!d_c_cli_present("UPDATERESYNC") && d_c_cli_present("REUSE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!d_c_cli_present("UPDATERESYNC") && d_c_cli_present("RESUME")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("REUSE") && d_c_cli_present("RESUME")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!(d_c_cli_present("START") || d_c_cli_present("SHUTDOWN")) && d_c_cli_present("UPDATEONLY")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (!(d_c_cli_present("START") || d_c_cli_present("SHUTDOWN") || d_c_cli_present("CHECKHEALTH")) && d_c_cli_present("HELPERS")); disallow_return_value = (d_c_cli_present("LISTENPORT") && d_c_cli_present("UPDATEONLY")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("UPDATEONLY") && d_c_cli_present("HELPERS")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("CHANGELOG") && !(d_c_cli_present("LOG") || d_c_cli_present("LOG_INTERVAL"))); CLI_DIS_CHECK_N_RESET; /* BUFFSIZE, CMPSIZE or FILTER are supported only with START qualifier */ disallow_return_value = (!d_c_cli_present("START") && (d_c_cli_present("BUFFSIZE") || d_c_cli_present("CMPLVL") || d_c_cli_present("FILTER"))); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("AUTOROLLBACK") && !d_c_cli_present("LISTENPORT") && !d_c_cli_present("START")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_remove(void) { int disallow_return_value = 0; boolean_t p1, p2, p3; *cli_err_str_ptr = 0; p1 = d_c_cli_present("RECORD"); p2 = d_c_cli_present("OFFSET"); p3 = d_c_cli_present("VERSION"); disallow_return_value = cli_check_any2(VARLSTCNT(3) p1, p2, p3); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("VERSION") && d_c_cli_present("COUNT"); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_maps(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4; *cli_err_str_ptr = 0; p1 = d_c_cli_present("FREE"); p2 = d_c_cli_present("BUSY"); p3 = d_c_cli_present("MASTER"); p4 = d_c_cli_present("RESTORE_ALL"); disallow_return_value = cli_check_any2(VARLSTCNT(4) p1, p2, p3, p4); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("BLOCK") && d_c_cli_present("RESTORE_ALL"); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_cache(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4; *cli_err_str_ptr = 0; p1 = d_c_cli_present("CHANGE"); p2 = d_c_cli_present("RECOVER"); p3 = d_c_cli_present("SHOW"); p4 = d_c_cli_present("VERIFY"); /* any DSE CACHE command should contain at LEAST one of the above qualifiers */ disallow_return_value = !(p1 || p2 || p3 || p4); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* any DSE CACHE command should contain at MOST one of the above qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(4) p1, p2, p3, p4); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ALL") && d_c_cli_present("CHANGE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("SHOW")) && (d_c_cli_present("OFFSET") || d_c_cli_present("SIZE") || d_c_cli_present("VALUE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SHOW") && d_c_cli_present("VALUE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CHANGE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("OFFSET") && !d_c_cli_present("SIZE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SIZE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("VALUE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_negated("CRIT") && (d_c_cli_present("CHANGE") || d_c_cli_present("RECOVER") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_crit(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4, p5; *cli_err_str_ptr = 0; p1 = d_c_cli_present("INIT"); p2 = d_c_cli_present("OWNER"); p3 = d_c_cli_present("SEIZE"); p4 = d_c_cli_present("RELEASE"); p5 = d_c_cli_present("REMOVE"); disallow_return_value = cli_check_any2(VARLSTCNT(5) p1, p2, p3, p4, p5); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CRASH") && (d_c_cli_present("SEIZE") || d_c_cli_present("RELEASE") || d_c_cli_present("OWNER") || d_c_cli_present("RESET")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("RESET") && (d_c_cli_present("SEIZE") || d_c_cli_present("RELEASE") || d_c_cli_present("OWNER")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CYCLE") && (d_c_cli_present("INIT") || d_c_cli_present("REMOVE") || d_c_cli_present("SEIZE") || d_c_cli_present("RELEASE") || d_c_cli_present("RESET")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ALL") && (d_c_cli_present("CRASH") || d_c_cli_present("CYCLE") || d_c_cli_present("INIT") || d_c_cli_present("OWNER") || d_c_cli_present("RELEASE") || d_c_cli_present("REMOVE") || d_c_cli_present("RESET") || d_c_cli_present("SEIZE")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_dse_cache(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4; *cli_err_str_ptr = 0; disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("RECOVER") || d_c_cli_present("SHOW") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; p1 = d_c_cli_present("CHANGE"); p2 = d_c_cli_present("RECOVER"); p3 = d_c_cli_present("SHOW"); p4 = d_c_cli_present("VERIFY"); disallow_return_value = cli_check_any2(VARLSTCNT(4) p1, p2, p3, p4); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("ALL") && d_c_cli_present("CHANGE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = !(d_c_cli_present("CHANGE") || d_c_cli_present("SHOW")) && (d_c_cli_present("OFFSET") || d_c_cli_present("SIZE") || d_c_cli_present("VALUE")); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SHOW") && d_c_cli_present("VALUE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("CHANGE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("OFFSET") && !d_c_cli_present("SIZE"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("SIZE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_present("VALUE") && !d_c_cli_present("OFFSET"); CLI_DIS_CHECK_N_RESET; disallow_return_value = d_c_cli_negated("CRIT") && (d_c_cli_present("CHANGE") || d_c_cli_present("RECOVER") || d_c_cli_present("VERIFY")); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_replicate(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4, p5, p6; *cli_err_str_ptr = 0; p1 = d_c_cli_present("EDITINSTANCE"); p2 = d_c_cli_present("INSTANCE_CREATE"); p3 = d_c_cli_present("RECEIVER"); p4 = d_c_cli_present("SOURCE"); p5 = d_c_cli_present("UPDATEPROC"); p6 = d_c_cli_present("UPDHELPER"); /* any MUPIP REPLIC command should contain at LEAST one of the above qualifiers */ disallow_return_value = !(p1 || p2 || p3 || p4 || p5 || p6); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* any MUPIP REPLIC command should contain at MOST one of the above qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(6) p1, p2, p3, p4, p5, p6); CLI_DIS_CHECK_N_RESET; return FALSE; }
boolean_t cli_disallow_mupip_replic_source(void) { int disallow_return_value = 0; boolean_t p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12; *cli_err_str_ptr = 0; p1 = d_c_cli_present("START"); p2 = d_c_cli_present("SHUTDOWN"); p3 = d_c_cli_present("ACTIVATE"); p4 = d_c_cli_present("DEACTIVATE"); p5 = d_c_cli_present("CHECKHEALTH"); p6 = d_c_cli_present("STATSLOG"); p7 = d_c_cli_present("SHOWBACKLOG"); p8 = d_c_cli_present("CHANGELOG"); p9 = d_c_cli_present("STOPSOURCEFILTER"); p10 = d_c_cli_present("LOSTTNCOMPLETE"); p11 = d_c_cli_present("NEEDRESTART"); p12 = d_c_cli_present("JNLPOOL"); /* every source server command must have at least one of the above control qualifiers */ disallow_return_value = !(p1 || p2 || p3 || p4 || p5 || p6 || p7 || p8 || p9 || p10 || p11 || p12); CLI_DIS_CHECK; /* Note CLI_DIS_CHECK_N_RESET is not used as we want to reuse the computed error string (cli_err_str_ptr) * for the next check as well in case it fails. Note that this can be done only if both checks use * exactly the same set of qualifiers (which is TRUE in this case). */ /* every source server command cannot have any more than one of the above control qualifiers */ disallow_return_value = cli_check_any2(VARLSTCNT(11) p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); CLI_DIS_CHECK_N_RESET; /* BUFFSIZE, CMPLVL, FILTER, PASSIVE are supported only with START qualifier */ disallow_return_value = (!d_c_cli_present("START") && (d_c_cli_present("BUFFSIZE") || d_c_cli_present("CMPLVL") || d_c_cli_present("FILTER") || d_c_cli_present("PASSIVE"))); CLI_DIS_CHECK_N_RESET; /* CONNECTPARAMS, SECONDARY are supported only with START or ACTIVATE qualifiers */ disallow_return_value = (!d_c_cli_present("START") && !d_c_cli_present("ACTIVATE") && (d_c_cli_present("CONNECTPARAMS") || d_c_cli_present("SECONDARY"))); CLI_DIS_CHECK_N_RESET; /* LOG, LOG_INTERVAL are supported only with START, CHANGELOG, ACTIVATE, STATSLOG qualifiers */ disallow_return_value = (!d_c_cli_present("START") && !d_c_cli_present("CHANGELOG") && !d_c_cli_present("ACTIVATE") && !d_c_cli_present("STATSLOG") && (d_c_cli_present("LOG") || d_c_cli_present("LOG_INTERVAL"))); CLI_DIS_CHECK_N_RESET; /* TIMEOUT is supported only with SHUTDOWN qualifier */ disallow_return_value = (!d_c_cli_present("SHUTDOWN") && d_c_cli_present("TIMEOUT")); CLI_DIS_CHECK_N_RESET; /* One and only one of PASSIVE or SECONDARY must be specified with START */ disallow_return_value = (d_c_cli_present("START") && d_c_cli_present("PASSIVE") && d_c_cli_present("SECONDARY")); CLI_DIS_CHECK_N_RESET; disallow_return_value = (d_c_cli_present("START") && !d_c_cli_present("PASSIVE") && !d_c_cli_present("SECONDARY")); CLI_DIS_CHECK_N_RESET; /* LOG is a mandatory qualifier with START */ disallow_return_value = (d_c_cli_present("START") && !d_c_cli_present("LOG")); CLI_DIS_CHECK_N_RESET; /* SECONDARY is a mandatory qualifier with ACTIVATE */ disallow_return_value = (d_c_cli_present("ACTIVATE") && !d_c_cli_present("SECONDARY")); CLI_DIS_CHECK_N_RESET; /* One of LOG or LOG_INTERVAL needs to be specified with CHANGELOG */ disallow_return_value = (d_c_cli_present("CHANGELOG") && !d_c_cli_present("LOG") && !d_c_cli_present("LOG_INTERVAL")); CLI_DIS_CHECK_N_RESET; /* ROOTPRIMARY (or UPDOK) and PROPAGATEPRIMARY (or UPDNOTOK) are mutually exclusive */ disallow_return_value = ((d_c_cli_present("ROOTPRIMARY") || d_c_cli_present("UPDNOTOK")) && (d_c_cli_present("PROPAGATEPRIMARY") || d_c_cli_present("UPDNOTOK"))); CLI_DIS_CHECK_N_RESET; /* ROOTPRIMARY and PROPAGATEPRIMARY are allowed only along with START, ACTIVATE or DEACTIVATE qualifiers */ disallow_return_value = ((d_c_cli_present("ROOTPRIMARY") || d_c_cli_present("PROPAGATEPRIMARY") || d_c_cli_present("UPDOK") || d_c_cli_present("UPDNOTOK")) && !(d_c_cli_present("START") || d_c_cli_present("ACTIVATE") || d_c_cli_present("DEACTIVATE"))); CLI_DIS_CHECK_N_RESET; /* INSTSECONDARY is allowed with every control qualifier except LOSTTNCOMPLETE and JNLPOOL */ disallow_return_value = (d_c_cli_present("INSTSECONDARY") && (d_c_cli_present("LOSTTNCOMPLETE") || d_c_cli_present("JNLPOOL"))); CLI_DIS_CHECK_N_RESET; /* DETAIL is compatible only with JNLPOOL */ disallow_return_value = (!d_c_cli_present("JNLPOOL") && d_c_cli_present("DETAIL")); CLI_DIS_CHECK_N_RESET; return FALSE; }