File: gnome-talk.h

package info (click to toggle)
gnome-network 1.0.2-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,968 kB
  • ctags: 1,007
  • sloc: ansic: 8,129; sh: 6,837; objc: 961; makefile: 251
file content (56 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (2)
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
/*
 * For a full descritpion of this check BSD's protocol/talkd.h
 *
 * This file just duplicates the interface
 */

#define NAME_SIZE       12
#define TTY_SIZE        16

/* client->server message */
typedef struct {
        guchar   vers;
        guchar   type; 
        guchar   answer; 
        guchar   pad;
        gint32   id_num; 
        struct   osockaddr addr;
        struct   osockaddr ctl_addr;
        gint32 pid;            
        char    l_name[NAME_SIZE];
        char    r_name[NAME_SIZE];
        char    r_tty[TTY_SIZE];
} CTL_MSG;

/* Server to client reponse format */
typedef struct {
	guchar	vers;		
	guchar	type;		
	guchar	answer;		
	guchar	pad;
	gint32  id_num;	
	struct	osockaddr addr;	
} CTL_RESPONSE;

/* Protocol version */
#define	TALK_VERSION	1

typedef enum {
	LEAVE_INVITE,
	LOOK_UP,
	DELETE,
	ANNOUNCE
} MessageType;

typedef enum {
	SUCCESS,
	NOT_HERE,
	FAILED,
	MACHINE_UNKNOWN,
	PERMISSION_DENIED,
	UNKNOWN_REQUEST,
	BADVERSION,
	BADADDR,
	BADCTLADDR
} AnwerType;