You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/include/sarp/buffer.h

25 lines
397 B
C

#ifndef SARP_BUFFER_H_
#define SARP_BUFFER_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include <stdint.h>
typedef struct sarp_buffer_t {
uint8_t * base;
size_t sz;
uint8_t * cur;
} sarp_buffer_t;
static inline size_t sarp_buffer_size_left(sarp_buffer_t * buff)
{
return buff->sz - (buff->cur - buff->base);
}
#ifdef __cplusplus
}
#endif
#endif