1 # $NetBSD: Makefile,v 1.8 2023/06/03 08:52:58 lukem Exp $ 2 # 3 4 .include "../Makefile.inc" 5 6 .PATH: ${S}/external/bsd/ipf/netinet 7 8 KMOD= ipl # Use "formal" name of ipfilter device to enable autoload 9 10 # Options for opt_ipfilter.h 11 12 CPPFLAGS+= -DIPFILTER_LOG # logging of ip packets 13 #CPPFLAGS+= -DIPFILTER_DEFAULT_BLOCK 14 #CPPFLAGS+= -DIPFILTER_BPF # BPF opcodes in rules 15 #CPPFLAGS+= -DIPFILTER_CKSUM # check layer 4 checksums 16 #CPPFLAGS+= -DIPFILTER_COMPILED # support for compiled IPF rules 17 CPPFLAGS+= -DIPFILTER_LOOKUP # support for ippool(8) 18 #CPPFLAGS+= -DIPFILTER_SCAN # scanning of packet contents 19 #CPPFLAGS+= -DIPFILTER_SYNC # synchronisation of state 20 CPPFLAGS+= -DIPFILTER_COMPAT # IPFilter version compat. 21 22 # IPFILTER_LOGSIZE # size of logging buffer 23 # IPSTATE_MAX # maximum number of references to state table entry 24 # IPSTATE_SIZE # size of state hash table 25 # NAT_TABLE_MAX # maximum number of NAT state entries 26 # NAT_TABLE_SZ # size of NAT state hash table 27 # NAT_SIZE # size of nat rules hash table 28 # RDR_SIZE # size of rdr rules hash table 29 # HOSTMAP_SIZE # size of hostmap hash table 30 31 CPPFLAGS+= -I$S/external/bsd/ipf 32 33 # Other options: 34 35 CPPFLAGS+= -DINET # opt_inet.h 36 CPPFLAGS+= -DINET6 # opt_inet.h 37 CPPFLAGS+= -DIPSEC # opt_ipsec.h 38 39 SRCS+= fil.c 40 SRCS+= ip_auth.c 41 SRCS+= ip_dstlist.c 42 SRCS+= ip_fil_netbsd.c 43 SRCS+= ip_frag.c 44 SRCS+= ip_htable.c 45 SRCS+= ip_log.c 46 SRCS+= ip_lookup.c 47 SRCS+= ip_nat.c 48 SRCS+= ip_nat6.c 49 SRCS+= ip_pool.c 50 SRCS+= ip_proxy.c 51 SRCS+= ip_scan.c 52 SRCS+= ip_state.c 53 SRCS+= ip_sync.c 54 SRCS+= ip_fil_compat.c 55 SRCS+= radix_ipf.c 56 57 WARNS= 3 58 59 CWARNFLAGS.clang+= -Wno-self-assign 60 COPTS.fil.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 61 COPTS.ip_fil_netbsd.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 62 COPTS.ip_htable.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 63 COPTS.ip_nat.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 64 COPTS.ip_nat6.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 65 COPTS.ip_proxy.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 66 COPTS.ip_state.c+= ${CC_WNO_ADDRESS_OF_PACKED_MEMBER} 67 68 .include <bsd.kmodule.mk> 69