From: Jonathan L. <le...@us...> - 2009-03-13 02:17:00
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/ping In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19279/src/edu/harvard/syrah/pyxida/ping Modified Files: JpcapPinger.java Log Message: upgraded to jpcap 0.7 from 0.5.1 Index: JpcapPinger.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/ping/JpcapPinger.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JpcapPinger.java 27 Mar 2008 18:33:01 -0000 1.9 --- JpcapPinger.java 13 Mar 2009 01:41:50 -0000 1.10 *************** *** 124,128 **** InetAddress pingAddr = JpcapPinger.this.defaultPingAddr.getInetAddress(); log.debug("defaultPingAddr=" + pingAddr); ! captor.setFilter("icmp and dst host " + pingAddr.getHostAddress(), false); InputStream is = null; Packet ping = null; --- 124,132 ---- InetAddress pingAddr = JpcapPinger.this.defaultPingAddr.getInetAddress(); log.debug("defaultPingAddr=" + pingAddr); ! try { ! captor.setFilter("icmp and dst host " + pingAddr.getHostAddress(), false); ! } catch (IOException ex) { ! log.error ("Could not set captor filter: "+ex); ! } InputStream is = null; Packet ping = null; *************** *** 191,196 **** public void run() { ! captor.setFilter("dst host " + thisIP.getHostAddress() + " and (icmp or (tcp and tcp[tcpflags] & (tcp-syn|tcp-ack) != 0))", true); //captor.setFilter("icmp", true); while (!jpcapThread.isInterrupted()) { --- 195,204 ---- public void run() { ! try { ! captor.setFilter("dst host " + thisIP.getHostAddress() + " and (icmp or (tcp and tcp[tcpflags] & (tcp-syn|tcp-ack) != 0))", true); //captor.setFilter("icmp", true); + } catch (IOException ex) { + log.error ("Could not set captor filter: "+ex); + } while (!jpcapThread.isInterrupted()) { |