2 * Copyright (c) 2016 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
9 package org.opendaylight.openflowplugin.impl.protocol.deserialization.match;
11 import io.netty.buffer.ByteBuf;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder;
15 public class IpProtoEntryDeserializer extends AbstractMatchEntryDeserializer {
18 public void deserializeEntry(ByteBuf message, MatchBuilder builder) {
19 processHeader(message);
20 final short proto = message.readUnsignedByte();
22 if (builder.getIpMatch() == null) {
23 builder.setIpMatch(new IpMatchBuilder()
26 } else if (builder.getIpMatch().getIpProtocol() == null) {
27 builder.setIpMatch(new IpMatchBuilder(builder.getIpMatch())
31 throwErrorOnMalformed(builder, "ipMatch", "ipProtocol");