SlideShare a Scribd company logo
https://ostinato.org
Ostinato – a brief history
●
Started 2007
●
Public launch Apr 2010 – v0.1
●
The BIG ONE-O Sep 2019 – v1.0
●
Lead developer-maintainer
●
Side project
●
Project sustained via paid binaries
https://ostinato.org
Currently supported protocols
L2 L3 L4 L5 Misc
Mac ARP ICMP (v4/v6) Text HexDump
Eth2 IPv4 IGMP Pattern Payload UserScript
802.3 IPv6 MLD
LLC IPoverIP (v4/v6) TCP
SNAP STP UDP
VLAN
As of Jan 2021
New protocols can be added using Ostinato’s
Protocol Builder Framework
https://ostinato.org
Code - Language and dependencies
●
Language
– C++
– Protocol buffers
●
Dependencies
– Qt 5.9+
– Protobuf 2.6+
– libpcap/npcap
– libnl3, libnl-route3 (Linux only)
https://ostinato.org
What is a Protocol Builder?
●
Wireshark
– Captures packets and dissects them
– “Protocol Dissectors”
●
Ostinato
– Builds packets and puts them on the wire
– “Protocol Builders”
https://ostinato.org
Parts of a Protocol Builder
●
Core
– sample.proto, {sample.pb.h, sample.pb.cc}, sample.h, sample.cpp
●
GUI widget
– sample.ui, {ui_sample.h}, sampleconfig.h, sampleconfig.cpp
●
PCAP import
– samplepdml.h, samplepdml.cpp
●
These are actual files from Ostinato code
– template for new protocol builders
– includes boilerplate code
– and TODO instructions for protocol specific code
https://ostinato.org
GRE – Frame Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|C| |K|S| Reserved0 | Ver | Protocol Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum (optional) | Reserved1 (Optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Key (optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number (Optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
(RFC 2890)
https://ostinato.org
GRE Protocol Builder files
●
Copy and rename template files
– sample*.* to gre*.*
– Find & Replace SAMPLE/Sample/sample with GRE/Gre/gre in the gre*.* files
●
New files
– Core: gre.proto, {gre.pb.h, gre.pb.cc}, gre.h, gre.cpp
– GUI widget: gre.ui, {ui_gre.h}, greconfig.h, greconfig.cpp
– PCAP import: grepdml.h, grepdml.cpp
●
Modified Files
– Definition: protocol.proto
– Registration: protocolmanager.cpp, protocolwidgetfactory.cpp,
pdmlreader.cpp
– Build/Project: ostproto.pro, ostprotogui.pro
https://ostinato.org
GRE Core
gre.proto, gre.h, gre.cpp
https://ostinato.org
GRE Core (gre.proto)
import "protocol.proto";
package OstProto;
// GRE Protocol
message Gre {
optional uint32 flags = 1 [default = 0xa];
optional uint32 rsvd0 = 2;
optional uint32 version = 3;
optional uint32 protocol_type = 4;
optional uint32 checksum = 5;
optional uint32 rsvd1 = 6;
optional uint32 key = 7 [default = 0x2020bad7];
optional uint32 sequence_num = 8;
}
extend Protocol {
optional Gre gre = 405;
}
https://ostinato.org
GRE Core (protocol.proto)
--- a/common/protocol.proto
+++ b/common/protocol.proto
@@ -156,6 +156,7 @@ message Protocol {
kIcmpFieldNumber = 402;
kIgmpFieldNumber = 403;
kMldFieldNumber = 404;
+ kGreFieldNumber = 405;
kTextProtocolFieldNumber = 500;
}
https://ostinato.org
GRE Core (gre.proto ==> gre.pb.[h,cc])
// protoc generated class
namespace OstProto {
// ...
class Gre : public ::google::protobuf::Message {
// ...
// optional uint32 flags = 1 [default = 10];
inline bool has_flags() const;
inline void clear_flags();
static const int kFlagsFieldNumber = 1;
inline ::google::protobuf::uint32 flags() const;
inline void set_flags(::google::protobuf::uint32 value);
// ...
}
}
https://ostinato.org
GRE Core class (diagram)
https://ostinato.org
GRE Core (gre.h)
#define GRE_FLAG_CKSUM 0x8
#define GRE_FLAG_KEY 0x2
#define GRE_FLAG_SEQ 0x1
class GreProtocol : public AbstractProtocol
{
public:
enum grefield
{
// Frame Fields
gre_flags = 0,
gre_rsvd0,
gre_version,
gre_protocol,
gre_checksum,
gre_rsvd1,
gre_key,
gre_sequence,
gre_fieldCount
};
// ...
private:
OstProto::Gre data;
}
https://ostinato.org
GRE Core (gre.cpp) – Boilerplate functions
// Same as template - no need to modify
AbstractProtocol* GreProtocol::createInstance(StreamBase *stream,
AbstractProtocol *parent) {
return new GreProtocol(stream, parent);
}
quint32 GreProtocol::protocolNumber() const {
return OstProto::Protocol::kGreFieldNumber;
}
void GreProtocol::protoDataCopyInto(OstProto::Protocol &protocol) const {
protocol.MutableExtension(OstProto::gre)->CopyFrom(data);
protocol.mutable_protocol_id()->set_id(protocolNumber());
}
void GreProtocol::protoDataCopyFrom(const OstProto::Protocol &protocol) {
if (protocol.protocol_id().id() == protocolNumber() &&
protocol.HasExtension(OstProto::gre))
data.MergeFrom(protocol.GetExtension(OstProto::gre));
}
https://ostinato.org
GRE Core (gre.cpp) – Names and IDs
QString GreProtocol::name() const {
return QString("General Routing Encapsulation Protocol");
}
QString GreProtocol::shortName() const {
return QString("GRE");
}
AbstractProtocol::ProtocolIdType GreProtocol::protocolIdType() const {
return ProtocolIdEth; // Types are ProtocolId[None|Llc|Eth|Ip|TcpUdp]
}
quint32 GreProtocol::protocolId(ProtocolIdType type) const {
switch(type) {
case ProtocolIdIp: return 47;
default:break;
}
return AbstractProtocol::protocolId(type);
}
https://ostinato.org
GRE Core (gre.cpp) – Field count and flags
int GreProtocol::fieldCount() const {
return gre_fieldCount;
}
AbstractProtocol::FieldFlags GreProtocol::fieldFlags(int index) const {
AbstractProtocol::FieldFlags flags // Options: [Frame,Cksum,Meta]Field
= AbstractProtocol::fieldFlags(index);// returns FrameField
if (index == gre_checksum)
flags |= CksumField;
return flags;
}
int GreProtocol::frameFieldCount() const { // Only if no. of fields may vary
int count = 4; // mandatory fields - flags, rsvd0, version, protocol
if (data.flags() & GRE_FLAG_CKSUM)
count += 2; // checksum, rsvd1
if (data.flags() & GRE_FLAG_KEY)
count++;
if (data.flags() & GRE_FLAG_SEQ)
count++;
return count;
}
https://ostinato.org
GRE Core (gre.cpp) – Field Data
QVariant GreProtocol::fieldData(int index, FieldAttrib attrib, int streamIndex) const {
switch (index) {
case gre_protocol: {
quint16 protocol = payloadProtocolId(ProtocolIdEth);
switch(attrib) {
case FieldName: // as string
return QString("Protocol");
case FieldValue: // as integer
return protocol;
case FieldFrameValue: { // as a byte array in Network byte order
QByteArray fv;
fv.resize(2);
qToBigEndian(protocol, (uchar*) fv.data());
return fv;
}
case FieldTextValue: // value as string
return QString("0x%1").arg(protocol, 4, BASE_HEX, QChar('0'));
case FieldBitSize: // required ONLY if size is not a byte multiple
return 16;
default:
break;
}
break;
}
// other fields ...
}
return AbstractProtocol::fieldData(index, attrib, streamIndex);
}
https://ostinato.org
GRE Core (gre.cpp) – Field Data Attributes
FieldName
FieldTextValue
FieldBitSize
FieldFrameValue
https://ostinato.org
GRE Core (gre.cpp) – Set Field Data
bool GreProtocol::setFieldData(int index, const QVariant &value,
FieldAttrib attrib) {
bool isOk = false;
if (attrib != FieldValue)
goto _exit;
switch (index) {
case gre_flags: {
uint flags = value.toUInt(&isOk);
if (isOk)
data.set_flags(flags);
break;
}
// ...
}
_exit:
return isOk;
}
https://ostinato.org
GRE Core (gre.cpp) – Protocol Frame Size
// Implement only if not a fixed size
int GreProtocol::protocolFrameSize(int /*streamIndex*/) const {
int size = 4; // mandatory fields - flags, rsvd0, version, protocol
if (data.flags() & GRE_FLAG_CKSUM)
size += 4;
if (data.flags() & GRE_FLAG_KEY)
size += 4;
if (data.flags() & GRE_FLAG_SEQ)
size += 4;
return size;
}
https://ostinato.org
GRE Core - Registration
--- a/common/protocolmanager.cpp
+++ b/common/protocolmanager.cpp
@@ -46,6 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "ip6over6.h"
// L4 Protos
+#include "gre.h"
#include "icmp.h"
#include "igmp.h"
#include "mld.h"
@@ -112,6 +113,8 @@ ProtocolManager::ProtocolManager()
(void*) Ip6over6Protocol::createInstance);
// Layer 4 Protocols
+ registerProtocol(OstProto::Protocol::kGreFieldNumber,
+ (void*) GreProtocol::createInstance);
registerProtocol(OstProto::Protocol::kIcmpFieldNumber,
(void*) IcmpProtocol::createInstance);
registerProtocol(OstProto::Protocol::kIgmpFieldNumber,
--- a/common/protocol.proto
+++ b/common/protocol.proto
@@ -156,6 +156,7 @@ message Protocol {
kIcmpFieldNumber = 402;
kIgmpFieldNumber = 403;
kMldFieldNumber = 404;
+ kGreFieldNumber = 405;
kTextProtocolFieldNumber = 500;
}
https://ostinato.org
GRE GUI
gre.ui, greconfig.h, greconfig.cpp
https://ostinato.org
GRE GUI (gre.ui)
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Gre</class>
<widget class="QWidget" name="Gre">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>264</width>
<height>140</height>
</rect>
</property>
<property name="windowTitle">
<string>Gre</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="version">
<property name="specialValueText">
<string>0 (RFC2784)</string>
</property>
<property name="maximum">
<number>7</number>
</property>
</widget>
</item>
<!--- ... -->
</widget>
</ui>
Created using Qt Designer
Saved as a .ui file (XML)
gre.ui --> (uic) --> ui_gre.h
https://ostinato.org
GRE GUI – Class Diagram
https://ostinato.org
GRE GUI (greconfig.h)
// Boilerplate from template
#include "abstractprotocolconfig.h"
#include "ui_gre.h"
class GreConfigForm :
public AbstractProtocolConfigForm,
private Ui::Gre
{
Q_OBJECT
public:
GreConfigForm(QWidget *parent = 0);
virtual ~GreConfigForm();
static GreConfigForm* createInstance();
virtual void loadWidget(AbstractProtocol *proto);
virtual void storeWidget(AbstractProtocol *proto);
};
https://ostinato.org
GRE GUI (greconfig.cpp) – Boilerplate functions
GreConfigForm::GreConfigForm(QWidget *parent)
: AbstractProtocolConfigForm(parent) {
setupUi(this);
}
GreConfigForm::~GreConfigForm() {
}
GreConfigForm* GreConfigForm::createInstance() {
return new GreConfigForm;
}
https://ostinato.org
GRE GUI (greconfig.cpp) – Load widget
// Load widget contents from proto
void GreConfigForm::loadWidget(AbstractProtocol *proto) {
version->setValue(
proto->fieldData(
GreProtocol::gre_version,
AbstractProtocol::FieldValue
).toUInt());
uint flags = proto->fieldData(GreProtocol::gre_flags,
AbstractProtocol::FieldValue)
.toUInt();
hasChecksum->setChecked(flags & GRE_FLAG_CKSUM);
checksum->setValue(
proto->fieldData(
GreProtocol::gre_checksum,
AbstractProtocol::FieldValue
).toUInt());
// ...
}
https://ostinato.org
GRE GUI (greconfig.cpp) – Store widget
// Store widget contents into proto
void GreConfigForm::storeWidget(AbstractProtocol *proto) {
uint flags = 0;
if (hasChecksum->isChecked())
flags |= GRE_FLAG_CKSUM;
if (hasKey->isChecked())
flags |= GRE_FLAG_KEY;
if (hasSequence->isChecked())
flags |= GRE_FLAG_SEQ;
proto->setFieldData(
GreProtocol::gre_flags,
flags);
proto->setFieldData(
GreProtocol::gre_version,
version->value());
proto->setFieldData(
GreProtocol::gre_checksum,
checksum->value());
// ...
}
https://ostinato.org
GRE GUI – Widget registration
--- a/common/protocolwidgetfactory.cpp
+++ b/common/protocolwidgetfactory.cpp
@@ -40,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "ip6over4config.h"
#include "ip6over6config.h"
// L4 Protocol Widgets
+#include "greconfig.h"
#include "icmpconfig.h"
#include "igmpconfig.h"
#include "mldconfig.h"
@@ -124,6 +125,9 @@ ProtocolWidgetFactory::ProtocolWidgetFactory()
(void*) Ip6over6ConfigForm::createInstance);
// Layer 4 Protocols
+ OstProtocolWidgetFactory->registerProtocolConfigWidget(
+ OstProto::Protocol::kGreFieldNumber,
+ (void*) GreConfigForm::createInstance);
OstProtocolWidgetFactory->registerProtocolConfigWidget(
OstProto::Protocol::kIcmpFieldNumber,
(void*) IcmpConfigForm::createInstance);
https://ostinato.org
GRE Pcap Import
grepdml.h, grepdml.cpp
https://ostinato.org
Ostinato Intelligent PCAP Import
● Uses tshark to convert PCAP to PDML
● PDML => Packet Data Markup Language (XML)
● PDML content is essentially Wireshark protocol dissector data
– PDML is NOT standard – may change across Wireshark/tshark versions if protocol
dissector changes
● Import relies essentially on PDML field name, size, value
<proto name="gre" showname="Generic Routing Encapsulation (IP)" size="16" pos="34">
<field name="gre.flags_and_version" showname="Flags and Version: 0xb000" size="2" pos="34" show="0x0000b000"
value="b000">
<field name="gre.flags.checksum" showname="1... .... .... .... = Checksum Bit: Yes" size="2" pos="34" show="1" value="1"
unmaskedvalue="b000"/>
<field name="gre.flags.routing" showname=".0.. .... .... .... = Routing Bit: No" size="2" pos="34" show="0" value="0"
unmaskedvalue="b000"/>
<field name="gre.flags.key" showname="..1. .... .... .... = Key Bit: Yes" size="2" pos="34" show="1" value="1"
unmaskedvalue="b000"/>
<field name="gre.flags.sequence_number" showname="...1 .... .... .... = Sequence Number Bit: Yes" size="2" pos="34"
show="1" value="1" unmaskedvalue="b000"/>
https://ostinato.org
GRE Pcap Import (grepdml.h)
// Boilerplate from template – add more, if required
#include "pdmlprotocol.h"
class PdmlGreProtocol : public PdmlProtocol
{
public:
virtual ~PdmlGreProtocol();
static PdmlProtocol* createInstance();
virtual void preProtocolHandler(QString name,
const QXmlStreamAttributes &attributes, int expectedPos,
OstProto::Protocol *pbProto, OstProto::Stream *stream);
virtual void prematureEndHandler(int pos, OstProto::Protocol *pbProto,
OstProto::Stream *stream);
virtual void postProtocolHandler(OstProto::Protocol *pbProto,
OstProto::Stream *stream);
void fieldHandler(QString name, const QXmlStreamAttributes &attributes,
OstProto::Protocol *pbProto, OstProto::Stream *stream);
virtual void unknownFieldHandler(QString name, int pos, int size,
const QXmlStreamAttributes &attributes,
OstProto::Protocol *pbProto, OstProto::Stream *stream);
protected:
PdmlGreProtocol();
};
https://ostinato.org
GRE Pcap Import (grepdml.cpp) – 1:1 fields
PdmlGreProtocol::PdmlGreProtocol()
{
ostProtoId_ = OstProto::Protocol::kGreFieldNumber;
// Wireshark's gre.flags_and_version is NOT 1:1 with Ostinato fields
fieldMap_.insert("gre.proto", OstProto::Gre::kProtocolTypeFieldNumber);
fieldMap_.insert("gre.checksum", OstProto::Gre::kChecksumFieldNumber);
fieldMap_.insert("gre.offset", OstProto::Gre::kRsvd1FieldNumber);
fieldMap_.insert("gre.key", OstProto::Gre::kKeyFieldNumber);
fieldMap_.insert("gre.sequence_number",
OstProto::Gre::kSequenceNumFieldNumber);
}
https://ostinato.org
GRE Pcap Import (grepdml.cpp) – unknown fields
void PdmlGreProtocol::unknownFieldHandler(QString name,
int pos, int size, const QXmlStreamAttributes& attributes,
OstProto::Protocol* proto, OstProto::Stream* stream)
{
// <field name="gre.flags_and_version"
// showname="Flags and Version: 0xb000" size="2" pos="34"
// show="0x0000b000" value="b000">
if (name == "gre.flags_and_version") {
bool isOk;
quint16 flagsAndVersion = attributes.value("value")
.toUInt(&isOk, kBaseHex);
OstProto::Gre *gre = proto
->MutableExtension(OstProto::gre);
gre->set_flags(flagsAndVersion >> 12);
gre->set_rsvd0((flagsAndVersion & 0x0FFF) >> 3);
gre->set_version(flagsAndVersion & 0x0007);
}
}
https://ostinato.org
GRE Pcap Import (grepdml.cpp) – Special Handling
// Implement if any special handling is required
void PdmlGreProtocol::preProtocolHandler(QString name,
const QXmlStreamAttributes& attributes,
int expectedPos, OstProto::Protocol* pbProto,
OstProto::Stream* stream) {
return;
}
void PdmlGreProtocol::postProtocolHandler(OstProto::Protocol* pbProto,
OstProto::Stream* stream) {
return;
}
void PdmlGreProtocol::prematureEndHandler(int pos,
OstProto::Protocol* pbProto, OstProto::Stream* stream) {
return;
}
https://ostinato.org
GRE Pcap Import – Registration
--- a/common/pdmlreader.cpp
+++ b/common/pdmlreader.cpp
@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/
licenses/>
#include "arppdml.h"
#include "eth2pdml.h"
+#include "grepdml.h"
#include "llcpdml.h"
#include "icmppdml.h"
#include "icmp6pdml.h"
@@ -59,6 +60,7 @@ PdmlReader::PdmlReader(OstProto::StreamConfigList
*streams)
factory_.insert("arp", PdmlArpProtocol::createInstance);
factory_.insert("eth", PdmlEthProtocol::createInstance);
+ factory_.insert("gre", PdmlGreProtocol::createInstance);
factory_.insert("http", PdmlTextProtocol::createInstance);
factory_.insert("icmp", PdmlIcmpProtocol::createInstance);
factory_.insert("icmpv6", PdmlIcmp6Protocol::createInstance);
https://ostinato.org
More Info
● GitHub Repo
https://github.com/pstavirs/ostinato
● Full code of GRE Protocol Builder - see GitHub PR
https://github.com/pstavirs/ostinato/pull/336
● Protocol Builder Documentation
https://devguide.ostinato.org/ProtocolBuilderHOWTO.html
● Slides and Video of this talk
https://ostinato.org/docs/fosdem2021
https://ostinato.org
Thank You!
Questions?

More Related Content

What's hot

The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014
Jian-Hong Pan
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
Linaro
 
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
Linaro
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
Kernel TLV
 
BUD17-300: Journey of a packet
BUD17-300: Journey of a packetBUD17-300: Journey of a packet
BUD17-300: Journey of a packet
Linaro
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services
Thomas Graf
 
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesKernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Anne Nicolas
 
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationSemtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Kernel TLV
 
BPF: Next Generation of Programmable Datapath
BPF: Next Generation of Programmable DatapathBPF: Next Generation of Programmable Datapath
BPF: Next Generation of Programmable Datapath
Thomas Graf
 
Understanding iptables
Understanding iptablesUnderstanding iptables
Understanding iptables
Denys Haryachyy
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profit
linuxlab_conf
 
Networking and Go: An Epic Journey
Networking and Go: An Epic JourneyNetworking and Go: An Epic Journey
Networking and Go: An Epic Journey
Sneha Inguva
 
Tc basics
Tc basicsTc basics
Tc basics
jeromy fu
 
#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++
IncludeOS
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
Linaro
 
Skydive, real-time network analyzer
Skydive, real-time network analyzer Skydive, real-time network analyzer
Skydive, real-time network analyzer
Sylvain Afchain
 
Network sockets
Network socketsNetwork sockets
Network sockets
Denys Haryachyy
 
BGP zombie routes
BGP zombie routesBGP zombie routes
BGP zombie routes
Redge Technologies
 
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OpenvSwitch
 
Skydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integrationSkydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integration
Sylvain Afchain
 

What's hot (20)

The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014The Simple Scheduler in Embedded System @ OSDC.TW 2014
The Simple Scheduler in Embedded System @ OSDC.TW 2014
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
 
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
BUD17-300: Journey of a packet
BUD17-300: Journey of a packetBUD17-300: Journey of a packet
BUD17-300: Journey of a packet
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services
 
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source dronesKernel Recipes 2015 - The Dronecode Project – A step in open source drones
Kernel Recipes 2015 - The Dronecode Project – A step in open source drones
 
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege EscalationSemtex.c [CVE-2013-2094] - A Linux Privelege Escalation
Semtex.c [CVE-2013-2094] - A Linux Privelege Escalation
 
BPF: Next Generation of Programmable Datapath
BPF: Next Generation of Programmable DatapathBPF: Next Generation of Programmable Datapath
BPF: Next Generation of Programmable Datapath
 
Understanding iptables
Understanding iptablesUnderstanding iptables
Understanding iptables
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profit
 
Networking and Go: An Epic Journey
Networking and Go: An Epic JourneyNetworking and Go: An Epic Journey
Networking and Go: An Epic Journey
 
Tc basics
Tc basicsTc basics
Tc basics
 
#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++#Include os - From bootloader to REST API with the new C++
#Include os - From bootloader to REST API with the new C++
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
 
Skydive, real-time network analyzer
Skydive, real-time network analyzer Skydive, real-time network analyzer
Skydive, real-time network analyzer
 
Network sockets
Network socketsNetwork sockets
Network sockets
 
BGP zombie routes
BGP zombie routesBGP zombie routes
BGP zombie routes
 
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
 
Skydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integrationSkydive, real-time network analyzer, container integration
Skydive, real-time network analyzer, container integration
 

Similar to Writing an Ostinato Protocol Builder [FOSDEM 2021]

WebTalk - Implementing Web Services with a dedicated Java daemon
WebTalk - Implementing Web Services with a dedicated Java daemonWebTalk - Implementing Web Services with a dedicated Java daemon
WebTalk - Implementing Web Services with a dedicated Java daemon
Geert Van Pamel
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
Kernel TLV
 
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTDevoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Benjamin Cabé
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io
 
Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...
Ari Jolma
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
Managing gRPC Services using Kong KONNECT and the KONG API Gateway
Managing gRPC Services using Kong KONNECT and the KONG API GatewayManaging gRPC Services using Kong KONNECT and the KONG API Gateway
Managing gRPC Services using Kong KONNECT and the KONG API Gateway
João Esperancinha
 
Multipath TCP Upstreaming
Multipath TCP UpstreamingMultipath TCP Upstreaming
Multipath TCP Upstreaming
Graham G. Turnbull
 
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
KAI CHU CHUNG
 
Improving go-git performance
Improving go-git performanceImproving go-git performance
Improving go-git performance
source{d}
 
Dpdk: rte_security: An update and introducing PDCP
Dpdk: rte_security: An update and introducing PDCPDpdk: rte_security: An update and introducing PDCP
Dpdk: rte_security: An update and introducing PDCP
Hemant Agrawal
 
The State of containerd
The State of containerdThe State of containerd
The State of containerd
Moby Project
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
Jean-Frederic Clere
 
Deploy your own P2P network
Deploy your own P2P networkDeploy your own P2P network
Deploy your own P2P network
Dobrica Pavlinušić
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
Diane Mueller
 
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin
 
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract DeathsBlockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Priyanka Aash
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
Roman Podoliaka
 
Advanced Sockets Programming
Advanced Sockets ProgrammingAdvanced Sockets Programming
Advanced Sockets Programmingelliando dias
 
Php 5.6 From the Inside Out
Php 5.6 From the Inside OutPhp 5.6 From the Inside Out
Php 5.6 From the Inside Out
Ferenc Kovács
 

Similar to Writing an Ostinato Protocol Builder [FOSDEM 2021] (20)

WebTalk - Implementing Web Services with a dedicated Java daemon
WebTalk - Implementing Web Services with a dedicated Java daemonWebTalk - Implementing Web Services with a dedicated Java daemon
WebTalk - Implementing Web Services with a dedicated Java daemon
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoTDevoxx 2015 - Building the Internet of Things with Eclipse IoT
Devoxx 2015 - Building the Internet of Things with Eclipse IoT
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
 
Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...Geospatial web services using little-known GDAL features and modern Perl midd...
Geospatial web services using little-known GDAL features and modern Perl midd...
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
 
Managing gRPC Services using Kong KONNECT and the KONG API Gateway
Managing gRPC Services using Kong KONNECT and the KONG API GatewayManaging gRPC Services using Kong KONNECT and the KONG API Gateway
Managing gRPC Services using Kong KONNECT and the KONG API Gateway
 
Multipath TCP Upstreaming
Multipath TCP UpstreamingMultipath TCP Upstreaming
Multipath TCP Upstreaming
 
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes  with ...
GDG Cloud Taipei meetup #50 - Build go kit microservices at kubernetes with ...
 
Improving go-git performance
Improving go-git performanceImproving go-git performance
Improving go-git performance
 
Dpdk: rte_security: An update and introducing PDCP
Dpdk: rte_security: An update and introducing PDCPDpdk: rte_security: An update and introducing PDCP
Dpdk: rte_security: An update and introducing PDCP
 
The State of containerd
The State of containerdThe State of containerd
The State of containerd
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
Deploy your own P2P network
Deploy your own P2P networkDeploy your own P2P network
Deploy your own P2P network
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
 
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
 
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract DeathsBlockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
 
Advanced Sockets Programming
Advanced Sockets ProgrammingAdvanced Sockets Programming
Advanced Sockets Programming
 
Php 5.6 From the Inside Out
Php 5.6 From the Inside OutPhp 5.6 From the Inside Out
Php 5.6 From the Inside Out
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 

Recently uploaded (20)

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 

Writing an Ostinato Protocol Builder [FOSDEM 2021]

  • 1.
  • 2.
  • 3. https://ostinato.org Ostinato – a brief history ● Started 2007 ● Public launch Apr 2010 – v0.1 ● The BIG ONE-O Sep 2019 – v1.0 ● Lead developer-maintainer ● Side project ● Project sustained via paid binaries
  • 4.
  • 5.
  • 6. https://ostinato.org Currently supported protocols L2 L3 L4 L5 Misc Mac ARP ICMP (v4/v6) Text HexDump Eth2 IPv4 IGMP Pattern Payload UserScript 802.3 IPv6 MLD LLC IPoverIP (v4/v6) TCP SNAP STP UDP VLAN As of Jan 2021 New protocols can be added using Ostinato’s Protocol Builder Framework
  • 7. https://ostinato.org Code - Language and dependencies ● Language – C++ – Protocol buffers ● Dependencies – Qt 5.9+ – Protobuf 2.6+ – libpcap/npcap – libnl3, libnl-route3 (Linux only)
  • 8. https://ostinato.org What is a Protocol Builder? ● Wireshark – Captures packets and dissects them – “Protocol Dissectors” ● Ostinato – Builds packets and puts them on the wire – “Protocol Builders”
  • 9. https://ostinato.org Parts of a Protocol Builder ● Core – sample.proto, {sample.pb.h, sample.pb.cc}, sample.h, sample.cpp ● GUI widget – sample.ui, {ui_sample.h}, sampleconfig.h, sampleconfig.cpp ● PCAP import – samplepdml.h, samplepdml.cpp ● These are actual files from Ostinato code – template for new protocol builders – includes boilerplate code – and TODO instructions for protocol specific code
  • 10. https://ostinato.org GRE – Frame Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C| |K|S| Reserved0 | Ver | Protocol Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum (optional) | Reserved1 (Optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Key (optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number (Optional) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (RFC 2890)
  • 11. https://ostinato.org GRE Protocol Builder files ● Copy and rename template files – sample*.* to gre*.* – Find & Replace SAMPLE/Sample/sample with GRE/Gre/gre in the gre*.* files ● New files – Core: gre.proto, {gre.pb.h, gre.pb.cc}, gre.h, gre.cpp – GUI widget: gre.ui, {ui_gre.h}, greconfig.h, greconfig.cpp – PCAP import: grepdml.h, grepdml.cpp ● Modified Files – Definition: protocol.proto – Registration: protocolmanager.cpp, protocolwidgetfactory.cpp, pdmlreader.cpp – Build/Project: ostproto.pro, ostprotogui.pro
  • 13. https://ostinato.org GRE Core (gre.proto) import "protocol.proto"; package OstProto; // GRE Protocol message Gre { optional uint32 flags = 1 [default = 0xa]; optional uint32 rsvd0 = 2; optional uint32 version = 3; optional uint32 protocol_type = 4; optional uint32 checksum = 5; optional uint32 rsvd1 = 6; optional uint32 key = 7 [default = 0x2020bad7]; optional uint32 sequence_num = 8; } extend Protocol { optional Gre gre = 405; }
  • 14. https://ostinato.org GRE Core (protocol.proto) --- a/common/protocol.proto +++ b/common/protocol.proto @@ -156,6 +156,7 @@ message Protocol { kIcmpFieldNumber = 402; kIgmpFieldNumber = 403; kMldFieldNumber = 404; + kGreFieldNumber = 405; kTextProtocolFieldNumber = 500; }
  • 15. https://ostinato.org GRE Core (gre.proto ==> gre.pb.[h,cc]) // protoc generated class namespace OstProto { // ... class Gre : public ::google::protobuf::Message { // ... // optional uint32 flags = 1 [default = 10]; inline bool has_flags() const; inline void clear_flags(); static const int kFlagsFieldNumber = 1; inline ::google::protobuf::uint32 flags() const; inline void set_flags(::google::protobuf::uint32 value); // ... } }
  • 17. https://ostinato.org GRE Core (gre.h) #define GRE_FLAG_CKSUM 0x8 #define GRE_FLAG_KEY 0x2 #define GRE_FLAG_SEQ 0x1 class GreProtocol : public AbstractProtocol { public: enum grefield { // Frame Fields gre_flags = 0, gre_rsvd0, gre_version, gre_protocol, gre_checksum, gre_rsvd1, gre_key, gre_sequence, gre_fieldCount }; // ... private: OstProto::Gre data; }
  • 18. https://ostinato.org GRE Core (gre.cpp) – Boilerplate functions // Same as template - no need to modify AbstractProtocol* GreProtocol::createInstance(StreamBase *stream, AbstractProtocol *parent) { return new GreProtocol(stream, parent); } quint32 GreProtocol::protocolNumber() const { return OstProto::Protocol::kGreFieldNumber; } void GreProtocol::protoDataCopyInto(OstProto::Protocol &protocol) const { protocol.MutableExtension(OstProto::gre)->CopyFrom(data); protocol.mutable_protocol_id()->set_id(protocolNumber()); } void GreProtocol::protoDataCopyFrom(const OstProto::Protocol &protocol) { if (protocol.protocol_id().id() == protocolNumber() && protocol.HasExtension(OstProto::gre)) data.MergeFrom(protocol.GetExtension(OstProto::gre)); }
  • 19. https://ostinato.org GRE Core (gre.cpp) – Names and IDs QString GreProtocol::name() const { return QString("General Routing Encapsulation Protocol"); } QString GreProtocol::shortName() const { return QString("GRE"); } AbstractProtocol::ProtocolIdType GreProtocol::protocolIdType() const { return ProtocolIdEth; // Types are ProtocolId[None|Llc|Eth|Ip|TcpUdp] } quint32 GreProtocol::protocolId(ProtocolIdType type) const { switch(type) { case ProtocolIdIp: return 47; default:break; } return AbstractProtocol::protocolId(type); }
  • 20. https://ostinato.org GRE Core (gre.cpp) – Field count and flags int GreProtocol::fieldCount() const { return gre_fieldCount; } AbstractProtocol::FieldFlags GreProtocol::fieldFlags(int index) const { AbstractProtocol::FieldFlags flags // Options: [Frame,Cksum,Meta]Field = AbstractProtocol::fieldFlags(index);// returns FrameField if (index == gre_checksum) flags |= CksumField; return flags; } int GreProtocol::frameFieldCount() const { // Only if no. of fields may vary int count = 4; // mandatory fields - flags, rsvd0, version, protocol if (data.flags() & GRE_FLAG_CKSUM) count += 2; // checksum, rsvd1 if (data.flags() & GRE_FLAG_KEY) count++; if (data.flags() & GRE_FLAG_SEQ) count++; return count; }
  • 21. https://ostinato.org GRE Core (gre.cpp) – Field Data QVariant GreProtocol::fieldData(int index, FieldAttrib attrib, int streamIndex) const { switch (index) { case gre_protocol: { quint16 protocol = payloadProtocolId(ProtocolIdEth); switch(attrib) { case FieldName: // as string return QString("Protocol"); case FieldValue: // as integer return protocol; case FieldFrameValue: { // as a byte array in Network byte order QByteArray fv; fv.resize(2); qToBigEndian(protocol, (uchar*) fv.data()); return fv; } case FieldTextValue: // value as string return QString("0x%1").arg(protocol, 4, BASE_HEX, QChar('0')); case FieldBitSize: // required ONLY if size is not a byte multiple return 16; default: break; } break; } // other fields ... } return AbstractProtocol::fieldData(index, attrib, streamIndex); }
  • 22. https://ostinato.org GRE Core (gre.cpp) – Field Data Attributes FieldName FieldTextValue FieldBitSize FieldFrameValue
  • 23. https://ostinato.org GRE Core (gre.cpp) – Set Field Data bool GreProtocol::setFieldData(int index, const QVariant &value, FieldAttrib attrib) { bool isOk = false; if (attrib != FieldValue) goto _exit; switch (index) { case gre_flags: { uint flags = value.toUInt(&isOk); if (isOk) data.set_flags(flags); break; } // ... } _exit: return isOk; }
  • 24. https://ostinato.org GRE Core (gre.cpp) – Protocol Frame Size // Implement only if not a fixed size int GreProtocol::protocolFrameSize(int /*streamIndex*/) const { int size = 4; // mandatory fields - flags, rsvd0, version, protocol if (data.flags() & GRE_FLAG_CKSUM) size += 4; if (data.flags() & GRE_FLAG_KEY) size += 4; if (data.flags() & GRE_FLAG_SEQ) size += 4; return size; }
  • 25. https://ostinato.org GRE Core - Registration --- a/common/protocolmanager.cpp +++ b/common/protocolmanager.cpp @@ -46,6 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/> #include "ip6over6.h" // L4 Protos +#include "gre.h" #include "icmp.h" #include "igmp.h" #include "mld.h" @@ -112,6 +113,8 @@ ProtocolManager::ProtocolManager() (void*) Ip6over6Protocol::createInstance); // Layer 4 Protocols + registerProtocol(OstProto::Protocol::kGreFieldNumber, + (void*) GreProtocol::createInstance); registerProtocol(OstProto::Protocol::kIcmpFieldNumber, (void*) IcmpProtocol::createInstance); registerProtocol(OstProto::Protocol::kIgmpFieldNumber, --- a/common/protocol.proto +++ b/common/protocol.proto @@ -156,6 +156,7 @@ message Protocol { kIcmpFieldNumber = 402; kIgmpFieldNumber = 403; kMldFieldNumber = 404; + kGreFieldNumber = 405; kTextProtocolFieldNumber = 500; }
  • 27. https://ostinato.org GRE GUI (gre.ui) <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>Gre</class> <widget class="QWidget" name="Gre"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>264</width> <height>140</height> </rect> </property> <property name="windowTitle"> <string>Gre</string> </property> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> <widget class="QLabel" name="label"> <property name="text"> <string>Version</string> </property> </widget> </item> <item row="0" column="1"> <widget class="QSpinBox" name="version"> <property name="specialValueText"> <string>0 (RFC2784)</string> </property> <property name="maximum"> <number>7</number> </property> </widget> </item> <!--- ... --> </widget> </ui> Created using Qt Designer Saved as a .ui file (XML) gre.ui --> (uic) --> ui_gre.h
  • 29. https://ostinato.org GRE GUI (greconfig.h) // Boilerplate from template #include "abstractprotocolconfig.h" #include "ui_gre.h" class GreConfigForm : public AbstractProtocolConfigForm, private Ui::Gre { Q_OBJECT public: GreConfigForm(QWidget *parent = 0); virtual ~GreConfigForm(); static GreConfigForm* createInstance(); virtual void loadWidget(AbstractProtocol *proto); virtual void storeWidget(AbstractProtocol *proto); };
  • 30. https://ostinato.org GRE GUI (greconfig.cpp) – Boilerplate functions GreConfigForm::GreConfigForm(QWidget *parent) : AbstractProtocolConfigForm(parent) { setupUi(this); } GreConfigForm::~GreConfigForm() { } GreConfigForm* GreConfigForm::createInstance() { return new GreConfigForm; }
  • 31. https://ostinato.org GRE GUI (greconfig.cpp) – Load widget // Load widget contents from proto void GreConfigForm::loadWidget(AbstractProtocol *proto) { version->setValue( proto->fieldData( GreProtocol::gre_version, AbstractProtocol::FieldValue ).toUInt()); uint flags = proto->fieldData(GreProtocol::gre_flags, AbstractProtocol::FieldValue) .toUInt(); hasChecksum->setChecked(flags & GRE_FLAG_CKSUM); checksum->setValue( proto->fieldData( GreProtocol::gre_checksum, AbstractProtocol::FieldValue ).toUInt()); // ... }
  • 32. https://ostinato.org GRE GUI (greconfig.cpp) – Store widget // Store widget contents into proto void GreConfigForm::storeWidget(AbstractProtocol *proto) { uint flags = 0; if (hasChecksum->isChecked()) flags |= GRE_FLAG_CKSUM; if (hasKey->isChecked()) flags |= GRE_FLAG_KEY; if (hasSequence->isChecked()) flags |= GRE_FLAG_SEQ; proto->setFieldData( GreProtocol::gre_flags, flags); proto->setFieldData( GreProtocol::gre_version, version->value()); proto->setFieldData( GreProtocol::gre_checksum, checksum->value()); // ... }
  • 33. https://ostinato.org GRE GUI – Widget registration --- a/common/protocolwidgetfactory.cpp +++ b/common/protocolwidgetfactory.cpp @@ -40,6 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/> #include "ip6over4config.h" #include "ip6over6config.h" // L4 Protocol Widgets +#include "greconfig.h" #include "icmpconfig.h" #include "igmpconfig.h" #include "mldconfig.h" @@ -124,6 +125,9 @@ ProtocolWidgetFactory::ProtocolWidgetFactory() (void*) Ip6over6ConfigForm::createInstance); // Layer 4 Protocols + OstProtocolWidgetFactory->registerProtocolConfigWidget( + OstProto::Protocol::kGreFieldNumber, + (void*) GreConfigForm::createInstance); OstProtocolWidgetFactory->registerProtocolConfigWidget( OstProto::Protocol::kIcmpFieldNumber, (void*) IcmpConfigForm::createInstance);
  • 35. https://ostinato.org Ostinato Intelligent PCAP Import ● Uses tshark to convert PCAP to PDML ● PDML => Packet Data Markup Language (XML) ● PDML content is essentially Wireshark protocol dissector data – PDML is NOT standard – may change across Wireshark/tshark versions if protocol dissector changes ● Import relies essentially on PDML field name, size, value <proto name="gre" showname="Generic Routing Encapsulation (IP)" size="16" pos="34"> <field name="gre.flags_and_version" showname="Flags and Version: 0xb000" size="2" pos="34" show="0x0000b000" value="b000"> <field name="gre.flags.checksum" showname="1... .... .... .... = Checksum Bit: Yes" size="2" pos="34" show="1" value="1" unmaskedvalue="b000"/> <field name="gre.flags.routing" showname=".0.. .... .... .... = Routing Bit: No" size="2" pos="34" show="0" value="0" unmaskedvalue="b000"/> <field name="gre.flags.key" showname="..1. .... .... .... = Key Bit: Yes" size="2" pos="34" show="1" value="1" unmaskedvalue="b000"/> <field name="gre.flags.sequence_number" showname="...1 .... .... .... = Sequence Number Bit: Yes" size="2" pos="34" show="1" value="1" unmaskedvalue="b000"/>
  • 36. https://ostinato.org GRE Pcap Import (grepdml.h) // Boilerplate from template – add more, if required #include "pdmlprotocol.h" class PdmlGreProtocol : public PdmlProtocol { public: virtual ~PdmlGreProtocol(); static PdmlProtocol* createInstance(); virtual void preProtocolHandler(QString name, const QXmlStreamAttributes &attributes, int expectedPos, OstProto::Protocol *pbProto, OstProto::Stream *stream); virtual void prematureEndHandler(int pos, OstProto::Protocol *pbProto, OstProto::Stream *stream); virtual void postProtocolHandler(OstProto::Protocol *pbProto, OstProto::Stream *stream); void fieldHandler(QString name, const QXmlStreamAttributes &attributes, OstProto::Protocol *pbProto, OstProto::Stream *stream); virtual void unknownFieldHandler(QString name, int pos, int size, const QXmlStreamAttributes &attributes, OstProto::Protocol *pbProto, OstProto::Stream *stream); protected: PdmlGreProtocol(); };
  • 37. https://ostinato.org GRE Pcap Import (grepdml.cpp) – 1:1 fields PdmlGreProtocol::PdmlGreProtocol() { ostProtoId_ = OstProto::Protocol::kGreFieldNumber; // Wireshark's gre.flags_and_version is NOT 1:1 with Ostinato fields fieldMap_.insert("gre.proto", OstProto::Gre::kProtocolTypeFieldNumber); fieldMap_.insert("gre.checksum", OstProto::Gre::kChecksumFieldNumber); fieldMap_.insert("gre.offset", OstProto::Gre::kRsvd1FieldNumber); fieldMap_.insert("gre.key", OstProto::Gre::kKeyFieldNumber); fieldMap_.insert("gre.sequence_number", OstProto::Gre::kSequenceNumFieldNumber); }
  • 38. https://ostinato.org GRE Pcap Import (grepdml.cpp) – unknown fields void PdmlGreProtocol::unknownFieldHandler(QString name, int pos, int size, const QXmlStreamAttributes& attributes, OstProto::Protocol* proto, OstProto::Stream* stream) { // <field name="gre.flags_and_version" // showname="Flags and Version: 0xb000" size="2" pos="34" // show="0x0000b000" value="b000"> if (name == "gre.flags_and_version") { bool isOk; quint16 flagsAndVersion = attributes.value("value") .toUInt(&isOk, kBaseHex); OstProto::Gre *gre = proto ->MutableExtension(OstProto::gre); gre->set_flags(flagsAndVersion >> 12); gre->set_rsvd0((flagsAndVersion & 0x0FFF) >> 3); gre->set_version(flagsAndVersion & 0x0007); } }
  • 39. https://ostinato.org GRE Pcap Import (grepdml.cpp) – Special Handling // Implement if any special handling is required void PdmlGreProtocol::preProtocolHandler(QString name, const QXmlStreamAttributes& attributes, int expectedPos, OstProto::Protocol* pbProto, OstProto::Stream* stream) { return; } void PdmlGreProtocol::postProtocolHandler(OstProto::Protocol* pbProto, OstProto::Stream* stream) { return; } void PdmlGreProtocol::prematureEndHandler(int pos, OstProto::Protocol* pbProto, OstProto::Stream* stream) { return; }
  • 40. https://ostinato.org GRE Pcap Import – Registration --- a/common/pdmlreader.cpp +++ b/common/pdmlreader.cpp @@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/ licenses/> #include "arppdml.h" #include "eth2pdml.h" +#include "grepdml.h" #include "llcpdml.h" #include "icmppdml.h" #include "icmp6pdml.h" @@ -59,6 +60,7 @@ PdmlReader::PdmlReader(OstProto::StreamConfigList *streams) factory_.insert("arp", PdmlArpProtocol::createInstance); factory_.insert("eth", PdmlEthProtocol::createInstance); + factory_.insert("gre", PdmlGreProtocol::createInstance); factory_.insert("http", PdmlTextProtocol::createInstance); factory_.insert("icmp", PdmlIcmpProtocol::createInstance); factory_.insert("icmpv6", PdmlIcmp6Protocol::createInstance);
  • 41. https://ostinato.org More Info ● GitHub Repo https://github.com/pstavirs/ostinato ● Full code of GRE Protocol Builder - see GitHub PR https://github.com/pstavirs/ostinato/pull/336 ● Protocol Builder Documentation https://devguide.ostinato.org/ProtocolBuilderHOWTO.html ● Slides and Video of this talk https://ostinato.org/docs/fosdem2021