OpenBSD CVS

CVS log for src/usr.sbin/relayd/Attic/buffer.c


[BACK] Up to [local] / src / usr.sbin / relayd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24, Wed May 26 16:44:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +1 -1 lines
FILE REMOVED

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt

Revision 1.23 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.22: +33 -33 lines
Diff to previous 1.22 (colored)

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt

Revision 1.22 / (download) - annotate - [select for diffs], Tue Sep 15 10:54:59 2009 UTC (14 years, 8 months ago) by jacekm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.21: +23 -25 lines
Diff to previous 1.21 (colored)

Enclose repeated buffer draining code in a new msgbuf_drain()
function, which is additionally exported for use by others.

It will be needed by smtpd's SSL module when the SMTP client code
is changed to replace libevent's evbuffers with our msgbuf_* API.

ok gilles@ henning@ guenther@ eric@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jul 23 18:58:42 2009 UTC (14 years, 10 months ago) by eric
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

make buf_write() behave like msgbuf_write(): send out only the
bytes that were filled, not the whole buffer.

ok pyr@ gilles@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jun 5 21:15:47 2009 UTC (14 years, 11 months ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.19: +46 -1 lines
Diff to previous 1.19 (colored)

bring buf_write here as well.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 5 07:14:31 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

sync buffer.c with ospfd, send out buf->wpos and not buf->size.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jun 4 07:16:38 2009 UTC (15 years ago) by eric
Branch: MAIN
Changes since 1.17: +2 -9 lines
Diff to previous 1.17 (colored)

Make imsg.c and buffer.c more generic by introducing
imsg.h and a daemon-specific imsg_types.h

discussed with and "yes, please" pyr@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 3 05:35:06 2009 UTC (15 years ago) by eric
Branch: MAIN
Changes since 1.16: +2 -3 lines
Diff to previous 1.16 (colored)

change buf_close return type to void.
that function is not supposed to report anything remotely useful,
or fail in any meaningful way.

ok pyr@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 2 22:02:01 2009 UTC (15 years ago) by eric
Branch: MAIN
Changes since 1.15: +23 -1 lines
Diff to previous 1.15 (colored)

bring in buf_seek, buf_size and buf_left from bgpd

ok pyr@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jun 2 21:44:22 2009 UTC (15 years ago) by eric
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

constify argument to buf_add

ok pyr@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Oct 3 15:20:29 2008 UTC (15 years, 8 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.13: +8 -4 lines
Diff to previous 1.13 (colored)

Unify code between the various flavors of imsg buffer.c.
Use unsigned int for msg_iovlen.

ok henning@ claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Thu May 22 08:35:08 2008 UTC (16 years ago) by gilles
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.12: +3 -8 lines
Diff to previous 1.12 (colored)

- fix a bug in msgbuf_write() that caused a descriptor to stay in the fd
	list even after being sent successfully. this has imsg_get_fd()
	keep returning the first fd. no impact in relayd.

"go for it" pyr@, "yeah someone screwed up in the copy" henning@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 24 16:11:05 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

msg_controllen has to be CMSG_SPACE so that the kernel can account for
each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len).  This
works now that kernel fd passing has been fixed to accept a bit of
sloppiness because of this ABI repair.
lots of discussion with kettenis

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 15 16:19:02 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Repair the simple cases for msg_controllen where it should just be
CMSG_SIZE(sizeof(int)), not sizeof(buffer) which may be larger because
of alignment; ok kettenis hshoexer

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 13 01:49:53 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +9 -6 lines
Diff to previous 1.9 (colored)

Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due to
an extensive discussion with otto, kettenis, millert, and hshoexer

Revision 1.9 / (download) - annotate - [select for diffs], Fri Dec 7 17:17:00 2007 UTC (16 years, 5 months ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

hoststated gets renamed to relayd.  easier to type, and actually says
what the daemon does - it is a relayer that pays attention to the status
of pools of hosts; not a status checkers that happens to do some relaying

Revision 1.8 / (download) - annotate - [select for diffs], Sat Nov 24 17:07:28 2007 UTC (16 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored)

sort includes, adjust to style(9)

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jun 12 15:16:10 2007 UTC (16 years, 11 months ago) by msf
Branch: MAIN
Changes since 1.6: +30 -1 lines
Diff to previous 1.6 (colored)

put the fd passing from bgpd back in to hoststated's version of imsg,
needed for layer 7 reload support.

ok pyr@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 7 13:39:58 2007 UTC (17 years, 3 months ago) by reyk
Branch: MAIN
Changes since 1.5: +1 -11 lines
Diff to previous 1.5 (colored)

remove unused functions and variables which have been copied from
ospfd(8) (can be re-imported later if required).

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 29 14:23:31 2007 UTC (17 years, 4 months ago) by pyr
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

Add SSL support to hoststated.
with help and OK reyk@
with help and advice by claudio@ and Srebrenko Sehic

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jan 9 00:45:32 2007 UTC (17 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

adapt to rename

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jan 8 20:46:18 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

do NOT use the regexp interface. it is way to complicated, error-prone
and we don't know about all the possible security problems.

change the check send/expect code to use the fnmatch(3) interface
using shell globbing rules instead. this allows simple patterns like
"220 * ESMTP*" or "SSH-[12].??-*".

suggested by deraadt@ and otto@
ok Pierre-Yves Ritschard (pyr at spootnik dot org)

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 8 13:37:26 2007 UTC (17 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

add a generic send/expect check using regular expression (see
regex(3)).  this allows to define additional checks for other TCP
protocols.

From Pierre-Yves Ritschard (pyr at spootnik dot org)

Revision 1.1 / (download) - annotate - [select for diffs], Sat Dec 16 11:45:07 2006 UTC (17 years, 5 months ago) by reyk
Branch: MAIN

Import hostated, the host status daemon.  This daemon will monitor
remote hosts and dynamically alter pf(4) tables and redirection rules
for active server load balancing.  The daemon has been written by
Pierre-Yves Ritschard (pyr at spootnik.org) and was formerly known as
"slbd".

The daemon is fully functional but it still needs some work and
cleanup so we don't link it to the build yet.  Some TODOs are a
partial rewrite of the check_* routines (use libevent whenever we
can), improvement of the manpages, and general knf and cleanup.

ok deraadt@ claudio@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.