Print this page
3484 enhance and document tail follow support
Reviewed by: Joshua M. Clulow <jmc@joyent.com>


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 




  27 #ifndef _SYS_PORT_H
  28 #define _SYS_PORT_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #ifdef  __cplusplus
  33 extern "C" {
  34 #endif
  35 
  36 #include <sys/types.h>
  37 
  38 /* port sources */
  39 #define PORT_SOURCE_AIO         1
  40 #define PORT_SOURCE_TIMER       2
  41 #define PORT_SOURCE_USER        3
  42 #define PORT_SOURCE_FD          4
  43 #define PORT_SOURCE_ALERT       5
  44 #define PORT_SOURCE_MQ          6
  45 #define PORT_SOURCE_FILE        7
  46 
  47 typedef struct port_event {
  48         int             portev_events;  /* event data is source specific */
  49         ushort_t        portev_source;  /* event source */
  50         ushort_t        portev_pad;     /* port internal use */
  51         uintptr_t       portev_object;  /* source specific object */


  89         caddr32_t       portnfy_user;   /* user defined */
  90 } port_notify32_t;
  91 
  92 #endif /* _SYSCALL32 */
  93 
  94 /* port_alert() flags */
  95 #define PORT_ALERT_SET          0x01
  96 #define PORT_ALERT_UPDATE       0x02
  97 #define PORT_ALERT_INVALID      (PORT_ALERT_SET | PORT_ALERT_UPDATE)
  98 
  99 /*
 100  * PORT_SOURCE_FILE - events
 101  */
 102 
 103 /*
 104  * User watchable file events
 105  */
 106 #define FILE_ACCESS             0x00000001
 107 #define FILE_MODIFIED           0x00000002
 108 #define FILE_ATTRIB             0x00000004

 109 #define FILE_NOFOLLOW           0x10000000
 110 
 111 /*
 112  * exception file events
 113  */
 114 
 115 /*
 116  * The watched file..
 117  */
 118 #define FILE_DELETE             0x00000010
 119 #define FILE_RENAME_TO          0x00000020
 120 #define FILE_RENAME_FROM        0x00000040
 121 /*
 122  * The filesystem on which the watched file resides got
 123  * unmounted.
 124  */
 125 #define UNMOUNTED               0x20000000
 126 /*
 127  * Some other file/filesystem got mounted over the
 128  * watched file/directory.


   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*
  28  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  29  */
  30 
  31 #ifndef _SYS_PORT_H
  32 #define _SYS_PORT_H
  33 


  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 #include <sys/types.h>
  39 
  40 /* port sources */
  41 #define PORT_SOURCE_AIO         1
  42 #define PORT_SOURCE_TIMER       2
  43 #define PORT_SOURCE_USER        3
  44 #define PORT_SOURCE_FD          4
  45 #define PORT_SOURCE_ALERT       5
  46 #define PORT_SOURCE_MQ          6
  47 #define PORT_SOURCE_FILE        7
  48 
  49 typedef struct port_event {
  50         int             portev_events;  /* event data is source specific */
  51         ushort_t        portev_source;  /* event source */
  52         ushort_t        portev_pad;     /* port internal use */
  53         uintptr_t       portev_object;  /* source specific object */


  91         caddr32_t       portnfy_user;   /* user defined */
  92 } port_notify32_t;
  93 
  94 #endif /* _SYSCALL32 */
  95 
  96 /* port_alert() flags */
  97 #define PORT_ALERT_SET          0x01
  98 #define PORT_ALERT_UPDATE       0x02
  99 #define PORT_ALERT_INVALID      (PORT_ALERT_SET | PORT_ALERT_UPDATE)
 100 
 101 /*
 102  * PORT_SOURCE_FILE - events
 103  */
 104 
 105 /*
 106  * User watchable file events
 107  */
 108 #define FILE_ACCESS             0x00000001
 109 #define FILE_MODIFIED           0x00000002
 110 #define FILE_ATTRIB             0x00000004
 111 #define FILE_TRUNC              0x00100000
 112 #define FILE_NOFOLLOW           0x10000000
 113 
 114 /*
 115  * exception file events
 116  */
 117 
 118 /*
 119  * The watched file..
 120  */
 121 #define FILE_DELETE             0x00000010
 122 #define FILE_RENAME_TO          0x00000020
 123 #define FILE_RENAME_FROM        0x00000040
 124 /*
 125  * The filesystem on which the watched file resides got
 126  * unmounted.
 127  */
 128 #define UNMOUNTED               0x20000000
 129 /*
 130  * Some other file/filesystem got mounted over the
 131  * watched file/directory.