libDwm-0.6.0
DwmIpv4Prefix.hh File Reference

Dwm::Ipv4Prefix class definition. More...

#include <inttypes.h>
#include <cstring>
#include <iostream>
#include <utility>
#include <vector>
#include "DwmIpv4Address.hh"
#include "DwmReadable.hh"
#include "DwmWritable.hh"
#include "DwmGZReadable.hh"
#include "DwmGZWritable.hh"
#include "DwmBZ2Readable.hh"
#include "DwmBZ2Writable.hh"
Include dependency graph for DwmIpv4Prefix.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Dwm::Ipv4Prefix
 This class encapsulates an IPv4 address and netmask. More...
 

Typedefs

typedef uint32_t ipv4addr_t
 

Functions

std::vector< Ipv4Prefix > Dwm::Ipv4RangePrefixes (const Ipv4Address &addr1, const Ipv4Address &addr2)
 Returns the minimal set of IPv4 prefixes that cover the entire range between addr1 and addr2. More...
 

Detailed Description

Dwm::Ipv4Prefix class definition.

Function Documentation

◆ Ipv4RangePrefixes()

std::vector<Ipv4Prefix> Dwm::Ipv4RangePrefixes ( const Ipv4Address addr1,
const Ipv4Address addr2 
)

Returns the minimal set of IPv4 prefixes that cover the entire range between addr1 and addr2.

This is mainly used for IDS/IPS types of applications which want to map from registry ranges to pf filters.