
{"id":12867,"date":"2026-04-14T06:21:42","date_gmt":"2026-04-14T06:21:42","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/?page_id=12867"},"modified":"2026-05-06T06:13:33","modified_gmt":"2026-05-06T06:13:33","slug":"ccspmisc","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/","title":{"rendered":"CcspMisc"},"content":{"rendered":"\n<p>CcspMisc is a collection of utility components and helper applications within the RDK-B middleware stack that provide essential system-level services and management capabilities. This component encompasses multiple independent utilities designed to support various broadband gateway operations including persistent storage management, event subscription, service control, firmware download validation, network bridge configuration, DHCP client utilities, and system diagnostics. Each utility within this collection serves specific operational requirements across the RDK-B ecosystem, enabling functionality ranging from data persistence and inter-process communication to network interface management and telemetry reporting.<\/p>\n\n\n\n<p>The miscellaneous-broadband component acts as a repository for standalone utilities that do not fit within larger architectural components but remain essential for gateway operation. These utilities provide low-level infrastructure services, command-line tools for system configuration and testing, and specialized daemons for specific operational tasks. The modular nature of this component allows platform vendors to selectively enable utilities based on specific platform capabilities and deployment requirements through build-time configuration flags.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">graph LR\n    subgraph \"External Systems\"\n        RemoteMgmt[\"Remote Management\"]\n        LocalUI[\"Local Web UI\"]\n        CLIAccess[\"CLI Access\"]\n    end\n\n    subgraph \"RDK-B Platform\"\n        subgraph \"Remote Management Agents\"\n            ProtocolAgents[\"Protocol Agents&lt;br\/>(TR-069\/WebPA\/TR-369)\"]\n        end\n\n        PandM[\"CCSP P&amp;M\"]\n        PSM[\"CCSP PSM\"]\n        CcspMisc[\"CcspMisc&lt;br\/>Utility Suite\"]\n        WiFi[\"WiFi Component\"]\n        WAN[\"WAN Manager\"]\n\n        subgraph \"Platform Layer\"\n            HAL[\"Platform HAL\"]\n            Linux[\"Linux Kernel\"]\n            Sysevent[\"Sysevent\"]\n            Syscfg[\"Syscfg\"]\n        end\n    end\n\n    RemoteMgmt -->|TR-069\/WebPA\/TR-369| ProtocolAgents\n    LocalUI -->|HTTP\/HTTPS| ProtocolAgents\n    CLIAccess -->|Direct Invocation| CcspMisc\n\n    ProtocolAgents -->|IPC| CcspMisc\n    CcspMisc -->|IPC| PandM\n    CcspMisc -->|IPC| PSM\n    CcspMisc -->|IPC| WiFi\n    CcspMisc -->|IPC| WAN\n\n    CcspMisc &lt;-->|HAL APIs| HAL\n    CcspMisc &lt;-->|System Events| Sysevent\n    CcspMisc &lt;-->|Secure Config| Syscfg\n\n    HAL &lt;-->|Driver Interfaces| Linux\n    CcspMisc &lt;-->|System Calls| Linux\n\n    classDef external fill:#fff3e0,stroke:#ef6c00,stroke-width:2px\n    classDef misc fill:#e3f2fd,stroke:#1976d2,stroke-width:3px\n    classDef rdkbComponent fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px\n    classDef system fill:#fce4ec,stroke:#c2185b,stroke-width:2px\n\n    class RemoteMgmt,LocalUI,CLIAccess external\n    class CcspMisc misc\n    class ProtocolAgents,PandM,PSM,WiFi,WAN rdkbComponent\n    class HAL,Linux,Sysevent,Syscfg system<\/pre><\/div>\n\n\n\n<p><strong>Key Features &amp; Responsibilities<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Persistent Storage CLI (Psmcli)<\/strong>: Command-line interface for PSM (Persistent Storage Manager) database operations providing direct access to CCSP parameter storage through message bus integration using&nbsp;<code>PSM_Get_Record_Value2()<\/code>&nbsp;and&nbsp;<code>PSM_Set_Record_Value2()<\/code>&nbsp;APIs with automatic retry logic (up to 3 attempts on NULL responses), supporting multiple CCSP data types (ccsp_string, ccsp_int, ccsp_unsignedInt, ccsp_boolean, ccsp_long, ccsp_unsignedLong, ccsp_float, ccsp_double, ccsp_byte)\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>psmcli [subsys &lt;prefix&gt; | nosubsys] &lt;command&gt; &lt;parameters...&gt;<\/code><\/li>\n\n\n\n<li>Commands:&nbsp;<code>get<\/code>,&nbsp;<code>set<\/code>,&nbsp;<code>del<\/code>,&nbsp;<code>getdetail<\/code>,&nbsp;<code>setdetail<\/code>,&nbsp;<code>getallinst<\/code>,&nbsp;<code>getinstcnt<\/code><\/li>\n\n\n\n<li>Subsystem prefix defaults to &#8220;eRT.&#8221; if not specified<\/li>\n\n\n\n<li>Example:&nbsp;<code>psmcli get dmsb.l2net.1.Name<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Bridge Utilities (bridge_utils)<\/strong>: Linux bridge management toolkit implementing network bridge operations via brctl commands (<code>brctl addbr<\/code>,&nbsp;<code>brctl addif<\/code>,&nbsp;<code>brctl delif<\/code>,&nbsp;<code>brctl delbr<\/code>) and VLAN configuration using vconfig (<code>vconfig add<\/code>&nbsp;for802.1Q tagging), PSM parameter namespace&nbsp;<code>dmsb.l2net.*<\/code>&nbsp;for persistent configuration storage, sysevent integration for runtime coordination, platform capability detection through file system checks (<code>\/etc\/onewifi_enabled<\/code>&nbsp;for OneWifi,&nbsp;<code>\/sys\/module\/openvswitch<\/code>&nbsp;for OpenVSwitch,&nbsp;<code>\/etc\/WFO_enabled<\/code>&nbsp;for WiFi Offload), supports MoCA isolation with separate bridge instances when MoCA is not disabled via NO_MOCA_FEATURE_SUPPORT flag\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>bridge_util &lt;operation&gt; &lt;instance_number&gt;<\/code><\/li>\n\n\n\n<li>Operations:&nbsp;<code>multinet-up<\/code>,&nbsp;<code>multinet-down<\/code>,&nbsp;<code>multinet-start<\/code>,&nbsp;<code>multinet-stop<\/code>,&nbsp;<code>multinet-restart<\/code>,&nbsp;<code>multinet-syncMembers<\/code>,&nbsp;<code>add-port<\/code>,&nbsp;<code>del-port<\/code>,&nbsp;<code>lnf-setup<\/code>,&nbsp;<code>lnf-down<\/code>,&nbsp;<code>meshbhaul-setup<\/code>,&nbsp;<code>meshonboard-setup<\/code>,&nbsp;<code>meshethbhaul-up<\/code>,&nbsp;<code>meshethbhaul-down<\/code><\/li>\n\n\n\n<li>Example:&nbsp;<code>bridge_util multinet-start 1<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Service Control (ServiceCtrl)<\/strong>: RBus-based daemon implementing service restart management through data element&nbsp;<code>Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ServiceCtrl.ServiceRestartList<\/code>&nbsp;with queue-based request processing using pthread mutexes and condition variables for thread synchronization, automatically daemonizes via fork()\/setsid() pattern, spawns dedicated worker thread (<code>spawn_svc_restart_queue_loop()<\/code>) for sequential service restart execution preventing race conditions, maintains restart queue using custom queue_t data structure with queue_push\/queue_pop operations protected by pthread_mutex_lock\n<ul class=\"wp-block-list\">\n<li>No direct CLI &#8211; accessed via RBus set operation on ServiceRestartList parameter<\/li>\n\n\n\n<li>Interface: RBus RBUS_ELEMENT_TYPE_PROPERTY with ServiceControl_SetStringHandler<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>DHCP Client Utilities (dhcp_client_utils)<\/strong>: Unified API library abstracting multiple DHCP client implementations (udhcpc, dibbler, ti_dhcp6c, ti_udhcpc) providing process lifecycle management functions&nbsp;<code>collect_waiting_process()<\/code>&nbsp;using waitpid() with WNOHANG and configurable timeout intervals,&nbsp;<code>signal_process()<\/code>&nbsp;for sending signals via kill(), fork()\/execv() pattern for client spawning, zombie process collection with COLLECT_WAIT_INTERVAL_MS polling, sysevent notification integration for DHCP events\n<ul class=\"wp-block-list\">\n<li>Library functions: No direct CLI &#8211; provides APIs for programmatic DHCP client control<\/li>\n\n\n\n<li>Core APIs:&nbsp;<code>signal_process()<\/code>,&nbsp;<code>collect_waiting_process()<\/code>, client-specific wrappers<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Event Subscription Utility (EventSubscription)<\/strong>: RBus event monitoring tool using&nbsp;<code>rbusEvent_Subscribe()<\/code>&nbsp;for event registration with custom callback handler&nbsp;<code>eventReceiveHandler()<\/code>, type-aware value extraction supporting RBUS_STRING, RBUS_BOOLEAN, RBUS_INT8, RBUS_INT16, RBUS_INT32, RBUS_UINT8, RBUS_UINT16, RBUS_UINT32, RBUS_DOUBLE, RBUS_BYTES through&nbsp;<code>rbusValue_GetType()<\/code>&nbsp;and type-specific getter functions (<code>rbusValue_GetBoolean()<\/code>,&nbsp;<code>rbusValue_GetInt8()<\/code>, etc.), continuous event loop processing with user data preservation across callback invocations\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>event_subscriber &lt;component_name&gt; &lt;event_name&gt;<\/code><\/li>\n\n\n\n<li>Example:&nbsp;<code>event_subscriber MyComponent Device.WiFi.Status<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Firmware Download Check (FwDownloadChk)<\/strong>: Firmware download memory validation implementing multi-factor availability check combining firmware image size extraction via HTTP Content-Length header parsing using libcurl, current available memory reading from&nbsp;<code>\/proc\/meminfo<\/code>&nbsp;(MemAvailable field), syscfg-based configuration thresholds (<code>FwDwld_AvlMem_RsrvThreshold<\/code>&nbsp;in MB,&nbsp;<code>FwDwld_ImageProcMemPercent<\/code>&nbsp;for processing overhead percentage), calculates required_kB = firmware_kB + reserve_threshold_kB + (firmware_kB * image_proc_percent \/ 100), publishes telemetry event&nbsp;<code>t2_event_d(\"XCONF_Dwld_Ignored_Not_EnoughMem\", 1)<\/code>&nbsp;when memory insufficient, structured logging to&nbsp;<code>\/rdklogs\/logs\/xconf.txt.0<\/code>&nbsp;with timestamps\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>FwDownloadChk<\/code><\/li>\n\n\n\n<li>Returns: Exit code 1 (proceed), 0 (block), -1 (error)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>WebConfig Decoder (webcfg_decoder)<\/strong>: WebConfig multipart document decoder supporting msgpack binary deserialization using&nbsp;<code>msgpack_unpack_next()<\/code>&nbsp;with MSGPACK_OBJECT_MAP parsing, base64 decoding via trower-base64 library, HTTP fetch using libcurl for cloud configuration retrieval, RBus method invocation&nbsp;<code>Device.X_RDK_WebConfig.FetchCachedBlob<\/code>&nbsp;for offline cache access via&nbsp;<code>rbusMethod_InvokeAsync()<\/code>, handles MSGPACK_OBJECT_NIL, MSGPACK_OBJECT_BOOLEAN, MSGPACK_OBJECT_POSITIVE_INTEGER, MSGPACK_OBJECT_STR and nested structures, outputs decoded JSON structures to stdout for debugging\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>webcfg_decoder -b &lt;filename&gt;<\/code>&nbsp;(base64 decode)<\/li>\n\n\n\n<li>CLI:&nbsp;<code>webcfg_decoder -m &lt;filename&gt;<\/code>&nbsp;(msgpack decode)<\/li>\n\n\n\n<li>CLI:&nbsp;<code>webcfg_decoder -c &lt;url&gt; &lt;subdoc&gt; &lt;token_file&gt; &lt;interface&gt;<\/code>&nbsp;(cloud fetch)<\/li>\n\n\n\n<li>CLI:&nbsp;<code>webcfg_decoder -f &lt;subdocname&gt;<\/code>&nbsp;(cache fetch via RBus)<\/li>\n\n\n\n<li>Example:&nbsp;<code>webcfg_decoder -f portforwarding<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Message Queue Utility (msgq_util)<\/strong>: POSIX message queue wrapper for gateway state machine IPC using&nbsp;<code>mq_open()<\/code>&nbsp;on queue&nbsp;<code>\/gwmgr_smqueue<\/code>,&nbsp;<code>mq_send()<\/code>&nbsp;for posting 24 defined event types (GM_EVENT_STA_MODE_CONNECTED=0, GM_EVENT_AP_MODE_CONNECTED=1, GM_EVENT_WAN_PRIMARY_UP=6, GM_EVENT_WAN_PRIMARY_DOWN=7, etc.), blocking send operations with error handling for queue full conditions\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>msgq_util &lt;event_number&gt;<\/code><\/li>\n\n\n\n<li>Event range: 0-23 for gateway state machine events<\/li>\n\n\n\n<li>Example:&nbsp;<code>msgq_util 6<\/code>&nbsp;(sends GM_EVENT_WAN_PRIMARY_UP)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Time Conversion Utilities (LTime\/TimeConv)<\/strong>: Timestamp conversion library using&nbsp;<code>getOffset()<\/code>&nbsp;function retrieving timezone offset from sysevent parameters (<code>ipv4-timeoffset<\/code>,&nbsp;<code>ipv6-timeoffset<\/code>) or platform HAL&nbsp;<code>platform_hal_getTimeOffSet()<\/code>, applies offset via&nbsp;<code>gmtime_r()<\/code>&nbsp;for UTC-adjusted local time calculation,&nbsp;<code>strftime()<\/code>&nbsp;for formatted output with DATE_FMT_H (hour), DATE_FMT_M (minute) formats, supports UTC_ENABLE conditional compilation for UTC time handling\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>LTime [H|M|O]<\/code><\/li>\n\n\n\n<li>Options:&nbsp;<code>H<\/code>&nbsp;(hour format),&nbsp;<code>M<\/code>&nbsp;(minute format),&nbsp;<code>O<\/code>&nbsp;(raw offset in seconds), no args (formatted timestamp)<\/li>\n\n\n\n<li>Example:&nbsp;<code>LTime O<\/code>&nbsp;(outputs timezone offset)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Memory Fragmentation Calculator (MemFrag_Calc)<\/strong>: Memory fragmentation analysis using Linux buddyinfo data (11-column format) parsing, calculates free page distribution across order-0 through order-10 memory blocks using power-of-2 array (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 pages), computes&nbsp;<code>overallFragmentation = sum(fragmentation_percentages) \/ 11<\/code>&nbsp;and&nbsp;<code>averageFragmentation = sum(fragmentation_percentages_orders_3_to_10) \/ 8<\/code>, outputs two integer percentages to stdout for telemetry ingestion\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>MemFrag_Calc &lt;buddyinfo_data&gt;<\/code><\/li>\n\n\n\n<li>Input format: Comma-separated 11 integer values representing page counts per order<\/li>\n\n\n\n<li>Example:&nbsp;<code>MemFrag_Calc \"100,50,25,12,6,3,1,0,0,0,0\"<\/code>&nbsp;(outputs &#8220;overall avg&#8221;)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Parental Control Device Blocker (parcon)<\/strong>: Parental control MAC address block list manager for device access restriction, validates MAC address format, writes validated MAC addresses to&nbsp;<code>\/tmp\/.pcmd<\/code>&nbsp;with file locking via&nbsp;<code>flock(fileno(fp), LOCK_EX)<\/code>&nbsp;preventing concurrent access race conditions, triggers firewall restart through&nbsp;<code>sysevent set firewall-restart<\/code>&nbsp;to apply blocking rules, logs all operations to&nbsp;<code>\/rdklogs\/logs\/Parcon.txt<\/code>&nbsp;with timestamps, clears block list when invoked without arguments allowing all devices\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>parcon &lt;mac_address1&gt; &lt;mac_address2&gt; ...<\/code><\/li>\n\n\n\n<li>Validates MAC format before accepting, writes device count + MAC list to&nbsp;<code>\/tmp\/.pcmd<\/code>&nbsp;for firewall consumption<\/li>\n\n\n\n<li>Example:&nbsp;<code>parcon AA:BB:CC:DD:EE:FF 11:22:33:44:55:66<\/code>&nbsp;(blocks two devices)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>LED Control (SetLED)<\/strong>: Hardware LED state management interfacing with platform HAL&nbsp;<code>platform_hal_setLed()<\/code>&nbsp;function accepting LEDMGMT_PARAMS structure with LED color (0-4 supported values), state (0=solid\/1=blink), and blink interval in seconds, validates input parameters with bounds checking (color range 0-4, state values 0-1, non-negative interval), returns error codes on validation failure or HAL operation errors\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>SetLED &lt;color&gt; &lt;state&gt; &lt;interval&gt;<\/code><\/li>\n\n\n\n<li>Parameters: color (0-4 where invalid values set NOT_SUPPORTED), state (0=solid, 1=blink), interval (blink period in seconds, \u22650)<\/li>\n\n\n\n<li>Example:&nbsp;<code>SetLED 1 1 2<\/code>&nbsp;(color 1, blinking, 2-second interval)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Firmware Bank Info (FwBankInfo)<\/strong>: Bootloader firmware bank information query using&nbsp;<code>platform_hal_GetFirmwareBankInfo()<\/code>&nbsp;for both ACTIVE_BANK and INACTIVE_BANK, extracts firmware name and state into FW_BANK_INFO structure, publishes to telemetry system via&nbsp;<code>t2_event_s(\"FW_ACTIVEBANK_split\", buffer)<\/code>&nbsp;and&nbsp;<code>t2_event_s(\"FW_INACTIVEBANK_split\", buffer)<\/code>&nbsp;with comma-separated name,state format, logs to&nbsp;<code>\/rdklogs\/logs\/SelfHeal.txt.0<\/code>, publishes error events&nbsp;<code>t2_event_d(\"SYS_ERROR_FW_ACTIVEBANK_FETCHFAILED\", 1)<\/code>&nbsp;on HAL failures\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>FwBankInfo<\/code><\/li>\n\n\n\n<li>Queries both banks and publishes telemetry events automatically<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Multipart Root (multipartRoot)<\/strong>: Multipart firmware\/configuration document creator using msgpack binary serialization via&nbsp;<code>msgpack_packer<\/code>&nbsp;for encoding subdocument metadata (name, version, binary data), accepts root version and variable subdocument arguments, generates multipart binary buffer using&nbsp;<code>generateMultipartBuffer()<\/code>, writes output to&nbsp;<code>\/nvram\/multipart.bin<\/code>, supports subdocument argument parsing and JSON-to-msgpack conversion for structured configuration documents\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>multipartRoot &lt;root_version&gt; &lt;subdoc_args...&gt;<\/code><\/li>\n\n\n\n<li>Creates msgpack-encoded multipart document from subdocument inputs<\/li>\n\n\n\n<li>Example:&nbsp;<code>multipartRoot 1.0 subdoc1.bin subdoc2.bin<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Notify Lease (Notify_Lease)<\/strong>: DHCP lease file monitoring daemon using inotify API (<code>inotify_init()<\/code>,&nbsp;<code>inotify_add_watch()<\/code>) for&nbsp;<code>\/nvram\/dnsmasq.leases<\/code>&nbsp;with IN_MODIFY event mask, daemonizes via fork()\/exit() pattern, spawns monitoring thread using&nbsp;<code>pthread_create()<\/code>&nbsp;running&nbsp;<code>MonitorDHCPLeaseFile()<\/code>&nbsp;function, triggers lease synchronization script&nbsp;<code>\/etc\/utopia\/service.d\/service_lan\/dhcp_lease_sync.sh<\/code>&nbsp;on every file modification event, continuous event loop with&nbsp;<code>read(inotifyFd, buf, BUF_LEN)<\/code>&nbsp;blocking on inotify file descriptor, waits for lease file existence with 5-second polling if not present at startup\n<ul class=\"wp-block-list\">\n<li>CLI:&nbsp;<code>Notify_Lease<\/code>&nbsp;(daemon)<\/li>\n\n\n\n<li>Automatically monitors DHCP lease file changes and triggers sync script<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-Design\">Design<\/h2>\n\n\n\n<p>The miscellaneous-broadband component follows a modular, loosely-coupled architecture where each utility operates as an independent executable or library with well-defined responsibilities. The design philosophy emphasizes minimal dependencies between utilities, allowing selective compilation and deployment based on platform requirements specified through configure-time flags. Each utility interface design promotes reusability and integration, providing command-line interfaces for administrative operations, library APIs for programmatic access, or daemon processes for runtime services. The architecture enables platform vendors to customize the utility suite by enabling only required modules through autoconf-based build configuration.<\/p>\n\n\n\n<p>The component integrates with the RDK-B middleware stack through standardized interfaces including RBus for event-driven communication, PSM for persistent data storage, sysevent for system-wide event notification, and syscfg for secure configuration access. Utilities requiring inter-process communication leverage RBus event subscription and method invocation mechanisms following RDK-B design patterns. Network-related utilities interact with the Linux kernel network stack through socket APIs, ioctl system calls, or specialized libraries like libnet when core networking library support is enabled. The design ensures that utilities can operate independently while maintaining consistent integration patterns across the broader RDK-B ecosystem.<\/p>\n\n\n\n<p>Data persistence strategies vary by utility purpose with configuration-focused utilities using PSM as the primary storage backend, runtime state managed through sysevent, and diagnostic information logged to standardized log locations under \/rdklogs\/logs\/. Utilities requiring secure configuration access integrate with syscfg providing tamper-resistant storage for sensitive parameters. The threading model varies per utility with simple command-line tools executing as single-threaded processes, while daemon utilities like ServiceCtrl implement multi-threaded architectures with dedicated worker threads for queue processing and event handling. Error handling follows defensive programming practices with comprehensive input validation, graceful error recovery, and detailed logging to support field diagnostics and troubleshooting operations.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">graph TB\n    %% External Actors\n    Admin[&lt;b>Administrator\/Scripts&lt;\/b>&lt;br\/>CLI Invocation]\n\n    %% Utility Categories\n    subgraph Utilities[\" \"]\n        direction TB\n\n        subgraph Core[\"&lt;b>Core Utilities&lt;\/b>\"]\n            Psmcli[\"psmcli&lt;br\/>&lt;i>PSM CLI&lt;\/i>\"]\n            ServiceCtrl[\"ServiceCtrl&lt;br\/>&lt;i>Service Restart Daemon&lt;\/i>\"]\n            EventSub[\"event_subscriber&lt;br\/>&lt;i>Event Monitor&lt;\/i>\"]\n        end\n\n        subgraph Network[\"&lt;b>Network &amp; Security&lt;\/b>\"]\n            BridgeUtils[\"bridge_utils&lt;br\/>&lt;i>Bridge Manager&lt;\/i>\"]\n            DHCPUtils[\"dhcp_client_utils&lt;br\/>&lt;i>DHCP Client Library&lt;\/i>\"]\n            Parcon[\"parcon&lt;br\/>&lt;i>Device Blocker&lt;\/i>\"]\n            NotifyLease[\"Notify_Lease&lt;br\/>&lt;i>Lease Monitor&lt;\/i>\"]\n        end\n\n        subgraph Config[\"&lt;b>Configuration&lt;\/b>\"]\n            WebCfgDecoder[\"webcfg_decoder&lt;br\/>&lt;i>WebConfig Parser&lt;\/i>\"]\n            MsgQ[\"msgq_util&lt;br\/>&lt;i>State Machine IPC&lt;\/i>\"]\n        end\n\n        subgraph Firmware[\"&lt;b>Firmware Management&lt;\/b>\"]\n            FwDownloadChk[\"FwDownloadChk&lt;br\/>&lt;i>Memory Validator&lt;\/i>\"]\n            FwBankInfo[\"FwBankInfo&lt;br\/>&lt;i>Bank Query&lt;\/i>\"]\n            MultipartRoot[\"multipartRoot&lt;br\/>&lt;i>Multipart Creator&lt;\/i>\"]\n        end\n\n        subgraph Diagnostic[\"&lt;b>Diagnostics&lt;\/b>\"]\n            LTime[\"LTime&lt;br\/>&lt;i>Time utility&lt;\/i>\"]\n            MemFragCalc[\"MemFrag_Calc&lt;br\/>&lt;i>Fragmentation&lt;\/i>\"]\n            SetLED[\"SetLED&lt;br\/>&lt;i>LED Control&lt;\/i>\"]\n        end\n    end\n\n    %% System Interfaces\n    subgraph SystemAPIs[\" \"]\n        direction LR\n        RBus[\"&lt;b>RBus&lt;\/b>&lt;br\/>Message Bus\"]\n        PSM[\"&lt;b>PSM&lt;\/b>&lt;br\/>Persistent Storage\"]\n        Sysevent[\"&lt;b>Sysevent&lt;\/b>&lt;br\/>Event System\"]\n        Syscfg[\"&lt;b>Syscfg&lt;\/b>&lt;br\/>Config Store\"]\n        Kernel[\"&lt;b>Linux Kernel&lt;\/b>&lt;br\/>Network\/FS\/Proc\"]\n        HAL[\"&lt;b>Platform HAL&lt;\/b>&lt;br\/>Hardware Abstraction\"]\n    end\n\n    %% Connections\n    Admin -.->|invoke| Core\n    Admin -.->|invoke| Network\n    Admin -.->|invoke| Config\n    Admin -.->|invoke| Firmware\n    Admin -.->|invoke| Diagnostic\n\n    ServiceCtrl --> RBus\n    EventSub --> RBus\n    WebCfgDecoder --> RBus\n\n    Psmcli --> PSM\n    BridgeUtils --> PSM\n\n    BridgeUtils --> Sysevent\n    DHCPUtils --> Sysevent\n    Parcon --> Sysevent\n\n    FwDownloadChk --> Syscfg\n\n    SetLED --> HAL\n    FwBankInfo --> HAL\n\n    BridgeUtils --> Kernel\n    DHCPUtils --> Kernel\n    Parcon --> Kernel\n    NotifyLease --> Kernel\n    MemFragCalc --> Kernel\n    WebCfgDecoder --> Kernel\n    MsgQ --> Kernel\n\n    %% Styling\n    classDef coreStyle fill:#e3f2fd,stroke:#1976d2,stroke-width:2px\n    classDef netStyle fill:#e8f5e9,stroke:#388e3c,stroke-width:2px\n    classDef configStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px\n    classDef fwStyle fill:#fff3e0,stroke:#f57c00,stroke-width:2px\n    classDef diagStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px\n    classDef apiStyle fill:#fff9c4,stroke:#f57f17,stroke-width:2px\n    classDef adminStyle fill:#ffebee,stroke:#d32f2f,stroke-width:2px\n\n    class Psmcli,ServiceCtrl,EventSub coreStyle\n    class BridgeUtils,DHCPUtils,Parcon,NotifyLease netStyle\n    class WebCfgDecoder,MsgQ configStyle\n    class FwDownloadChk,FwBankInfo,MultipartRoot fwStyle\n    class LTime,MemFragCalc,SetLED diagStyle\n    class RBus,PSM,Sysevent,Syscfg,Kernel,HAL apiStyle\n    class Admin adminStyle<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-PrerequisitesandDependencies\">Prerequisites and Dependencies<\/h3>\n\n\n\n<p><strong>Build-Time Flags and Configuration:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Configure Option<\/strong><\/td><td><strong>DISTRO Feature<\/strong><\/td><td><strong>Build Flag<\/strong><\/td><td><strong>Purpose<\/strong><\/td><td><strong>Default<\/strong><\/td><\/tr><tr><td><code>--enable-vts_bridge_util<\/code><\/td><td>N\/A<\/td><td><code>VTS_BRIDGE_UTIL_ENABLED<\/code><\/td><td>Enable VTS-specific bridge utility variant<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-core_net_lib_feature_support<\/code><\/td><td>N\/A<\/td><td><code>CORE_NET_LIB<\/code><\/td><td>Enable libnet-based networking library instead of standard Linux headers<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-notifylease<\/code><\/td><td>N\/A<\/td><td><code>NOTIFYLEASE_ENABLE<\/code><\/td><td>Build DHCP lease notification utility<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-setLED<\/code><\/td><td>N\/A<\/td><td><code>SETLED_ENABLE<\/code><\/td><td>Build LED control utility<\/td><td>Enabled<\/td><\/tr><tr><td><code>--enable-multipartUtilEnable<\/code><\/td><td>N\/A<\/td><td><code>MULTIPART_UTIL_ENABLE<\/code><\/td><td>Build multipart firmware handling utility<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-bridgeUtilsBin<\/code><\/td><td>N\/A<\/td><td><code>BRIDGE_UTILS_BIN_ENABLE<\/code><\/td><td>Build bridge utilities binary and library<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-dhcp_manager<\/code><\/td><td>N\/A<\/td><td><code>DHCP_MANAGER_ENABLE<\/code><\/td><td>Disable dhcp_client_utils when DHCP manager is enabled<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-unitTestDockerSupport<\/code><\/td><td>N\/A<\/td><td><code>UNIT_TEST_DOCKER_SUPPORT<\/code><\/td><td>Build unit tests with Docker support<\/td><td>Disabled<\/td><\/tr><tr><td>N\/A<\/td><td><code>OneWifi<\/code><\/td><td><code>RDK_ONEWIFI<\/code><\/td><td>Conditional compilation for OneWifi stack integration<\/td><td>Platform-specific<\/td><\/tr><tr><td>N\/A<\/td><td><code>safec<\/code><\/td><td><code>SAFEC_DUMMY_API<\/code>&nbsp;(when safec disabled)<\/td><td>Enable safe C library for bounds-checked string operations<\/td><td>Platform-specific<\/td><\/tr><tr><td>N\/A<\/td><td>N\/A<\/td><td><code>INCLUDE_BREAKPAD<\/code><\/td><td>Enable Google Breakpad crash reporting integration<\/td><td>Platform-specific<\/td><\/tr><tr><td>N\/A<\/td><td>N\/A<\/td><td><code>NO_MOCA_FEATURE_SUPPORT<\/code><\/td><td>Disable MoCA interface support in bridge utilities<\/td><td>Platform-specific<\/td><\/tr><tr><td>N\/A<\/td><td>N\/A<\/td><td><code>RDKB_EXTENDER_ENABLED<\/code><\/td><td>Enable extender mode support in bridge utilities<\/td><td>Platform-specific<\/td><\/tr><tr><td>N\/A<\/td><td>N\/A<\/td><td><code>UTC_ENABLE<\/code><\/td><td>Enable UTC time support in time conversion utilities<\/td><td>Platform-specific<\/td><\/tr><tr><td>N\/A<\/td><td>N\/A<\/td><td><code>DBUS_INIT_SYNC_MODE<\/code><\/td><td>Enable synchronous RBus initialization in psmcli<\/td><td>Platform-specific<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>RDK-B Platform and Integration Requirements:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Build Dependencies<\/strong>: Standard C compiler (gcc\/clang), autotools (autoconf, automake, libtool), pkg-config<\/li>\n\n\n\n<li><strong>RDK-B Components<\/strong>:&nbsp;<code>CcspCommonLibrary<\/code>&nbsp;for message bus and utility functions,&nbsp;<code>CcspPsm<\/code>&nbsp;for persistent storage operations, RBus library for event-driven communication<\/li>\n\n\n\n<li><strong>System Libraries<\/strong>: RBus library, pthread library, standard C library with POSIX extensions, libcurl for HTTP operations (webcfg_decoder), msgpack-c for binary serialization (webcfg_decoder), trower-base64 for encoding (webcfg_decoder), libnet for core networking support (optional, bridge_utils)<\/li>\n\n\n\n<li><strong>HAL Dependencies<\/strong>: Platform HAL for LED control operations when SetLED is enabled<\/li>\n\n\n\n<li><strong>Configuration Files<\/strong>: PSM database for persistent parameters, syscfg storage for secure configuration, sysevent daemon for system event distribution<\/li>\n\n\n\n<li><strong>Runtime Dependencies<\/strong>: RBus message bus daemon must be running, PSM service must be operational for utilities requiring persistent storage access, sysevent daemon must be active for network utilities<\/li>\n<\/ul>\n\n\n\n<p><strong>Threading Model:<\/strong><\/p>\n\n\n\n<p>The miscellaneous-broadband component employs utility-specific threading models optimized for each module&#8217;s operational requirements ranging from single-threaded command-line tools to multi-threaded daemon processes with specialized worker threads.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Threading Architecture<\/strong>: Varies by utility type &#8211; single-threaded for CLI utilities, multi-threaded for daemon processes with dedicated worker threads<\/li>\n\n\n\n<li><strong>Command-Line Utilities<\/strong>: Single-threaded synchronous execution model used by psmcli, parcon, LTime, TimeConv, MemFrag_Calc, SetLED, FwBankInfo, FwDownloadChk, and webcfg_decoder where utilities execute requested operations and exit immediately without background processing<\/li>\n\n\n\n<li><strong>Main Thread Responsibilities (Daemon Processes)<\/strong>:<\/li>\n\n\n\n<li><strong>ServiceCtrl Main Thread<\/strong>: Signal handler installation (SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGSEGV), RBus connection management with&nbsp;<code>ServiceControl_Rbus_Init()<\/code>, component lifecycle coordination, infinite sleep loop maintaining daemon process<\/li>\n\n\n\n<li><strong>Notify_Lease Main Thread<\/strong>: Process daemonization via fork()\/exit() pattern, monitoring thread spawning, infinite sleep loop (30-second intervals) maintaining daemon process lifetime<\/li>\n\n\n\n<li><strong>EventSubscription Main Thread<\/strong>: RBus connection initialization via&nbsp;<code>rbus_open()<\/code>, event subscription setup with&nbsp;<code>rbusEvent_Subscribe()<\/code>, infinite event processing loop, signal handler for graceful SIGINT shutdown with&nbsp;<code>rbusEvent_Unsubscribe()<\/code><\/li>\n\n\n\n<li><strong>Worker Threads<\/strong>:<\/li>\n\n\n\n<li><strong>ServiceCtrl &#8211; Service Restart Queue Thread<\/strong>&nbsp;(<code>svc_restart_queue_loop()<\/code>): Dedicated detached thread created via&nbsp;<code>spawn_svc_restart_queue_loop()<\/code>&nbsp;with PTHREAD_CREATE_DETACHED attribute, processes service restart queue using&nbsp;<code>pthread_cond_wait()<\/code>&nbsp;on&nbsp;<code>svcCond<\/code>&nbsp;condition variable, executes&nbsp;<code>systemctl restart<\/code>&nbsp;commands sequentially via&nbsp;<code>v_secure_system()<\/code>&nbsp;for queued services, waits on condition variable when queue empty (<code>svc_queue_wakeup<\/code>&nbsp;flag false), terminates when&nbsp;<code>exit_svc_queue_loop<\/code>&nbsp;flag set<\/li>\n\n\n\n<li><strong>Notify_Lease &#8211; DHCP Lease Monitor Thread<\/strong>&nbsp;(<code>MonitorDHCPLeaseFile()<\/code>): Spawned via&nbsp;<code>pthread_create()<\/code>&nbsp;with default joinable attributes, initializes inotify file descriptor with&nbsp;<code>inotify_init()<\/code>, adds watch on&nbsp;<code>\/nvram\/dnsmasq.leases<\/code>&nbsp;with IN_MODIFY event mask using&nbsp;<code>inotify_add_watch()<\/code>, infinite blocking read loop on inotify file descriptor, triggers&nbsp;<code>\/etc\/utopia\/service.d\/service_lan\/dhcp_lease_sync.sh<\/code>&nbsp;script on every IN_MODIFY event, handles file existence polling with 5-second sleep intervals when lease file not present<\/li>\n\n\n\n<li><strong>Event-Driven Processing (EventSubscription)<\/strong>: Single-threaded event-driven architecture using RBus event dispatcher, callback handler&nbsp;<code>eventReceiveHandler()<\/code>&nbsp;invoked asynchronously by RBus library on subscribed event arrival, type-aware event value extraction supporting multiple RBus data types (RBUS_STRING, RBUS_BOOLEAN, RBUS_INT8, RBUS_UINT8, RBUS_INT16, RBUS_UINT16, RBUS_INT32, RBUS_UINT32, RBUS_DOUBLE, RBUS_BYTES), user data preserved across callback invocations via&nbsp;<code>subscription-&gt;userData<\/code>, graceful unsubscribe on SIGINT via&nbsp;<code>handle_sigint()<\/code>&nbsp;signal handler<\/li>\n\n\n\n<li><strong>Library Components<\/strong>: Thread-safe reentrant libraries (dhcp_client_utils, msgq_util) with no internal threading, caller-controlled threading context, mutex-free design relying on atomic system calls and process-level synchronization<\/li>\n\n\n\n<li><strong>Synchronization Mechanisms<\/strong>:<\/li>\n\n\n\n<li><strong>ServiceCtrl Mutexes<\/strong>:&nbsp;<code>svcMutex<\/code>&nbsp;(pthread_mutex_t) protects service restart queue operations including queue_push\/queue_pop and queue_count access,&nbsp;<code>gVarMutex<\/code>&nbsp;(pthread_mutex_t) protects global variable access including&nbsp;<code>exit_svc_queue_loop<\/code>&nbsp;and&nbsp;<code>svc_queue_wakeup<\/code>&nbsp;flags<\/li>\n\n\n\n<li><strong>ServiceCtrl Condition Variables<\/strong>:&nbsp;<code>svcCond<\/code>&nbsp;(pthread_cond_t) used for thread coordination with&nbsp;<code>pthread_cond_wait()<\/code>&nbsp;in worker thread and&nbsp;<code>pthread_cond_signal()<\/code>&nbsp;in queue push operations, implements producer-consumer pattern for service restart queue<\/li>\n\n\n\n<li><strong>File Locking<\/strong>: parcon utility uses&nbsp;<code>flock(fileno(fp), LOCK_EX)<\/code>&nbsp;for exclusive lock on&nbsp;<code>\/tmp\/.pcmd<\/code>&nbsp;file preventing concurrent firewall rule modifications, automatic unlock via&nbsp;<code>flock(fileno(fp), LOCK_UN)<\/code>&nbsp;before file close<\/li>\n\n\n\n<li><strong>Atomic Operations<\/strong>: Queue wakeup flag (<code>svc_queue_wakeup<\/code>) and exit flag (<code>exit_svc_queue_loop<\/code>) used for lock-free thread signaling patterns<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-ComponentStateFlow\">Component State Flow<\/h3>\n\n\n\n<p><strong>Initialization to Active State<\/strong><\/p>\n\n\n\n<p>Command-line utilities follow a straightforward initialization-execute-terminate lifecycle while daemon processes maintain persistent operation with event-driven state management.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant System as System Startup\/Invocation\n    participant Utility as Utility Process\n    participant MsgBus as Message Bus\n    participant PSM as Persistent Storage\n    participant Kernel as Linux Kernel\n\n    System->>Utility: Launch Utility\n    Utility->>Utility: Parse Command Line Arguments\n\n    alt Daemon Process (ServiceCtrl)\n        Utility->>Utility: Daemonize Process\n        Utility->>Utility: Initialize Logging\n        Utility->>MsgBus: RBus Connect &amp; Register\n        MsgBus-->>Utility: RBus Handle\n        Utility->>Utility: Initialize Service Queue\n        Utility->>Utility: Start Worker Thread\n        Utility->>System: Signal Ready (Active State)\n        loop Event Processing\n            MsgBus->>Utility: RBus Event\/Method Call\n            Utility->>Utility: Process Request\n            Utility-->>MsgBus: Response\n        end\n    else PSM Utility (Psmcli)\n        Utility->>MsgBus: RBus Connect\n        MsgBus-->>Utility: Connection Established\n        Utility->>PSM: Execute PSM Operation\n        PSM-->>Utility: Result\n        Utility->>System: Exit with Status Code\n    else Security Utility (parcon)\n        Utility->>Utility: Validate MAC Addresses\n        Utility->>Kernel: Write Block List to \/tmp\/.pcmd\n        Kernel-->>Utility: File Write Success\n        Utility->>Kernel: Trigger sysevent firewall-restart\n        Utility->>System: Exit with Status Code\n    else Network Utility (bridge_utils)\n        Utility->>PSM: Read Bridge Configuration\n        PSM-->>Utility: Configuration Data\n        Utility->>Kernel: Apply Network Configuration\n        Kernel-->>Utility: Operation Status\n        Utility->>System: Exit with Status Code\n    else Event Subscriber (EventSubscription)\n        Utility->>MsgBus: RBus Connect\n        MsgBus-->>Utility: RBus Handle\n        Utility->>MsgBus: Subscribe to Event\n        MsgBus-->>Utility: Subscription Confirmed\n        Utility->>System: Signal Ready (Active State)\n        loop Event Reception\n            MsgBus->>Utility: Event Notification\n            Utility->>Utility: Display Event Data\n        end\n    end\n\n    System->>Utility: Shutdown Signal (Daemon Only)\n    Utility->>Utility: Cleanup Resources\n    Utility->>MsgBus: Disconnect\n    Utility->>System: Exit<\/pre><\/div>\n\n\n\n<p><strong>Runtime State Changes and Context Switching<\/strong><\/p>\n\n\n\n<p>Runtime state transitions occur based on external triggers, configuration changes, and operational events specific to each utility.<\/p>\n\n\n\n<p><strong>State Change Triggers:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Daemon processes respond to RBus method invocations triggering service restart operations queued for sequential processing<\/li>\n\n\n\n<li>Network utilities react to sysevent notifications for bridge configuration changes, interface state transitions, or VLAN updates requiring reconfiguration<\/li>\n\n\n\n<li>Configuration utilities process PSM parameter change notifications triggering re-read of configuration data<\/li>\n\n\n\n<li>Event subscription utilities receive RBus events from subscribed topics triggering callback handler execution and data logging<\/li>\n\n\n\n<li>Service restart operations transition through queued, processing, and completed states with mutex-protected state tracking<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-CallFlow\">Call Flow<\/h3>\n\n\n\n<p><strong>Initialization Call Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Init as Initialization Process\n    participant Comp as CcspMisc Utility\n    participant MsgBus as Message Bus\n    participant PSM as PSM\/Syscfg\n    participant Sys as System Resources\n\n    Init->>Comp: Launch Utility\n    Comp->>Comp: Parse Arguments &amp; Validate\n    Comp->>Sys: Initialize Logging\n    alt Requires Message Bus\n        Comp->>MsgBus: Connect (RBus)\n        MsgBus-->>Comp: Connection Handle\n        Comp->>MsgBus: Register Components\/Events\n        MsgBus-->>Comp: Registration Confirmed\n    end\n    alt Requires Persistent Storage\n        Comp->>PSM: Connect to PSM\/Syscfg\n        PSM-->>Comp: Connection Established\n    end\n    Comp->>Comp: Initialize Data Structures\n    Comp->>Init: Initialization Complete (Active State)<\/pre><\/div>\n\n\n\n<p><strong>Request Processing Call Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Client as Client\/Caller\n    participant Comp as CcspMisc Utility\n    participant MsgBus as Message Bus\n    participant PSM as PSM\/Syscfg\n    participant HAL as HAL\/Kernel\n\n    Client->>Comp: Request (CLI\/RBus\/Event)\n    Comp->>Comp: Validate Request Parameters\n\n    alt PSM Operation (Psmcli)\n        Comp->>MsgBus: PSM Get\/Set Request\n        MsgBus->>PSM: Forward Request\n        PSM-->>MsgBus: PSM Response\n        MsgBus-->>Comp: Response Data\n    else Service Restart (ServiceCtrl)\n        Comp->>Comp: Queue Restart Request\n        Comp->>Comp: Worker Thread Processes Queue\n        Comp->>HAL: Execute Service Restart\n        HAL-->>Comp: Operation Status\n        Comp->>MsgBus: Publish Status Event\n    else Bridge Configuration (bridge_utils)\n        Comp->>PSM: Read Bridge Config\n        PSM-->>Comp: Configuration Data\n        Comp->>HAL: Apply Network Configuration\n        HAL-->>Comp: Configuration Status\n    else Event Monitoring (EventSubscription)\n        MsgBus->>Comp: Event Notification\n        Comp->>Comp: Display Event Data\n    end\n\n    Comp-->>Client: Response\/Event<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-InternalModules\">Internal Modules<\/h2>\n\n\n\n<p>The miscellaneous-broadband component consists of multiple independent utilities, each serving specific operational needs within the RDK-B ecosystem.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Module\/Class<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Key Files<\/strong><\/td><\/tr><tr><td><strong>Psmcli<\/strong><\/td><td>Command-line interface for PSM operations supporting get, set, getdetail, and delete operations with type-specific parameter handling. Provides direct access to persistent storage for administration and debugging.<\/td><td><code>psmcli.c<\/code>,&nbsp;<code>ccsp_psmcli.h<\/code><\/td><\/tr><tr><td><strong>ServiceCtrl<\/strong><\/td><td>RBus-based daemon providing service restart management through standardized interface. Implements queue-based restart processing with mutex-protected concurrent access and RBus method handlers.<\/td><td><code>servicecontrol_main.c<\/code>,&nbsp;<code>servicecontrol_apis.c<\/code>,&nbsp;<code>servicecontrol_rbus_handler_apis.c<\/code>,&nbsp;<code>servicecontrol_dml.c<\/code><\/td><\/tr><tr><td><strong>bridge_utils<\/strong><\/td><td>Network bridge management utility supporting creation, configuration, and deletion of Linux bridges with VLAN tagging, member interface management, and MoCA isolation support. Integrates with PSM for configuration storage and sysevent for runtime coordination.<\/td><td><code>bridge_util.c<\/code>,&nbsp;<code>bridge_util_generic.c<\/code>,&nbsp;<code>bridge_creation.c<\/code>,&nbsp;<code>main.c<\/code><\/td><\/tr><tr><td><strong>dhcp_client_utils<\/strong><\/td><td>Common library abstracting multiple DHCP client implementations (udhcpc, dibbler, ti_dhcp6c) providing unified API for client lifecycle management, process control, and event notification.<\/td><td><code>dhcp_client_common.c<\/code>,&nbsp;<code>udhcpc_client_utils.c<\/code>,&nbsp;<code>dhcpv4_client_utils.c<\/code>,&nbsp;<code>dhcpv6_client_utils.c<\/code>,&nbsp;<code>dibbler_client_utils.c<\/code>,&nbsp;<code>ti_dhcp6c_client_utils.c<\/code>,&nbsp;<code>ti_udhcpc_client_utils.c<\/code><\/td><\/tr><tr><td><strong>EventSubscription<\/strong><\/td><td>RBus event subscription utility for CLI-based event monitoring. Subscribes to specified RBus events and displays received event data with type-aware value extraction supporting string, boolean, and numeric types.<\/td><td><code>event_subscriber.c<\/code><\/td><\/tr><tr><td><strong>FwDownloadChk<\/strong><\/td><td>Firmware download memory validation utility checking available system memory against firmware size plus configurable thresholds. Prevents firmware download attempts when insufficient memory exists, reducing failed upgrade attempts.<\/td><td><code>fw_download_check.c<\/code>,&nbsp;<code>fw_download_check.h<\/code><\/td><\/tr><tr><td><strong>webcfg_decoder<\/strong><\/td><td>WebConfig blob fetch and decode utility supporting both HTTP download and RBus-based cache retrieval. Decodes msgpack-encoded multipart documents with base64 decoding and structured output for debugging WebConfig operations.<\/td><td><code>main.c<\/code><\/td><\/tr><tr><td><strong>msgq_util<\/strong><\/td><td>POSIX message queue wrapper providing gateway state machine messaging capabilities. Implements message send\/receive operations for inter-process event communication with defined event enumeration.<\/td><td><code>msgq_util.c<\/code><\/td><\/tr><tr><td><strong>LTime<\/strong><\/td><td>Local time retrieval utility providing current timestamp output in seconds since epoch. Supports optional UTC time handling when UTC_ENABLE flag is set.<\/td><td><code>LTime.c<\/code><\/td><\/tr><tr><td><strong>TimeConv<\/strong><\/td><td>Time format conversion library providing conversion between different time representations. Supports UTC time conversion when UTC_ENABLE build flag is enabled.<\/td><td><code>time_conversion.c<\/code>,&nbsp;<code>time_conversion.h<\/code><\/td><\/tr><tr><td><strong>MemFrag_Calc<\/strong><\/td><td>Memory fragmentation analysis utility calculating fragmentation metrics from \/proc meminfo. Used for system diagnostics and telemetry reporting.<\/td><td><code>MemFragCalc.c<\/code><\/td><\/tr><tr><td><strong>FwBankInfo<\/strong><\/td><td>Firmware bank information query utility extracting bootloader firmware bank details. Provides active\/inactive bank identification for dual-bank firmware management.<\/td><td><code>FwBank_Info.c<\/code><\/td><\/tr><tr><td><strong>parcon<\/strong><\/td><td>Parental control device blocking utility managing MAC address block lists for firewall-based device access restriction. Validates MAC addresses, writes block list to&nbsp;<code>\/tmp\/.pcmd<\/code>, and triggers firewall restart via sysevent.<\/td><td><code>parcon.c<\/code><\/td><\/tr><tr><td><strong>multipartRoot<\/strong><\/td><td>Multipart firmware image handling utility for processing split firmware images during upgrade operations.<\/td><td><code>multipartRoot.c<\/code><\/td><\/tr><tr><td><strong>SetLED<\/strong><\/td><td>LED control utility providing command-line interface for hardware LED state management. Interfaces with platform HAL for LED hardware control.<\/td><td><code>SetLED.c<\/code><\/td><\/tr><tr><td><strong>Notify_Lease<\/strong><\/td><td>DHCP lease notification monitoring utility tracking DHCP lease acquisition and renewal events. Conditionally compiled when notifylease feature is enabled.<\/td><td><code>Notify_Lease.c<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-ComponentInteractions\">Component Interactions<\/h2>\n\n\n\n<p>The miscellaneous-broadband utilities interact with various RDK-B components, system services, and external systems to provide their respective functionalities.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-InteractionMatrix\">Interaction Matrix<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Target Component\/Layer<\/strong><\/td><td><strong>Interaction Purpose<\/strong><\/td><td><strong>Key APIs\/Endpoints<\/strong><\/td><\/tr><tr><td><strong>RDK-B Middleware Components<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>RBus Message Bus<\/td><td>Event subscription, method invocation, parameter get\/set operations<\/td><td><code>CCSP_Message_Bus_Init()<\/code>,&nbsp;<code>rbus_open()<\/code>,&nbsp;<code>rbusEvent_Subscribe()<\/code>,&nbsp;<code>rbusMethod_InvokeAsync()<\/code><\/td><\/tr><tr><td>CcspPsm<\/td><td>Persistent parameter storage and retrieval for configuration data<\/td><td><code>PSM_Get_Record_Value2()<\/code>,&nbsp;<code>PSM_Set_Record_Value2()<\/code>,&nbsp;<code>PSM_Del_Record()<\/code><\/td><\/tr><tr><td>CcspPandM<\/td><td>Bridge configuration coordination, service state synchronization<\/td><td>RBus events:&nbsp;<code>Device.X_CISCO_COM_DeviceControl.*<\/code>, PSM parameters:&nbsp;<code>dmsb.l2net.*<\/code><\/td><\/tr><tr><td>CcspWiFi<\/td><td>WiFi interface bridge membership configuration<\/td><td>PSM parameters:&nbsp;<code>dmsb.l2net.*.Members.WiFi<\/code>, Sysevent: WiFi interface notifications<\/td><\/tr><tr><td><strong>System Services<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>Sysevent<\/td><td>System-wide event notification for network configuration changes<\/td><td><code>sysevent_open()<\/code>,&nbsp;<code>sysevent_get()<\/code>,&nbsp;<code>sysevent_set()<\/code>,&nbsp;<code>sysevent_set_options()<\/code>&nbsp;events:&nbsp;<code>bridge-status<\/code>,&nbsp;<code>multinet-*<\/code>,&nbsp;<code>wan-status<\/code><\/td><\/tr><tr><td>Syscfg<\/td><td>Secure configuration storage for firmware and system parameters<\/td><td><code>syscfg_init()<\/code>,&nbsp;<code>syscfg_get()<\/code>,&nbsp;<code>syscfg_set()<\/code>,&nbsp;<code>syscfg_commit()<\/code>&nbsp;keys:&nbsp;<code>xconf_url<\/code>,&nbsp;<code>FwDwld_AvlMem_RsrvThreshold<\/code><\/td><\/tr><tr><td><strong>Hardware Abstraction Layer<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>Platform HAL<\/td><td>LED hardware control operations<\/td><td>Platform-specific LED HAL APIs for state control<\/td><\/tr><tr><td><strong>Linux Kernel<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>Network Stack<\/td><td>Bridge creation, VLAN configuration, interface management<\/td><td><code>socket()<\/code>,&nbsp;<code>ioctl(SIOCBRADDBR)<\/code>,&nbsp;<code>ioctl(BRCADDIF)<\/code>, netlink sockets for interface operations<\/td><\/tr><tr><td>Process Management<\/td><td>DHCP client process lifecycle control<\/td><td><code>fork()<\/code>,&nbsp;<code>execv()<\/code>,&nbsp;<code>waitpid()<\/code>,&nbsp;<code>kill()<\/code>, signal handling<\/td><\/tr><tr><td>File System<\/td><td>Memory information, system status, log file access<\/td><td><code>\/proc\/meminfo<\/code>,&nbsp;<code>\/proc\/net\/*<\/code>,&nbsp;<code>\/sys\/class\/net\/*<\/code>,&nbsp;<code>\/rdklogs\/logs\/*<\/code><\/td><\/tr><tr><td>POSIX Message Queues<\/td><td>Inter-process messaging for gateway state machine<\/td><td><code>mq_open()<\/code>,&nbsp;<code>mq_send()<\/code>,&nbsp;<code>mq_receive()<\/code>,&nbsp;<code>mq_close()<\/code>, queue:&nbsp;<code>\/gwsm_queue<\/code><\/td><\/tr><tr><td><strong>External Systems<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>XCONF Server<\/td><td>Firmware image download URL and metadata retrieval<\/td><td>HTTP GET with curl library, Content-Length header parsing<\/td><\/tr><tr><td>WebConfig Server<\/td><td>Configuration document fetch and processing<\/td><td>HTTP GET\/POST with curl, msgpack deserialization, base64 decoding<\/td><\/tr><tr><td>Telemetry System<\/td><td>Diagnostic event reporting<\/td><td><code>t2_event_s()<\/code>&nbsp;for telemetry marker publication<\/td><\/tr><tr><td><strong>Configuration Sources<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>PSM Database<\/td><td>Bridge configurations, network parameters, persistent state<\/td><td>Namespace:&nbsp;<code>dmsb.l2net.*<\/code>,&nbsp;<code>dmsb.MultiLAN.*<\/code>&nbsp;for bridge and network settings<\/td><\/tr><tr><td>Command Line<\/td><td>Direct utility invocation by administrators and scripts<\/td><td>Standard argc\/argv parsing, getopt for option processing<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Events Published by CcspMisc:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Event Name<\/strong><\/td><td><strong>Event Topic\/Path<\/strong><\/td><td><strong>Trigger Condition<\/strong><\/td><td><strong>Subscriber Components<\/strong><\/td><\/tr><tr><td>Service_Restart_Complete<\/td><td>ServiceCtrl RBus method response<\/td><td>Service restart operation completes successfully or with error<\/td><td>Requesting component (CcspPandM, WebPA)<\/td><\/tr><tr><td>Bridge_Status_Change<\/td><td><code>bridge-status<\/code>&nbsp;sysevent<\/td><td>Bridge creation or deletion completes<\/td><td>Network management components, WiFi, routing services<\/td><\/tr><tr><td>DHCP_Lease_Event<\/td><td>Sysevent notifications<\/td><td>DHCP lease acquisition or renewal detected<\/td><td>Network monitoring, device tracking components<\/td><\/tr><tr><td>Network_Device_Status<\/td><td>RBus event publication<\/td><td>Device presence or network status change detected<\/td><td>Telemetry services, monitoring components<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-IPCFlowPatterns\">IPC Flow Patterns<\/h3>\n\n\n\n<p><strong>Primary IPC Flow &#8211; Service Restart Request:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Client as Management Client\n    participant ServiceCtrl as ServiceCtrl Daemon\n    participant Queue as Request Queue\n    participant System as System Service\n    participant PSM as PSM Storage\n\n    Client->>ServiceCtrl: RBus Method Call (Service Restart)\n    ServiceCtrl->>ServiceCtrl: Validate Request\n    ServiceCtrl->>Queue: Enqueue Restart Request\n    ServiceCtrl-->>Client: Request Accepted\n\n    Queue->>ServiceCtrl: Worker Thread Dequeues\n    ServiceCtrl->>System: Execute Service Restart\n    System-->>ServiceCtrl: Restart Status\n    ServiceCtrl->>PSM: Log Operation (optional)\n    PSM-->>ServiceCtrl: Storage Confirmation\n    ServiceCtrl->>Client: Publish Status Event (RBus)<\/pre><\/div>\n\n\n\n<p><strong>Bridge Configuration Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Admin as Administrator\n    participant BridgeUtil as bridge_utils\n    participant PSM as PSM Storage\n    participant Sysevent as Sysevent\n    participant Kernel as Linux Kernel\n\n    Admin->>BridgeUtil: CLI Invocation (Create Bridge)\n    BridgeUtil->>PSM: Read Bridge Configuration\n    PSM-->>BridgeUtil: Configuration Parameters\n    BridgeUtil->>BridgeUtil: Validate Configuration\n    BridgeUtil->>Kernel: Create Bridge (ioctl)\n    Kernel-->>BridgeUtil: Bridge Created\n    BridgeUtil->>Kernel: Add Member Interfaces\n    Kernel-->>BridgeUtil: Members Added\n    BridgeUtil->>Sysevent: Publish bridge-status Event\n    Sysevent-->>BridgeUtil: Event Published\n    BridgeUtil-->>Admin: Operation Complete (Exit Code)<\/pre><\/div>\n\n\n\n<p><strong>PSM Access Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant User as User\/Script\n    participant Psmcli as psmcli\n    participant MsgBus as Message Bus\n    participant PSM as PSM Service\n\n    User->>Psmcli: CLI Command (get\/set)\n    Psmcli->>Psmcli: Parse Arguments\n    Psmcli->>MsgBus: Connect to RBus\n    MsgBus-->>Psmcli: Connection Established\n    Psmcli->>MsgBus: PSM Request (Get\/Set)\n    MsgBus->>PSM: Forward Request\n    PSM->>PSM: Access Database\n    PSM-->>MsgBus: Response Data\n    MsgBus-->>Psmcli: Response Data\n    Psmcli->>Psmcli: Format Output\n    Psmcli-->>User: Display Result (stdout)\n    Psmcli->>MsgBus: Disconnect<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-ImplementationDetails\">Implementation Details<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-KeyImplementationLogic\">Key Implementation Logic<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Queue-Based Service Management (ServiceCtrl)<\/strong>: Producer-consumer pattern with dedicated worker thread processing service restart requests sequentially, ensuring serialized systemctl operations to prevent race conditions and maintain system stability during bulk restart operations.<\/li>\n\n\n\n<li>Main implementation in&nbsp;<code>servicecontrol_main.c<\/code>&nbsp;&#8211; process daemonization via fork()\/setsid() pattern, signal handler installation (SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGSEGV), RBus connection via&nbsp;<code>ServiceControl_Rbus_Init()<\/code>, infinite sleep loop maintaining daemon lifetime<\/li>\n\n\n\n<li>Worker thread implementation in&nbsp;<code>servicecontrol_apis.c<\/code>&nbsp;&#8211;&nbsp;<code>svc_restart_queue_loop()<\/code>&nbsp;function spawned with PTHREAD_CREATE_DETACHED attribute, processes queue using&nbsp;<code>pthread_cond_wait()<\/code>&nbsp;blocking until requests arrive, executes&nbsp;<code>v_secure_system(\"systemctl restart %s\")<\/code>&nbsp;for each queued service name, uses mutex-protected queue operations (queue_push\/queue_pop) preventing concurrent modification<\/li>\n\n\n\n<li>RBus handler in&nbsp;<code>servicecontrol_rbus_handler_apis.c<\/code>&nbsp;&#8211;&nbsp;<code>ServiceControl_SetStringHandler()<\/code>&nbsp;receives restart requests via RBus method call&nbsp;<code>Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.ServiceCtrl.ServiceRestartList<\/code>, validates service names, enqueues requests with&nbsp;<code>pthread_cond_signal()<\/code>&nbsp;to wake worker thread<\/li>\n\n\n\n<li><strong>Event Processing<\/strong>: Multiple event handling patterns implemented across utilities, each optimized for specific operational requirements including RBus event callbacks, inotify file system monitoring, and queue-based asynchronous processing.<\/li>\n\n\n\n<li><strong>RBus Event Callback Processing (EventSubscription)<\/strong>: Implemented in&nbsp;<code>event_subscriber.c<\/code>&nbsp;using&nbsp;<code>eventReceiveHandler()<\/code>&nbsp;callback function invoked asynchronously by RBus dispatcher thread when subscribed events arrive, extracts event data via&nbsp;<code>rbusObject_GetValue()<\/code>&nbsp;with NULL key to get root value, performs type-aware value extraction using&nbsp;<code>rbusValue_GetType()<\/code>&nbsp;to determine data type (RBUS_STRING, RBUS_BOOLEAN, RBUS_INT8\/16\/32, RBUS_UINT8\/16\/32, RBUS_DOUBLE, RBUS_BYTES), calls type-specific getter functions (<code>rbusValue_GetBoolean()<\/code>,&nbsp;<code>rbusValue_GetInt8()<\/code>,&nbsp;<code>rbusValue_ToString()<\/code>, etc.) to extract actual values, displays formatted event data to stdout for monitoring\/debugging, preserves user data across callback invocations via&nbsp;<code>subscription-&gt;userData<\/code>&nbsp;pointer, implements SIGINT handler&nbsp;<code>handle_sigint()<\/code>&nbsp;for graceful unsubscribe via&nbsp;<code>rbusEvent_Unsubscribe()<\/code>&nbsp;before exit<\/li>\n\n\n\n<li><strong>File System Event Monitoring (Notify_Lease)<\/strong>: Implemented in&nbsp;<code>Notify_Lease.c<\/code>&nbsp;using Linux inotify API with&nbsp;<code>MonitorDHCPLeaseFile()<\/code>&nbsp;thread function, initializes inotify instance via&nbsp;<code>inotify_init()<\/code>, registers file watch on&nbsp;<code>\/nvram\/dnsmasq.leases<\/code>&nbsp;using&nbsp;<code>inotify_add_watch()<\/code>&nbsp;with IN_MODIFY event mask, enters infinite blocking loop with&nbsp;<code>read(inotifyFd, buf, BUF_LEN)<\/code>&nbsp;waiting for file modification events, triggers lease synchronization script&nbsp;<code>\/etc\/utopia\/service.d\/service_lan\/dhcp_lease_sync.sh<\/code>&nbsp;via&nbsp;<code>v_secure_system()<\/code>&nbsp;on every file modification, handles missing file scenario with 5-second polling loop using&nbsp;<code>sleep(5)<\/code>&nbsp;and&nbsp;<code>access()<\/code>&nbsp;checking file existence before adding watch<\/li>\n\n\n\n<li><strong>Queue-Based Asynchronous Processing (ServiceCtrl)<\/strong>: Worker thread blocks on&nbsp;<code>pthread_cond_wait(&amp;svcCond, &amp;svcMutex)<\/code>&nbsp;waiting for queue wakeup signal, processes queue in while loop checking&nbsp;<code>queue_count(svc_queue)<\/code>, pops service name from queue with&nbsp;<code>queue_pop(svc_queue)<\/code>, executes restart operation, signals completion, returns to wait state when queue empty (<code>svc_queue_wakeup<\/code>&nbsp;flag set to false)<\/li>\n\n\n\n<li><strong>Error Handling Strategy<\/strong>: Comprehensive error detection and recovery mechanisms across all utilities ensuring robustness with defensive programming practices, explicit error code checking, resource cleanup, and telemetry integration for operational visibility.<\/li>\n\n\n\n<li><strong>Return Code Validation<\/strong>: Every system call and API function checked for error returns with explicit validation &#8211; PSM operations retry up to 3 times on NULL response in psmcli, curl operations check CURLE_OK status in FwDownloadChk, file operations check for NULL file pointer in parcon with error logging via&nbsp;<code>v_secure_system(\"echo Error: ... &gt;&gt; \/rdklogs\/logs\/Parcon.txt\")<\/code>, HAL API calls verify non-error status codes with fallback telemetry event publication on failure<\/li>\n\n\n\n<li><strong>Input Validation<\/strong>: Extensive parameter validation before processing &#8211; MAC address format validation in parcon, LED control parameter bounds checking in SetLED ensures color range 0-4 and state values 0-1 with non-negative interval, argc\/argv validation in all CLI utilities with usage message display on invalid argument count<\/li>\n\n\n\n<li><strong>Resource Cleanup<\/strong>: Guaranteed cleanup on error paths &#8211; file descriptor closure after operations, mutex unlock in ServiceCtrl error paths preventing deadlocks, RBus handle cleanup via&nbsp;<code>rbus_close()<\/code>&nbsp;on connection failures, memory free for dynamically allocated queue data preventing memory leaks, flock unlock via&nbsp;<code>flock(fileno(fp), LOCK_UN)<\/code>&nbsp;before file close in parcon<\/li>\n\n\n\n<li><strong>Telemetry Integration<\/strong>: Operational error reporting via T2 telemetry system &#8211; FwDownloadChk publishes&nbsp;<code>t2_event_d(\"XCONF_Dwld_Ignored_Not_EnoughMem\", 1)<\/code>&nbsp;when memory insufficient, FwBankInfo publishes&nbsp;<code>t2_event_d(\"SYS_ERROR_FW_ACTIVEBANK_FETCHFAILED\", 1)<\/code>&nbsp;on HAL failures, provides visibility into field operational issues for remote diagnostics and proactive issue detection<\/li>\n\n\n\n<li><strong>Logging &amp; Debugging<\/strong>: Multi-tier logging strategy with component-specific log files, structured log formatting, runtime debug control, and integration with RDK Logger framework when available for centralized log management.<\/li>\n\n\n\n<li><strong>Component-Specific Log Files<\/strong>: Dedicated log files under&nbsp;<code>\/rdklogs\/logs\/<\/code>&nbsp;&#8211; parcon writes to&nbsp;<code>\/rdklogs\/logs\/Parcon.txt<\/code>&nbsp;with&nbsp;<code>v_secure_system(\"echo message &gt;&gt; \/rdklogs\/logs\/Parcon.txt\")<\/code>&nbsp;pattern including entry\/exit timestamps via&nbsp;<code>date<\/code>&nbsp;command, FwDownloadChk uses custom&nbsp;<code>xconf_log_write()<\/code>&nbsp;function writing to&nbsp;<code>\/rdklogs\/logs\/xconf.txt.0<\/code>&nbsp;with timestamped INFO\/ERROR levels formatted as &#8220;YYYY-MM-DD HH:MM:SS [LEVEL] message&#8221; using&nbsp;<code>strftime()<\/code>&nbsp;and&nbsp;<code>localtime_r()<\/code>, FwBankInfo outputs to&nbsp;<code>\/rdklogs\/logs\/SelfHeal.txt.0<\/code><\/li>\n\n\n\n<li><strong>RDK Logger Integration (ServiceCtrl)<\/strong>: Uses RDK Logger framework when available &#8211;&nbsp;<code>ServiceControl_Log_Init()<\/code>&nbsp;initializes logger with debug configuration from&nbsp;<code>\/etc\/debug.ini<\/code>&nbsp;or override path, uses severity macros&nbsp;<code>SvcCtrlDebug()<\/code>,&nbsp;<code>SvcCtrlInfo()<\/code>,&nbsp;<code>SvcCtrlWarning()<\/code>,&nbsp;<code>SvcCtrlError()<\/code>&nbsp;for categorized logging with function name tracking via&nbsp;<code>__FUNCTION__<\/code>&nbsp;macro<\/li>\n\n\n\n<li><strong>Debug Control Mechanisms<\/strong>: Runtime debug level control in psmcli via&nbsp;<code>\/nvram\/psmcli_debug_level<\/code>&nbsp;file containing log level name (NONE, EMERG, ALERT, CRIT, ERROR, WARN, NOTICE, INFO, DEBUG, TRACE), parsed at startup via&nbsp;<code>psmcli_get_debug_level()<\/code>&nbsp;function, conditional compilation with&nbsp;<code>_DEBUG<\/code>&nbsp;preprocessor flag enabling additional verbose output, trace macros&nbsp;<code>CcspTraceDebug()<\/code>,&nbsp;<code>CcspTraceWarning()<\/code>&nbsp;for development builds<\/li>\n\n\n\n<li><strong>Console Output<\/strong>: Utilities output operational status to stdout\/stderr &#8211; EventSubscription displays received event data with type information and formatted values for real-time monitoring, psmcli outputs PSM operation results in human-readable format, error messages written to stderr with detailed context including component name and error codes<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"MiscellaneousBroadband:-KeyConfigurationFiles\">Key Configuration Files<\/h3>\n\n\n\n<p>The miscellaneous-broadband component relies on multiple configuration sources including PSM parameters, syscfg keys, and file-based configurations.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Configuration Source<\/strong><\/td><td><strong>Location\/Namespace<\/strong><\/td><td><strong>Purpose<\/strong><\/td><td><strong>Access Method<\/strong><\/td><\/tr><tr><td>PSM Parameters<\/td><td><code>dmsb.l2net.*<\/code><\/td><td>L2 network bridge configuration including bridge names, VLAN IDs, and member interfaces<\/td><td>PSM API via message bus<\/td><\/tr><tr><td>PSM Parameters<\/td><td><code>dmsb.MultiLAN.*<\/code><\/td><td>Multi-LAN configuration including MoCA isolation settings<\/td><td>PSM API via message bus<\/td><\/tr><tr><td>Syscfg<\/td><td><code>xconf_url<\/code>,&nbsp;<code>fw_to_upgrade<\/code><\/td><td>Firmware download URL construction for memory check validation<\/td><td>Syscfg API<\/td><\/tr><tr><td>Syscfg<\/td><td><code>FwDwld_AvlMem_RsrvThreshold<\/code><\/td><td>Reserved memory threshold in MB for firmware download operations<\/td><td>Syscfg API<\/td><\/tr><tr><td>Syscfg<\/td><td><code>FwDwld_ImageProcMemPercent<\/code><\/td><td>Additional memory overhead percentage for firmware image processing<\/td><td>Syscfg API<\/td><\/tr><tr><td>File<\/td><td><code>\/etc\/onewifi_enabled<\/code><\/td><td>OneWifi feature detection flag for bridge utility behavior<\/td><td>File existence check<\/td><\/tr><tr><td>File<\/td><td><code>\/sys\/module\/openvswitch<\/code><\/td><td>OpenVSwitch kernel module detection for bridge implementation selection<\/td><td>Directory existence check<\/td><\/tr><tr><td>File<\/td><td><code>\/etc\/WFO_enabled<\/code><\/td><td>WFO (WiFi Offload) feature detection flag<\/td><td>File existence check<\/td><\/tr><tr><td>File<\/td><td><code>\/var\/tmp\/brctl_interact_enable.txt<\/code><\/td><td>Bridge utility debug interaction enable flag<\/td><td>File existence check<\/td><\/tr><tr><td>File<\/td><td><code>\/rdklogs\/logs\/xconf.txt.0<\/code><\/td><td>XCONF firmware download check log output<\/td><td>Append-only log file<\/td><\/tr><tr><td>RBus Method<\/td><td><code>Device.X_RDK_WebConfig.FetchCachedBlob<\/code><\/td><td>WebConfig cached blob retrieval method for offline decode operations<\/td><td>RBus method invocation<\/td><\/tr><tr><td>Message Bus Config<\/td><td>CCSP_MSG_BUS_CFG<\/td><td>Message bus connection configuration for RBus initialization<\/td><td>File read during bus initi<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>CcspMisc is a collection of utility components and helper applications within the RDK-B middleware stack [&hellip;]<\/p>\n","protected":false},"author":659,"featured_media":0,"parent":9575,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-12867","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CcspMisc - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CcspMisc - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"CcspMisc is a collection of utility components and helper applications within the RDK-B middleware stack [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-06T06:13:33+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/\",\"name\":\"CcspMisc - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"datePublished\":\"2026-04-14T06:21:42+00:00\",\"dateModified\":\"2026-05-06T06:13:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"RDK Broadband\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Components\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"CcspMisc\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CcspMisc - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/","og_locale":"en_US","og_type":"article","og_title":"CcspMisc - RDK Documentation Portal | Documentation","og_description":"CcspMisc is a collection of utility components and helper applications within the RDK-B middleware stack [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2026-05-06T06:13:33+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/","name":"CcspMisc - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"datePublished":"2026-04-14T06:21:42+00:00","dateModified":"2026-05-06T06:13:33+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/ccspmisc\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"RDK Broadband","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/"},{"@type":"ListItem","position":4,"name":"Components","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/"},{"@type":"ListItem","position":5,"name":"CcspMisc"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/659"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=12867"}],"version-history":[{"count":4,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12867\/revisions"}],"predecessor-version":[{"id":12893,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12867\/revisions\/12893"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9575"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=12867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}