Last change
on this file since 22881 was 20377, checked in by vboxsync, 15 years ago |
NAT: sbuf perfomance counters
|
-
Property svn:eol-style
set to
native
|
File size:
1004 bytes
|
Line | |
---|
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 |
|
---|
14 | struct 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 |
|
---|
25 | void sbfree (struct sbuf *);
|
---|
26 | void sbdrop (struct sbuf *, int);
|
---|
27 | void sbreserve (PNATState, struct sbuf *, int);
|
---|
28 | void sbappend (PNATState, struct socket *, struct mbuf *);
|
---|
29 | void sbappendsb (PNATState, struct sbuf *, struct mbuf *);
|
---|
30 | void sbcopy (struct sbuf *, int, int, char *);
|
---|
31 |
|
---|
32 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.