BREAKING CHANGE(snmp): refactor: update SNMP type definitions and interface names for consistency

This commit is contained in:
2025-03-25 10:21:21 +00:00
parent 70c16fa0a6
commit ecfd171f97
9 changed files with 41 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
import type { SnmpConfig } from './types.js';
import type { ISnmpConfig } from './types.js';
import { SnmpEncoder } from './encoder.js';
/**
@@ -13,7 +13,7 @@ export class SnmpPacketParser {
* @param debug Whether to enable debug output
* @returns Parsed value or null if parsing failed
*/
public static parseSnmpResponse(buffer: Buffer, config: SnmpConfig, debug: boolean = false): any {
public static parseSnmpResponse(buffer: Buffer, config: ISnmpConfig, debug: boolean = false): any {
// Check if we have a response packet
if (buffer[0] !== 0x30) {
throw new Error('Invalid SNMP response format');