source: trunk/minix/servers/inet/generic/sr.h@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 1.2 KB
Line 
1/*
2sr.h
3
4Copyright 1995 Philip Homburg
5*/
6
7#ifndef SR_H
8#define SR_H
9
10#define MAX_IOCTL_S 512
11
12#define SR_CANCEL_IOCTL 1
13#define SR_CANCEL_READ 2
14#define SR_CANCEL_WRITE 3
15
16#define SR_SELECT_READ 0x01
17#define SR_SELECT_WRITE 0x02
18#define SR_SELECT_EXCEPTION 0x04
19#define SR_SELECT_POLL 0x10
20
21/* Forward struct declarations */
22
23struct acc;
24
25/* prototypes */
26
27typedef int (*sr_open_t) ARGS(( int port, int srfd,
28 get_userdata_t get_userdata, put_userdata_t put_userdata,
29 put_pkt_t put_pkt, select_res_t select_res ));
30typedef void (*sr_close_t) ARGS(( int fd ));
31typedef int (*sr_read_t) ARGS(( int fd, size_t count ));
32typedef int (*sr_write_t) ARGS(( int fd, size_t count ));
33typedef int (*sr_ioctl_t) ARGS(( int fd, ioreq_t req ));
34typedef int (*sr_cancel_t) ARGS(( int fd, int which_operation ));
35typedef int (*sr_select_t) ARGS(( int fd, unsigned operations ));
36
37void sr_init ARGS(( void ));
38void sr_add_minor ARGS(( int minor, int port, sr_open_t openf,
39 sr_close_t closef, sr_read_t sr_read, sr_write_t sr_write,
40 sr_ioctl_t ioctlf, sr_cancel_t cancelf, sr_select_t selectf ));
41
42#endif /* SR_H */
43
44/* Track TCP connections back into sr (for lsof, identd, etc.) */
45EXTERN sr_cancel_t tcp_cancel_f;
46
47/*
48 * $PchId: sr.h,v 1.9 2005/06/28 14:19:51 philip Exp $
49 */
Note: See TracBrowser for help on using the repository browser.