Incase anyone else runs into this issue this is what I did and how I got it to work without walking the whole tree.
lMessage.Text := 'Getting MAC Port List...';
baseoid := '1.3.6.1.2.1.17.4.3.1.2';
oid := baseoid;
walkmemo.Lines.Add('Port' + #9 + 'MAC');
repeat
snmpResult := SNMPGetNext(oid, snmpval, ipaddrval, s);
if (SNMPResult = True) then
begin
if Pos(BaseOID, OID) <> 1 then
break;
mactemp:=midstr(oid,length(baseoid)+2,length(oid)-(length(baseoid)+1));
List:=TStringList.Create;
List.Delimiter:='.';
List.DelimitedText:=mactemp;
for macindex:=0 to 5 do
begin
if macindex=0 then
begin
macaddress:= inttohex( strtoint(list[macindex]),2);
end
else
begin
macaddress:=macaddress +':'+ inttohex( strtoint(list[macindex]),2);
end;
end;
walkmemo.Lines.Add(s + #9 + macaddress);
application.processmessages;
end;
until not snmpresult;
lMessage.Text := 'Complete!';