Java BigInteger Calculate getNatRouterIdFromMetadata(BigInteger metadata)

Here you can find the source of getNatRouterIdFromMetadata(BigInteger metadata)

Description

get Nat Router Id From Metadata

License

Open Source License

Declaration

public static long getNatRouterIdFromMetadata(BigInteger metadata) 

Method Source Code


//package com.java2s;
/*/*  w w w  . j  a  v a 2s . co  m*/
 * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

import java.math.BigInteger;

public class Main {
    public static final BigInteger METADATA_MASK_VRFID = new BigInteger("00000000FFFFFFFF", 16);

    public static long getNatRouterIdFromMetadata(BigInteger metadata) {
        return (metadata.and(METADATA_MASK_VRFID)).longValue();
    }
}

Related

  1. getMagnitude(BigInteger bi)
  2. getMetaDataForLPortDispatcher(int lportTag, short serviceIndex, BigInteger serviceMetaData)
  3. getMetaDataMaskForLPortDispatcher(BigInteger metadataMaskForServiceIndex, BigInteger metadataMaskForLPortTag, BigInteger metadataMaskForService)
  4. getN(BigInteger p, BigInteger q)
  5. getNafWeight(BigInteger k)
  6. getNetAddress(BigInteger ip, BigInteger netmask)
  7. getNextLexicographicalPermutation(BigInteger v)
  8. getNRightmostBits(final BigInteger in, final int n)
  9. getNumbersBetweenRange(BigInteger minValue, BigInteger maxValue)