summaryrefslogtreecommitdiff
path: root/draft/mcastseed/src/sockets.h
blob: 86f7c5ba87750869326931167ad73906768326f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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*/