_pmdEDUCB::~_pmdEDUCB () { { ossScopedRWLock assist ( &_callInMutex, EXCLUSIVE ) ; } if ( _pErrorBuff ) { SDB_OSS_FREE ( _pErrorBuff ) ; _pErrorBuff = NULL ; } #if defined ( SDB_ENGINE ) DpsTransCBLockList::iterator iterLst = _transLockLst.begin(); while( iterLst != _transLockLst.end() ) { if ( iterLst->second ) { SDB_OSS_DEL iterLst->second ; } _transLockLst.erase( iterLst++ ); } if ( _pTransNodeMap ) { delete _pTransNodeMap; _pTransNodeMap = NULL; } #endif // SDB_ENGINE clear() ; }
// PD_TRACE_DECLARE_FUNCTION ( SDB__PMDEDUCB_FORCE, "_pmdEDUCB::force" ) void _pmdEDUCB::force () { PD_TRACE_ENTRY ( SDB__PMDEDUCB_FORCE ); ossScopedRWLock assist ( &_callInMutex, SHARED ) ; disconnect () ; _ctrlFlag |= EDU_CTRL_FORCED ; PD_TRACE_EXIT ( SDB__PMDEDUCB_FORCE ); }
// PD_TRACE_DECLARE_FUNCTION ( SDB__PMDEDUCB_DISCONNECT, "_pmdEDUCB::disconnect" ) void _pmdEDUCB::disconnect () { PD_TRACE_ENTRY ( SDB__PMDEDUCB_DISCONNECT ); ossScopedRWLock assist ( &_callInMutex, SHARED ) ; interrupt () ; _ctrlFlag |= EDU_CTRL_DISCONNECTED ; postEvent ( pmdEDUEvent ( PMD_EDU_EVENT_TERM ) ) ; PD_TRACE_EXIT ( SDB__PMDEDUCB_DISCONNECT ); }
Ref<Instance, Owner> AssistantManager::assist(Ref<Context> context, int modifiers, uchar_t key, const char* language) const { Ref<Tip, Owner> tip; if (!language) { tip = assist(context, modifiers, key, context->language()); if (!tip) tip = assist(context, modifiers, key, "any"); } else { Ref<AssistantList, Owner> list; if (assistantListByLanguage_->lookup(language, &list)) { AssistantList::Iterator it = list->iterator(); while ((it.hasNext()) && (!tip)) { Ref<Assistant> assistant = it.next(); tip = assistant->assist(context, modifiers, key); } } } return tip; }
int main (int argc, char const * argv []) { extern struct channel channel; static char const * optv [] = { "ei:qv", "[sta|cid|rsvd|vic|bw|bwc] [limit] [device] [...]", "CoQos Stream Utility", "e\tredirect stderr to stdout", #if defined (WINPCAP) || defined (LIBPCAP) "i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]", #else "i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]", #endif "q\tquiet mode", "v\tverbose mode", (char const *) (0) }; #include "../plc/plc.c" uint16_t cid = 0; uint16_t limit = 0; uint8_t type; signed code; signed c; if (getenv (PLCDEVICE)) { #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (getenv (PLCDEVICE)); #else channel.ifname = strdup (getenv (PLCDEVICE)); #endif } optind = 1; while ((c = getoptv (argc, argv, optv)) != -1) { switch (c) { case 'e': dup2 (STDOUT_FILENO, STDERR_FILENO); break; case 'i': #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (optarg); #else channel.ifname = optarg; #endif break; case 'q': _setbits (channel.flags, CHANNEL_SILENCE); _setbits (plc.flags, PLC_SILENCE); break; case 'v': _setbits (channel.flags, CHANNEL_VERBOSE); _setbits (plc.flags, PLC_VERBOSE); break; default: break; } } argc -= optind; argv += optind; if ((code = lookup (* argv++, types, SIZEOF (types))) == -1) { assist (*--argv, CONTROL, types, SIZEOF (types)); } type = (uint8_t)(code); argc--; if (type == CONTROL_CID) { if (!argc) { error (1, errno, "Expected Connection Identifier"); } if (!hexencode ((uint8_t *)(&cid), sizeof (cid), * argv++)) { error (1, errno, "Invalid CID"); } cid = htons (cid); argc--; } else if (type == CONTROL_BW) { if (!argc) { error (1, errno, "Expected Bandwidth Limit"); } limit = atoi (* argv++); argc--; } openchannel (&channel); if (!(plc.message = malloc (sizeof (* plc.message)))) { error (1, errno, PLC_NOMEMORY); } if (!argc) { con_info (&plc, type, cid, limit); } while ((argc) && (* argv)) { if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices)))) { error (1, errno, PLC_BAD_MAC, * argv); } con_info (&plc, type, cid, limit); argc--; argv++; } free (plc.message); closechannel (&channel); exit (0); }
int main (int argc, char const * argv []) { extern struct channel channel; static char const * optv [] = { "cCef:ri:qvz:", "device [device] [...] [> stdout]", "Qualcomm Atheros INT6x00 Log Retrieval Utility", "c\tclear watchdog and checkpoint reports", "C\tcustom watchdog report", "e\tredirect stderr to stdout", "f s\tprint Watchdog Report in format (s) [xml]", #if defined (WINPCAP) || defined (LIBPCAP) "i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]", #else "i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]", #endif "q\tquiet mode", "r\tread ", "v\tverbose mode", (char const *) (0) }; #include "../plc/plc.c" signed c; if (getenv (PLCDEVICE)) { #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (getenv (PLCDEVICE)); #else channel.ifname = strdup (getenv (PLCDEVICE)); #endif } optind = 1; plc.readaction = 0; plc.action = INT6KLOG_FMT_XML; while ((c = getoptv (argc, argv, optv)) != -1) { switch (c) { case 'C': _setbits (plc.readaction, WD_ACTION_CUSTOM); break; case 'c': _setbits (plc.readaction, WD_ACTION_CLEAR); break; case 'e': dup2 (STDOUT_FILENO, STDERR_FILENO); break; case 'f': if ((c = lookup (optarg, formats, SIZEOF (formats))) == -1) { assist (optarg, "format", formats, SIZEOF (formats)); } plc.action = (uint8_t)(c); break; case 'i': #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (optarg); #else channel.ifname = optarg; #endif break; case 'q': _setbits (channel.flags, CHANNEL_SILENCE); _setbits (plc.flags, PLC_SILENCE); break; case 'r': _setbits (plc.readaction, WD_ACTION_READ); break; case 'v': _setbits (channel.flags, CHANNEL_VERBOSE); _setbits (plc.flags, PLC_VERBOSE); break; case 'z': plc.readaction = (uint8_t)(uintspec (optarg, 0, 255)); break; default: break; } } argc -= optind; argv += optind; if (argc != 1) { if (plc.rpt.file != -1) { error (1, ECANCELED, PLC_NODEVICE); } } openchannel (&channel); if (!(plc.message = malloc (sizeof (* plc.message)))) { error (1, errno, PLC_NOMEMORY); } #ifdef WIN32 if (plc.action == INT6KLOG_FMT_RAW) { setmode (STDOUT_FILENO, O_BINARY); } #endif if (!argc) { Diagnostics (&plc); } while ((argc) && (* argv)) { if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices)))) { error (1, errno, PLC_BAD_MAC, * argv); } Diagnostics (&plc); argc--; argv++; } free (plc.message); closechannel (&channel); exit (0); }
int main (int argc, char const * argv []) { extern struct channel channel; static char const * optv [] = { "ei:qv", "spnd,res cid", "CoQos Stream Utility", "e\tredirect stderr to stdout", #if defined (WINPCAP) || defined (LIBPCAP) "i n\thost interface is (n) [" OPTSTR (CHANNEL_ETHNUMBER) "]", #else "i s\thost interface is (s) [" OPTSTR (CHANNEL_ETHDEVICE) "]", #endif "q\tquiet mode", "v\tverbose mode", (char const *) (0) }; #include "../plc/plc.c" uint16_t cid; uint8_t type; signed code; signed c; if (getenv (PLCDEVICE)) { #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (getenv (PLCDEVICE)); #else channel.ifname = strdup (getenv (PLCDEVICE)); #endif } optind = 1; while ((c = getoptv (argc, argv, optv)) != -1) { switch (c) { case 'e': dup2 (STDOUT_FILENO, STDERR_FILENO); break; case 'i': #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (optarg); #else channel.ifname = optarg; #endif break; case 'q': _setbits (channel.flags, CHANNEL_SILENCE); _setbits (plc.flags, PLC_SILENCE); break; case 'v': _setbits (channel.flags, CHANNEL_VERBOSE); _setbits (plc.flags, PLC_VERBOSE); break; default: break; } } argc -= optind; argv += optind; if ((code = lookup (* argv++, actions, SIZEOF (actions))) == -1) { assist (*--argv, ACTION, actions, SIZEOF (actions)); } type = (uint8_t)(code); argc--; if (argc == 0) { error (1, ECANCELED, "Missing CID"); } if (!hexencode ((uint8_t *)(&cid), sizeof (cid), * argv++)) { error (1, errno, "Invalid CID"); } cid = htons (cid); argc--; openchannel (&channel); if (!(plc.message = malloc (sizeof (* plc.message)))) { error (1, errno, PLC_NOMEMORY); } if (!argc) { mod_conn (&plc, type, cid); } while ((argc) && (* argv)) { if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices)))) { error (1, errno, PLC_BAD_MAC, * argv); } mod_conn (&plc, type, cid); argc--; argv++; } free (plc.message); closechannel (&channel); exit (0); }
int main (int argc, char const * argv []) { extern struct channel channel; static char const * optv [] = { "a:d:ef:i:n:p:qrs:tvw", "device [device] [...] [> stdout]", "Qualcomm Atheros Ethernet PHY Settings", "a s\tadvertise capabilities as (s) ['1000Full'|'100Full'|'100Half'|10Full'|'10Half']", "d s\tduplex setting is (s) ['half'|'full']", "e\tredirect stderr to stdout", "f s\tflow control is (s) ['on'|'tx'|'rx'|'off']", #if defined (WINPCAP) || defined (LIBPCAP) "i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]", #else "i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]", #endif "n s\tauto-negotiate mode is (s) ['on'|'off']", "p n\tport number is (n) [" LITERAL (ETH_PORT) "]", "q\tquiet mode", "r\tread settings instead of write settings", "s s\ttransmission speed in mbps is (s) ['10'|'100'|'1000']", "v\tverbose mode", "w\twrite settings instead of read settings", (char const *) (0) }; struct phy_settings settings = { 0, 1, 0, 0, 0, 0 }; flag_t flags = (flag_t)(0); signed c; if (getenv (PLCDEVICE)) { #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (getenv (PLCDEVICE)); #else channel.ifname = strdup (getenv (PLCDEVICE)); #endif } optind = 1; while ((c = getoptv (argc, argv, optv)) != -1) { switch (c) { case 'a': if ((c = lookup (optarg, advcap, ADVCAP)) == -1) { assist (optarg, "capability", advcap, ADVCAP); } settings.ADVCAPS |= (uint8_t)(c); break; case 'd': if ((c = lookup (optarg, duplex, DUPLEX)) == -1) { assist (optarg, "duplex", duplex, DUPLEX); } settings.EDUPLEX = (uint8_t)(c); break; case 'e': dup2 (STDOUT_FILENO, STDERR_FILENO); break; case 'f': if ((c = lookup (optarg, control, CONTROL)) == -1) { assist (optarg, "control", control, CONTROL); } settings.EFLOWCONTROL = (uint8_t)(c); break; case 'n': if ((c = lookup (optarg, negotiate, NEGOTIATE)) == -1) { assist (optarg, "auto-negotiate", negotiate, NEGOTIATE); } settings.AUTONEGOTIATE = (uint8_t)(c); break; case 's': if ((c = lookup (optarg, speeds, SPEEDS)) == -1) { assist (optarg, "speed", speeds, SPEEDS); } settings.ESPEED = (uint8_t)(c); break; case 't': _setbits (flags, PLC_ANALYSE); break; case 'i': #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (optarg); #else channel.ifname = optarg; #endif break; case 'p': settings.MCONTROL &= 0x0F; settings.MCONTROL |= (unsigned)(uintspec (optarg, 0, 7)) << 4; break; case 'q': _setbits (channel.flags, CHANNEL_SILENCE); break; case 'r': settings.MCONTROL &= 0xF0; settings.MCONTROL |= 0x00; break; case 'v': _setbits (channel.flags, CHANNEL_VERBOSE); break; case 'w': settings.MCONTROL &= 0xF0; settings.MCONTROL |= 0x01; break; default: break; } } argc -= optind; argv += optind; openchannel (&channel); if (!argc) { PHYSettings (&channel, &settings, flags); } while ((argc) && (* argv)) { if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices)))) { error (1, errno, PLC_BAD_MAC, * argv); } PHYSettings (&channel, &settings, flags); argc--; argv++; } closechannel (&channel); exit (0); }
int main (int argc, char const * argv []) { extern struct channel channel; static char const * optv [] = { "ei:qv", "action priority destination rate ttl operand condition [...] [device] [...]\n\n where condition is field operator value", "CoQos Stream Utility", "e\tredirect stderr to stdout", #if defined (WINPCAP) || defined (LIBPCAP) "i n\thost interface is (n) [" LITERAL (CHANNEL_ETHNUMBER) "]", #else "i s\thost interface is (s) [" LITERAL (CHANNEL_ETHDEVICE) "]", #endif "q\tquiet mode", "v\tverbose mode", (char const *) (0) }; #include "../plc/plc.c" struct connection connection; struct MMEClassifier * rule = (struct MMEClassifier *)(&connection.rule.CLASSIFIERS); uint16_t * word; uint8_t * byte; signed code; signed c; if (getenv (PLCDEVICE)) { #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (getenv (PLCDEVICE)); #else channel.ifname = strdup (getenv (PLCDEVICE)); #endif } optind = 1; while ((c = getoptv (argc, argv, optv)) != -1) { switch (c) { case 'e': dup2 (STDOUT_FILENO, STDERR_FILENO); break; case 'i': #if defined (WINPCAP) || defined (LIBPCAP) channel.ifindex = atoi (optarg); #else channel.ifname = optarg; #endif break; case 'q': _setbits (channel.flags, CHANNEL_SILENCE); _setbits (plc.flags, PLC_SILENCE); break; case 'v': _setbits (channel.flags, CHANNEL_VERBOSE); _setbits (plc.flags, PLC_VERBOSE); break; default: break; } } argc -= optind; argv += optind; memset (&connection, 0, sizeof (connection)); if ((code = lookup (* argv++, actions, SIZEOF (actions))) == -1) { assist (*--argv, CLASSIFIER_ACTION_NAME, actions, SIZEOF (actions)); } connection.cspec.CONN_CAP = (uint8_t)(code); argc--; if (!argc) { error (1, ECANCELED, "Expected Priority: 0-15"); } connection.cspec.CONN_COQOS_PRIO = (uint8_t)(uintspec (* argv++, 0, 15)); argc--; if (!argc) { error (1, ECANCELED, "Expected Destination MAC Address"); } if (!hexencode (connection.APP_DA, sizeof (connection.APP_DA), synonym (* argv++, devices, SIZEOF (devices)))) { error (1, errno, "Invalid MAC=[%s]", *--argv); } argc--; if (!argc) { error (1, ECANCELED, "Expected Data Rate: 10-9000 (kbps)"); } connection.cspec.CONN_RATE = (uint16_t)(uintspec (* argv++, 1, 9000)); argc--; if (!argc) { error (1, ECANCELED, "Expected TTL: 10000-2000000 (microseconds)"); } connection.cspec.CONN_TTL = (uint32_t)(uintspec (* argv++, 10000, 2000000)); argc--; if ((code = lookup (* argv++, operands, SIZEOF (operands))) == -1) { assist (*--argv, CLASSIFIER_OPERAND_NAME, operands, SIZEOF (operands)); } connection.rule.MOPERAND = (uint8_t)(code); argc--; while ((* argv) && (lookup (* argv, controls, SIZEOF (controls)) == -1)) { if ((code = lookup (* argv++, fields, SIZEOF (fields))) == -1) { assist (*--argv, CLASSIFIER_FIELD_NAME, fields, SIZEOF (fields)); } rule->CR_PID = (uint8_t)(code); argc--; if ((code = lookup (* argv++, operators, SIZEOF (operators))) == -1) { assist (*--argv, CLASSIFIER_OPERATOR_NAME, operators, SIZEOF (operators)); } rule->CR_OPERAND = (uint8_t)(code); argc--; if (!argc || !* argv) { error (1, ENOTSUP, "Have %s '%s' without any value", CLASSIFIER_OPERATOR_NAME, *--argv); } switch (rule->CR_PID) { case FIELD_ETH_SA: case FIELD_ETH_DA: bytespec (* argv++, rule->CR_VALUE, ETHER_ADDR_LEN); break; case FIELD_IPV4_SA: case FIELD_IPV4_DA: ipv4spec (* argv++, rule->CR_VALUE); break; case FIELD_IPV6_SA: case FIELD_IPV6_DA: ipv6spec (* argv++, rule->CR_VALUE); break; case FIELD_VLAN_UP: case FIELD_IPV4_TOS: case FIELD_IPV4_PROT: byte = (uint8_t *)(rule->CR_VALUE); *byte = (uint8_t)(basespec (* argv++, 0, sizeof (* byte))); break; case FIELD_VLAN_ID: case FIELD_TCP_SP: case FIELD_TCP_DP: case FIELD_UDP_SP: case FIELD_UDP_DP: case FIELD_IP_SP: case FIELD_IP_DP: word = (uint16_t *)(rule->CR_VALUE); *word = (uint16_t)(basespec (* argv++, 0, sizeof (* word))); *word = htons (*word); break; case FIELD_ETH_TYPE: word = (uint16_t *)(rule->CR_VALUE); *word = (uint16_t)(basespec (* argv++, 0, sizeof (* word))); *word = htons (*word); break; case FIELD_HPAV_MME: bytespec (* argv++, rule->CR_VALUE, sizeof (uint8_t) + sizeof (uint16_t)); byte = (uint8_t *)(rule->CR_VALUE); HTOBE16 ((uint16_t)(* ++byte)); break; case FIELD_IPV6_TC: case FIELD_IPV6_FL: case FIELD_TCP_ACK: default: error (1, ENOTSUP, "Field '%s' (0x%02X)", argv [-2], rule->CR_PID); break; } connection.rule.NUM_CLASSIFIERS++; if (connection.rule.NUM_CLASSIFIERS > RULE_MAX_CLASSIFIERS) { error (1, ENOTSUP, "More than %d classifiers in rule", RULE_MAX_CLASSIFIERS); } rule++; argc--; } connection.cspec.CSPEC_VERSION = 0x0001; openchannel (&channel); if (!(plc.message = malloc (sizeof (* plc.message)))) { error (1, errno, PLC_NOMEMORY); } if (!argc) { add_conn (&plc, &connection); } while ((argc) && (* argv)) { if (!hexencode (channel.peer, sizeof (channel.peer), synonym (* argv, devices, SIZEOF (devices)))) { error (1, errno, PLC_BAD_MAC, * argv); } add_conn (&plc, &connection); argc--; argv++; } free (plc.message); closechannel (&channel); exit (0); }
signed ParseRule (int * argcp, char const ** argvp [], struct MMERule * rule, struct cspec * cspec) { int argc = * argcp; char const ** argv = * argvp; union { uint32_t wide; uint16_t word; uint8_t byte [4]; } temp; signed code; struct MMEClassifier * classifier = (struct MMEClassifier *) (& rule->CLASSIFIER); if ((code = lookup (* argv++, actions, SIZEOF (actions))) == -1) { assist (* -- argv, CLASSIFIER_ACTION_NAME, actions, SIZEOF (actions)); } rule->MACTION = (uint8_t) (code); argc--; if ((code = lookup (* argv++, operands, SIZEOF (operands))) == -1) { assist (* -- argv, CLASSIFIER_OPERAND_NAME, operands, SIZEOF (operands)); } rule->MOPERAND = (uint8_t) (code); argc--; while ((* argv) && (lookup (* argv, controls, SIZEOF (controls)) == -1)) { if ((code = lookup (* argv++, fields, SIZEOF (fields))) == -1) { assist (* -- argv, CLASSIFIER_FIELD_NAME, fields, SIZEOF (fields)); } classifier->CR_PID = (uint8_t) (code); argc--; if ((code = lookup (* argv++, operators, SIZEOF (operators))) == -1) { assist (* -- argv, CLASSIFIER_OPERATOR_NAME, operators, SIZEOF (operators)); } classifier->CR_OPERAND = (uint8_t) (code); argc--; if (! argc || ! * argv) { error (1, ENOTSUP, "I have %s '%s' but no value", CLASSIFIER_OPERATOR_NAME, * -- argv); } switch (classifier->CR_PID) { case FIELD_ETH_SA: case FIELD_ETH_DA: bytespec (* argv++, classifier->CR_VALUE, ETHER_ADDR_LEN); break; case FIELD_IPV4_SA: case FIELD_IPV4_DA: ipv4spec (* argv++, classifier->CR_VALUE); break; case FIELD_IPV6_SA: case FIELD_IPV6_DA: ipv6spec (* argv++, classifier->CR_VALUE); break; case FIELD_VLAN_UP: case FIELD_IPV6_TC: case FIELD_IPV4_TOS: case FIELD_IPV4_PROT: classifier->CR_VALUE [0] = (uint8_t) (basespec (* argv++, 0, sizeof (classifier->CR_VALUE [0]))); break; case FIELD_VLAN_ID: case FIELD_TCP_SP: case FIELD_TCP_DP: case FIELD_UDP_SP: case FIELD_UDP_DP: case FIELD_IP_SP: case FIELD_IP_DP: temp.word = (uint16_t) (basespec (* argv++, 0, sizeof (temp.word))); temp.word = htons (temp.word); memcpy (classifier->CR_VALUE, & temp, sizeof (temp.word)); break; case FIELD_ETH_TYPE: temp.word = (uint16_t) (basespec (* argv++, 0, sizeof (temp.word))); temp.word = htons (temp.word); memcpy (classifier->CR_VALUE, & temp, sizeof (temp.word)); break; case FIELD_IPV6_FL: temp.wide = (uint32_t) (basespec (* argv++, 0, sizeof (temp.wide))) & 0x000FFFFF; temp.wide = htonl (temp.wide); memcpy (classifier->CR_VALUE, & temp.byte [1], 3); break; case FIELD_HPAV_MME: bytespec (* argv++, classifier->CR_VALUE, sizeof (uint16_t) + sizeof (uint8_t)); temp.byte [0] = classifier->CR_VALUE [1]; classifier->CR_VALUE [1] = classifier->CR_VALUE [2]; classifier->CR_VALUE [2] = temp.byte [0]; break; case FIELD_TCP_ACK: if ((code = lookup (* argv++, states, SIZEOF (states))) == -1) { assist (* -- argv, CLASSIFIER_STATE_NAME, states, SIZEOF (states)); } memset (classifier->CR_VALUE, 0, sizeof (classifier->CR_VALUE)); break; case FIELD_VLAN_TAG: if ((code = lookup (* argv++, states, SIZEOF (states))) == -1) { assist (* -- argv, CLASSIFIER_STATE_NAME, states, SIZEOF (states)); } memset (classifier->CR_VALUE, 0, sizeof (classifier->CR_VALUE)); classifier->CR_OPERAND ^= code; break; default: error (1, ENOTSUP, "%s", argv [- 2]); break; } rule->NUM_CLASSIFIERS++; classifier++; argc--; } memcpy (classifier, cspec, sizeof (* cspec)); if ((code = lookup (* argv++, controls, SIZEOF (controls))) == -1) { assist (* -- argv, CLASSIFIER_CONTROL_NAME, controls, SIZEOF (controls)); } rule->MCONTROL = (uint8_t) (code); argc--; if ((code = lookup (* argv++, volatilities, SIZEOF (volatilities))) == -1) { assist (* -- argv, CLASSIFIER_VOLATILITY_NAME, volatilities, SIZEOF (volatilities)); } rule->MVOLATILITY = (uint8_t) (code); argc--; * argcp = argc; * argvp = argv; return (0); }