-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconstants.lisp
64 lines (53 loc) · 2.33 KB
/
constants.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
;;;; -*- Mode: Lisp -*-
;;;; $Id$
(in-package :snmp)
;; octets type is commonly used by many files, define it here.
(deftype octets () `(simple-array (unsigned-byte 8) (*)))
;; Adopted from Net-SNMP Project
(defconstant +max-snmp-packet-size+ 65507)
(defconstant +usm-auth-ku-len+ 32)
(defconstant +usm-priv-ku-len+ 32)
;; (defconstant +snmp-sec-model-any+ 0)
;; (defconstant +snmp-sec-model-snmpv1+ 1)
;; (defconstant +snmp-sec-model-snmpv2c+ 2)
(defconstant +snmp-sec-model-usm+ 3)
;; (defconstant +snmp-sec-level-noauth+ 1)
;; (defconstant +snmp-sec-level-authnopriv+ 2)
;; (defconstant +snmp-sec-level-authpriv+ 3)
;;; Following constants are come from SYSMAN/Lisp-SNMP project
(defconstant +error-status-no-error+ 0)
(defconstant +error-status-too-big+ 1)
(defconstant +error-status-no-such-name+ 2) ;for proxy compatibility
(defconstant +error-status-bad-value+ 3) ;for proxy compatibility
(defconstant +error-status-read-only+ 4) ;for proxy compatibility
(defconstant +error-status-generic-error+ 5)
(defconstant +error-status-no-access+ 6)
(defconstant +error-status-wrong-type+ 7)
(defconstant +error-status-wrong-length+ 8)
(defconstant +error-status-wrong-encoding+ 9)
(defconstant +error-status-wrong-value+ 10)
(defconstant +error-status-no-creation+ 11)
(defconstant +error-status-inconsistent-value+ 12)
(defconstant +error-status-resource-unavailable+ 13)
(defconstant +error-status-commit-failed+ 14)
(defconstant +error-status-undo-failed+ 15)
(defconstant +error-status-authorization-error+ 16)
(defconstant +error-status-not-writable+ 17)
(defconstant +error-status-inconsistent-name+ 18)
(defconstant +smi-no-such-object+ 0)
(defconstant +smi-no-such-instance+ 1)
(defconstant +smi-end-of-mibview+ 2)
(defvar *smi-map*
`((,+smi-no-such-object+ . :no-such-object) ; no value in a normal node
(,+smi-no-such-instance+ . :no-such-instance) ; no value in a table
(,+smi-end-of-mibview+ . :end-of-mibview))) ; end of mib view
;;; SNMP PDU Type
(defconstant +get-request-pdu+ 0)
(defconstant +get-next-request-pdu+ 1)
(defconstant +response-pdu+ 2)
(defconstant +set-request-pdu+ 3)
(defconstant +trap-pdu+ 4)
(defconstant +bulk-pdu+ 5)
(defconstant +inform-request-pdu+ 6)
(defconstant +snmpv2-trap-pdu+ 7)
(defconstant +report-pdu+ 8)