Annotation of embedaddon/mpd/src/rep.h, revision 1.1.1.1
1.1 misho 1:
2: /*
3: * rep.h
4: *
5: * Written by Alexander Motin <mav@FreeBSD.org>
6: */
7:
8: #ifndef _REP_H_
9: #define _REP_H_
10:
11: #include "defs.h"
12: #include "msg.h"
13: #include "command.h"
14: #include <netgraph/ng_message.h>
15:
16: /*
17: * DEFINITIONS
18: */
19:
20: /* Total state of a repeater */
21: struct rep {
22: char name[LINK_MAX_NAME]; /* Name of this repeater */
23: int id; /* Index of this link in gReps */
24: int csock; /* Socket node control socket */
25: ng_ID_t node_id; /* ng_tee node ID */
26: Link links[2]; /* Links used by repeater */
27: int refs; /* Number of references */
28: u_char p_up; /* Up phys */
29: u_char dead; /* Dead flag */
30: };
31:
32: /*
33: * VARIABLES
34: */
35:
36: extern const struct cmdtab RepSetCmds[];
37:
38: /*
39: * FUNCTIONS
40: */
41:
42: extern int RepStat(Context ctx, int ac, char *av[], void *arg);
43: extern int RepCommand(Context ctx, int ac, char *av[], void *arg);
44: extern int RepCreate(Link in, const char *out);
45: extern void RepShutdown(Rep r);
46:
47: extern void RepIncoming(Link l);
48: extern int RepIsSync(Link l); /* Is pair link is synchronous */
49: extern void RepSetAccm(Link l, u_int32_t xmit, u_int32_t recv); /* Set async accm */
50: extern void RepUp(Link l);
51: extern void RepDown(Link l);
52: extern int RepGetHook(Link l, char *path, char *hook);
53: extern Rep RepFind(char *name);
54:
55: #endif
56:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>