{"id":210,"date":"2015-01-27T11:02:04","date_gmt":"2015-01-27T11:02:04","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=210"},"modified":"2017-12-08T10:55:08","modified_gmt":"2017-12-08T10:55:08","slug":"the-sockunix-module","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=210","title":{"rendered":"The sockunix module"},"content":{"rendered":"<p>The <code>sockunix<\/code> module reads raw packets from a Unix UDP socket (<code>AF_UNIX<\/code>, <code>SOCK_DGRAM<\/code>).<\/p>\n<p>The <code>sockunix<\/code> module is\u00a0 an <a title=\"Input modules\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=126\">input module<\/a>, meaning that its purpose is to read data from some sources, and convert it to Orchids events.\u00a0 The sources\u00a0 should be declared in the <a title=\"orchids-inputs.conf\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=145\"><code>orchids-inputs.conf<\/code><\/a> file.\u00a0 Admissible sources are UDP\u00a0(<code>SOCK_DGRAM<\/code>) local connections (<code>AF_UNIX<\/code>).<\/p>\n<p>The <code>sockunix<\/code> module reads from these sources and produces Orchids events, one per UDP packet.\u00a0 The contents of each packet will then be found in the <code>.sockunix.msg<\/code> field of the event.<\/p>\n<h3>Configuration options<\/h3>\n<p>None.<\/p>\n<p>(The <code>sockunix<\/code> module in fact understands the special <code>INPUT<\/code> directive.\u00a0 It takes a socket name as argument, and connects to that socket.\u00a0 This should <em>not<\/em> be used inside the <code>sockunix<\/code> module configuration file.\u00a0 Instead, input should be specified in the <a title=\"orchids-inputs.conf\" href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=145\"><code>orchids-inputs.conf<\/code><\/a> file.)<\/p>\n<h3>Fields<\/h3>\n<p>The last field is <code>.sockunix.msg<\/code>, available for further dissection; the dissection key is <code>.sockunix.socket<\/code>, which is the name of the local Unix socket.<\/p>\n<p>&nbsp;<\/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>.sockunix.event<\/code><\/td>\n<td>int<\/td>\n<td>\u2713<\/td>\n<td>event number<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.sockunix.time<\/code><\/td>\n<td>timeval<\/td>\n<td>\u2713<\/td>\n<td>reception time<\/td>\n<\/tr>\n<tr style=\"background-color: lightgrey;\">\n<td><code>.sockunix.socket<\/code><\/td>\n<td>str<\/td>\n<td><\/td>\n<td>Unix socket name<\/td>\n<\/tr>\n<tr style=\"background-color: white;\">\n<td><code>.sockunix.msg<\/code><\/td>\n<td>bstr<\/td>\n<td><\/td>\n<td>message<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The sockunix module reads raw packets from a Unix UDP socket (AF_UNIX, SOCK_DGRAM). The sockunix module is\u00a0 an input module, meaning that its purpose is to read data from some sources, and convert it to Orchids events.\u00a0 The sources\u00a0 should be declared in the orchids-inputs.conf file.\u00a0 Admissible sources are UDP\u00a0(SOCK_DGRAM) local connections (AF_UNIX). The sockunix &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=210\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The sockunix 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-210","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/210","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=210"}],"version-history":[{"count":5,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/210\/revisions"}],"predecessor-version":[{"id":732,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/210\/revisions\/732"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}