1LIB= pcap 2SHLIB_MAJOR=3 3 4SRCDIR= ${.CURDIR}/../../contrib/libpcap 5WARNS?= 2 6 7.PATH: ${SRCDIR} 8SRCS= bpf_dump.c \ 9 bpf_filter.c \ 10 bpf_image.c \ 11 etherent.c \ 12 fad-getad.c \ 13 fmtutils.c \ 14 gencode.c \ 15 nametoaddr.c \ 16 optimize.c \ 17 pcap-bpf.c \ 18 pcap-common.c \ 19 pcap.c \ 20 savefile.c \ 21 sf-pcap.c \ 22 sf-pcapng.c 23 24SRCS+= scanner.l scanner.h 25CLEANFILES+=scanner.h 26LFLAGS+=-Ppcap_ --header-file=${.OBJDIR}/scanner.h --nounput 27scanner.h: scanner.c 28 29SRCS+= grammar.y 30YFLAGS+=-p pcap_ 31 32CFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR} -I${.OBJDIR} -I${SRCDIR} 33CFLAGS+=-D_U_="__attribute__((unused))" 34CFLAGS+=-DHAVE_STRUCT_ETHER_ADDR -DHAVE_NET_PFVAR_H 35.if !defined(NOINET6) 36CFLAGS+=-DINET6 37.endif 38 39# Old compatibility headers 40INCS= pcap.h \ 41 pcap-bpf.h \ 42 pcap-namedb.h 43 44PCAPINCS= \ 45 pcap/bluetooth.h \ 46 pcap/bpf.h \ 47 pcap/can_socketcan.h \ 48 pcap/compiler-tests.h \ 49 pcap/dlt.h \ 50 pcap/funcattrs.h \ 51 pcap/ipnet.h \ 52 pcap/namedb.h \ 53 pcap/nflog.h \ 54 pcap/pcap-inttypes.h \ 55 pcap/pcap.h \ 56 pcap/sll.h \ 57 pcap/socket.h \ 58 pcap/usb.h \ 59 pcap/vlan.h 60 61PCAPINCSDIR= ${INCLUDEDIR}/pcap 62INCSGROUPS= INCS PCAPINCS 63 64MAN= pcap.3 \ 65 pcap_activate.3 \ 66 pcap_breakloop.3 \ 67 pcap_can_set_rfmon.3 \ 68 pcap_close.3 \ 69 pcap_compile.3 \ 70 pcap_create.3 \ 71 pcap_datalink.3 \ 72 pcap_datalink_name_to_val.3 \ 73 pcap_datalink_val_to_name.3 \ 74 pcap_dump.3 \ 75 pcap_dump_close.3 \ 76 pcap_dump_file.3 \ 77 pcap_dump_flush.3 \ 78 pcap_dump_ftell.3 \ 79 pcap_dump_open.3 \ 80 pcap_file.3 \ 81 pcap_fileno.3 \ 82 pcap_findalldevs.3 \ 83 pcap_freecode.3 \ 84 pcap_get_required_select_timeout.3 \ 85 pcap_get_selectable_fd.3 \ 86 pcap_get_tstamp_precision.3 \ 87 pcap_geterr.3 \ 88 pcap_inject.3 \ 89 pcap_is_swapped.3 \ 90 pcap_lib_version.3 \ 91 pcap_list_datalinks.3 \ 92 pcap_list_tstamp_types.3 \ 93 pcap_lookupdev.3 \ 94 pcap_lookupnet.3 \ 95 pcap_loop.3 \ 96 pcap_major_version.3 \ 97 pcap_next_ex.3 \ 98 pcap_offline_filter.3 \ 99 pcap_open_dead.3 \ 100 pcap_open_live.3 \ 101 pcap_open_offline.3 \ 102 pcap_set_buffer_size.3 \ 103 pcap_set_datalink.3 \ 104 pcap_set_immediate_mode.3 \ 105 pcap_set_promisc.3 \ 106 pcap_set_rfmon.3 \ 107 pcap_set_snaplen.3 \ 108 pcap_set_timeout.3 \ 109 pcap_set_tstamp_precision.3 \ 110 pcap_set_tstamp_type.3 \ 111 pcap_setdirection.3 \ 112 pcap_setfilter.3 \ 113 pcap_setnonblock.3 \ 114 pcap_snapshot.3 \ 115 pcap_stats.3 \ 116 pcap_statustostr.3 \ 117 pcap_strerror.3 \ 118 pcap_tstamp_type_name_to_val.3 \ 119 pcap_tstamp_type_val_to_name.3 120MAN+= pcap-savefile.5 121MAN+= pcap-filter.7 \ 122 pcap-linktype.7 \ 123 pcap-tstamp.7 124 125MLINKS= pcap_datalink_val_to_name.3 pcap_datalink_val_to_description.3 \ 126 pcap_datalink_val_to_name.3 pcap_datalink_val_to_description_or_dlt.3 \ 127 pcap_dump_open.3 pcap_dump_fopen.3 \ 128 pcap_findalldevs.3 pcap_freealldevs.3 \ 129 pcap_geterr.3 pcap_perror.3 \ 130 pcap_inject.3 pcap_sendpacket.3 \ 131 pcap_list_datalinks.3 pcap_free_datalinks.3 \ 132 pcap_list_tstamp_types.3 pcap_free_tstamp_types.3 \ 133 pcap_loop.3 pcap_dispatch.3 \ 134 pcap_major_version.3 pcap_minor_version.3 \ 135 pcap_next_ex.3 pcap_next.3 \ 136 pcap_open_dead.3 pcap_open_dead_with_tstamp_precision.3 \ 137 pcap_open_offline.3 pcap_fopen_offline.3 \ 138 pcap_open_offline.3 pcap_fopen_offline_with_tstamp_precision.3 \ 139 pcap_open_offline.3 pcap_open_offline_with_tstamp_precision.3 \ 140 pcap_setnonblock.3 pcap_getnonblock.3 \ 141 pcap_tstamp_type_val_to_name.3 pcap_tstamp_type_val_to_description.3 142 143# Magic to convert the man pages to something non Solarish 144CLEANFILES+=${MAN} 145.for _page in ${MAN} 146${_page}: 147 if [ -f ${SRCDIR}/${_page:S/3$/3pcap/} ]; then \ 148 F=${_page:S/3$/3pcap/}; \ 149 elif [ -f ${SRCDIR}/${_page:S/3$/3pcap.in/} ]; then \ 150 F=${_page:S/3$/3pcap.in/}; \ 151 elif [ -f ${SRCDIR}/${_page:S/5$/manfile/} ]; then \ 152 F=${_page:S/5$/manfile/}; \ 153 elif [ -f ${SRCDIR}/${_page:S/5$/manfile.in/} ]; then \ 154 F=${_page:S/5$/manfile.in/}; \ 155 elif [ -f ${SRCDIR}/${_page:S/7$/manmisc/} ]; then \ 156 F=${_page:S/7$/manmisc/}; \ 157 elif [ -f ${SRCDIR}/${_page:S/7$/manmisc.in/} ]; then \ 158 F=${_page:S/7$/manmisc.in/}; \ 159 fi; \ 160 sed -e 's/3PCAP/3/g' -e 's/@MAN_FILE_FORMATS@/5/g' \ 161 -e 's/@MAN_MISC_INFO@/7/g' ${SRCDIR}/$$F > ${_page} 162.endfor 163 164.include <bsd.lib.mk> 165