I want to know if we can implement this paper entirely with java.It is a security mechanism for routing protocols---we cannot afford routers so thinking of simulating them.

Dani AI

Generated

Short answer for : the paper's algorithms and a full simulator/daemon can be implemented in Java. The practical choice is the target: a pure algorithm-level simulator, a packet-level emulator that talks real frames, or a userspace routing daemon that interacts with the OS. Each has different complexity, privileges and testing value.

A sensible three-step path:

  1. Start with a pure Java, discrete-event simulation to validate correctness and attacker models. Keep routing logic, topology, event scheduler and crypto abstractions separate so the same logic can later run over real I/O.
  2. Move to packet-level emulation: run multiple processes or containers/namespace hosts and exchange real packets using a Java pcap wrapper. This exposes timing, serialization and crypto overheads you won't see in a pure sim.
  3. If the goal is deployment/production, implement a userspace routing daemon that pushes routes to the kernel (or speaks netlink) or integrate with an existing routing suite. Kernel modules or kernel-space code are not usually written in Java; bridging with JNI/JNR or using a userspace approach is the practical route.

Implementation tips and cautions:

  • Design a clear Transport interface so transport can be swapped (in-process events, pcap I/O, or socket/netlink).
  • Use Java crypto (JCA/BouncyCastle) rather than home-grown crypto; measure signature/MAC cost early — security ops can dominate runtime.
  • Packet capture/send will require native libs and root privileges; on Linux use libpcap/npcap and test inside containers or Mininet-like environments.
  • Watch GC/latency for high packet rates; use profiling, direct ByteBuffers and tune GC settings.

Recommended resources to evaluate approaches: for Java simulation, pcap4j for Java packet I/O, and Mininet for lightweight topology/emulation. Given points from and , an incremental approach (simulate -> emulate -> userspace integration) minimizes wasted effort while giving progressively more realistic results.

Recommended Answers

All 2 Replies

Uhm, you do know that the cost of a programmers time to write something like that (which I didn't even read BTW), and test it, is more than the cost of a few routers, right?

You also know that it possible for any computer you have to be a router, right?

Well, the paper addresses the problem symbolically and algorithmically, so the language it is implemented is up to you, the implementer. However, network routing is done in the system kernel, and access to kernel structures from a user-space Java application may be difficult. Not necessarily impossible, or even necessary, but this is not a trivial exercise. Break the problem up into domains of behavior, and address each individually, with a view to the whole.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.