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
8 package org.opendaylight.openflowplugin.impl.protocol.deserialization.match;
10 import io.netty.buffer.ByteBuf;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder;
14 public class Icmpv6CodeEntryDeserializer extends AbstractMatchEntryDeserializer {
17 public void deserializeEntry(ByteBuf message, MatchBuilder builder) {
18 processHeader(message);
19 final short code = message.readUnsignedByte();
21 if (builder.getIcmpv6Match() == null) {
22 builder.setIcmpv6Match(new Icmpv6MatchBuilder()
25 } else if (builder.getIcmpv6Match().getIcmpv6Code() == null) {
26 builder.setIcmpv6Match(new Icmpv6MatchBuilder(builder.getIcmpv6Match())
30 throwErrorOnMalformed(builder, "icmpv6Match", "icmpv6Code");