[9] | 1 | /*
|
---|
| 2 | sr.h
|
---|
| 3 |
|
---|
| 4 | Copyright 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 |
|
---|
| 23 | struct acc;
|
---|
| 24 |
|
---|
| 25 | /* prototypes */
|
---|
| 26 |
|
---|
| 27 | typedef 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 ));
|
---|
| 30 | typedef void (*sr_close_t) ARGS(( int fd ));
|
---|
| 31 | typedef int (*sr_read_t) ARGS(( int fd, size_t count ));
|
---|
| 32 | typedef int (*sr_write_t) ARGS(( int fd, size_t count ));
|
---|
| 33 | typedef int (*sr_ioctl_t) ARGS(( int fd, ioreq_t req ));
|
---|
| 34 | typedef int (*sr_cancel_t) ARGS(( int fd, int which_operation ));
|
---|
| 35 | typedef int (*sr_select_t) ARGS(( int fd, unsigned operations ));
|
---|
| 36 |
|
---|
| 37 | void sr_init ARGS(( void ));
|
---|
| 38 | void 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.) */
|
---|
| 45 | EXTERN sr_cancel_t tcp_cancel_f;
|
---|
| 46 |
|
---|
| 47 | /*
|
---|
| 48 | * $PchId: sr.h,v 1.9 2005/06/28 14:19:51 philip Exp $
|
---|
| 49 | */
|
---|