Print this page
Only exploit ipf state keeping for CFW logging.

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
   1    1  /*
   2    2   * Copyright (C) 1993-2001, 2003 by Darren Reed.
   3    3   *
   4    4   * See the IPFILTER.LICENCE file for details on licencing.
   5    5   *
   6    6   * @(#)ip_fil.h 1.35 6/5/96
   7    7   * $Id: ip_fil.h,v 2.170.2.22 2005/07/16 05:55:35 darrenr Exp $
   8    8   *
   9    9   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  10   10   *
  11      - * Copyright (c) 2014, Joyent, Inc.  All rights reserved.
       11 + * Copyright 2019, Joyent, Inc.
  12   12   */
  13   13  
  14   14  #ifndef __IP_FIL_H__
  15   15  #define __IP_FIL_H__
  16   16  
  17   17  #include "netinet/ip_compat.h"
  18   18  #include <sys/zone.h>
  19   19  
  20   20  #ifdef  SOLARIS
  21   21  #undef  SOLARIS
↓ open down ↓ 1530 lines elided ↑ open up ↑
1552 1552                                       ipf_stack_t *));
1553 1553  
1554 1554  extern  int     fr_loginit __P((ipf_stack_t *));
1555 1555  extern  int     ipflog_clear __P((minor_t, ipf_stack_t *));
1556 1556  extern  int     ipflog_read __P((minor_t, struct uio *, ipf_stack_t *));
1557 1557  extern  int     ipflog __P((fr_info_t *, u_int));
1558 1558  extern  int     ipllog __P((int, fr_info_t *, void **, size_t *, int *, int,
1559 1559                              ipf_stack_t *));
1560 1560  extern  void    fr_logunload __P((ipf_stack_t *));
1561 1561  
     1562 +/* SmartOS single-FD global-zone state accumulator (see cfw.c) */
     1563 +extern boolean_t ipf_cfwlog_enabled;
     1564 +struct ipstate; /* Ugggh. */
     1565 +extern void ipf_log_cfwlog __P((struct ipstate *, uint_t, ipf_stack_t *));
     1566 +extern void ipf_block_cfwlog __P((frentry_t *, fr_info_t *, ipf_stack_t *));
     1567 +#define IFS_CFWLOG(ifs) ((ifs)->ifs_gz_controlled && ipf_cfwlog_enabled)
     1568 +
     1569 +
1562 1570  extern  frentry_t       *fr_acctpkt __P((fr_info_t *, u_32_t *));
1563 1571  extern  int             fr_copytolog __P((int, char *, int));
1564 1572  extern  u_short         fr_cksum __P((mb_t *, ip_t *, int, void *));
1565 1573  extern  void            fr_deinitialise __P((ipf_stack_t *));
1566 1574  extern  frentry_t       *fr_dolog __P((fr_info_t *, u_32_t *));
1567 1575  extern  frentry_t       *fr_dstgrpmap __P((fr_info_t *, u_32_t *));
1568 1576  extern  void            fr_fixskip __P((frentry_t **, frentry_t *, int));
1569 1577  extern  void            fr_forgetifp __P((void *, ipf_stack_t *));
1570 1578  extern  frentry_t       *fr_getrulen __P((int, char *, u_32_t, 
1571 1579                                            ipf_stack_t *));
↓ open down ↓ 50 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX