Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 1 | package org.projectfloodlight.openflow.protocol.match; |
| 2 | |
| 3 | import org.projectfloodlight.openflow.types.ArpOpcode; |
Rich Lane | eb21c4f | 2013-10-28 17:34:41 -0700 | [diff] [blame] | 4 | import org.projectfloodlight.openflow.types.ClassId; |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 5 | import org.projectfloodlight.openflow.types.EthType; |
| 6 | import org.projectfloodlight.openflow.types.ICMPv4Code; |
| 7 | import org.projectfloodlight.openflow.types.ICMPv4Type; |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 8 | import org.projectfloodlight.openflow.types.IPv4Address; |
| 9 | import org.projectfloodlight.openflow.types.IPv6Address; |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 10 | import org.projectfloodlight.openflow.types.IPv6FlowLabel; |
| 11 | import org.projectfloodlight.openflow.types.IpDscp; |
| 12 | import org.projectfloodlight.openflow.types.IpEcn; |
| 13 | import org.projectfloodlight.openflow.types.IpProtocol; |
Rich Lane | 376cafe | 2013-10-27 21:49:14 -0700 | [diff] [blame] | 14 | import org.projectfloodlight.openflow.types.LagId; |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 15 | import org.projectfloodlight.openflow.types.MacAddress; |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 16 | import org.projectfloodlight.openflow.types.OFBitMask128; |
Rich Lane | 9c27b5d | 2013-10-30 17:14:32 -0700 | [diff] [blame] | 17 | import org.projectfloodlight.openflow.types.OFBooleanValue; |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 18 | import org.projectfloodlight.openflow.types.OFMetadata; |
| 19 | import org.projectfloodlight.openflow.types.OFPort; |
| 20 | import org.projectfloodlight.openflow.types.OFValueType; |
Andreas Wundsam | 98a1863 | 2013-11-05 11:34:24 -0800 | [diff] [blame] | 21 | import org.projectfloodlight.openflow.types.OFVlanVidMatch; |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 22 | import org.projectfloodlight.openflow.types.TransportPort; |
Rich Lane | 9b17807 | 2014-05-19 15:31:55 -0700 | [diff] [blame^] | 23 | import org.projectfloodlight.openflow.types.U16; |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 24 | import org.projectfloodlight.openflow.types.U32; |
| 25 | import org.projectfloodlight.openflow.types.U8; |
Rich Lane | 53ddf5c | 2014-03-20 15:24:08 -0700 | [diff] [blame] | 26 | import org.projectfloodlight.openflow.types.UDF; |
Rich Lane | eb21c4f | 2013-10-28 17:34:41 -0700 | [diff] [blame] | 27 | import org.projectfloodlight.openflow.types.VRF; |
Andreas Wundsam | 98a1863 | 2013-11-05 11:34:24 -0800 | [diff] [blame] | 28 | import org.projectfloodlight.openflow.types.VlanPcp; |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 29 | |
| 30 | @SuppressWarnings("unchecked") |
| 31 | public class MatchField<F extends OFValueType<F>> { |
| 32 | private final String name; |
| 33 | public final MatchFields id; |
| 34 | private final Prerequisite<?>[] prerequisites; |
| 35 | |
| 36 | private MatchField(final String name, final MatchFields id, Prerequisite<?>... prerequisites) { |
| 37 | this.name = name; |
| 38 | this.id = id; |
| 39 | this.prerequisites = prerequisites; |
| 40 | } |
| 41 | |
| 42 | public final static MatchField<OFPort> IN_PORT = |
| 43 | new MatchField<OFPort>("in_port", MatchFields.IN_PORT); |
| 44 | |
| 45 | public final static MatchField<OFPort> IN_PHY_PORT = |
| 46 | new MatchField<OFPort>("in_phy_port", MatchFields.IN_PHY_PORT, |
| 47 | new Prerequisite<OFPort>(MatchField.IN_PORT)); |
| 48 | |
| 49 | public final static MatchField<OFMetadata> METADATA = |
| 50 | new MatchField<OFMetadata>("metadata", MatchFields.METADATA); |
| 51 | |
| 52 | public final static MatchField<MacAddress> ETH_DST = |
| 53 | new MatchField<MacAddress>("eth_dst", MatchFields.ETH_DST); |
| 54 | |
| 55 | public final static MatchField<MacAddress> ETH_SRC = |
| 56 | new MatchField<MacAddress>("eth_src", MatchFields.ETH_SRC); |
| 57 | |
| 58 | public final static MatchField<EthType> ETH_TYPE = |
| 59 | new MatchField<EthType>("eth_type", MatchFields.ETH_TYPE); |
| 60 | |
Andreas Wundsam | 98a1863 | 2013-11-05 11:34:24 -0800 | [diff] [blame] | 61 | public final static MatchField<OFVlanVidMatch> VLAN_VID = |
| 62 | new MatchField<OFVlanVidMatch>("vlan_vid", MatchFields.VLAN_VID); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 63 | |
| 64 | public final static MatchField<VlanPcp> VLAN_PCP = |
| 65 | new MatchField<VlanPcp>("vlan_pcp", MatchFields.VLAN_PCP, |
Andreas Wundsam | 98a1863 | 2013-11-05 11:34:24 -0800 | [diff] [blame] | 66 | new Prerequisite<OFVlanVidMatch>(MatchField.VLAN_VID)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 67 | |
| 68 | public final static MatchField<IpDscp> IP_DSCP = |
| 69 | new MatchField<IpDscp>("ip_dscp", MatchFields.IP_DSCP, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 70 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv4, EthType.IPv6)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 71 | |
| 72 | public final static MatchField<IpEcn> IP_ECN = |
Ronald Li | 8083dfa | 2013-11-20 15:00:05 -0800 | [diff] [blame] | 73 | new MatchField<IpEcn>("ip_ecn", MatchFields.IP_ECN, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 74 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv4, EthType.IPv6)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 75 | |
| 76 | public final static MatchField<IpProtocol> IP_PROTO = |
| 77 | new MatchField<IpProtocol>("ip_proto", MatchFields.IP_PROTO, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 78 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv4, EthType.IPv6)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 79 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 80 | public final static MatchField<IPv4Address> IPV4_SRC = |
| 81 | new MatchField<IPv4Address>("ipv4_src", MatchFields.IPV4_SRC, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 82 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv4)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 83 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 84 | public final static MatchField<IPv4Address> IPV4_DST = |
| 85 | new MatchField<IPv4Address>("ipv4_dst", MatchFields.IPV4_DST, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 86 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv4)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 87 | |
| 88 | public final static MatchField<TransportPort> TCP_SRC = new MatchField<TransportPort>( |
| 89 | "tcp_src", MatchFields.TCP_SRC, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 90 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.TCP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 91 | |
| 92 | public final static MatchField<TransportPort> TCP_DST = new MatchField<TransportPort>( |
| 93 | "tcp_dst", MatchFields.TCP_DST, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 94 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.TCP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 95 | |
| 96 | public final static MatchField<TransportPort> UDP_SRC = new MatchField<TransportPort>( |
| 97 | "udp_src", MatchFields.UDP_SRC, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 98 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.UDP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 99 | |
| 100 | public final static MatchField<TransportPort> UDP_DST = new MatchField<TransportPort>( |
| 101 | "udp_dst", MatchFields.UDP_DST, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 102 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.UDP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 103 | |
| 104 | public final static MatchField<TransportPort> SCTP_SRC = new MatchField<TransportPort>( |
| 105 | "sctp_src", MatchFields.SCTP_SRC, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 106 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.SCTP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 107 | |
| 108 | public final static MatchField<TransportPort> SCTP_DST = new MatchField<TransportPort>( |
| 109 | "sctp_dst", MatchFields.SCTP_DST, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 110 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.SCTP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 111 | |
| 112 | public final static MatchField<ICMPv4Type> ICMPV4_TYPE = new MatchField<ICMPv4Type>( |
Ronald Li | d7a63f0 | 2013-11-20 15:49:33 -0800 | [diff] [blame] | 113 | "icmpv4_type", MatchFields.ICMPV4_TYPE, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 114 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.ICMP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 115 | |
| 116 | public final static MatchField<ICMPv4Code> ICMPV4_CODE = new MatchField<ICMPv4Code>( |
Ronald Li | d7a63f0 | 2013-11-20 15:49:33 -0800 | [diff] [blame] | 117 | "icmpv4_code", MatchFields.ICMPV4_CODE, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 118 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.ICMP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 119 | |
| 120 | public final static MatchField<ArpOpcode> ARP_OP = new MatchField<ArpOpcode>( |
| 121 | "arp_op", MatchFields.ARP_OP, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 122 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ARP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 123 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 124 | public final static MatchField<IPv4Address> ARP_SPA = |
| 125 | new MatchField<IPv4Address>("arp_spa", MatchFields.ARP_SPA, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 126 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ARP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 127 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 128 | public final static MatchField<IPv4Address> ARP_TPA = |
| 129 | new MatchField<IPv4Address>("arp_tpa", MatchFields.ARP_TPA, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 130 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ARP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 131 | |
| 132 | public final static MatchField<MacAddress> ARP_SHA = |
| 133 | new MatchField<MacAddress>("arp_sha", MatchFields.ARP_SHA, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 134 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ARP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 135 | |
| 136 | public final static MatchField<MacAddress> ARP_THA = |
| 137 | new MatchField<MacAddress>("arp_tha", MatchFields.ARP_THA, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 138 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.ARP)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 139 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 140 | public final static MatchField<IPv6Address> IPV6_SRC = |
| 141 | new MatchField<IPv6Address>("ipv6_src", MatchFields.IPV6_SRC, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 142 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv6)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 143 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 144 | public final static MatchField<IPv6Address> IPV6_DST = |
| 145 | new MatchField<IPv6Address>("ipv6_dst", MatchFields.IPV6_DST, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 146 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv6)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 147 | |
| 148 | public final static MatchField<IPv6FlowLabel> IPV6_FLABEL = |
| 149 | new MatchField<IPv6FlowLabel>("ipv6_flabel", MatchFields.IPV6_FLABEL, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 150 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv6)); |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 151 | |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 152 | public final static MatchField<U8> ICMPV6_TYPE = |
| 153 | new MatchField<U8>("icmpv6_type", MatchFields.ICMPV6_TYPE, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 154 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IPv6_ICMP)); |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 155 | |
| 156 | public final static MatchField<U8> ICMPV6_CODE = |
| 157 | new MatchField<U8>("icmpv6_code", MatchFields.ICMPV6_CODE, |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 158 | new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IPv6_ICMP)); |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 159 | |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 160 | public final static MatchField<IPv6Address> IPV6_ND_TARGET = |
| 161 | new MatchField<IPv6Address>("ipv6_nd_target", MatchFields.IPV6_ND_TARGET, |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 162 | new Prerequisite<U8>(MatchField.ICMPV6_TYPE, U8.of((short)135), U8.of((short)136))); |
| 163 | |
| 164 | public final static MatchField<MacAddress> IPV6_ND_SLL = |
| 165 | new MatchField<MacAddress>("ipv6_nd_sll", MatchFields.IPV6_ND_SLL, |
| 166 | new Prerequisite<U8>(MatchField.ICMPV6_TYPE, U8.of((short)135))); |
| 167 | |
| 168 | public final static MatchField<MacAddress> IPV6_ND_TLL = |
| 169 | new MatchField<MacAddress>("ipv6_nd_tll", MatchFields.IPV6_ND_TLL, |
| 170 | new Prerequisite<U8>(MatchField.ICMPV6_TYPE, U8.of((short)136))); |
| 171 | |
| 172 | public final static MatchField<U32> MPLS_LABEL = |
| 173 | new MatchField<U32>("mpls_label", MatchFields.MPLS_LABEL, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 174 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.MPLS_UNICAST, EthType.MPLS_MULTICAST)); |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 175 | |
| 176 | public final static MatchField<U8> MPLS_TC = |
| 177 | new MatchField<U8>("mpls_tc", MatchFields.MPLS_TC, |
Andreas Wundsam | b70b044 | 2013-09-23 14:44:43 -0700 | [diff] [blame] | 178 | new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.MPLS_UNICAST, EthType.MPLS_MULTICAST)); |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 179 | |
Yotam Harchol | 2c53558 | 2013-10-01 15:50:20 -0700 | [diff] [blame] | 180 | public final static MatchField<OFBitMask128> BSN_IN_PORTS_128 = |
Ronald Li | a07b257 | 2013-11-18 13:54:08 -0800 | [diff] [blame] | 181 | new MatchField<OFBitMask128>("bsn_in_ports_128", MatchFields.BSN_IN_PORTS_128); |
Yotam Harchol | a11f38b | 2013-09-26 15:38:17 -0700 | [diff] [blame] | 182 | |
Rich Lane | 376cafe | 2013-10-27 21:49:14 -0700 | [diff] [blame] | 183 | public final static MatchField<LagId> BSN_LAG_ID = |
| 184 | new MatchField<LagId>("bsn_lag_id", MatchFields.BSN_LAG_ID); |
Rich Lane | 1424d0b | 2013-10-24 17:16:24 -0700 | [diff] [blame] | 185 | |
Rich Lane | eb21c4f | 2013-10-28 17:34:41 -0700 | [diff] [blame] | 186 | public final static MatchField<VRF> BSN_VRF = |
| 187 | new MatchField<VRF>("bsn_vrf", MatchFields.BSN_VRF); |
| 188 | |
Rich Lane | 9c27b5d | 2013-10-30 17:14:32 -0700 | [diff] [blame] | 189 | public final static MatchField<OFBooleanValue> BSN_GLOBAL_VRF_ALLOWED = |
| 190 | new MatchField<OFBooleanValue>("bsn_global_vrf_allowed", MatchFields.BSN_GLOBAL_VRF_ALLOWED); |
Rich Lane | eb21c4f | 2013-10-28 17:34:41 -0700 | [diff] [blame] | 191 | |
| 192 | public final static MatchField<ClassId> BSN_L3_INTERFACE_CLASS_ID = |
| 193 | new MatchField<ClassId>("bsn_l3_interface_class_id", MatchFields.BSN_L3_INTERFACE_CLASS_ID); |
| 194 | |
| 195 | public final static MatchField<ClassId> BSN_L3_SRC_CLASS_ID = |
| 196 | new MatchField<ClassId>("bsn_l3_src_class_id", MatchFields.BSN_L3_SRC_CLASS_ID); |
| 197 | |
| 198 | public final static MatchField<ClassId> BSN_L3_DST_CLASS_ID = |
| 199 | new MatchField<ClassId>("bsn_l3_dst_class_id", MatchFields.BSN_L3_DST_CLASS_ID); |
| 200 | |
Rich Lane | 917bb9a | 2014-03-11 17:49:56 -0700 | [diff] [blame] | 201 | public final static MatchField<ClassId> BSN_EGR_PORT_GROUP_ID = |
| 202 | new MatchField<ClassId>("bsn_egr_port_group_id", MatchFields.BSN_EGR_PORT_GROUP_ID); |
| 203 | |
Rich Lane | 53ddf5c | 2014-03-20 15:24:08 -0700 | [diff] [blame] | 204 | public final static MatchField<UDF> BSN_UDF0 = |
| 205 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF0); |
| 206 | |
| 207 | public final static MatchField<UDF> BSN_UDF1 = |
| 208 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF1); |
| 209 | |
| 210 | public final static MatchField<UDF> BSN_UDF2 = |
| 211 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF2); |
| 212 | |
| 213 | public final static MatchField<UDF> BSN_UDF3 = |
| 214 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF3); |
| 215 | |
| 216 | public final static MatchField<UDF> BSN_UDF4 = |
| 217 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF4); |
| 218 | |
| 219 | public final static MatchField<UDF> BSN_UDF5 = |
| 220 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF5); |
| 221 | |
| 222 | public final static MatchField<UDF> BSN_UDF6 = |
| 223 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF6); |
| 224 | |
| 225 | public final static MatchField<UDF> BSN_UDF7 = |
| 226 | new MatchField<UDF>("bsn_udf", MatchFields.BSN_UDF7); |
| 227 | |
Rich Lane | 9b17807 | 2014-05-19 15:31:55 -0700 | [diff] [blame^] | 228 | public final static MatchField<U16> BSN_TCP_FLAGS = |
| 229 | new MatchField<U16>("bsn_tcp_flags", MatchFields.BSN_TCP_FLAGS); |
| 230 | |
Yotam Harchol | f3f1115 | 2013-09-05 16:47:16 -0700 | [diff] [blame] | 231 | public String getName() { |
| 232 | return name; |
| 233 | } |
| 234 | |
| 235 | public boolean arePrerequisitesOK(Match match) { |
| 236 | for (Prerequisite<?> p : this.prerequisites) { |
| 237 | if (!p.isSatisfied(match)) { |
| 238 | return false; |
| 239 | } |
| 240 | } |
| 241 | return true; |
| 242 | } |
| 243 | |
| 244 | } |