2 * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
10 import static org.opendaylight.yangtools.yang.common.netty.ByteBufUtils.readUint16;
12 import io.netty.buffer.ByteBuf;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.TcpSrc;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.TcpSrcCaseBuilder;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.tcp.src._case.TcpSrcBuilder;
20 * Translates OxmTcpSrc messages.
22 * @author michal.polkorab
24 public class OxmTcpSrcDeserializer extends AbstractOxmMatchEntryDeserializer {
25 public OxmTcpSrcDeserializer() {
30 protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
31 builder.setMatchEntryValue(new TcpSrcCaseBuilder()
32 .setTcpSrc(new TcpSrcBuilder().setPort(new PortNumber(readUint16(input))).build())