Skip to content

Commit f64c2e9

Browse files
committed
Adjust "Developer" page
1 parent 7ba13ad commit f64c2e9

File tree

2 files changed

+41
-50
lines changed

2 files changed

+41
-50
lines changed

_developer/basic.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ fields:
3333
ipfix: "29305/1"
3434
value: "number of bytes in data flow (dst to src)"
3535
-
36-
name: "LINK_BIT_FIELD"
37-
type: "or"
38-
value: "ODID uint64 or uint32 exporter identification"
36+
name: "LINK_BIT_FIELD or ODID"
37+
type: "uint64 or uint32"
38+
ipfix: "-/-"
39+
value: "exporter identification"
3940
-
4041
name: "TIME_FIRST"
4142
type: "time"

developer.html

Lines changed: 37 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,48 @@
22
title: Developer info
33
heading: Developer info
44
---
5-
6-
7-
{% assign sorted_developers = site.developer | sort: 'title' %}
85
<section style="padding:0px; padding-bottom:100px">
96
<div class="container">
107
<div class="blog-post text-container">
118
<p>The architecture of the ipfixprobe can be described by the following diagram:</p>
129
<img src="/images/ipfixprobe_architecture.jpg" style = "width: 100%;">
13-
<p>Process plugin can export data. Export format of each plugin is described in this section</p>
10+
<h1>Process plugin</h1>
11+
<p>The ipfixprobe contains script that creates template for new process plugin. To use it follow these steps:<br>
1412
<div class="text editable" style="display: flex;flex-direction: column;justify-content: center;align-items: left;">
15-
{% for export_table in sorted_developers %}
16-
<hr>
17-
<h1 class="clickable" id = "{{export_table.title}}">{{export_table.title}}</h1>
18-
{% assign textId = export_table.title | append: "_text" %}
19-
<p id = "{{textId}}" class = "hidden">{{export_table.description}}</p>
20-
{% assign tableId = export_table.title | append: "_table" %}
21-
<table id = "{{tableId}}" class = "hidden">
22-
<thead>
23-
<tr>
24-
<th>Output field</th>
25-
<th>Type</th>
26-
<th>IPFIX Enterprise number/ID</th>
27-
<th>Description</th>
28-
</tr>
29-
</thead>
30-
<tbody>
31-
{% for row in export_table.fields %}
32-
<tr>
33-
<td>{{row.name}}</td>
34-
<td>{{row.type}}</td>
35-
<td>{{row.ipfix}}</td>
36-
<td>{{row.value}}</td>
37-
</tr>
38-
{% endfor %}
39-
</tbody>
40-
</table>
41-
{% endfor %}
42-
</div>
13+
<p>Run the script:</p>
14+
<span>
15+
<p style = "font-family: monospace;">cd process</p>
16+
<p style = "font-family: monospace;">./create_plugin.sh</p>
17+
</span>
18+
<span>
19+
<p>To create the process plugin follow these steps:</p>
20+
<ol>
21+
<li><p>Add <b>plugin_name.hpp</b> and <b>plugin_name.cpp</b> files to ipfixprobe_process_src variable in <b>Makefile.am</b>.</p></li>
22+
<li><p>Implement process plugin event functions. Don't forget to remove unused events to keep default implementation.</p></li>
23+
<li><p>Set <b>PLUGIN_NAME_UNIREC_TEMPLATE</b> and <b>IPFIX_PLUGIN_NAME_TEMPLATE</b> macros to export Unirec or IPFIX data respectively.</p></li>
24+
<li><p>Define Unirec and IPFIX fields to export Unirec or IPFIX respectively.</p></li>
25+
<li><p>Implement <b>fill_ipfix</b> and <b>fill_unirec</b>.</p></li>
26+
<li><p>Update README.md.</p></li>
27+
</ol>
28+
</span>
29+
<h2>Process plugin events</h2>
30+
<p><b>pre_create</b> Is called before the creation of new flow from the initial packet.</p>
31+
<p><b>post_create</b> is called after the flow is created, taket newly created flow and initial packet.</p>
32+
<p><b>pre_update</b> is called when incoming packet belongs to the existing flow, before the data from the packet are added to the flow.</p>
33+
<p><b>post_update</b> is called after the data of the packet are added to the flow.</p>
34+
<p><b>pre_export</b> is called right before the flow is exported.</p>
35+
</div>
36+
<h1>Input plugin</h1>
37+
<p>You can also create own input plugin.</p>
38+
<span>
39+
<p>To create the input plugin follow these steps:</p>
40+
<ol>
41+
<li>Create <b>plugin_name.hpp</b> and <b>plugin_name.cpp</b> in the <b>input</b> directory.</li>
42+
<li>Add <b>plugin_name.hpp</b> and <b>plugin_name.cpp</b> files to ipfixprobe_input_src variable in <b>Makefile.am</b>.</li>
43+
<li>Create a plugin class that inherites from the Input plugin class.</li>
44+
<li>Override virtual Plugin class methods (<i>init</i>, <i>close</i>, <i>get_parser</i>, <i>get_name</i>) and Input plugin method to receive new packets(<i>get</i>).</li>
45+
</ol>
46+
</span>
4347
</div>
4448
</div>
45-
</section>
46-
47-
<script>
48-
document.addEventListener("DOMContentLoaded", function () {
49-
document.querySelectorAll(".clickable").forEach(function (toggleButton) {
50-
const description = document.getElementById(toggleButton.id + "_text");
51-
const table = document.getElementById(toggleButton.id + "_table");
52-
53-
toggleButton.addEventListener("click", function () {
54-
description.classList.toggle("hidden");
55-
table.classList.toggle("hidden");
56-
});
57-
});
58-
});
59-
</script>
49+
</section>

0 commit comments

Comments
 (0)