Closed simPod closed 2 years ago
Yeah, I remember thinking about that too when I was looking back through this. I agree, the constructor should probably just be string $startAt = '1.3.6.1.2.1'
. If you submit a PR with that I'd merge it. Not sure if any specs need to be changed. Otherwise I could probably take care of it over the weekend.
I have some changes ready here. Will try to somehow get it into reasonable PRs.
Closing this out. That oid is a default that the standard snmpwalk cli suggests when none is provided. Seems OK to keep that IMO. Someone using this should be aware to provide their own value. It's also documented here:
https://github.com/FreeDSx/SNMP/blob/master/docs/Client/SNMP-Walk.md#startat
I have gone exploring internals of this lib. I'd like to ask about this line
$this->startAt = $startAt ?? '1.3.6.1.2.1';
Shouldn't it rather throw exception when no startAt is provided? Or just type
string $startAt
? I don't get the reason for default '1.3.6.1.2.1'. Thanks!