summaryrefslogtreecommitdiff
path: root/draft/mcastseed/src/sockets.h
diff options
context:
space:
mode:
Diffstat (limited to 'draft/mcastseed/src/sockets.h')
-rw-r--r--draft/mcastseed/src/sockets.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/draft/mcastseed/src/sockets.h b/draft/mcastseed/src/sockets.h
new file mode 100644
index 0000000..86f7c5b
--- /dev/null
+++ b/draft/mcastseed/src/sockets.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2016 by Ludovic Pouzenc <ludovic@pouzenc.fr>
+ *
+ * Greatly inspired from msock.h written by Christian Beier <dontmind@sdf.org>
+ */
+
+#ifndef SOCKETS_H
+#define SOCKETS_H
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+/*
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/un.h>
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+*/
+int mcast_recv_socket(char *mcast_ip, char *port, int wanted_so_rcvbuf);
+int mcast_send_socket(char *mcast_ip, char *port, int mcast_ttl, struct addrinfo **mcast_ai);
+
+int ucast_server_socket(char *port, int max_pending_conn);
+int ucast_client_socket(char *server_ip, char *port);
+
+#endif /*SOCKETS_H*/