From 604f3d64764270c052cfb43081ec522237bbdb75 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Fri, 5 May 2017 11:28:51 +0200 Subject: Massive add for all draft stuff to keep it in sync --- mcastseed/src/dgrambuf.h | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 mcastseed/src/dgrambuf.h (limited to 'mcastseed/src/dgrambuf.h') diff --git a/mcastseed/src/dgrambuf.h b/mcastseed/src/dgrambuf.h deleted file mode 100644 index a83647b..0000000 --- a/mcastseed/src/dgrambuf.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef DGRAMBUF_H -#define DGRAMBUF_H -/* - * dgrambuf.c - C datagrams buffer. - * - * Copyright 2016 by Ludovic Pouzenc - */ -#include /* size_t */ - -#define DGRAMBUF_RECV_OVERWRITE 1 << 1 -#define DGRAMBUF_RECV_EINTR 1 << 2 -#define DGRAMBUF_RECV_IOVEC_FULL 1 << 3 -#define DGRAMBUF_RECV_FINALIZE 1 << 4 -#define DGRAMBUF_RECV_FUTURE_DGRAM 1 << 5 -#define DGRAMBUF_RECV_DUPLICATE_DGRAM 1 << 6 -#define DGRAMBUF_RECV_VALID_DGRAM 1 << 6 - -#define DGRAMBUF_WRITE_PARTIAL 1 << 1 -#define DGRAMBUF_WRITE_EWOULDBLOCK_OR_EINTR 1 << 2 -#define DGRAMBUF_WRITE_IOVEC_FULL 1 << 3 -#define DGRAMBUF_WRITE_SUCCESS 1 << 4 - -typedef struct dgrambuf_t *dgrambuf_t; - -dgrambuf_t dgrambuf_new(size_t dgram_slots, size_t dgram_max_size, size_t dgram_header_size, size_t iovec_slots); -void dgrambuf_free(dgrambuf_t *); - -void dgrambuf_set_validate_func(dgrambuf_t dbuf, int (*validate_func)(unsigned int, void *, unsigned int *)); - -size_t dgrambuf_get_free_count(const dgrambuf_t); -size_t dgrambuf_get_used_count(const dgrambuf_t); -int dgrambuf_have_data_ready_to_write(const dgrambuf_t); -int dgrambuf_have_received_everything(const dgrambuf_t); - -int dgrambuf_stats(dgrambuf_t dbuf, char **allocated_string); - -/* Warning : dgrambuf_recvmmsg sets and restore SIGALRM handler if timeout != 0 */ -ssize_t dgrambuf_recvmmsg(dgrambuf_t dbuf, int sockfd, int timeout, int *info); -ssize_t dgrambuf_write(dgrambuf_t dbuf, int fd, int *info); - -#endif /* DGRAMBUF_H */ -- cgit v1.2.3