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-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
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 _SNOOP_H_
   17 #define _SNOOP_H_
   18 
   19 #define SNOOP_MINLEN            (4*1024)        /* This should be power of 2.
   20                                                  * 4K tested to be the minimum
   21                                                  * for which on normal tty
   22                                                  * usage there is no need to
   23                                                  * allocate more.
   24                                                  */
   25 #define SNOOP_MAXLEN            (64*1024)       /* This one also,64K enough
   26                                                  * If we grow more,something
   27                                                  * really bad in this world..
   28                                                  */
   29 
   30 /*
   31  * This is the main snoop per-device
   32  * structure...
   33  */
   34 
   35 struct snoop {
   36         dev_t           snp_target;     /* major/minor number of device*/
   37         struct tty      *snp_tty;       /* tty device pointer          */
   38         u_long          snp_len;        /* buffer data length          */
   39         u_long          snp_base;       /* buffer data base            */
   40         u_long          snp_blen;       /* Overall buffer len          */
   41         caddr_t         snp_buf;        /* Data buffer                 */
   42         int             snp_flags;      /* Flags place                 */
   43 #define SNOOP_NBIO              0x0001
   44 #define SNOOP_ASYNC             0x0002
   45 #define SNOOP_OPEN              0x0004
   46 #define SNOOP_RWAIT             0x0008
   47 #define SNOOP_OFLOW             0x0010
   48 #define SNOOP_DOWN              0x0020
   49         struct selinfo  snp_sel;        /* Selection info              */
   50 };
   51 
   52 /*
   53  * Theese are snoop io controls
   54  * SNPSTTY accepts 'struct snptty' as input.
   55  * If ever type or  unit set to -1,snoop device
   56  * detached from it's current tty.
   57  */
   58 
   59 #define SNPSTTY       _IOW('T', 90, dev_t)
   60 #define SNPGTTY       _IOR('T', 89, dev_t)
   61 
   62 /*
   63  * Theese values would be returned by FIONREAD ioctl
   64  * instead of number of characters in buffer in case
   65  * of specific errors.
   66  */
   67 #define SNP_OFLOW               -1
   68 #define SNP_TTYCLOSE            -2
   69 #define SNP_DETACH              -3
   70 
   71 #ifdef KERNEL
   72 /* XXX several wrong storage classes and types here. */
   73 int     snpdown __P((struct snoop *snp));
   74 int     snpin __P((struct snoop *snp, char *buf, int n));
   75 int     snpinc __P((struct snoop *snp, char c));
   76 #endif /* KERNEL */
   77 
   78 #endif /* _SNOOP_H_ */

Cache object: 5aad03a41f05c1fe4d10dd690e783bb9


[ 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.