The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/snoop.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright (c) 1995 Ugen J.S.Antsilevich
    3  *
    4  * Redistribution and use in source forms, with and without modification,
    5  * are permitted provided that this entire comment appears intact.
    6  *
    7  * Redistribution in binary form may occur without any restrictions.
    8  * Obviously, it would be nice if you gave credit where credit is due
    9  * but requiring it would be too onerous.
   10  *
   11  * This software is provided ``AS IS'' without any warranties of any kind.
   12  *
   13  * Snoop stuff.
   14  */
   15 
   16 #ifndef _SYS_SNOOP_H_
   17 #define _SYS_SNOOP_H_
   18 
   19 #ifndef KERNEL
   20 #include <sys/types.h>
   21 #endif
   22 #include <sys/ioccom.h>
   23 
   24 #ifdef KERNEL
   25 #define SNOOP_MINLEN            (4*1024)        /* This should be power of 2.
   26                                                  * 4K tested to be the minimum
   27                                                  * for which on normal tty
   28                                                  * usage there is no need to
   29                                                  * allocate more.
   30                                                  */
   31 #define SNOOP_MAXLEN            (64*1024)       /* This one also,64K enough
   32                                                  * If we grow more,something
   33                                                  * really bad in this world..
   34                                                  */
   35 
   36 /*
   37  * This is the main snoop per-device
   38  * structure...
   39  */
   40 
   41 struct snoop {
   42         dev_t           snp_target;     /* major/minor number of device*/
   43         struct tty      *snp_tty;       /* tty device pointer          */
   44         u_long          snp_len;        /* buffer data length          */
   45         u_long          snp_base;       /* buffer data base            */
   46         u_long          snp_blen;       /* Overall buffer len          */
   47         caddr_t         snp_buf;        /* Data buffer                 */
   48         int             snp_flags;      /* Flags place                 */
   49 #define SNOOP_ASYNC             0x0002
   50 #define SNOOP_OPEN              0x0004
   51 #define SNOOP_RWAIT             0x0008
   52 #define SNOOP_OFLOW             0x0010
   53 #define SNOOP_DOWN              0x0020
   54         struct selinfo  snp_sel;        /* Selection info              */
   55 };
   56 
   57 /* XXX several wrong storage classes and types here. */
   58 int     snpdown __P((struct snoop *snp));
   59 int     snpin __P((struct snoop *snp, char *buf, int n));
   60 int     snpinc __P((struct snoop *snp, char c));
   61 #endif /* KERNEL */
   62 
   63 /*
   64  * Theese are snoop io controls
   65  * SNPSTTY accepts 'struct snptty' as input.
   66  * If ever type or  unit set to -1,snoop device
   67  * detached from its current tty.
   68  */
   69 
   70 #define SNPSTTY       _IOW('T', 90, dev_t)
   71 #define SNPGTTY       _IOR('T', 89, dev_t)
   72 
   73 /*
   74  * Theese values would be returned by FIONREAD ioctl
   75  * instead of number of characters in buffer in case
   76  * of specific errors.
   77  */
   78 #define SNP_OFLOW               -1
   79 #define SNP_TTYCLOSE            -2
   80 #define SNP_DETACH              -3
   81 
   82 #endif /* !_SYS_SNOOP_H_ */

Cache object: 58469932cf70d6e0d8661fc43fe66a18


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.