Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String tracePacket(Packet packet){
- packet.recordPath(own_ip);
- if(own_ip.isTheSame(packet.getDestination())){
- return packet.toString();
- }else{
- if(packet.isLive()){
- for(Node child:children){
- if(packet.getDestination().insideRng(child.lower_ip, child.higher_ip)){
- return child.tracePacket(packet);
- }
- }
- if(parent == null){
- return "OUT";
- }else{
- return parent.tracePacket(packet);
- }
- }else{
- return "LOOP";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement