1. 27 Feb, 2003 1 commit
    • Robert Ricci's avatar
      Add a blocking poll, event_poll_blocking(), to the event library. · b6cf32b8
      Robert Ricci authored
      Note the following: (from the API file)
        IMPORTANT: elvin uses timeouts internally. So, this function does
        NOT guarantee that when it returns, either an event has been
        recieved or your timeout has passed. This should not be much of
        a problem, but you have been warned!
      The above is not really fixable, without hacking elvin. And it may
      not be entirely fixable even then. In particular, the first call to
      event_poll_blocking() will always return at once, since there are
      leftover timers from connecting to elvind.
  2. 10 Jul, 2002 1 commit
  3. 25 Mar, 2002 1 commit
  4. 22 Mar, 2002 1 commit
  5. 18 Mar, 2002 1 commit
  6. 07 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Isolate the pain of building threaded (and statically linked) event · 4dad8ebe
      Leigh B. Stoller authored
      system programs. Build two versions of the event library, one for non
      threaded programs and another (libevent_r.a) for threaded versions.
      Remove all that -pthread goo from all of the makefiles, except for the
      scheduler (which is threaded); it gets linked as before, but with
      -levent_r instead. If you try and use the threaded API without the
      proper link, the library will print an error message and quit.
  7. 06 Mar, 2002 1 commit
    • Leigh B. Stoller's avatar
      Increase flexibility in event subscription. You can now specify a · 2938132c
      Leigh B. Stoller authored
      comma (or space) delimited list of tags for each member of the address
      tuple. So, if you wanted to subscribe to LINK and TIME events, you
      would set the address tuple like this:
      	tuple->objtype   = "TRAFGEN,TIME";
      and the subscription clause that would be passed to elvin would look
      something like this:
      	( OBJTYPE == "TRAFGEN" || OBJTYPE == "TIME" )
      This should make it easier to subscribe to multiple types of events,
      without having to get all of them. For example, the trafgen agent
      could subscribe to TIME events and get the TIME START event that is
      now sent once all nodes report ISUP
  8. 05 Mar, 2002 1 commit
  9. 27 Feb, 2002 1 commit
  10. 21 Feb, 2002 1 commit
    • Leigh B. Stoller's avatar
      Some whacking of the event system. I have implemented the addressing · 8305021f
      Leigh B. Stoller authored
      scheme that we discussed in email. Notifications and subscriptions now
      take an "address_tuple" argument (I know, crappy name) that is a
      structure that looks like this:
      	char		*site;		/* Which Emulab site. God only */
      	char		*expt;		/* Project and experiment IDs */
      	char		*group;		/* User defined group of nodes */
      	char		*host;		/* A specific host */
      	char		*objtype;	/* LINK, TRAFGEN, etc ... */
              char		*objname;	/* link0, cbr0, cbr1, etc ... */
              char		*eventtype;	/* START, STOP, UP, DOWN, etc ... */
      These can be a specific value, ADDRESSTUPLE_ANY if you are a
      subscriber, or ADDRESSTUPLE_ALL if you are a producer. The reason for
      the distinction is that you can optimize the match expression with the
      extra bit of information, and the above structure can make for a
      fairly lengthy match expression, which takes more time of course.
      You should use address_tuple_alloc() and address_tuple_free() rather
      than allocating them yourself. Note that host above is actually the
      ipaddr of control interface. This turns out to be more convenient
      since free nodes do not have virtual names.
      Also added a new tbgen directly. This directory includes 3 programs in
      the making:
      tbmevd: Is the Testbed Master Event Daemon, to be run on boss and will
      handle TBCONTROL events (reboot, reload, etc). It is just a shell of a
      program right now, that takes the events but does not do anything
      useful with them. Have not defined what the events are, and what DB
      state will be modified.
      tbmevc: Is the Testbed Master Event Client (akin to tmcc). It
      generates TBCONTROL events which the tbmevd will pick up and do
      something useful with. This program is intended to be wrapped by a
      perl script that will ask the tmcd for the name of the boss (running
      the event daemon).
      sample-client: This is a little client to demonstrate how to connect
      to the event system and use the address tuple to subscribe to events,
      and then how to get information out of notifications.
      Note that I have not created a proper build environment yet, so new
      programs should probably go in the event dir for now, and link using
      the same approach as in tbgen/GNUmakefile.in.
  11. 19 Feb, 2002 3 commits
    • Leigh B. Stoller's avatar
      Add testbed style GNUmakefile.in files and add subdirs to configure. · f00d574e
      Leigh B. Stoller authored
      Also several changes for building on FreeBSD. I've left the older
      Makefiles in place so Ian can continue to build in his environmant
    • Ian Murdock's avatar
      Doc fixes/updates: · 1046c4f5
      Ian Murdock authored
      Fixed typo in API (s/event_notification/event_notification_t/).
      Tell user (in README) to configure Elvin library with --enable-threads
      to enable threaded API support.
      Removed instructions on enabling server discovery feature (now optional).
      Document event_register interface changes ("threaded" arguement, which
      allows caller to choose between the thread-safe "threaded" API and the
      simpler "sync" API).
      Mention (in API) that event_notify and event_schedule don't deallocate
    • Ian Murdock's avatar
      Added "threaded" argument to event_register: If "threaded" is 1, use · 30c5bb96
      Ian Murdock authored
      the threaded API; otherwise, use the sync API.  This option allows
      multi-threaded programs to access the threaded API, which is thread-
  12. 31 Jan, 2002 1 commit
  13. 29 Jan, 2002 1 commit
    • Ian Murdock's avatar
      * Added event_schedule to the event API, which allows events · e9f9388a
      Ian Murdock authored
      to be scheduled at a later time. The interface to event_schedule is
      identical to event_notify, except it takes an additional struct
      timeval argument that specifies when the event should be fired.  We
      assume time synchronization between nodes.
      * Revamped the attribute interface. Rather than a single get and put
      function that takes a union "type" argument, we now have separate
      event_notification_get_<type> and event_notification_put_<type>
      functions, where <type> is one of "double", "int32", "int64",
      "opaque", "string". These changes should greatly simply the attribute
      interface. The opaque attribute type is new, and allows
      arbitrary data structures to be added to notifications as attributes.
      * Added event_notification_remove, which deletes an attribute from a
      * Modified the event notification callback to take "host" and "type"
      parameters, which contain the "host" and "type" attributes from the
      event notification, respectively.
  14. 19 Dec, 2001 1 commit
  15. 04 Dec, 2001 1 commit
  16. 06 Nov, 2001 2 commits
  17. 02 Nov, 2001 1 commit
  18. 01 Nov, 2001 1 commit