{"id":707,"date":"2017-12-03T21:33:22","date_gmt":"2017-12-03T21:33:22","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=707"},"modified":"2017-12-08T10:54:51","modified_gmt":"2017-12-08T10:54:51","slug":"the-snmptrap-module","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=707","title":{"rendered":"The snmptrap module"},"content":{"rendered":"<p>The <code>snmptrap<\/code> module is a <a title=\"Dissection modules\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=131\">dissection module<\/a>: its purpose is to take an Orchids event, parse one of its binary fields and return a refined Orchids events, with additional fields. Typically, the <code>snmptrap<\/code> module is meant to dissect binary data coming from the\u00a0<a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=171\"><code><span style=\"color: #ca3c08;\">udp<\/span><\/code><\/a>\u00a0module. \u00a0That data should be text in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Abstract_Syntax_Notation_One\">ASN.1<\/a> format, as reported by so-called MIBs, following the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Simple_Network_Management_Protocol\">SNMP<\/a> protocol.<\/p>\n<h3>Configuration options<\/h3>\n<p><code>&lt;module snmptrap&gt;<\/code><\/p>\n<ul>\n<li><code> AddMibDir<\/code>\u00a0<em>string<\/em>: set the MIB directory where Orchids will find MIB modules.<br \/>\nDefault is\u00a0<code>\"\/usr\/share\/snmp\/mibs\"<\/code>.<\/li>\n<li><code>AddMib<\/code>\u00a0<i>string<\/i>: add a MIB module.<\/li>\n<li><code>AddMibFile<\/code> <em>string<\/em>: add a MIB file.<\/li>\n<\/ul>\n<p><code>&lt;\/module&gt;<\/code><\/p>\n<h3>Fields<\/h3>\n<p>The <code>snmptrap<\/code> module is not dissectable: plugging a <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=131\">dissection module<\/a> onto <code>snmptrap<\/code> makes no sense.<\/p>\n<table style=\"border: solid 1px black;\">\n<tbody>\n<tr style=\"background-color: lightsteelblue;\">\n<th>Field<\/th>\n<th><a title=\"Types\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=98\">Type<\/a><\/th>\n<th><a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=719\">Mono<\/a>?<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.seq<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td>\u00a0\u2713<\/td>\n<td>sequence number<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td>\u00a0<code>.snmptrap.bind<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>\u00a0binding index (unused)<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.version<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>SNMP version<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.snmptrap.community<\/code><\/td>\n<td><code>str<\/code><\/td>\n<td><\/td>\n<td>community name<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.pdu_type<\/code><\/td>\n<td><code>str<\/code><\/td>\n<td><\/td>\n<td>Protocol Data Unit type (unused)<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.snmptrap.object_id<\/code><\/td>\n<td>\u00a0<code>snmpoid<\/code><\/td>\n<td><\/td>\n<td>\u00a0object identifier (unused)<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.value<\/code><\/td>\n<td><code>bstr<\/code><\/td>\n<td><\/td>\n<td>object value (unused)<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.snmptrap.enterprise<\/code><\/td>\n<td><code>snmpoid<\/code><\/td>\n<td><\/td>\n<td>source of the SNMP trap<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.agent_addr<\/code><\/td>\n<td><code>ipv4<\/code><\/td>\n<td><\/td>\n<td>source address<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.snmptrap.trap_type<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>trap type<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.specific_trap_type<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>specific trap type<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.snmptrap.timestamp<\/code><\/td>\n<td><code>int<\/code><\/td>\n<td><\/td>\n<td>timestamp<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.request_id<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>request ID (v2 specific, unused)<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.snmptrap.error_status<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>error status (v2 specific, unused)<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.snmptrap.error_index<\/code><\/td>\n<td><code>uint<\/code><\/td>\n<td><\/td>\n<td>error index (v2 specific, unused)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The snmptrap module is a dissection module: its purpose is to take an Orchids event, parse one of its binary fields and return a refined Orchids events, with additional fields. Typically, the snmptrap module is meant to dissect binary data coming from the\u00a0udp\u00a0module. \u00a0That data should be text in ASN.1 format, as reported by so-called &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=707\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The snmptrap module<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-707","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=707"}],"version-history":[{"count":5,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/707\/revisions"}],"predecessor-version":[{"id":731,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/707\/revisions\/731"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}