libbgp  0.6
A C++ BGP Library.
Classes | Functions
prefix4.h File Reference

IPv4 Route/Prefix related utilities. More...

#include <stdint.h>
#include <unistd.h>
#include "prefix.h"
Include dependency graph for prefix4.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  libbgp::Prefix4
 IPv4 Route/Prefix related utilities. More...
 

Functions

uint32_t libbgp::cidr_to_mask (uint8_t cidr)
 Convert netmask in CIDR notation to network bytes integer. More...
 

Detailed Description

IPv4 Route/Prefix related utilities.

Author
Nato Morichika nat@n.nosp@m.at.m.nosp@m.oe
Version
0.2
Date
2019-07-21

Definition in file prefix4.h.

Function Documentation

◆ cidr_to_mask()

uint32_t libbgp::cidr_to_mask ( uint8_t  cidr)

Convert netmask in CIDR notation to network bytes integer.

Parameters
cidrThe netmask in CIDR notation.
Returns
uint32_t The netmask in network byte order.
Exceptions
bad_route_lengthNetmask invalid.

Definition at line 33 of file prefix4.cc.

References libbgp::cidr_to_mask().

Referenced by libbgp::cidr_to_mask().