diff options
author | Sergey Poznyakoff <gray@nxc.no> | 2018-02-04 10:11:07 +0100 |
---|---|---|
committer | Sergey Poznyakoff <gray@nxc.no> | 2018-02-04 12:52:11 +0100 |
commit | 7651936f80b1bc6f5b01477ee9e648843097d7b8 (patch) | |
tree | ec6232e179767283c557b6c1babf23bcb1bb455a /src/Makefile.am | |
parent | 82822c0a336018e33658aebb166819c960e92140 (diff) | |
download | varnish-mib-7651936f80b1bc6f5b01477ee9e648843097d7b8.tar.gz varnish-mib-7651936f80b1bc6f5b01477ee9e648843097d7b8.tar.bz2 |
Rewrite hash table support.
* .gitignore: Update.
* Makefile.am (EXTRA_DIST): Add perl modules from lib/VarnishMib
* lib/VarnishMib/HashTable.pm: New file.
* lib/VarnishMib/MIBTable.pm: New file.
* src/Makefile.am (varnish_mib_la_SOURCES): Remove statdict.
(.mib2c.c): Set PERL5LIB
* src/betab.c (backend_dfn.vpt): Remove const qualifier.
(backend_register): Store in vpt cloned points.
(backend_clear): Destroy points in vpt.
* src/statdict.c: Remove.
* src/varnish_mib.mib2c: Use VarnishMib::MIBTable.
Set mib2c variable $varnish_hash_table to an instance of VarnishMib::MIBTable.
Use it to generate lookup table code section.
(varnish_var_lookup, varnish_get_oid)
(dict_clear, dict_install, dict_load): New functions.
(handle_$i): Use direct addressing to obtain a vpt.
Fix handling of ASN_TIMETICKS.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 3ef9fa5..55cdb85 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -6,62 +6,63 @@ | |||
6 | # the Free Software Foundation; either version 3, or (at your option) | 6 | # the Free Software Foundation; either version 3, or (at your option) |
7 | # any later version. | 7 | # any later version. |
8 | # | 8 | # |
9 | # varnish-mib is distributed in the hope that it will be useful, | 9 | # varnish-mib is distributed in the hope that it will be useful, |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | # GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | # | 13 | # |
14 | # You should have received a copy of the GNU General Public License | 14 | # You should have received a copy of the GNU General Public License |
15 | # along with varnish-mib. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with varnish-mib. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | dlmoddir=@DLMODDIR@ | 17 | dlmoddir=@DLMODDIR@ |
18 | dlmod_LTLIBRARIES = varnish-mib.la | 18 | dlmod_LTLIBRARIES = varnish-mib.la |
19 | 19 | ||
20 | varnish_mib_la_SOURCES = \ | 20 | varnish_mib_la_SOURCES = \ |
21 | auth.c\ | 21 | auth.c\ |
22 | ban.c\ | 22 | ban.c\ |
23 | backend.h\ | 23 | backend.h\ |
24 | belex.l\ | 24 | belex.l\ |
25 | betab.c\ | 25 | betab.c\ |
26 | modconf.h\ | 26 | modconf.h\ |
27 | modconf.c\ | 27 | modconf.c\ |
28 | sha256.c\ | 28 | sha256.c\ |
29 | sha256.h\ | 29 | sha256.h\ |
30 | statdict.c\ | ||
31 | varnish_mib.c\ | 30 | varnish_mib.c\ |
32 | varnish_mib.h\ | 31 | varnish_mib.h\ |
33 | vcli.c\ | 32 | vcli.c\ |
34 | vclient.h | 33 | vclient.h |
35 | 34 | ||
36 | BUILT_SOURCES = \ | 35 | BUILT_SOURCES = \ |
37 | varnish_mib.c\ | 36 | varnish_mib.c\ |
38 | varnish_mib.h | 37 | varnish_mib.h |
39 | 38 | ||
40 | varnish_mib.c varnish_mib.h: varnish_mib.mib2c VARNISH-MIB.txt | 39 | varnish_mib.c varnish_mib.h: varnish_mib.mib2c VARNISH-MIB.txt |
41 | 40 | ||
42 | .mib2c.c: | 41 | .mib2c.c: |
43 | MIBDIRS=${top_srcdir}/src:${NET_SNMP_MIBDIRS} MIBS="VARNISH-MIB:${NET_SNMP_MIBS}" \ | 42 | MIBDIRS=${top_srcdir}/src:${NET_SNMP_MIBDIRS}\ |
43 | MIBS="VARNISH-MIB:${NET_SNMP_MIBS}" \ | ||
44 | PERL5LIB=${top_srcdir}/lib \ | ||
44 | mib2c -c $< -f $@ varnish | 45 | mib2c -c $< -f $@ varnish |
45 | 46 | ||
46 | #NET_SNMP_INCLUDES = `$(NET_SNMP_CONFIG) --cflags` | 47 | #NET_SNMP_INCLUDES = `$(NET_SNMP_CONFIG) --cflags` |
47 | #NET_SNMP_INCLUDES = | 48 | #NET_SNMP_INCLUDES = |
48 | NET_SNMP_LIBS = `$(NET_SNMP_CONFIG) --libs` | 49 | NET_SNMP_LIBS = `$(NET_SNMP_CONFIG) --libs` |
49 | NET_SNMP_EXLIBS = `$(NET_SNMP_CONFIG) --external-libs` | 50 | NET_SNMP_EXLIBS = `$(NET_SNMP_CONFIG) --external-libs` |
50 | NET_SNMP_MIBDIRS = `net-snmp-config --mibdirs` | 51 | NET_SNMP_MIBDIRS = `net-snmp-config --mibdirs` |
51 | NET_SNMP_MIBS = `net-snmp-config --default-mibs` | 52 | NET_SNMP_MIBS = `net-snmp-config --default-mibs` |
52 | 53 | ||
53 | AM_LDFLAGS = \ | 54 | AM_LDFLAGS = \ |
54 | -module \ | 55 | -module \ |
55 | -export-dynamic\ | 56 | -export-dynamic\ |
56 | -avoid-version \ | 57 | -avoid-version \ |
57 | -rpath '$(dlmoddir)'\ | 58 | -rpath '$(dlmoddir)'\ |
58 | ${VARNISHAPI_LIBS}\ | 59 | ${VARNISHAPI_LIBS}\ |
59 | $(NET_SNMP_LIBS)\ | 60 | $(NET_SNMP_LIBS)\ |
60 | $(NET_SNMP_EXLIBS) | 61 | $(NET_SNMP_EXLIBS) |
61 | 62 | ||
62 | AM_CPPFLAGS=-I. ${VARNISHAPI_CFLAGS} | 63 | AM_CPPFLAGS=-I. ${VARNISHAPI_CFLAGS} |
63 | 64 | ||
64 | mibdir=@MIBDIR@ | 65 | mibdir=@MIBDIR@ |
65 | mib_DATA = VARNISH-MIB.txt | 66 | mib_DATA = VARNISH-MIB.txt |
66 | 67 | ||
67 | dist_man_MANS = varnish-mib.8 | 68 | dist_man_MANS = varnish-mib.8 |