2 * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.openflowjava.protocol.impl.deserialization;
\r
10 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
\r
11 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTcpFlagDeserializer;
\r
12 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTunnelIpv4DstDeserializer;
\r
13 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.NxmTunnelIpv4SrcDeserializer;
\r
14 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpOpDeserializer;
\r
15 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpShaDeserializer;
\r
16 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpSpaDeserializer;
\r
17 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpThaDeserializer;
\r
18 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmArpTpaDeserializer;
\r
19 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthDstDeserializer;
\r
20 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthSrcDeserializer;
\r
21 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmEthTypeDeserializer;
\r
22 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4CodeDeserializer;
\r
23 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv4TypeDeserializer;
\r
24 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6CodeDeserializer;
\r
25 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIcmpv6TypeDeserializer;
\r
26 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPhyPortDeserializer;
\r
27 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmInPortDeserializer;
\r
28 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpDscpDeserializer;
\r
29 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpEcnDeserializer;
\r
30 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpProtoDeserializer;
\r
31 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4DstDeserializer;
\r
32 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv4SrcDeserializer;
\r
33 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6DstDeserializer;
\r
34 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6ExtHdrDeserializer;
\r
35 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6FlabelDeserializer;
\r
36 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdSllDeserializer;
\r
37 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTargetDeserializer;
\r
38 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6NdTllDeserializer;
\r
39 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmIpv6SrcDeserializer;
\r
40 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMetadataDeserializer;
\r
41 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsBosDeserializer;
\r
42 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsLabelDeserializer;
\r
43 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmMplsTcDeserializer;
\r
44 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmPbbIsidDeserializer;
\r
45 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpDstDeserializer;
\r
46 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmSctpSrcDeserializer;
\r
47 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpDstDeserializer;
\r
48 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTcpSrcDeserializer;
\r
49 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmTunnelIdDeserializer;
\r
50 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpDstDeserializer;
\r
51 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmUdpSrcDeserializer;
\r
52 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanPcpDeserializer;
\r
53 import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmVlanVidDeserializer;
\r
54 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
\r
55 import org.opendaylight.openflowjava.protocol.impl.util.MatchEntryDeserializerRegistryHelper;
\r
56 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
\r
59 * @author michal.polkorab
\r
62 public class MatchEntryDeserializerInitializer {
\r
65 * Registers match entry deserializers
\r
66 * @param registry registry to be filled with deserializers
\r
68 public static void registerMatchEntryDeserializers(DeserializerRegistry registry) {
\r
69 // register OpenflowBasicClass match entry deserializers
\r
70 MatchEntryDeserializerRegistryHelper helper =
\r
71 new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,
\r
72 OxmMatchConstants.OPENFLOW_BASIC_CLASS, registry);
\r
73 helper.register(OxmMatchConstants.IN_PORT, new OxmInPortDeserializer());
\r
74 helper.register(OxmMatchConstants.IN_PHY_PORT, new OxmInPhyPortDeserializer());
\r
75 helper.register(OxmMatchConstants.METADATA, new OxmMetadataDeserializer());
\r
76 helper.register(OxmMatchConstants.ETH_DST, new OxmEthDstDeserializer());
\r
77 helper.register(OxmMatchConstants.ETH_SRC, new OxmEthSrcDeserializer());
\r
78 helper.register(OxmMatchConstants.ETH_TYPE, new OxmEthTypeDeserializer());
\r
79 helper.register(OxmMatchConstants.VLAN_VID, new OxmVlanVidDeserializer());
\r
80 helper.register(OxmMatchConstants.VLAN_PCP, new OxmVlanPcpDeserializer());
\r
81 helper.register(OxmMatchConstants.IP_DSCP, new OxmIpDscpDeserializer());
\r
82 helper.register(OxmMatchConstants.IP_ECN, new OxmIpEcnDeserializer());
\r
83 helper.register(OxmMatchConstants.IP_PROTO, new OxmIpProtoDeserializer());
\r
84 helper.register(OxmMatchConstants.IPV4_SRC, new OxmIpv4SrcDeserializer());
\r
85 helper.register(OxmMatchConstants.IPV4_DST, new OxmIpv4DstDeserializer());
\r
86 helper.register(OxmMatchConstants.TCP_SRC, new OxmTcpSrcDeserializer());
\r
87 helper.register(OxmMatchConstants.TCP_DST, new OxmTcpDstDeserializer());
\r
88 helper.register(OxmMatchConstants.UDP_SRC, new OxmUdpSrcDeserializer());
\r
89 helper.register(OxmMatchConstants.UDP_DST, new OxmUdpDstDeserializer());
\r
90 helper.register(OxmMatchConstants.SCTP_SRC, new OxmSctpSrcDeserializer());
\r
91 helper.register(OxmMatchConstants.SCTP_DST, new OxmSctpDstDeserializer());
\r
92 helper.register(OxmMatchConstants.ICMPV4_TYPE, new OxmIcmpv4TypeDeserializer());
\r
93 helper.register(OxmMatchConstants.ICMPV4_CODE, new OxmIcmpv4CodeDeserializer());
\r
94 helper.register(OxmMatchConstants.ARP_OP, new OxmArpOpDeserializer());
\r
95 helper.register(OxmMatchConstants.ARP_SPA, new OxmArpSpaDeserializer());
\r
96 helper.register(OxmMatchConstants.ARP_TPA, new OxmArpTpaDeserializer());
\r
97 helper.register(OxmMatchConstants.ARP_SHA, new OxmArpShaDeserializer());
\r
98 helper.register(OxmMatchConstants.ARP_THA, new OxmArpThaDeserializer());
\r
99 helper.register(OxmMatchConstants.IPV6_SRC, new OxmIpv6SrcDeserializer());
\r
100 helper.register(OxmMatchConstants.IPV6_DST, new OxmIpv6DstDeserializer());
\r
101 helper.register(OxmMatchConstants.IPV6_FLABEL, new OxmIpv6FlabelDeserializer());
\r
102 helper.register(OxmMatchConstants.ICMPV6_TYPE, new OxmIcmpv6TypeDeserializer());
\r
103 helper.register(OxmMatchConstants.ICMPV6_CODE, new OxmIcmpv6CodeDeserializer());
\r
104 helper.register(OxmMatchConstants.IPV6_ND_TARGET, new OxmIpv6NdTargetDeserializer());
\r
105 helper.register(OxmMatchConstants.IPV6_ND_SLL, new OxmIpv6NdSllDeserializer());
\r
106 helper.register(OxmMatchConstants.IPV6_ND_TLL, new OxmIpv6NdTllDeserializer());
\r
107 helper.register(OxmMatchConstants.MPLS_LABEL, new OxmMplsLabelDeserializer());
\r
108 helper.register(OxmMatchConstants.MPLS_TC, new OxmMplsTcDeserializer());
\r
109 helper.register(OxmMatchConstants.MPLS_BOS, new OxmMplsBosDeserializer());
\r
110 helper.register(OxmMatchConstants.PBB_ISID, new OxmPbbIsidDeserializer());
\r
111 helper.register(OxmMatchConstants.TUNNEL_ID, new OxmTunnelIdDeserializer());
\r
112 helper.register(OxmMatchConstants.IPV6_EXTHDR, new OxmIpv6ExtHdrDeserializer());
\r
114 // Register NXM1Class match entry deserializers
\r
115 MatchEntryDeserializerRegistryHelper nxm1helper =
\r
116 new MatchEntryDeserializerRegistryHelper(EncodeConstants.OF13_VERSION_ID,
\r
117 OxmMatchConstants.NXM_1_CLASS, registry);
\r
118 nxm1helper.register(OxmMatchConstants.NXM_NX_TUN_IPV4_SRC, new NxmTunnelIpv4SrcDeserializer());
\r
119 nxm1helper.register(OxmMatchConstants.NXM_NX_TUN_IPV4_DST, new NxmTunnelIpv4DstDeserializer());
\r
120 nxm1helper.register(OxmMatchConstants.NXM_NX_TCP_FLAG, new NxmTcpFlagDeserializer());
\r