Oppure

Loading
06/09/08 15:19
robyp7
jpcap è un'utility per fare sniffig dei pacchetti oppure ping, traceroute ecc: nel mio caso mi serve fare tracerout in java e ho trovato l'esemopio:
netresearch.ics.uci.edu/kfujii/jpcap/sample/…

ho aggiunto dell System.out.println in qusti punti(per debugging, vedi la "-->";):

}else if(p.type==ICMPPacket.ICMP_TIMXCEED){
    --> System.out.println("Enter icmp time exceed!";);
    p.src_ip.getHostName();
    System.out.println(icmp.hop_limit+": "+p.src_ip);
    icmp.hop_limit++;
}else if(p.type==ICMPPacket.ICMP_UNREACH){
    --> System.out.println("Enter unreach, destination unreachable!";);
    p.src_ip.getHostName();
    System.out.println(icmp.hop_limit+": "+p.src_ip);
    System.exit(0);
}else if(p.type==ICMPPacket.ICMP_ECHOREPLY){
    -->System.out.println("Enter echo reply!";);
    p.src_ip.getHostName();
    System.out.println(icmp.hop_limit+": "+p.src_ip);
    System.exit(0);
}else continue;

faccio un traceroute verso google.it (74.125.39.103) e ottengo visualizzato in shell:

Enter icmp time exceed!
0: 192.168.1.1/192.168.1.1 <-- my gateway answer about TTL=0 whit a icmp
Enter unreach, destination unreachable!
1: 192.168.1.1/192.168.1.1 <-- TTL = 1 but dest not reacable

e basta! perchè?

sono su una lan con gateway 192.168.1.1/255.255.255.0 ma non riesco ad uscire dal gateway, mentre con tracert da dos (windows xp) si, perchè????????

possibil che è un problema del mio gatew?
che posso fare?

grazie!Roby

Robert


aaa