-static int event(struct sr_output *o, int event_type, char **data_out,
- uint64_t *length_out)
-{
- struct context *ctx;
- char *outbuf;
-
- ctx = o->internal;
- switch (event_type) {
- case SR_DF_END:
- outbuf = strdup("$dumpoff\n$end\n");
- *data_out = outbuf;
- *length_out = strlen(outbuf);
- free(o->internal);
- o->internal = NULL;
- break;
- default:
- *data_out = NULL;
- *length_out = 0;
- break;
- }
-
- return SR_OK;
-}
-
-static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
- char **data_out, uint64_t *length_out)
+static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
+ const struct sr_datafeed_packet *packet, GString **out)