libbgp  0.6
A C++ BGP Library.
Functions
value-op.h File Reference

Buffer operation helpers. More...

#include <stdint.h>
#include <unistd.h>
#include <string.h>
Include dependency graph for value-op.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
libbgp::getValue (const uint8_t **buffer)
 Get value from buffer. More...
 
template<typename T >
size_t libbgp::putValue (uint8_t **buffer, T value)
 Put value to buffer. More...
 

Detailed Description

Buffer operation helpers.

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

Definition in file value-op.h.

Function Documentation

◆ getValue()

template<typename T >
T libbgp::getValue ( const uint8_t **  buffer)

Get value from buffer.

Read value from buffer pointer and move buffer pointer.

Template Parameters
TType of value.
Parameters
bufferPointer to buffer.
Returns
T The value.

Definition at line 42 of file value-op.h.

References libbgp::getValue().

Referenced by libbgp::getValue().

◆ putValue()

template<typename T >
size_t libbgp::putValue ( uint8_t **  buffer,
value 
)

Put value to buffer.

Write the value to buffer pointer and move the buffer pointer.

Template Parameters
TType of value.
Parameters
bufferPointer to pointer to buffer.
valueValue to write.
Returns
size_t Bytes written.

Definition at line 51 of file value-op.h.

References libbgp::putValue().

Referenced by libbgp::putValue().