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 io.netty.buffer.ByteBuf;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.EthType;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.EthTypeCaseBuilder;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.eth.type._case.EthTypeBuilder;
16 import org.opendaylight.yangtools.yang.common.netty.ByteBufUtils;
19 * Translates OxmEthType messages.
21 * @author michal.polkorab
23 public class OxmEthTypeDeserializer extends AbstractOxmMatchEntryDeserializer {
24 public OxmEthTypeDeserializer() {
29 protected void deserialize(final ByteBuf input, final MatchEntryBuilder builder) {
30 builder.setMatchEntryValue(new EthTypeCaseBuilder()
31 .setEthType(new EthTypeBuilder().setEthType(new EtherType(ByteBufUtils.readUint16(input))).build())