Implementation of Linkstate and  distance vector routing protocols in java