+static void dump(struct tevent_context *ev,
+ struct tevent_signal *se,
+ int signum,
+ int count,
+ void *siginfo,
+ void *_oserver)
+{
+ struct oserver *oserver = _oserver;
+ char *str;
+ int fd;
+
+ str = cdump_bundle(ev, cdump_struct_oserver, oserver);
+ fd = open(oserver->dumpfile, O_CREAT|O_TRUNC|O_WRONLY, 0600);
+ write(fd, str, strlen(str));
+ close(fd);
+ talloc_free(str);
+}
+
+struct oserver *oserver_setup(struct tevent_context *ev, unsigned short port,
+ const char *dumpfile)