add ifEntry MIB also

This commit is contained in:
Pim van Pelt
2025-06-09 17:51:06 +02:00
parent 396d2ace00
commit a51efbf471
2 changed files with 203 additions and 31 deletions

View File

@ -35,16 +35,11 @@ func main() {
client.Timeout = 1 * time.Minute
client.ReconnectInterval = 1 * time.Second
session, err := client.Session()
if err != nil {
log.Fatalf("Failed to create session: %v", err)
}
// Create the interface MIB
interfaceMIB := ifmib.NewInterfaceMIB(*ifIndexOffset)
// Register the interface MIB with the AgentX session
if err := interfaceMIB.RegisterWithSession(session); err != nil {
// Register the interface MIB with the AgentX client
if err := interfaceMIB.RegisterWithClient(client); err != nil {
log.Fatalf("Failed to register interface MIB: %v", err)
}