home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (C) 1990 Keith Gabryelski (ag@amix.commodore.com)
-
- This file is part of advise.
-
- advise is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY. No author or distributor
- accepts responsibility to anyone for the consequences of using it
- or for whether it serves any particular purpose or works at all,
- unless he says so in writing. Refer to the advise General Public
- License for full details.
-
- Everyone is granted permission to copy, modify and redistribute
- advise, but only under the conditions described in the
- advise General Public License. A copy of this license is
- supposed to have been given to you along with advise so you
- can know your rights and responsibilities. It should be in a
- file named COPYING. Among other things, the copyright notice
- and this notice must be preserved on all copies. */
-
- /*
- ** Author: Keith Gabryelski (ag@amix.commodore.com)
- */
-
- struct advise_queue_list
- {
- mblk_t *savbp; /* ptr to this mblk for freeb()ing */
- queue_t *q; /* advisor's queue */
- int minord; /* minor device for this advisor */
- int wdir; /* direction of writes */
- struct advise_state *state; /* ptr back to advise_state struct */
- struct advise_queue_list *next; /* ptr to next advisor */
- };
-
- struct advise_state
- {
- mblk_t *savbp; /* ptr to this mblk for freeb()ing */
- int status; /* current status */
- dev_t dev; /* our device */
- queue_t *q; /* queue for advisor writing */
- struct advise_queue_list *q_wlist, *q_rlist; /* lists of spies */
- struct advise_state *next; /* next in advise_table */
- };
-
- #define ALLOW_ADVICE (0x01)
-
- struct advise_message
- {
- int type; /* What type of data is this? */
- };
-
- #define ADVISE_DATA (0x00)
- #define ADVISE_READDATA (0x01)
-
- #ifdef sun
- #define ADVISE_SETADVISEEWR _IOW(z, 1, dev_t)
- #define ADVISE_SETADVISEERD _IOW(z, 2, dev_t)
- #define ADVISE_ALLOW _IO(z, 3)
- #define ADVISE_DENY _IO(z, 4)
- #define ADVISE_STATUS _IOR(z, 5, int)
- #else
- #define ADVISE ('z'<<16)
- #define ADVISE_SETADVISEEWR (ADVISE|0x01)
- #define ADVISE_SETADVISEERD (ADVISE|0x02)
- #define ADVISE_ALLOW (ADVISE|0x03)
- #define ADVISE_DENY (ADVISE|0x04)
- #define ADVISE_STATUS (ADVISE|0x05)
- #endif /* sun */
-
- #define spladvise spltty
-
- #define ADVMODNAME "advmod"
-