aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sympathyd.c
blob: 4845c95c27866344aeda50bab0abbcc8ae725a29 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * sympathy.c:
 *
 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id$";

/*
 * $Log$
 * Revision 1.3  2008/02/08 15:06:52  james
 * *** empty log message ***
 *
 * Revision 1.2  2008/02/07 15:42:49  james
 * *** empty log message ***
 *
 * Revision 1.1  2008/02/05 14:25:49  james
 * *** empty log message ***
 *
 */

#include "sympathy.h"
#include "ipc.h"

#include "../src/crt.h"
#include "../src/vt102.h"


int main(int argc,char *argv[])
{
int fd;
struct sockaddr_un sun={0};

fd=socket(PF_UNIX,SOCK_STREAM,0);
if (fd<0) {
	perror("socket");
	exit(1);
}

sun.sun_family=AF_UNIX;
strcpy(sun.sun_path,SOCKPATH);

unlink(SOCKPATH);

if (bind(fd,(struct sockaddr *) &sun,sizeof(sun))<0)  {
	perror("bind");
	exit(1);
}

if (listen(fd,5)<0) {
	perror("listen");
	exit(1);
}


printf("sizeof(VT102)=%d\n",sizeof(VT102));

}