/** * libbpf-specific errno codes * * Keep synchronized with `deps/libbpf/src/libbpf.h`. */ export declare enum LibbpfErrno { /** Something wrong in libelf */ LIBELF = 4000, /** BPF object format invalid */ FORMAT = 4001, /** Incorrect or no 'version' section */ KVERSION = 4002, /** Endian mismatch */ ENDIAN = 4003, /** Internal error in libbpf */ INTERNAL = 4004, /** Relocation failed */ RELOC = 4005, /** Load program failure for unknown reason */ LOAD = 4006, /** Kernel verifier blocks program loading */ VERIFY = 4007, /** Program too big */ PROG2BIG = 4008, /** Incorrect kernel version */ KVER = 4009, /** Kernel doesn't support this program type */ PROGTYPE = 4010, /** Wrong pid in netlink message */ WRNGPID = 4011, /** Invalid netlink sequence */ INVSEQ = 4012, /** netlink parsing error */ NLPARSE = 4013 } /** * mapping of libbpf-specific errno codes to messages * * Keep synchronized with `deps/libbpf/src/libbpf.h`. */ export declare const libbpfErrnoMessages: { [errno: number]: string; }; export declare class BPFError extends Error { operation: string; errno: number | LibbpfErrno; code?: string; count?: number; constructor(errno: number, operation: string, count?: number); static getCode(errno: number): string; } export declare function checkStatus(operation: string, status: number, count?: number): void;