OpenBSD CVS

CVS log for src/usr.sbin/relayd/Attic/imsg.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.16, Wed May 26 16:44:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +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.15 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.14: +21 -21 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Tue Apr 27 21:04:04 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.13: +1 -3 lines
Diff to previous 1.13 (colored)

imsg.h does not need sys/tree.h.

ok eric

Revision 1.13 / (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.12: +2 -1 lines
Diff to previous 1.12 (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.12 / (download) - annotate - [select for diffs], Sun Jun 7 05:56:25 2009 UTC (14 years, 11 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored)

Change the way fds passed over a socket are retreived on the receiving side.

Currently the receiver fetches an imsg via imsg_get() and if he expects
an fd, he then calls imsg_get_fd() to fetch the next fd queued on the
imsgbuf from which the imsg came.

This changes hides the fd queueing mechanism to the API user.  When closing
an imsg with an fd, the message is flagged so that the receiving end knows
it must dequeue the fd in imsg_get() and return it with the imsg structure.
This way there is no (less) possible screw up from imsg_get_fd() not being
called directly after imsg_get() by the user. The retreived imsg is
self-contained.

ok pyr@, "I like that" henning@

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jun 6 22:11:25 2009 UTC (14 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.10: +7 -6 lines
Diff to previous 1.10 (colored)

change the imsg header fields a bit to prepare for upcoming changes.
add a flag field, use u_int32_t for pid_t and extend type to 32 bits
for padding.

ok pyr@

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jun 5 23:44:14 2009 UTC (14 years, 11 months ago) by eric
Branch: MAIN
Changes since 1.9: +1 -2 lines
Diff to previous 1.9 (colored)

didn't we just say we remove libevent from the imsg framework?

ok pyr@

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 5 23:39:51 2009 UTC (14 years, 11 months ago) by pyr
Branch: MAIN
Changes since 1.8: +2 -6 lines
Diff to previous 1.8 (colored)

4 handed diff with eric:
Stop pushing event handling in the imsg framework.
Instead, provide a small glue layer on top of both imsg and libevent.
This finally clearly separates event handling and imsg construction.

Sidetrack bonus: remove the mega-ugly hack of having a dummy imsg_event_add
stub in relayctl.

This will make bgpd (and thus henning) happy. Next up are smtpd and ospfd.

ok eric@

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

bring buf_write here as well.

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

Add an unused data field, to allow smtpd and ypldap to work, all lib
ready daemons have NULL diffs now for the imsg files. This field should
eventually die a honorable death as it was a design screwup.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 5 19:38:53 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

bump MAX_IMSGSIZE here as well

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 5 00:04:01 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

Make imsg completely async model agnostic by not requiring an
imsg_event_add function to be provided (which ended up being a named
callback).
Instead provide a wrapper in the daemon and call that everywhere.
Previsously discussed with the usual suspects,
ok eric@ though not too happy about the function name
(imsg_compose_event).

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 4 23:33:49 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.3: +1 -10 lines
Diff to previous 1.3 (colored)

move logging functions out of imsg.h, make imsg.c more library ready
by not calling log_* or fatal and handle set errno when appropriate.

discussed with a bunch of imsg conscious guys, ok eric@

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 4 22:42:15 2009 UTC (15 years ago) by eric
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

change imsg_close() return type to void. It never fails nor does it
return any useful value.

"ok now" pyr@

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 4 20:31:37 2009 UTC (15 years ago) by eric
Branch: MAIN
Changes since 1.1: +5 -8 lines
Diff to previous 1.1 (colored)

- move message types enum back to relayd.h
- use u_int16_t instead of enum imsg_type in imsg function prototypes

requested by reyk@, ok pyr@

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 4 07:16:38 2009 UTC (15 years ago) by eric
Branch: MAIN

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@

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.