Print this page
%B


  62 #define MOD_PROP_PERM_READ      0x1
  63 #define MOD_PROP_PERM_WRITE     0x2
  64 #define MOD_PROP_PERM_RW        (MOD_PROP_PERM_READ|MOD_PROP_PERM_WRITE)
  65 
  66 /* mpr_flags values */
  67 #define MOD_PROP_ACTIVE         0x01    /* current value of the property */
  68 #define MOD_PROP_DEFAULT        0x02    /* default value of the property */
  69 #define MOD_PROP_POSSIBLE       0x04    /* possible values for the property */
  70 #define MOD_PROP_PERM           0x08    /* read/write permission for property */
  71 #define MOD_PROP_APPEND         0x10    /* append to multi-valued property */
  72 #define MOD_PROP_REMOVE         0x20    /* remove from multi-valued property */
  73 
  74 /* mpr_proto values */
  75 #define MOD_PROTO_NONE          0x00
  76 #define MOD_PROTO_IPV4          0x01    /* property is applicable to IPV4 */
  77 #define MOD_PROTO_IPV6          0x02    /* property is applicable to IPV6 */
  78 #define MOD_PROTO_RAWIP         0x04    /* property is applicable to ICMP */
  79 #define MOD_PROTO_TCP           0x08    /* property is applicable to TCP */
  80 #define MOD_PROTO_UDP           0x10    /* property is applicable to UDP */
  81 #define MOD_PROTO_SCTP          0x20    /* property is applicable to SCTP */

  82 
  83 /* property is applicable to both IPV[4|6] */
  84 #define MOD_PROTO_IP            (MOD_PROTO_IPV4|MOD_PROTO_IPV6)
  85 
  86 #ifdef  _KERNEL
  87 
  88 typedef struct mod_prop_info_s mod_prop_info_t;
  89 
  90 /* set/get property callback functions */
  91 typedef int     mod_prop_setf_t(void *, cred_t *, mod_prop_info_t *,
  92                     const char *, const void *, uint_t);
  93 typedef int     mod_prop_getf_t(void *, mod_prop_info_t *, const char *,
  94                     void *val, uint_t, uint_t);
  95 
  96 typedef struct mod_propval_uint32_s {
  97         uint32_t        mod_propval_umin;
  98         uint32_t        mod_propval_umax;
  99         uint32_t        mod_propval_ucur;
 100 } mod_propval_uint32_t;
 101 




  62 #define MOD_PROP_PERM_READ      0x1
  63 #define MOD_PROP_PERM_WRITE     0x2
  64 #define MOD_PROP_PERM_RW        (MOD_PROP_PERM_READ|MOD_PROP_PERM_WRITE)
  65 
  66 /* mpr_flags values */
  67 #define MOD_PROP_ACTIVE         0x01    /* current value of the property */
  68 #define MOD_PROP_DEFAULT        0x02    /* default value of the property */
  69 #define MOD_PROP_POSSIBLE       0x04    /* possible values for the property */
  70 #define MOD_PROP_PERM           0x08    /* read/write permission for property */
  71 #define MOD_PROP_APPEND         0x10    /* append to multi-valued property */
  72 #define MOD_PROP_REMOVE         0x20    /* remove from multi-valued property */
  73 
  74 /* mpr_proto values */
  75 #define MOD_PROTO_NONE          0x00
  76 #define MOD_PROTO_IPV4          0x01    /* property is applicable to IPV4 */
  77 #define MOD_PROTO_IPV6          0x02    /* property is applicable to IPV6 */
  78 #define MOD_PROTO_RAWIP         0x04    /* property is applicable to ICMP */
  79 #define MOD_PROTO_TCP           0x08    /* property is applicable to TCP */
  80 #define MOD_PROTO_UDP           0x10    /* property is applicable to UDP */
  81 #define MOD_PROTO_SCTP          0x20    /* property is applicable to SCTP */
  82 #define MOD_PROTO_DCCP          0x40    /* property is applicable to DCCP */
  83 
  84 /* property is applicable to both IPV[4|6] */
  85 #define MOD_PROTO_IP            (MOD_PROTO_IPV4|MOD_PROTO_IPV6)
  86 
  87 #ifdef  _KERNEL
  88 
  89 typedef struct mod_prop_info_s mod_prop_info_t;
  90 
  91 /* set/get property callback functions */
  92 typedef int     mod_prop_setf_t(void *, cred_t *, mod_prop_info_t *,
  93                     const char *, const void *, uint_t);
  94 typedef int     mod_prop_getf_t(void *, mod_prop_info_t *, const char *,
  95                     void *val, uint_t, uint_t);
  96 
  97 typedef struct mod_propval_uint32_s {
  98         uint32_t        mod_propval_umin;
  99         uint32_t        mod_propval_umax;
 100         uint32_t        mod_propval_ucur;
 101 } mod_propval_uint32_t;
 102