Example usage for io.netty.buffer ByteBuf readUnsignedInt

List of usage examples for io.netty.buffer ByteBuf readUnsignedInt

Introduction

In this page you can find the example usage for io.netty.buffer ByteBuf readUnsignedInt.

Prototype

public abstract long readUnsignedInt();

Source Link

Document

Gets an unsigned 32-bit integer at the current readerIndex and increases the readerIndex by 4 in this buffer.

Usage

From source file:org.opendaylight.protocol.bgp.parser.impl.message.update.LocalPreferenceAttributeParser.java

License:Open Source License

@Override
public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder) {
    builder.setLocalPref(new LocalPrefBuilder().setPref(buffer.readUnsignedInt()).build());
}

From source file:org.opendaylight.protocol.bgp.parser.impl.message.update.MultiExitDiscriminatorAttributeParser.java

License:Open Source License

@Override
public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder) {
    builder.setMultiExitDisc(new MultiExitDiscBuilder().setMed(buffer.readUnsignedInt()).build());
}

From source file:org.opendaylight.protocol.bgp.parser.spi.extended.community.FourOctAsCommonECUtil.java

License:Open Source License

public static As4SpecificCommon parseCommon(final ByteBuf body) {
    return new As4SpecificCommonBuilder().setAsNumber(new AsNumber(body.readUnsignedInt()))
            .setLocalAdministrator(body.readUnsignedShort()).build();
}

From source file:org.opendaylight.protocol.bgp.parser.spi.PathIdUtil.java

License:Open Source License

/**
 * Reads Path Identifier (4 bytes) from buffer.
 *
 * @param buffer Input buffer./*from   w  ww. j a v a2 s  . c  o  m*/
 * @return Decoded PathId.
 */
public static PathId readPathId(final ByteBuf buffer) {
    Preconditions.checkArgument(buffer != null && buffer.isReadable(ByteBufWriteUtil.INT_BYTES_LENGTH));
    return new PathId(buffer.readUnsignedInt());
}

From source file:org.opendaylight.protocol.bmp.impl.tlv.StatType000TlvHandler.java

License:Open Source License

@Override
public Tlv parseTlv(final ByteBuf buffer) throws BmpDeserializationException {
    if (buffer == null) {
        return null;
    }/*from www  . jav a2s. co  m*/
    return new RejectedPrefixesTlvBuilder().setCount(new Counter32(buffer.readUnsignedInt())).build();
}

From source file:org.opendaylight.protocol.bmp.impl.tlv.StatType001TlvHandler.java

License:Open Source License

@Override
public Tlv parseTlv(final ByteBuf buffer) throws BmpDeserializationException {
    if (buffer == null) {
        return null;
    }/*from w ww  .ja  v  a2  s  . c  o m*/
    return new DuplicatePrefixAdvertisementsTlvBuilder().setCount(new Counter32(buffer.readUnsignedInt()))
            .build();
}

From source file:org.opendaylight.protocol.bmp.impl.tlv.StatType002TlvHandler.java

License:Open Source License

@Override
public Tlv parseTlv(final ByteBuf buffer) throws BmpDeserializationException {
    if (buffer == null) {
        return null;
    }//ww w  .jav  a 2  s . c  o  m
    return new DuplicateWithdrawsTlvBuilder().setCount(new Counter32(buffer.readUnsignedInt())).build();
}

From source file:org.opendaylight.protocol.bmp.impl.tlv.StatType003TlvHandler.java

License:Open Source License

@Override
public Tlv parseTlv(final ByteBuf buffer) throws BmpDeserializationException {
    if (buffer == null) {
        return null;
    }//  ww w  . jav  a 2 s.c  o m
    return new InvalidatedClusterListLoopTlvBuilder().setCount(new Counter32(buffer.readUnsignedInt())).build();
}

From source file:org.opendaylight.protocol.bmp.impl.tlv.StatType004TlvHandler.java

License:Open Source License

@Override
public Tlv parseTlv(final ByteBuf buffer) throws BmpDeserializationException {
    if (buffer == null) {
        return null;
    }//w ww  .ja  v a2 s.  c om
    return new InvalidatedAsPathLoopTlvBuilder().setCount(new Counter32(buffer.readUnsignedInt())).build();
}

From source file:org.opendaylight.protocol.bmp.impl.tlv.StatType005TlvHandler.java

License:Open Source License

@Override
public Tlv parseTlv(final ByteBuf buffer) throws BmpDeserializationException {
    if (buffer == null) {
        return null;
    }//from   w w  w.  j  a va 2s .  c o m
    return new InvalidatedOriginatorIdTlvBuilder().setCount(new Counter32(buffer.readUnsignedInt())).build();
}