Implementation of Traceroute In Java - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Implementation of Traceroute In Java

Description:

IP layer. Network access layer. TCP. UDP. Raw socket interface. Stream socket interface ... { System.err.println('Can't Find Library'); catch (SecurityException e) ... – PowerPoint PPT presentation

Number of Views:121
Avg rating:3.0/5.0
Slides: 12
Provided by: xwu4
Category:

less

Transcript and Presenter's Notes

Title: Implementation of Traceroute In Java


1
Implementation of Traceroute In Java
  • Instructor Dr. Byrav Rammurthy

Present by Sheng Zhang
Xueming Wu
2
Outline
  • Introduction
  • Implementation
  • Eveluation
  • Conclusion

3
How Traceroute Work
  • ICMP_TIMXCEED
  • ICMP_UNREACH_PORT or ICMP_UNREACH_PROTOCOL

4
How Traceroute Work
5
Socket
  • Socket
  • setsockopt
  • sendto
  • select
  • recvfrom

6
Socket
if ((pe getprotobyname("icmp"))
NULL) return -3
if ((c_rcvsock socket(AF_INET, SOCK_RAW,
pe-gtp_proto)) lt 0) return -4
if ((c_sndsock socket(AF_INET,
SOCK_RAW, IPPROTO_RAW)) lt 0)
close(c_rcvsock) c_rcvsock 0
return -5
7
Java Native Iterface
8
Java Native Iterface
public native int inittrroute(int
sockets) static
try System.loadLibrary("TrNat")
catch (UnsatisfiedLinkError e)
System.err.println("Can't Find Library")
catch (SecurityException e)
System.err.println("Can't Load
Library...Security Violation")
.. rc trobj.inittrroute(s
ockets)
9
Java Native Iterface
// mtrace method public native int
inittrroute(int sockets) JNIEXPORT jint
JNICALL Java_mtrace_inittrroute (JNIEnv env,
jobject thisObj, jintArray sockets)
10
Evaluation
11
Conclusion
  • a great opportunity
  • can be evolved to a useful tool
Write a Comment
User Comments (0)
About PowerShow.com