VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/sbuf.h@ 15472

最後變更 在這個檔案從15472是 14964,由 vboxsync 提交於 16 年 前

slirp: code cosmetics for better readability (no semantics change)

  • 屬性 svn:eol-style 設為 native
檔案大小: 1006 位元組
 
1/*
2 * Copyright (c) 1995 Danny Gasparovski.
3 *
4 * Please read the file COPYRIGHT for the
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{
16 u_int sb_cc; /* actual chars in buffer */
17 u_int sb_datalen; /* Length of data */
18 char *sb_wptr; /* write pointer. points to where the next
19 * bytes should be written in the sbuf */
20 char *sb_rptr; /* read pointer. points to where the next
21 * byte should be read from the sbuf */
22 char *sb_data; /* Actual data */
23};
24
25void sbfree _P((struct sbuf *));
26void sbdrop _P((struct sbuf *, int));
27void sbreserve _P((struct sbuf *, int));
28void sbappend _P((PNATState, struct socket *, struct mbuf *));
29void sbappendsb _P((struct sbuf *, struct mbuf *));
30void sbcopy _P((struct sbuf *, int, int, char *));
31
32#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette