rrd based system stats
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
706 B

  1. #ifndef _LINEBUFFER_H_
  2. #define _LINEBUFFER_H_
  3. #include <stdarg.h>
  4. /* hide details */
  5. struct lbuf;
  6. struct lbuf * lbuf_create(size_t size);
  7. void lbuf_free(struct lbuf *buf);
  8. int lbuf_clear(struct lbuf *buf);
  9. int lbuf_readfd(struct lbuf *buf, int fd);
  10. int lbuf_parsefd(struct lbuf *buf, int fd);
  11. int lbuf_writefd(struct lbuf *buf, int fd);
  12. char * lbuf_getdata(struct lbuf *buf, size_t *len);
  13. int lbuf_append(struct lbuf *buf, const char *src, size_t size);
  14. int lbuf_vprintf(struct lbuf *buf, const char *fmt, va_list ap);
  15. int lbuf_printf(struct lbuf *buf, const char *fmt, ...);
  16. char * lbuf_gettok(struct lbuf *buf, const char *delim);
  17. int lbuf_freetok(struct lbuf *buf);
  18. #endif /* _LINEBUFFER_H_ */