Print this page
OS-7667 IPFilter needs to keep and report state for cloud firewall logging
Portions contributed by: Mike Gerdts <mike.gerdts@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ipf/tools/ipmon_y.y
          +++ new/usr/src/cmd/ipf/tools/ipmon_y.y
   1    1  /*
   2    2   * Copyright (C) 1993-2005  by Darren Reed.
   3    3   * See the IPFILTER.LICENCE file for details on licencing.
        4 + *
        5 + * Copyright 2019 Joyent, Inc.
   4    6   */ 
   5    7  
   6    8  %{
   7    9  #include "ipf.h"
   8   10  #include <syslog.h>
       11 +#include <uuid/uuid.h>
   9   12  #undef  OPT_NAT
  10   13  #undef  OPT_VERBOSE
  11   14  #include "ipmon_l.h"
  12   15  #include "ipmon.h"
  13   16  
  14   17  #define YYDEBUG 1
  15   18  
  16   19  extern  void    yyerror __P((char *));
  17   20  extern  int     yyparse __P((void));
  18   21  extern  int     yylex __P((void));
↓ open down ↓ 16 lines elided ↑ open up ↑
  35   38  
  36   39  static  ipmon_action_t  *alist = NULL;
  37   40  %}
  38   41  
  39   42  %union  {
  40   43          char    *str;
  41   44          u_32_t  num;
  42   45          struct in_addr  addr;
  43   46          struct opt      *opt;
  44   47          union   i6addr  ip6;
       48 +        uuid_t  uuid;
  45   49  }
  46   50  
  47   51  %token  <num>   YY_NUMBER YY_HEX
  48   52  %token  <str>   YY_STR
  49   53  %token  <ip6>   YY_IPV6
       54 +%token  <uuid>  YY_UUID
  50   55  %token  YY_COMMENT 
  51   56  %token  YY_CMP_EQ YY_CMP_NE YY_CMP_LE YY_CMP_GE YY_CMP_LT YY_CMP_GT
  52   57  %token  YY_RANGE_OUT YY_RANGE_IN
  53   58  
  54   59  %token  IPM_MATCH IPM_BODY IPM_COMMENT IPM_DIRECTION IPM_DSTIP IPM_DSTPORT
  55   60  %token  IPM_EVERY IPM_EXECUTE IPM_GROUP IPM_INTERFACE IPM_IN IPM_NO IPM_OUT
  56   61  %token  IPM_PACKET IPM_PACKETS IPM_POOL IPM_PROTOCOL IPM_RESULT IPM_RULE
  57   62  %token  IPM_SECOND IPM_SECONDS IPM_SRCIP IPM_SRCPORT IPM_LOGTAG IPM_WITH
  58   63  %token  IPM_DO IPM_SAVE IPM_SYSLOG IPM_NOTHING IPM_RAW IPM_TYPE IPM_NAT
  59   64  %token  IPM_STATE IPM_NATTAG IPM_IPF
↓ open down ↓ 641 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX