version 1.1.1.3, 2018/04/24 16:54:31
|
version 1.1.1.4, 2018/04/24 17:25:39
|
Line 9
|
Line 9
|
|
|
static void sbappendsb(struct sbuf *sb, struct mbuf *m); |
static void sbappendsb(struct sbuf *sb, struct mbuf *m); |
|
|
/* Done as a macro in socket.h */ |
|
/* int |
|
* sbspace(struct sockbuff *sb) |
|
* { |
|
* return SB_DATALEN - sb->sb_cc; |
|
* } |
|
*/ |
|
|
|
void |
void |
sbfree(sb) |
sbfree(struct sbuf *sb) |
struct sbuf *sb; |
|
{ |
{ |
free(sb->sb_data); |
free(sb->sb_data); |
} |
} |
|
|
void |
void |
sbdrop(sb, num) |
sbdrop(struct sbuf *sb, int num) |
struct sbuf *sb; |
|
int num; |
|
{ |
{ |
/* |
/* |
* We can only drop how much we have |
* We can only drop how much we have |
Line 43 sbdrop(sb, num)
|
Line 32 sbdrop(sb, num)
|
} |
} |
|
|
void |
void |
sbreserve(sb, size) |
sbreserve(struct sbuf *sb, int size) |
struct sbuf *sb; |
|
int size; |
|
{ |
{ |
if (sb->sb_data) { |
if (sb->sb_data) { |
/* Already alloced, realloc if necessary */ |
/* Already alloced, realloc if necessary */ |
Line 74 sbreserve(sb, size)
|
Line 61 sbreserve(sb, size)
|
* (the socket is non-blocking, so we won't hang) |
* (the socket is non-blocking, so we won't hang) |
*/ |
*/ |
void |
void |
sbappend(so, m) |
sbappend(struct socket *so, struct mbuf *m) |
struct socket *so; |
|
struct mbuf *m; |
|
{ |
{ |
int ret = 0; |
int ret = 0; |
|
|
Line 173 sbappendsb(struct sbuf *sb, struct mbuf
|
Line 158 sbappendsb(struct sbuf *sb, struct mbuf
|
* done in sbdrop when the data is acked |
* done in sbdrop when the data is acked |
*/ |
*/ |
void |
void |
sbcopy(sb, off, len, to) |
sbcopy(struct sbuf *sb, int off, int len, char *to) |
struct sbuf *sb; |
|
int off; |
|
int len; |
|
char *to; |
|
{ |
{ |
char *from; |
char *from; |
|
|