]> git.proxmox.com Git - qemu.git/blame - slirp/sbuf.h
rng-egd: remove redundant free
[qemu.git] / slirp / sbuf.h
CommitLineData
f0cbd3ec
FB
1/*
2 * Copyright (c) 1995 Danny Gasparovski.
5fafdf24
TS
3 *
4 * Please read the file COPYRIGHT for the
f0cbd3ec
FB
5 * terms and conditions of the copyright.
6 */
7
8#ifndef _SBUF_H_
9#define _SBUF_H_
10
11#define sbflush(sb) sbdrop((sb),(sb)->sb_cc)
12#define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc)
13
14struct sbuf {
15 u_int sb_cc; /* actual chars in buffer */
16 u_int sb_datalen; /* Length of data */
17 char *sb_wptr; /* write pointer. points to where the next
18 * bytes should be written in the sbuf */
19 char *sb_rptr; /* read pointer. points to where the next
20 * byte should be read from the sbuf */
21 char *sb_data; /* Actual data */
22};
23
6cb9c6d3
BS
24void sbfree(struct sbuf *);
25void sbdrop(struct sbuf *, int);
26void sbreserve(struct sbuf *, int);
27void sbappend(struct socket *, struct mbuf *);
28void sbcopy(struct sbuf *, int, int, char *);
f0cbd3ec
FB
29
30#endif