BREAKING CHANGE(snmp): refactor: update SNMP type definitions and interface names for consistency
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user