~ubuntu-branches/ubuntu/vivid/basilisk2/vivid

« back to all changes in this revision

Viewing changes to src/slirp/sbuf.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-03-06 19:33:01 UTC
  • mfrom: (2.1.4 gutsy)
  • Revision ID: james.westby@ubuntu.com-20080306193301-cc2ofn705nfsq3y0
Tags: 0.9.20070407-4
* Update copyright-check cdbs snippet to parse licensecheck using perl:
  + No longer randomly drops newlines
  + More compact hint file (and ordered more like wiki-proposed new copyright
    syntax).
  + No longer ignore files without copyright.
* Update copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
        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
 
 
24
void sbfree _P((struct sbuf *));
 
25
void sbdrop _P((struct sbuf *, int));
 
26
void sbreserve _P((struct sbuf *, int));
 
27
void sbappend _P((struct socket *, struct mbuf *));
 
28
void sbappendsb _P((struct sbuf *, struct mbuf *));
 
29
void sbcopy _P((struct sbuf *, int, int, char *));
 
30
 
 
31
#endif