Here you can find the source of getNatRouterIdFromMetadata(BigInteger metadata)
public static long getNatRouterIdFromMetadata(BigInteger metadata)
//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(); } }