# New plugin usage: Error: " value used but not set"

**URL:** <https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478>\
**Category:** Zeek\
**Created:** [February 6, 2015, 1:09pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478 "2015-02-06T13:09:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 1:09pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/1 "2015-02-06T13:09:36Z")

</div>

Hi

I have a SW module that worked using the older plugin module from 2.2.135 Bro and I recently merged it to Bro 2.3.397 and when I run my Bro script that uses it I get:

/usr/local/bro/share/bro/base/protocols/dns/telemetry\_speed.bro, line 454: value used but not set (dns\_telemetry\_set\_options)

dns\_telemetry\_set\_options is a function contained in my module in a events.bif file. The file is compiled.

Any help in diagnosing this err would be appreciated .

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 1:19pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/2 "2015-02-06T13:19:31Z")

</div>

I see the library plugin being created :

make[3]: Entering directory `/work/jpd/dyn/src/bro-fork2/bro/build’  
[27%] Building CXX object src/analyzer/protocol/dns\_telemetry/CMakeFiles/plugin-Bro-DNS\_TELEMETRY.dir/DNS.cc.o  
[27%] Building CXX object src/analyzer/protocol/dns\_telemetry/CMakeFiles/plugin-Bro-DNS\_TELEMETRY.dir/events.bif.cc.o  
[27%] Building CXX object src/analyzer/protocol/dns\_telemetry/CMakeFiles/plugin-Bro-DNS\_TELEMETRY.dir/events.bif.init.cc.o  
Linking CXX static library libplugin-Bro-DNS\_TELEMETRY.a

---

<div class="post-metadata">

**Author:** ![Seth\_Hall3](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Seth\_Hall3](https://community.zeek.org/u/Seth_Hall3)\
**Post date:** [February 6, 2015, 1:29pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/3 "2015-02-06T13:29:14Z")

</div>

If your plugin in the BRO\_PLUGIN\_PATH?

Also, if your Bro script is something that you would always want to load with your module, you can include it with the module and make it automatically load when Bro starts up. This lets you completely keep any evidence of your plugin out of Bro’s normal installation (I see you added your script to the base/ directory which you probably don’t want to do).

&nbsp;&nbsp;.Seth

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 1:41pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/4 "2015-02-06T13:41:07Z")

</div>

That directory is empty:

bro -h :

$BRO\_PLUGIN\_PATH | plugin search path (/usr/local/bro/lib/bro/plugins)

ls /usr/local/bro/lib/bro/plugins  
ls: cannot access /usr/local/bro/lib/bro/plugins: No such file or directory

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 1:48pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/5 "2015-02-06T13:48:29Z")

</div>

bro -N | grep DNS  
opened ‘debug.log’ debugging output  
Bro::DNS - DNS analyzer (built-in)  
Bro::DNS\_Telemetry - DNS analyzer Telemetry (built-in)

---

<div class="post-metadata">

**Author:** ![Seth\_Hall3](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@Seth\_Hall3](https://community.zeek.org/u/Seth_Hall3)\
**Post date:** [February 6, 2015, 2:18pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/6 "2015-02-06T14:18:12Z")

</div>

Oh, I’m sorry. I thought you were writing this as an external/dynamic plugin.

Have you tried looking at the output if you load the misc/loaded-scripts script? That should show a file named something like this getting loaded…

scripts/base/bif/plugins/Bro\_DNS\_TELEMETRY.events.bif.bro

&nbsp;&nbsp;.Seth

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 2:30pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/7 "2015-02-06T14:30:44Z")

</div>

No indication it gets loaded:

find /usr/local/bro | grep TELE  
/usr/local/bro/share/bro/base/bif/plugins/Bro\_DNS\_TELEMETRY.events.bif.bro  
root@dyn-x64-01:/work/jpd/dyn/src/bro-fork2/bro# export BRO\_PLUGIN\_PATH=/usr/local/bro/share/bro/base/bif/plugins

/usr/local/bro/bin/bro -i lo -i eth0 -i eth1 -b -C /usr/local/bro/share/bro/base/protocols/dns/telemetry\_speed.bro

listening on lo, capture length 8192 bytes

listening on eth0, capture length 8192 bytes

listening on eth1, capture length 8192 bytes

1423232941.050872 error in /usr/local/bro/share/bro/base/protocols/dns/telemetry\_speed.bro, line 454: value used but not set (dns\_telemetry\_set\_options)  
1423232941.050872 error in /usr/local/bro/share/bro/base/protocols/dns/telemetry\_speed.bro, line 508: value used but not set (dns\_telemetry\_load\_anchor\_map)  
1423232941.050872 error in /usr/local/bro/share/bro/base/protocols/dns/telemetry\_speed.bro, line 524: value used but not set (dns\_telemetry\_get\_metrics)

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 3:36pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/8 "2015-02-06T15:36:16Z")

</div>

using -B plugins I see:

Registering component DNS\_TELEMETRY (tag 13/0)

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [February 6, 2015, 3:49pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/9 "2015-02-06T15:49:30Z")

</div>

Does -NN show your function?

Robin

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 4:00pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/10 "2015-02-06T16:00:14Z")

</div>

No . -NN only shows the Plugin Name:

Bro::DNS\_Telemetry - DNS analyzer Telemetry (built-in)  
[Analyzer] Contents\_DNS\_Telemetry (enabled)  
[Analyzer] DNS\_TELEMETRY (ANALYZER\_DNS\_TELEMETRY, enabled)

I turned on all -B options and gathered this from debug.log and what -NN shows

Made IdentifierInfo dns\_telemetry\_set\_options, in script base/bif/plugins/Bro\_DNS\_TELEMETRY.events.bif.bro

Filter id ‘dns\_telemetry\_set\_options’ in ‘base/bif/plugins/Bro\_DNS\_TELEMETRY.events.bif.bro’ as a function

[deb.txt](https://community.zeek.org/uploads/short-url/961Xeo7CDLbWxfMZrED4qAsTRcN.txt) (11.6 KB)

---

<div class="post-metadata">

**Author:** ![John\_Donnelly](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@John\_Donnelly](https://community.zeek.org/u/John_Donnelly)\
**Post date:** [February 6, 2015, 4:17pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/11 "2015-02-06T16:17:33Z")

</div>

My Pluggin - I am using the same InstantiateAnalyzer method as I did in 2.2.135:

class Plugin : public plugin::Plugin {  
public:  
plugin::Configuration Configure()  
{  
AddComponent(new ::analyzer::Component(“DNS\_TELEMETRY”, ::analyzer::dns\_telemetry::DNS\_Telemetry\_Analyzer::InstantiateAnalyzer));  
AddComponent(new ::analyzer::Component(“Contents\_DNS\_Telemetry”, 0));

plugin::Configuration config;  
[config.name](http://config.name) = “Bro::DNS\_Telemetry”;  
config.description = “DNS analyzer Telemetry”;  
return config;  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:42pm UTC](https://community.zeek.org/t/new-plugin-usage-error-value-used-but-not-set/3478/12 "2022-05-06T15:42:27Z")

</div>


