{"record":{"id":"fbdca99103a944b6","repo":"ruvnet/RuView","slug":"usage-s-i-ifindex-k-key-hex-p-passes","errorCode":null,"errorMessage":"Usage: %s -i <ifindex> [-k <key_hex>] [-p <passes>]\n  BUILD-ONLY / UNTESTED-ON-HARDWARE. See README.md.","messagePattern":"Usage: (.+?) -i <ifindex> \\[-k <key_hex>\\] \\[-p <passes>\\]\n  BUILD-ONLY / UNTESTED-ON-HARDWARE\\. See README\\.md\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"firmware/privshield/openwrt/veil_shieldd.c","lineNumber":234,"sourceCode":"        /* TODO(hw): parse NL80211_ATTR_FRAME; classify VHT/HE compressed\n         * beamforming action (category 21/30) or NDPA to measure solicitation\n         * cadence. Requires the driver to forward these frames (registered via\n         * NL80211_CMD_REGISTER_FRAME / monitor). Not guaranteed upstream. */\n        (void)veil_randomize_sounding_cadence(c);\n        break;\n    case NL80211_CMD_NEW_STATION:\n    case NL80211_CMD_DEL_STATION:\n        /* Membership churn changes MU grouping surface. */\n        (void)veil_shuffle_mumimo_groups(c);\n        break;\n    default:\n        break;\n    }\n    return NL_SKIP;\n}\n\nstatic void usage(const char *p) {\n    fprintf(stderr,\n        \"Usage: %s -i <ifindex> [-k <key_hex>] [-p <passes>]\\n\"\n        \"  BUILD-ONLY / UNTESTED-ON-HARDWARE. See README.md.\\n\", p);\n}\n\nint main(int argc, char **argv) {\n    memset(&g_ctx, 0, sizeof(g_ctx));\n    g_ctx.key = 0xA5A5A5A5A5A5A5A5ULL; /* placeholder; real key from keystore */\n    g_ctx.passes = VEIL_DEFAULT_PASSES;\n    g_ctx.ifindex = -1;\n    g_ctx.running = 1;\n\n    int opt;\n    while ((opt = getopt(argc, argv, \"i:k:p:h\")) != -1) {\n        switch (opt) {\n        case 'i': g_ctx.ifindex = atoi(optarg); break;\n        case 'k': g_ctx.key = strtoull(optarg, NULL, 16); break;\n        case 'p': g_ctx.passes = (size_t)strtoul(optarg, NULL, 10); break;\n        case 'h': default: usage(argv[0]); return (opt == 'h') ? 0 : 2;","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/firmware/privshield/openwrt/veil_shieldd.c#L216-L252","documentation":"The daemon's usage banner, printed to stderr when required options are missing (notably `-i <ifindex>`), an unknown flag is passed, or help is requested. The text itself warns that the binary is BUILD-ONLY / UNTESTED-ON-HARDWARE and points at README.md. `ifindex` is the numeric interface index, not the interface name.","triggerScenarios":"Launching without `-i`; passing an interface name instead of a number (`-i wlan0`); supplying an unrecognized option; running `veil_shieldd` with no arguments to see help.","commonSituations":"First run on a router; scripts that copy the usage string literally (including `%s`); confusion between interface name and ifindex; forgetting the optional `-k`/`-p` semantics.","solutions":["Resolve the numeric index first: `ip link show wlan0` (or `cat /sys/class/net/wlan0/ifindex`), then `veil_shieldd -i <N>`.","Optional flags: `-k <key_hex>` for the rotation key and `-p <passes>`; omit them to accept defaults.","Read README.md before relying on it — the binary self-identifies as build-only and untested on hardware."],"exampleFix":"# before\nveil_shieldd -i wlan0\n# after\nveil_shieldd -i $(cat /sys/class/net/wlan0/ifindex) -k deadbeefdeadbeef -p 4","handlingStrategy":"validation","validationCode":"#!/bin/sh\n[ $# -ge 2 ] || { echo \"missing -i <ifindex>\"; veil_shieldd; exit 2; }\ncase \"$2\" in (*[!0-9]*|'') echo \"ifindex must be numeric\"; exit 2;; esac\n[ -e \"/sys/class/net/*/ifindex\" ] 2>/dev/null\nexec veil_shieldd \"$@\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve interface names to ifindex in launch scripts: $(cat /sys/class/net/wlan0/ifindex).","Treat -k and -p as optional; only -i is required.","Remember the banner's own warning: BUILD-ONLY / untested on hardware — do not ship as a control."],"tags":["c","openwrt","cli","usage","daemon-startup"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}