\doxysection{include/osmocom/core/strrb.h File Reference}
\label{strrb_8h}\index{include/osmocom/core/strrb.h@{include/osmocom/core/strrb.h}}


Osmocom string ringbuffer handling routines.  


{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+strrb}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ RB\+\_\+\+MAX\+\_\+\+MESSAGE\+\_\+\+SIZE}~240
\begin{DoxyCompactList}\small\item\em A structure representing an osmocom string ringbuffer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+strrb} $\ast$ \textbf{ osmo\+\_\+strrb\+\_\+create} (void $\ast$talloc\+\_\+ctx, size\+\_\+t rb\+\_\+size)
\begin{DoxyCompactList}\small\item\em Create an empty, initialized \doxyref{osmo\+\_\+strrb}{p.}{structosmo__strrb}. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+strrb\+\_\+is\+\_\+empty} (const struct \textbf{ osmo\+\_\+strrb} $\ast$rb)
\begin{DoxyCompactList}\small\item\em Check if an \doxyref{osmo\+\_\+strrb}{p.}{structosmo__strrb} is empty. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+strrb\+\_\+get\+\_\+nth} (const struct \textbf{ osmo\+\_\+strrb} $\ast$rb, unsigned int string\+\_\+index)
\begin{DoxyCompactList}\small\item\em Return a pointer to the Nth string in the \doxyref{osmo\+\_\+strrb}{p.}{structosmo__strrb}. \end{DoxyCompactList}\item 
bool \textbf{ \+\_\+osmo\+\_\+strrb\+\_\+is\+\_\+bufindex\+\_\+valid} (const struct \textbf{ osmo\+\_\+strrb} $\ast$rb, unsigned int offset)
\item 
size\+\_\+t \textbf{ osmo\+\_\+strrb\+\_\+elements} (const struct \textbf{ osmo\+\_\+strrb} $\ast$rb)
\begin{DoxyCompactList}\small\item\em Count the number of log messages in an \doxyref{osmo\+\_\+strrb}{p.}{structosmo__strrb}. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+strrb\+\_\+add} (struct \textbf{ osmo\+\_\+strrb} $\ast$rb, const char $\ast$\textbf{ data})
\begin{DoxyCompactList}\small\item\em Add a string to the \doxyref{osmo\+\_\+strrb}{p.}{structosmo__strrb}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom string ringbuffer handling routines. 

