{"id":121,"date":"2015-01-14T09:40:27","date_gmt":"2015-01-14T09:40:27","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=121"},"modified":"2017-12-08T10:49:54","modified_gmt":"2017-12-08T10:49:54","slug":"the-bintotext-module","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=121","title":{"rendered":"The bintotext module"},"content":{"rendered":"<p>The <code>bintotext<\/code> module serves to convert binary data containing text to a list of lines.\u00a0 This is typically used to obtain text lines from a socket through the <a title=\"The udp module\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=171\"><code>udp<\/code><\/a> module.\u00a0 The latter returns raw packets of binary data.<\/p>\n<p>The <code>bintotext<\/code> module is similar to the <a title=\"The textfile module\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=87\"><code>textfile<\/code><\/a> module in that it returns text lines. While <a title=\"The textfile module\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=87\"><code>textfile<\/code><\/a> is an input module that reads from files, named pipes and Unix sockets, <code>bintotext<\/code> takes input already obtained by another module (such as <a title=\"The udp module\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=171\"><code>udp<\/code><\/a>).<\/p>\n<h3>Configuration options<\/h3>\n<p>None.<\/p>\n<h3>Fields<\/h3>\n<p>The last field is <code>.bintotext.line<\/code>, available for further dissection; the dissection tag is <code>.bintotext.tag<\/code>.\u00a0 There is, in fact, no other field.<\/p>\n<p>The <code>.bintotext.tag<\/code> field has a special status.\u00a0 If you decide to use <code>bintotext<\/code> by invoking the <code>DISSECT<\/code> directive in the configuration file <a title=\"orchids-inputs.conf\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=145\"><code>orchids-inputs.conf<\/code><\/a>, you will also give it a tag (a string rendition of the destination port number, if you dissect a <a title=\"The udp module\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=171\"><code>udp<\/code><\/a> source). This tag is replicated here as <code>.bintotext.tag<\/code>, so as to allow the output of <code>bintotext<\/code> to itself be dissected by further modules (such as <a title=\"The syslog module\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=157\"><code>syslog<\/code><\/a>, for example).<\/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>.bintotext.tag<\/code><\/td>\n<td><code>str<\/code><\/td>\n<td><\/td>\n<td>tag for further subdissection<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.bintotext.line<\/code><\/td>\n<td><code>str<\/code><\/td>\n<td><\/td>\n<td>current line<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>The bintotext module serves to convert binary data containing text to a list of lines.\u00a0 This is typically used to obtain text lines from a socket through the udp module.\u00a0 The latter returns raw packets of binary data. The bintotext module is similar to the textfile module in that it returns text lines. While textfile &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=121\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The bintotext 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":"open","template":"","meta":{"footnotes":""},"class_list":["post-121","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/121","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=121"}],"version-history":[{"count":8,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/121\/revisions"}],"predecessor-version":[{"id":726,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/121\/revisions\/726"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}