source: trunk/athena/etc/xdm/misc/pc.h @ 8093

Revision 8093, 1.2 KB checked in by cfields, 29 years ago (diff)
add pc_destroy
Line 
1#ifndef _PC_H_
2#define _PC_H_
3#include <sys/types.h>
4
5#include "pc_err.h"
6
7#ifndef _PC_BSD_H_
8typedef struct _pc_port pc_port;
9typedef struct _pc_state pc_state;
10#endif /* _PC_BSD_H_ */
11
12#define PC_READ 1
13#define PC_WRITE 2
14
15typedef struct {
16        int fd;
17        int events;
18} pc_fd;
19
20#define PC_BROKEN 0
21#define PC_DATA 1
22#define PC_FD 2
23#define PC_SIGNAL 3
24#define PC_NEWCONN 4
25
26typedef struct {
27  int type;
28  int fd, event;
29
30  pc_port *source;
31  int length;
32  void *data;
33} pc_message;
34
35#define PC_GRAB 1
36#define PC_CHOWN 2
37#define PC_CHMOD 4
38
39extern long             pc_init(pc_state **);
40extern long             pc_destroy(pc_state *);
41extern long             pc_addport(pc_state *, pc_port *);
42extern long             pc_removeport(pc_state *, pc_port *);
43extern long             pc_addfd(pc_state *, pc_fd *);
44extern long             pc_removefd(pc_state *, pc_fd *);
45extern long             pc_wait(pc_message **, pc_state *);
46
47extern long             pc_makeport(pc_port **, char *, int,
48                                    uid_t, gid_t, mode_t);
49extern long             pc_chprot(pc_port *, uid_t, gid_t, mode_t);
50extern long             pc_openport(pc_port **, char *);
51extern long             pc_send(pc_message *);
52extern long             pc_receive(pc_message **, pc_port *);
53extern long             pc_close(pc_port *);
54extern long             pc_freemessage(pc_message *);
55
56#endif /* _PC_H_ */
Note: See TracBrowser for help on using the repository browser.