@php
// src = 'code' → matches a value stored in OltInfoController::store()
// src = 'ref' → general SNMP standard or vendor MIB lookup, NOT in your code
$oidGroups = [
'generic' => [
'title' => 'Standard SNMP (any device)',
'badge' => 'Generic',
'badgeClass' => 'badge-secondary',
'items' => [
['oid' => '1.3.6.1.2.1.1.1.0', 'label' => 'System Description (sysDescr)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.1.3.0', 'label' => 'System Uptime (sysUpTime)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.1.4.0', 'label' => 'System Contact (sysContact)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.1.5.0', 'label' => 'System Name (sysName) — used as olt_name for every brand', 'src' => 'code'],
['oid' => '1.3.6.1.2.1.1.6.0', 'label' => 'System Location (sysLocation)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.1.0', 'label' => 'Number of Interfaces (ifNumber)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.2.1.2', 'label' => 'Interface Description (ifDescr) — used as onu_interface_name', 'src' => 'code'],
['oid' => '1.3.6.1.2.1.2.2.1.5', 'label' => 'Interface Speed (ifSpeed)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.2.1.7', 'label' => 'Interface Admin Status (ifAdminStatus)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.2.1.8', 'label' => 'Interface Operational Status (ifOperStatus)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.2.1.10', 'label' => 'Interface In Octets (ifInOctets)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.2.1.16', 'label' => 'Interface Out Octets (ifOutOctets)', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.31.1.1.1.18', 'label' => 'Interface Alias (ifAlias)', 'src' => 'ref'],
],
],
'fdb' => [
'title' => 'Dynamic MAC Address Table (Bridge MIB)',
'badge' => 'Vendor-agnostic',
'badgeClass' => 'badge-success',
'items' => [
// RFC 1493 / RFC 4188 — Bridge MIB (non-VLAN dynamic FDB)
['oid' => '1.3.6.1.2.1.17.4.3.1.1', 'label' => 'dot1dTpFdbAddress — dynamic MAC list (non-VLAN aware FDB).', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.17.4.3.1.2', 'label' => 'dot1dTpFdbPort — bridge port where each MAC was learned.', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.17.4.3.1.3', 'label' => 'dot1dTpFdbStatus — entry status (3 = learned, 4 = self, 5 = mgmt).', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.17.1.4.1.2', 'label' => 'dot1dBasePortIfIndex — maps bridge port → ifIndex (cross-reference with ifDescr).', 'src' => 'ref'],
// RFC 2674 — Q-BRIDGE MIB (VLAN-aware FDB) — same OIDs BDCom uses
['oid' => '1.3.6.1.2.1.17.7.1.2.2.1.1', 'label' => 'dot1qTpFdbAddress — VLAN-aware MAC list. (Same as BDCom vlan_mac.)', 'src' => 'code'],
['oid' => '1.3.6.1.2.1.17.7.1.2.2.1.2', 'label' => 'dot1qTpFdbPort — bridge port for each (VLAN, MAC). (Same as BDCom onu_id.)', 'src' => 'code'],
['oid' => '1.3.6.1.2.1.17.7.1.2.2.1.3', 'label' => 'dot1qTpFdbStatus — VLAN-aware entry status.', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.17.7.1.4.2.1.5', 'label' => 'dot1qVlanCurrentEgressPorts — current egress port set per VLAN.', 'src' => 'ref'],
],
],
'bdcom' => [
'title' => 'BDCom',
'badge' => 'EPON / GPON',
'badgeClass' => 'badge-info',
'items' => [
['oid' => '1.3.6.1.2.1.17.7.1.2.2.1.1', 'label' => 'VLAN-MAC mapping (vlan_mac)', 'src' => 'code'],
['oid' => '1.3.6.1.2.1.17.7.1.2.2.1.2', 'label' => 'ONU ID by VLAN (onu_id)', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.3320.101.10.5.1.5', 'label' => 'ONU Laser RX — EPON', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.3320.10.3.4.1.2', 'label' => 'ONU Laser RX — GPON', 'src' => 'code'],
],
],
'vsol' => [
'title' => 'Vsol',
'badge' => 'EPON / GPON',
'badgeClass' => 'badge-info',
'items' => [
['oid' => '1.3.6.1.4.1.37950.1.1.5.10.3.2.1.3', 'label' => 'VLAN-MAC mapping (vlan_mac)', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.37950.1.1.5.10.3.2.1.5', 'label' => 'ONU ID / Interface', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.37950.1.1.5.12.2.1.8.1.7', 'label' => 'ONU Laser — EPON', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.37950.1.1.6.1.1.3.1.7', 'label' => 'ONU Laser — GPON', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.37950.1.1.5.10.3.5.1.3', 'label' => 'VLAN-MAC mapping (GPON variant, older revision)', 'src' => 'ref'],
['oid' => '1.3.6.1.4.1.37950.1.1.5.10.3.5.1.5', 'label' => 'ONU ID / Interface (GPON variant, older revision)', 'src' => 'ref'],
],
],
'cdata' => [
'title' => 'C-Data',
'badge' => 'EPON / GPON',
'badgeClass' => 'badge-info',
'items' => [
['oid' => '1.3.6.1.4.1.17409.2.3.2.4.2.1.1', 'label' => 'VLAN-MAC mapping (vlan_mac)', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.34592.1.3.100.12.2.1.1.3', 'label' => 'ONU ID', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.17409.2.3.4.2.1.4', 'label' => 'ONU Laser RX', 'src' => 'code'],
],
],
'ecom' => [
'title' => 'Ecom',
'badge' => 'GPON',
'badgeClass' => 'badge-info',
'items' => [
['oid' => '1.3.6.1.4.1.34592.1.3.100.12.2.1.1.3', 'label' => 'VLAN-MAC mapping (vlan_mac)', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.17409.2.3.4.1.1.2', 'label' => 'ONU ID', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.17409.2.3.4.2.1.4', 'label' => 'ONU Laser RX', 'src' => 'code'],
],
],
'tbs' => [
'title' => 'TBS (enterprise 12170)',
'badge' => 'EPON / GPON',
'badgeClass' => 'badge-info',
'items' => [
['oid' => '1.3.6.1.4.1.12170.2.3.5.2.2.1.1', 'label' => 'Learned client MAC (vlan_mac). Row index is the MAC bytes + VLAN — walk with -Ox or a third of the MACs print as plain strings.', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.12170.2.3.5.2.2.1.4', 'label' => 'PON port for each learned MAC (onu_interface_name).', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.12170.2.3.5.2.2.1.5', 'label' => 'ONU index for each learned MAC (onu_id).', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.12170.2.3.5.2.2.1.2', 'label' => 'VLAN column — same value as the last segment of the row index (0 = untagged).', 'src' => 'ref'],
['oid' => '1.3.6.1.4.1.12170.2.3.4.2.1.4', 'label' => 'ONU Laser RX (onu_laser), indexed {frame}.{port}.{onu} in hundredths of a dBm.', 'src' => 'code'],
['oid' => '1.3.6.1.4.1.12170.2.3.4.1.1.2', 'label' => 'Legacy ONU table — the ONU\'s own MAC, used by TBS before the vlan-mac rewrite.', 'src' => 'ref'],
],
],
// 'huawei' => [
// 'title' => 'Huawei (MA56xx / MA58xx)',
// 'badge' => 'GPON',
// 'badgeClass' => 'badge-warning',
// 'items' => [
// ['oid' => '1.3.6.1.4.1.2011.6.128.1.1.2.43.1.3', 'label' => 'ONU Serial Number', 'src' => 'ref'],
// ['oid' => '1.3.6.1.4.1.2011.6.128.1.1.2.43.1.9', 'label' => 'ONU Description / Name', 'src' => 'ref'],
// ['oid' => '1.3.6.1.4.1.2011.6.128.1.1.2.46.1.15', 'label' => 'ONU Run State', 'src' => 'ref'],
// ['oid' => '1.3.6.1.4.1.2011.6.128.1.1.2.51.1.4', 'label' => 'ONU TX Optical Power', 'src' => 'ref'],
// ['oid' => '1.3.6.1.4.1.2011.6.128.1.1.2.51.1.6', 'label' => 'ONU RX Optical Power', 'src' => 'ref'],
// ],
// ],
// 'zte' => [
// 'title' => 'ZTE (C300 / C320 / C600)',
// 'badge' => 'EPON / GPON',
// 'badgeClass' => 'badge-warning',
// 'items' => [
// ['oid' => '1.3.6.1.4.1.3902.1012.3.28.1.1.5', 'label' => 'ONU Serial Number', 'src' => 'ref'],
// ['oid' => '1.3.6.1.4.1.3902.1012.3.50.12.1.1.4', 'label' => 'ONU TX Optical Power', 'src' => 'ref'],
// ['oid' => '1.3.6.1.4.1.3902.1012.3.50.12.1.1.10', 'label' => 'ONU RX Optical Power', 'src' => 'ref'],
// ],
// ],
'corelink' => [
'title' => 'Corelink (enterprise 25355)',
'badge' => 'Walk to identify',
'badgeClass' => 'badge-dark',
'items' => [
['oid' => '1.3.6.1.2.1.1.2.0', 'label' => 'sysObjectID — confirmed: iso.3.6.1.4.1.25355.4.1 (Corelink product family).', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.1.1.0', 'label' => 'sysDescr — model + firmware string.', 'src' => 'ref'],
['oid' => '1.3.6.1.4.1.25355', 'label' => 'Full Corelink enterprise subtree. Run this to enumerate every Corelink-specific OID, then scan for MAC / ONU ID / RX power patterns.', 'src' => 'ref'],
['oid' => '1.3.6.1.4.1.25355.4.1', 'label' => 'Corelink product subtree (one level under sysObjectID). Usually narrower than the full enterprise walk.', 'src' => 'ref'],
['oid' => '1.3.6.1.4.1.25355.4.1.1', 'label' => 'Likely PON / ONU table root — walk to look for ONU ID + MAC + RX power columns.', 'src' => 'ref'],
['oid' => '1.3.6.1.4.1.25355.4.1.2', 'label' => 'Alternate ONU table root — walk if .1.1 is empty.', 'src' => 'ref'],
['oid' => '1.3.6.1.2.1.2.2.1.2', 'label' => 'ifDescr — usable as onu_interface_name once Corelink is wired into OltInfoController.', 'src' => 'ref'],
],
],
];
@endphp
@foreach ($oidGroups as $key => $group)
@php
$codeCount = collect($group['items'])->where('src', 'code')->count();
$refCount = collect($group['items'])->where('src', 'ref')->count();
@endphp
@endforeach