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

Route/Prefix related utilities. More...

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

Go to the source code of this file.

Classes

class  libbgp::Prefix
 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

Route/Prefix related utilities.

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

Definition in file prefix.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().