summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/bgpd.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-12-28 14:34:31 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-12-28 14:34:31 +0000
commit61f8bc1c82d9aab917529611effaad633782e457 (patch)
treee5468112fc21c6cfed03619bd0f8cb8caea1b3cd /usr.sbin/bgpd/bgpd.h
parenta7bfdd02fe4106044791878771234737d19b306f (diff)
redo the imsg readers to use bigger buffers and less read(2)s. should increase
performance even further. gets rif od struct imsg_readbuf; rename peer_read_buf to read_buf as that is more appropriate now.
Diffstat (limited to 'usr.sbin/bgpd/bgpd.h')
-rw-r--r--usr.sbin/bgpd/bgpd.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 6cc04e25505..0c3a48dada9 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.43 2003/12/27 14:24:42 henning Exp $ */
+/* $OpenBSD: bgpd.h,v 1.44 2003/12/28 14:34:30 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -111,7 +111,7 @@ struct bgpd_config {
struct peer *peers;
};
-struct peer_buf_read {
+struct buf_read {
u_char buf[READ_BUF_SIZE];
u_char *rptr;
ssize_t wpos;
@@ -143,7 +143,7 @@ struct peer {
int sock;
int events;
struct msgbuf wbuf;
- struct peer_buf_read *rbuf;
+ struct buf_read *rbuf;
struct peer *next;
};
@@ -187,19 +187,9 @@ struct mrtdump_config {
#define IMSG_HEADER_SIZE sizeof(struct imsg_hdr)
#define MAX_IMSGSIZE 8192
-struct imsg_readbuf {
- u_char buf[MAX_IMSGSIZE];
- ssize_t read_len;
- u_int32_t peerid;
- u_int16_t pkt_len;
- u_int8_t type;
- u_char *wptr;
- u_int8_t seen_hdr;
-};
-
struct imsgbuf {
int sock;
- struct imsg_readbuf r;
+ struct buf_read r;
struct msgbuf w;
};