… | |
… | |
13 | This module tries to speed up Net::SNMP response packet decoding. |
13 | This module tries to speed up Net::SNMP response packet decoding. |
14 | |
14 | |
15 | It does this by overriding a few selected internal method by (almost) |
15 | It does this by overriding a few selected internal method by (almost) |
16 | equivalent XS methods. |
16 | equivalent XS methods. |
17 | |
17 | |
18 | This currently reduces decode time by a factor of four for typical bulk |
18 | This currently reduces decode time by a factor of ten for typical bulk |
19 | responses. |
19 | responses. |
20 | |
20 | |
21 | There are currently the following limitations when using this module: |
21 | There are currently the following limitations when using this module: |
22 | |
22 | |
23 | =over 4 |
23 | =over 4 |
24 | |
24 | |
25 | =item leading dots are required for iods |
25 | =item overriding internal functions might cause the module to |
|
|
26 | malfunction with future versions of Net::SNMP |
26 | |
27 | |
27 | =item error handling is currently broken (but parse errors will be detected) |
28 | =item only leading dots for oids are supported |
28 | |
29 | |
29 | =item error messages will be simpler/different |
30 | =item error messages will be simpler/different |
30 | |
31 | |
31 | =item oid components are limited to unsigned 32 bit integers |
32 | =item oid components are limited to unsigned 32 bit integers |
32 | |
33 | |
33 | =item translation will be ignored (all values will be delivered "raw") |
34 | =item translation will be ignored (all values will be delivered "raw") |
34 | |
35 | |
35 | =item a 64 bit perl is required |
|
|
36 | |
|
|
37 | =item a moderately modern (>= C99) C compiler is required |
36 | =item a moderately modern (>= C99) C compiler is required |
38 | |
37 | |
39 | =item only tested with 5.10 |
38 | =item only tested with 5.10, no intentions to port to older perls |
|
|
39 | |
|
|
40 | =item duplicate OIDs are not supported |
|
|
41 | |
|
|
42 | =item REPORT PDUs are not supported |
40 | |
43 | |
41 | =back |
44 | =back |
42 | |
45 | |
43 | =cut |
46 | =cut |
44 | |
47 | |
… | |
… | |
55 | |
58 | |
56 | our $VERSION; |
59 | our $VERSION; |
57 | our $old_prepare; |
60 | our $old_prepare; |
58 | |
61 | |
59 | BEGIN { |
62 | BEGIN { |
60 | $VERSION = '0.01'; |
63 | $VERSION = '0.02'; |
61 | |
64 | |
62 | $old_prepare = \&Net::SNMP::MessageProcessing::prepare_data_elements; |
65 | $old_prepare = \&Net::SNMP::MessageProcessing::prepare_data_elements; |
63 | |
66 | |
64 | # this overrides many methods inside |
67 | # this overrides many methods inside |
65 | require XSLoader; |
68 | require XSLoader; |