Revision 8100,
1.2 KB
checked in by cfields, 29 years ago
(diff) |
remove a column in prototypes
add pc_secure prototype
|
Rev | Line | |
---|
[8055] | 1 | #ifndef _PC_H_ |
---|
| 2 | #define _PC_H_ |
---|
| 3 | #include <sys/types.h> |
---|
| 4 | |
---|
[8073] | 5 | #include "pc_err.h" |
---|
| 6 | |
---|
[8059] | 7 | #ifndef _PC_BSD_H_ |
---|
[8055] | 8 | typedef struct _pc_port pc_port; |
---|
| 9 | typedef struct _pc_state pc_state; |
---|
[8059] | 10 | #endif /* _PC_BSD_H_ */ |
---|
[8055] | 11 | |
---|
| 12 | #define PC_READ 1 |
---|
| 13 | #define PC_WRITE 2 |
---|
| 14 | |
---|
| 15 | typedef 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 | |
---|
| 26 | typedef 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 | |
---|
[8100] | 39 | extern long pc_init(pc_state **); |
---|
| 40 | extern long pc_destroy(pc_state *); |
---|
| 41 | extern long pc_addport(pc_state *, pc_port *); |
---|
| 42 | extern long pc_removeport(pc_state *, pc_port *); |
---|
| 43 | extern long pc_addfd(pc_state *, pc_fd *); |
---|
| 44 | extern long pc_removefd(pc_state *, pc_fd *); |
---|
| 45 | extern long pc_wait(pc_message **, pc_state *); |
---|
| 46 | extern long pc_secure(pc_state *, pc_port *, pc_message *); |
---|
| 47 | extern long pc_makeport(pc_port **, char *, int, |
---|
| 48 | uid_t, gid_t, mode_t); |
---|
| 49 | extern long pc_chprot(pc_port *, uid_t, gid_t, mode_t); |
---|
| 50 | extern long pc_openport(pc_port **, char *); |
---|
| 51 | extern long pc_send(pc_message *); |
---|
| 52 | extern long pc_receive(pc_message **, pc_port *); |
---|
| 53 | extern long pc_close(pc_port *); |
---|
| 54 | extern long pc_freemessage(pc_message *); |
---|
[8055] | 55 | |
---|
| 56 | #endif /* _PC_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.