Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130362 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 725E61A00BC for ; Mon, 16 Mar 2026 05:03:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1773637443; bh=D3O74lNYPkTLiPC710WGJWoR9f5eclbwfdo8kG10XwE=; h=From:To:Date:Subject:From; b=W3cdeyEM9lsk7NZdeuSexfWGNQ0DosbMu/NOhLG9TGRkcEbYHkTHYAToNTbc4hUt7 WuJ3udjP06+9xg6JQRenCzB2P5ovXVfhJw2+YZU5JlmKBJrb3BwsQAML/UMShZSKGj sEM/7v7ZnuSxNjNfNY37XXJI8YLphcTKuESCI9RmmoHQdnDoQHCvudbTYbjXGgP48V yhjbpNG8iTVQOb3f5qhNqpdCqQmPAaSyvAtYHUtMcbewplsRtQ3UEjGhurpL45onch B/0m0Nr7UyZn0ETvpgzpta5YL/5WkdvsLthd/skBh+qip20owcKktRWWAzjAcZsOY5 pU/uOh1PzNd3Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0F7D418007E for ; Mon, 16 Mar 2026 05:04:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail.fluentit.au (mail.fluentit.au [103.249.239.231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 16 Mar 2026 05:04:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.fluentit.au (Postfix) with ESMTP id A0603CF7B2 for ; Mon, 16 Mar 2026 13:03:51 +0800 (AWST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fluentit.au; s=default; t=1773637431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=D3O74lNYPkTLiPC710WGJWoR9f5eclbwfdo8kG10XwE=; b=luMJkyzVtssrvtsrL1IBxOn7REY0jSePYRg/34ig7Xt0eKbofWu/TKslqQl9S16qhTQb2J u8nWtVuu/B2rB8ehkXq6T7rUrp/5TVC9a07P1BMz3AxSx8NgwuLRCV9dfbMwUAtnHO2l5Q tD6R2ZCDpd5S/lLhHif71jDq+Ps2LQc= To: internals@lists.php.net User-Agent: SOGoMail 5.12.1 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 16 Mar 2026 13:03:51 +0800 Subject: [PHP-DEV] [RFC] SNMP MIB reset function Message-ID: <5a2-69b78f00-11-50bc7700@253019388> X-Forward: 103.212.217.14 Content-Type: multipart/alternative; boundary="----=_=-_OpenGroupware_org_NGMime-1442-1773637431.526570-7------" From: swilton@fluentit.au (=?utf-8?q?swilton=40fluentit=2Eau?=) ------=_=-_OpenGroupware_org_NGMime-1442-1773637431.526570-7------ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Length: 1258 Hi All, =C2=A0 I would like to create an RFC proposal to add a new function snmp=5Fini= t=5Fmib() that will shut down and then re-initialise the MIB tree withi= n the lib-snmp library. =C2=A0This allows the PHP code to define the SN= MP environment variables, and then initialise the MIB tree without impo= rting any MIBs from the global config into the MIB tree. Another consideration is that the MIB tree persists across FPM requests= because the MIB tree is kept as a global structure within SNMP library= memory. =C2=A0This proposal would allow the MIB to be reset within a r= equest if needed. Something like this function is required if you want to run multiple SN= MP queries for different MIBs that define the same OIDs differently. =C2= =A0I have come across a few vendor MIB files where this happens, and th= e php snmp module cannot work without the ability to reset the MIB tree= , or without forking an external process for these specific MIBs. I believe that the process is to send a message to the list, and gauge = whether there is positive feedback before creating the RFC for voting. = =C2=A0Please let me know if I should create the RFC first? The PR is here: https://github.com/php/php-src/pull/21452/changes regards Steve ------=_=-_OpenGroupware_org_NGMime-1442-1773637431.526570-7------ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Length: 1400

Hi All,
 
I would like to create an RFC proposal to= add a new function snmp=5Finit=5Fmib() that will shut down and then re= -initialise the MIB tree within the lib-snmp library.  This allows= the PHP code to define the SNMP environment variables, and then initia= lise the MIB tree without importing any MIBs from the global config int= o the MIB tree.

Another consideration is that the MIB tree persis= ts across FPM requests because the MIB tree is kept as a global structu= re within SNMP library memory.  This proposal would allow the MIB = to be reset within a request if needed.

Something like this funct= ion is required if you want to run multiple SNMP queries for different = MIBs that define the same OIDs differently.  I have come across a = few vendor MIB files where this happens, and the php snmp module cannot= work without the ability to reset the MIB tree, or without forking an = external process for these specific MIBs.

I believe that the proc= ess is to send a message to the list, and gauge whether there is positi= ve feedback before creating the RFC for voting.  Please let me kno= w if I should create the RFC first?

The PR is here: https://github.com/php= /php-src/pull/21452/changes

regards

Steve

------=_=-_OpenGroupware_org_NGMime-1442-1773637431.526570-7--------