OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.19, Wed May 26 16:44:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.18: +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.18 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.17: +33 -33 lines
Diff to previous 1.17 (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.17 / (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.16: +23 -25 lines
Diff to previous 1.16 (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.16 / (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.15: +3 -3 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sat Jun 6 07:31:26 2009 UTC (15 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.14: +1 -1 lines
Diff to previous 1.14 (colored)

sync ospfctl/ospfd with the common imsg code, making it lib ready as well.

"looks ok" claudio@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jun 5 21:15:47 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.13: +46 -1 lines
Diff to previous 1.13 (colored)

bring buf_write here as well.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 5 19:33:58 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.12: +36 -5 lines
Diff to previous 1.12 (colored)

make ospfd's imsg lib ready as well.
ok claudio@

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 5 01:19:09 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.11: +5 -8 lines
Diff to previous 1.11 (colored)

treat buf->wpos as the size to send out on the wire, not buf->size,
this plays better with dynamic buffers which are now the norm.
ok by a slightly annoyed claudio@, ok eric@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Mar 4 12:51:01 2009 UTC (15 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.10: +10 -2 lines
Diff to previous 1.10 (colored)

Introduce and use buf_size(buf) instead of buf->wpos -- at least in the non
buf/imsg specific code. buf_close() will no force a truncation of the buffer
to the wpos but actually add code in imsg.c to detect and report such silly
behaviour. Makes the buf API a bit more sane.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 31 11:44:49 2009 UTC (15 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.9: +7 -1 lines
Diff to previous 1.9 (colored)

Implement buf_left() to make some some more buffer handling easier.
buf_left() returns the bytes left in a buffer. This makes the check to
keep MD5_DIGEST_LENGTH bytes unallocated in some messages easier.
From the buf cleanup diff that was OK norby@ and henning@

Revision 1.9 / (download) - annotate - [select for diffs], Fri Oct 3 15:20:29 2008 UTC (15 years, 8 months ago) by eric
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

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

ok henning@ claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Feb 10 18:30:47 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.7: +1 -79 lines
Diff to previous 1.7 (colored)

ospfd does not need fd passing via the imsg framework so remove that code
and remove other unneeded functions that are only used in bgpd.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Aug 11 16:28:07 2005 UTC (18 years, 10 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored)

EINTR, and a little KNF in packet.c

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 26 15:18:22 2005 UTC (19 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.5: +4 -5 lines
Diff to previous 1.5 (colored)

unify shared code a bit again to make future syncs easier
From: Alexander von Gernler <grunk@pestilenz.org>

Revision 1.5 / (download) - annotate - [select for diffs], Tue Apr 5 12:59:18 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

Set errno in case buf_realloc() fails because the limit of the buffer is
reached.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 23 11:36:34 2005 UTC (19 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.3: +1 -13 lines
Diff to previous 1.3 (colored)

remove now osolete comment, from a mail exchange with
Alexander von Gernler <grunk@pestilenz.org>

Revision 1.3 / (download) - annotate - [select for diffs], Wed Feb 9 14:39:56 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.2: +11 -1 lines
Diff to previous 1.2 (colored)

Add buf_seek() as buf_reserve() fails if a buf_add()/buf_reserve() is
called afterwards as it may realloc() the buffer and so the returned
pointer is bogus. Needed by the upcomming originate LSA code.
OK henning@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 1 21:25:18 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.1: +47 -9 lines
Diff to previous 1.1 (colored)

Introduce dynmaic buffers. Dynamic buffers are realloced() until max is
hit. This makes it possible to alloc a buffer based on the max packet size
and filling it up slowly till the packet is finished or *sigh* an overflow
is detected. While doing that switch most sizes from ssize_t to the unsigned
size_t as this makes more sense. The ssize_t -> size_t change is mostly from
henning@

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 28 14:05:40 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN

Welcome ospfd
started by Esben Norby some time ago by using the imsg/three process framework
of bgpd. He implemented the basic concept plus the ospf finite state machines.
Later I joined and helped him cleanup, debug and extend his work.
Right now it is not particularly useful, major parts are still missing but is
imported to allow more people to work on it.
status:
The basic protocol works for broadcast networks and the LS database is
synchronized and updated. It is not possible to be DR or BDR on a network
and other interface types like point-to-point are not yet supported.
The shortest path tree is not calculated and so no routing information is
exchanged with the kernel FIB.

Not yet connected to the builds.
OK henning@

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.