1 /* SPDX-License-Identifier: BSD-3-Clause */
3 * Copyright (c) 1995 Danny Gasparovski.
9 #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc)
12 uint32_t sb_cc
; /* actual chars in buffer */
13 uint32_t sb_datalen
; /* Length of data */
14 char *sb_wptr
; /* write pointer. points to where the next
15 * bytes should be written in the sbuf */
16 char *sb_rptr
; /* read pointer. points to where the next
17 * byte should be read from the sbuf */
18 char *sb_data
; /* Actual data */
21 void sbfree(struct sbuf
*);
22 bool sbdrop(struct sbuf
*, int);
23 void sbreserve(struct sbuf
*, int);
24 void sbappend(struct socket
*, struct mbuf
*);
25 void sbcopy(struct sbuf
*, int, int, char *);