The SENF Packet Library

The SENF Packet library provides facilities to analyze, manipulate and create structured packet oriented data (e.g. network packets).

Introduction

     →  see Overall Packet library Architecture

The Packet library consists of several components:

  • The Packet Handling manages the packet data and provides the framework for handling the chain of packet headers. The visible interface is provided by the Packet class.
  • The PacketParser facility provides the framework for interpreting packet data. It handles parsing the packet information into meaningful values.
  • The Supported packet types (protocols) provide concrete implementations for interpreting packets of some protocol. The Protocol Bundles are built on top of the basic packet library.

All these components work together to provide a hopefully simple and intuitive interface to packet parsing and creation.

Tutorial

     →  see Using the packet library

This chapter discusses the usage of the packet library from a high level view.

The packet API

The packet library API is divided into three areas

Supported packet types (protocols)

Each protocol bundle provides a collection of related concrete packet classes for a group of related protocols:

There are two ways to link with a bundle

  • If you only work with known packets which you explicitly reference you may just link with the corresponding library.
  • If you need to parse unknown packets and want those to be parsed as complete as possible without explicitly referencing the packet type, you will need to link against the combined object file built for every bundle. This way, all packets defined in the bundle will be included whether they are explicitly referenced or not (and they will all automatically be registered).

Defining new packet types

     →  see Defining new Packet types

The packet library provides the framework which allows to define arbitrary packet types. There is quite some information needed to completely specify a specific type of packet.