blob: b9a43e478a48ce0620508b02e1fb9bb82f8bdf3b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
# Ports collection makefile for: click
# Date created: 3 Nov 2001
# Whom: gnn
#
# $FreeBSD$
#
# XXX: TODO: fix kernel module
PORTNAME= click
PORTVERSION= 1.5.0
CATEGORIES= net
MASTER_SITES= http://www.read.cs.ucla.edu/click/
MAINTAINER= bms@FreeBSD.org
COMMENT= The Click Modular Router
USE_PERL5_BUILD=yes
GNU_CONFIGURE= yes
USE_GMAKE= yes
SRC_BASE?= /usr/src
INC_BASE?= /usr/include
CONFIGURE_ARGS+= --disable-linuxmodule
CONFIGURE_ARGS+= --enable-nanotimestamp
MANCOMPRESSED= no
INFO= click
MAN1= click.1 click-align.1 click-combine.1 click-devirtualize.1 \
click-fastclassifier.1 click-flatten.1 click-install.1 \
click-mkmindriver.1 click-pretty.1 click-uncombine.1 click-undead.1 \
click-uninstall.1 click-xform.1 testie.1
MAN5= click.5
MAN7= elementdoc.7
MAN8= click.o.8
MANN= FTPPortMapper.n ARPFaker.n ARPPrint.n ARPQuerier.n ARPResponder.n \
elements-click.n ChangeUID.n \
EnsureEther.n EtherEncap.n EtherMirror.n HostEtherFilter.n \
CheckARPHeader.n DirectIPLookup.n \
RFC2507Comp.n RFC2507Decomp.n \
CheckICMPHeader.n ICMPError.n ICMPPingResponder.n ICMPPingRewriter.n \
ICMPRewriter.n CheckIPHeader.n CheckIPHeader2.n \
DecIPTTL.n FixIPSrc.n FromSocket.n GetIPAddress.n ICMPPingEncap.n \
ICMPPingSource.n IPAddrRewriter.n IPAddrPairRewriter.n IPClassifier.n \
IPEncap.n IPFilter.n IPFragmenter.n IPGWOptions.n IPInputCombo.n \
IPNameInfo.n \
IPMirror.n IPOutputCombo.n IPPrint.n IPRateMonitor.n IPRewriterPatterns.n \
KernelTun.n LinearIPLookup.n LinkUnqueue.n \
MarkIPCE.n MarkIPHeader.n Message.n MixedQueue.n NotifierQueue.n \
PaintSwitch.n PortInfo.n RIPSend.n RandomSwitch.n RangeIPLookup.n \
RoundRobinIPMapper.n SetAnnoByte.n SetIPAddress.n SetIPChecksum.n SetIPDSCP.n \
SetRandIPAddress.n SetUDPChecksum.n SimpleQueue.n StoreData.n \
StoreIPAddress.n StripIPHeader.n ToSocket.n UnstripIPHeader.n \
Socket.n Script.n Truncate.n \
AddressInfo.n Align.n AlignmentInfo.n AverageCounter.n \
BandwidthMeter.n BandwidthShaper.n Burster.n BandwidthRatedSplitter.n \
BandwidthRatedUnqueue.n CheckCRC32.n CheckLength.n CheckPaint.n \
Classifier.n CompareBlock.n Counter.n DelayShaper.n DelayUnqueue.n \
Discard.n DiscardNoFree.n DriverManager.n DropBroadcasts.n DRRSched.n \
Error.n FrontDropQueue.n HashSwitch.n Idle.n \
InfiniteSource.n Meter.n MSQueue.n Null.n PushNull.n PullNull.n \
Null1.n \
Paint.n PaintTee.n PokeHandlers.n Print.n PrioSched.n \
PullSwitch.n Queue.n QuitWatcher.n \
RandomBitErrors.n RandomSource.n RatedSource.n \
RatedSplitter.n RatedUnqueue.n RED.n RoundRobinSched.n \
RoundRobinSwitch.n ScheduleInfo.n SetCRC32.n SetTimestamp.n Shaper.n \
SourceIPHashMapper.n SortedIPLookup.n \
SpinlockAcquire.n SpinlockInfo.n SpinlockRelease.n StaticPullSwitch.n \
StaticSwitch.n StrideSched.n StrideSwitch.n Strip.n Suppressor.n \
Switch.n Tee.n PullTee.n TimedSink.n TimedSource.n Unqueue.n \
Unqueue2.n Unstrip.n CheckTCPHeader.n CheckUDPHeader.n \
DynamicUDPIPEncap.n IPRewriter.n SetTCPChecksum.n TCPRewriter.n \
UDPIPEncap.n ChatterSocket.n ControlSocket.n FromDevice.u.n \
FromDump.n KernelTap.n KernelHandlerProxy.n \
ToDevice.u.n ToDump.n elements.n AdaptiveRED.n IPReassembler.n \
IPRouteTable.n StaticIPLookup.n LinuxIPLookup.n RadixIPLookup.n \
RandomSample.n SetPacketType.n StripToNetworkHeader.n ProgressBar.n
CONFDIR= ${PREFIX}/etc/click/conf
OPTIONS= \
XML "Enable XML support with expat" Off \
USERCLICK "Build user-space Click" On \
KERNEL_MODULE "Build BSD kernel module (BROKEN)" Off \
ANALYSIS_ELEMS "Build network analysis elements" Off \
ETHERSWITCH_ELEMS "Build etherswitch elements" Off \
GRID_ELEMS "Build Grid elements (see FAQ)" Off \
IPSEC_ELEMS "Build IPSEC elements" Off \
LOCAL_ELEMS "Build local elements" Off \
WIFI_ELEMS "Build Wi-Fi elements" Off \
IPV6_ELEMS "Build IPv6 elements (EXPERIMENTAL)" Off \
NS_ELEMS "Build NS elements (EXPERIMENTAL)" Off \
RADIO_ELEMS "Build radio elements (EXPERIMENTAL)" Off
.include <bsd.port.pre.mk>
.if ${ARCH} == "alpha"
BROKEN= does not compile on alpha 4.x
.endif
.if defined(WITH_XML)
CONFIGURE_ARGS+= --with-expat=${LOCALBASE}
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2
PLIST_SUB+= XMLCLICK=""
.else
PLIST_SUB+= XMLCLICK="@comment "
.endif
.if !defined(WITH_USERCLICK)
CONFIGURE_ARGS+= --disable-userlevel
#.else
#MANN+= IPFlowRawSockets.n
.endif
.if defined(WITH_KERNEL_MODULE)
.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE= kernel source files required
.endif
CONFIGURE_ARGS+= --enable-bsdmodule \
--with-freebsd=${SRC_BASE}/sys,${INC_BASE}
.else
CONFIGURE_ARGS+= --disable-bsdmodule
.endif
.if defined(WITH_ANALYSIS_ELEMS)
CONFIGURE_ARGS+= --enable-analysis
MANN+= AggregateFilter.n TimeSortedSched.n TimeRange.n \
FromTcpdump.n ToIPFlowDumps.n AggregateLast.n \
SimPacketAnalyzer.n AggregatePaint.n \
FromNetFlowSummaryDump.n AggregateFirst.n AggregateCounter.n \
FromDAGDump.n StoreTimestamp.n AggregateIPFlows.n \
SetTimestampDelta.n FromCapDump.n AggregateIP.n \
TimestampAccum.n AnonymizeIPAddr.n AggregateLength.n \
FromIPSummaryDump.n ToIPSummaryDump.n AggregateIPAddrPair.n \
AggregatePacketCounter.n TimeFilter.n
.endif
.if defined(WITH_ETHERSWITCH_ELEMS)
CONFIGURE_ARGS+= --enable-etherswitch
MANN+= EtherSwitch.n ListenEtherSwitch.n
.endif
.if defined(WITH_GRID_ELEMS)
CONFIGURE_ARGS+= --enable-grid
MANN+= ACKResponder.n ACKResponder2.n ACKRetrySender.n \
ACKRetrySender2.n AiroInfo.n BottleneckMetric.n \
CheckGridHeader.n DSDVRouteTable.n DSRArpTable.n \
DSRRouteTable.n E2ELossMetric.n ETX2Metric.n ETXMetric.n \
EstimateRouterRegion.n FilterByGridHops.n FilterByRange.n \
FixDstLoc.n FixSrcLoc.n FloodingLocQuerier.n FromNLANRDump.n \
GridEncap.n GridGatewayInfo.n GridHeaderInfo.n \
GridLocationInfo.n GridLocationInfo2.n GridLogger.n \
GridProbeHandler.n GridProbeReplyReceiver.n \
GridProbeSender.n GridProxy.n GridRouteTable.n GridTxError.n \
HopcountMetric.n IncrementSeqNo.n LIRMetric.n LinkStat.n \
LinkTable.n LinkTestReceiver.n LinkTester.n LinkTracker.n \
LocFromFile.n LocQueryResponder.n LocationTable.n \
LookupGeographicGridRoute.n LookupLocalGridRoute.n \
LookupLocalGridRoute2.n MovementSimulator.n PEP.n \
PacketLogger.n PacketLogger2.n PingPong.n PrintGrid.n \
SendGridHello.n SendGridLRHello.n SetGridChecksum.n \
SimpleLocQuerier.n ThresholdMetric.n UpdateGridRoutes.n \
YarvisMetric.n
.endif
.if defined(WITH_IPSEC_ELEMS)
CONFIGURE_ARGS+= --enable-ipsec
MANN+= IPsecAuthSHA1.n IPsecDES.n IPsecESPUnencap.n \
IPsecESPEncap.n
.endif
.if defined(WITH_LOCAL_ELEMS)
CONFIGURE_ARGS+= --enable-local
.endif
.if defined(WITH_WIFI_ELEMS)
CONFIGURE_ARGS+= --enable-wifi
MANN+= FilterPhyErr.n AssociationResponder.n FilterFailures.n \
ReadAnno.n PacketStore.n AvailableRates.n \
AssociationRequester.n OpenAuthResponder.n \
OpenAuthRequeser.n Prism2Encap.n ProbeResponder.n \
AutoRateFallback.n ProbeTXRate.n ARPTable.n WepEncap.n \
WepDecap.n WifiDecap.n FilterTX.n EtherCount.n \
RadiotapDecap.n RadiotapEncap.n WifiFragment.n \
BeaconSource.n BeaconTracker.n BeaconScanner.n RXStats.n \
WirelessInfo.n PrintTXFeedback.n SetTXRate.n SetTXPower.n \
Prism2Decap.n WifiEncap.n WifiDefrag.n MadwifiRate.n \
PrintWifi.n WifiSeq.n PushAnno.n WifiDupeFilter.n \
ExtraEncap.n ExtraDecap.n AthdescDecap.n AthdescEncap.n
.endif
#
# The following Click elements are marked experimental as of 1.5.0.
#
.if defined(WITH_IPV6_ELEMS)
CONFIGURE_ARGS+= --enable-ipv6
.endif
.if defined(WITH_NS_ELEMS)
CONFIGURE_ARGS+= --enable-nsclick
MANN+= ToSimTrace.n ToSimDevice.u.n FromSimDevice.u.n \
EraseIPPayload.n
PLIST_SUB+= NSCLICK=""
.else
PLIST_SUB+= NSCLICK="@comment "
.endif
.if defined(WITH_RADIO_ELEMS)
CONFIGURE_ARGS+= --enable-radio
MANN+= RadioSim.n
.endif
post-install:
cd ${PREFIX}/bin && ${STRIP_CMD} click click-align click-check \
click-combine click-uncombine click-devirtualize click-fastclassifier \
click-flatten click-mkmindriver click-undead click-xform
@${MKDIR} ${CONFDIR}
${INSTALL_DATA} ${WRKSRC}/conf/*.click ${CONFDIR}
@${MKDIR} ${CONFDIR}/wifi
${INSTALL_DATA} ${WRKSRC}/conf/wifi/*.click ${CONFDIR}/wifi
@${ECHO_CMD}
@${ECHO_CMD} "----------------------------------------------------"
@${ECHO_CMD} "Install complete, to try it out do the following:"
@${ECHO_CMD} "cd ${PREFIX}/etc/click/conf"
@${ECHO_CMD} "click test.click"
@${ECHO_CMD} "You should see some output. Now go read the papers and manual."
@${ECHO_CMD} "----------------------------------------------------"
@${ECHO_CMD}
.include <bsd.port.post.mk>
|