summaryrefslogtreecommitdiff
path: root/tools/vdrdiscovery.h
blob: 3db1bd1c3ff5137c6f63e6196a95e21c1c6aee03 (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
28
29
30
31
32
33
34
35
36
37
/*
 * vdrdiscovery.h
 *
 * Simple broadcast protocol to search VDR with xineliboutput server 
 * from (local) network.
 *
 * See the main source file 'xineliboutput.c' for copyright information and
 * how to reach the author.
 *
 * $Id: vdrdiscovery.h,v 1.4 2008-11-04 12:08:59 phintuka Exp $
 *
 */

#ifndef _VDRDISCOVERY_H_
#define _VDRDISCOVERY_H_

#define DISCOVERY_MSG_MAXSIZE  1024

#ifdef __cplusplus
extern "C" {
#endif

struct sockaddr_in;

int udp_discovery_find_server(int *port, char *address);
int udp_discovery_init(void);
int udp_discovery_broadcast(int fd_discovery, int server_port, const char *server_address);
int udp_discovery_recv(int fd_discovery, char *buf, int timeout,
		       struct sockaddr_in *source);
int udp_discovery_is_valid_search(const char *buf);

#ifdef __cplusplus
};
#endif


#endif // _VDRDISCOVERY_H_