Print this page
More stats to SIOCIPFCFWCFG and add SIOCIPFCFWNEWSZ to affect ring-buffer size.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ipf/netinet/ip_fil.h
          +++ new/usr/src/uts/common/inet/ipf/netinet/ip_fil.h
↓ open down ↓ 108 lines elided ↑ open up ↑
 109  109  # define        SIOCIPFITER     _IOWR(r, 92, struct ipfobj)
 110  110  # define        SIOCGENITER     _IOWR(r, 93, struct ipfobj)
 111  111  # define        SIOCGTABL       _IOWR(r, 94, struct ipfobj)
 112  112  # define        SIOCIPFDELTOK   _IOWR(r, 95, int)
 113  113  # define        SIOCLOOKUPITER  _IOWR(r, 96, struct ipfobj)
 114  114  #endif
 115  115  #define SIOCADDFR       SIOCADAFR
 116  116  #define SIOCDELFR       SIOCRMAFR
 117  117  #define SIOCINSFR       SIOCINAFR
 118  118  # define        SIOCIPFZONESET  _IOWR('r', 97, struct ipfzoneobj)
 119      -# define        SIOCIPFCFWCFG   _IOWR('r', 98, struct ipfcfwcfg)
      119 +# define        SIOCIPFCFWCFG   _IOR('r', 98, struct ipfcfwcfg)
      120 +# define        SIOCIPFCFWNEWSZ _IOWR('r', 99, struct ipfcfwcfg)
 120  121  
 121  122  /*
 122  123   * What type of table is getting flushed?
 123  124   */
 124  125  
 125  126  #define NAT_FLUSH       1
 126  127  #define STATE_FLUSH     2
 127  128  
 128  129  /*
 129  130   * What table flush options are available?
↓ open down ↓ 1052 lines elided ↑ open up ↑
1182 1183   * ioctl struct for setting what zone further ioctls will act on. ipfz_gz is a
1183 1184   * boolean: set it to 1 to operate on the GZ-controlled stack.
1184 1185   */
1185 1186  typedef struct  ipfzoneobj      {
1186 1187          u_32_t          ipfz_gz;                        /* GZ stack boolean */
1187 1188          char            ipfz_zonename[ZONENAME_MAX];    /* zone to act on */
1188 1189  } ipfzoneobj_t;
1189 1190  
1190 1191  /* ioctl to grab CFW logging parameters */
1191 1192  typedef struct ipfcfwcfg {
     1193 +        /* CFG => Max event size, NEWSZ => ignored in, like CFG out. */
1192 1194          uint32_t ipfcfwc_maxevsize;
     1195 +        /*
     1196 +         * CFG => Current ring size,
     1197 +         * NEWSZ => New ring size, must be 2^N for 10 <= N <= 31.
     1198 +         */
1193 1199          uint32_t ipfcfwc_evringsize;
     1200 +        /* CFG => Number of event reports, NEWSZ => ignored in, like CFG out. */
     1201 +        uint64_t ipfcfwc_evreports;
     1202 +        /* CFG => Number of event drops, NEWSZ => ignored in, like CFG out. */
     1203 +        uint64_t ipfcfwc_evdrops;
1194 1204  } ipfcfwcfg_t;
1195 1205  
1196 1206  #if defined(_KERNEL)
1197 1207  /* Set ipfs_zoneid to this if no zone has been set: */
1198 1208  #define IPFS_ZONE_UNSET -2
1199 1209  
1200 1210  typedef struct  ipf_devstate    {
1201 1211          zoneid_t        ipfs_zoneid;
1202 1212          minor_t         ipfs_minor;
1203 1213          boolean_t       ipfs_gz;
↓ open down ↓ 376 lines elided ↑ open up ↑
1580 1590  #define IFS_CFWLOG(ifs, fr) ((ifs)->ifs_gz_controlled && ipf_cfwlog_enabled &&\
1581 1591          fr != NULL && ((fr)->fr_flags & FR_CFWLOG))
1582 1592  struct cfwev_s; /* See ipf_cfw.h */
1583 1593  extern boolean_t ipf_cfwev_consume __P((struct cfwev_s *, boolean_t));
1584 1594  /* See cfw.c's ipf_cfwev_consume_many() for details. */
1585 1595  typedef uint_t (*cfwmanycb_t) __P((struct cfwev_s *, uint_t, void *));
1586 1596  extern uint_t
1587 1597          ipf_cfwev_consume_many __P((uint_t, boolean_t, cfwmanycb_t, void *));
1588 1598  extern int ipf_cfwlog_read __P((dev_t, struct uio *, struct cred *));
1589 1599  extern int ipf_cfwlog_ioctl __P((dev_t, int, intptr_t, int, cred_t *, int *));
     1600 +#define IPF_CFW_RING_ALLOCATE 0
     1601 +#define IPF_CFW_RING_DESTROY 1
     1602 +extern int ipf_cfw_ring_resize(uint32_t);
1590 1603  
1591 1604  extern  frentry_t       *fr_acctpkt __P((fr_info_t *, u_32_t *));
1592 1605  extern  int             fr_copytolog __P((int, char *, int));
1593 1606  extern  u_short         fr_cksum __P((mb_t *, ip_t *, int, void *));
1594 1607  extern  void            fr_deinitialise __P((ipf_stack_t *));
1595 1608  extern  frentry_t       *fr_dolog __P((fr_info_t *, u_32_t *));
1596 1609  extern  frentry_t       *fr_dstgrpmap __P((fr_info_t *, u_32_t *));
1597 1610  extern  void            fr_fixskip __P((frentry_t **, frentry_t *, int));
1598 1611  extern  void            fr_forgetifp __P((void *, ipf_stack_t *));
1599 1612  extern  frentry_t       *fr_getrulen __P((int, char *, u_32_t, 
↓ open down ↓ 51 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX