28 NTMobile Java Proposal and Implementation of Java Wrapper for NTMobile ( : 130441077) : 29 2 10
NTMobile Network Traversal with Mobility NTMobile Linux NTMobile C Java NTMobile Java Java JNA Java Native Access NTMobile Java Java API NTMobile Abstract NTMobile(Network Traversal with Mobility) is a next generation technology which realizes mobility and connectivity simultaneously. We implemented previous Studies about NTMobile to Linux Kernel. Currently, it is being ported to Applications. This is called NTMobile Framework. NTMobile Framework is coded in C-language. However, Application is coded in Java frequently. Therefore, in this study, we propose Java Wrapper for NTMobile Framework and present the results of implementation. JNA(Java Native Access) makes it possible to use NTMobile Framework Library on Java Wrapper. Another thing, an Application developer realizes that NTMobile Communication with Java API by using Java Wrapper. i
1 1 2 Java 3 2.1 JNA Java Native Access............................... 3 2.2 Java...................................... 4 3 NTMobile 6 3.1 NTMobile.................................... 6 3.2 NTMobile.................................... 6 3.3 NTMobile.................................... 7 3.3.1................................... 7 3.3.2................................... 7 3.3.3................................. 8 3.4 NTMobile............................... 8 4 NTMobile Java 12 4.1...................................... 12 4.2..................................... 12 5 15 5.1......................................... 15 5.2......................................... 15 6 18 19 21 23 iii
1 IP IP IP IPv4 NAT Network Address Translation NAT NAT NAT NAT NAT IP IPv6 IPv6 IPv4 IPv4 IPv6 IPv4 MIPv4 Mobile IPv4 [1] MIPv6 Mobile IPv6 [2] DSMIP Dual Stack Mobile IPv6 [3] HA Home Agent NAT STUN Session Traversal Utilities for NATs [4] TURN Traversal Using Relay around NAT [5] ICE Interactive Connectivity Establishment [6,7] STUN TURN ICE NAT NTMobile Network Traversal with Mobility [8 10] NTMobile IP IP NAT IP IPv4 /IPv4 /IPv6 NTMobile Linux NTMobile 1
NTMobile [11] NTMobile C Java Java NTMobile NTMobile Java NTMobile Java Java API NTMobile NTMobile NTMobile Java Java NTMobile NTMobile 2 Java Java 3 NT- Mobile 4 NTMobile Java 5 Java 6 2
2 Java JNA Java Native Access Java 2.1 JNA Java Native Access JNA 1 JNA API C Java API JNA 2 (i) (ii) (i) Java 1 C Java JNA Native loadlibrary JNA loadlibrary Java アプリケーション JNA 共有ライブラリ 1 (ii) API Java 2 JNA C 1 https://github.com/java-native-access 3
Java C Java インターフェース method 1 method 2 method 3 method n マッピング C 言語 共有ライブラリ method 1 method 2 method 3 method n 2 (i) (ii) Java C 2.2 Java Java 2.1 JNA 3 Java int Integer 2 Java int String int Integer tostring(int i) 3 int 4330 tostring(4330) Integer Integer String 4330 2 https://docs.oracle.com/javase/8/docs/api/java/lang/integer.html 4
int 型 Integer クラス 4330 int 型 4330 4330 String 型 型変換 4330 String 型 4330 4330 3 int 5
3 NTMobile NTMobile 3.1 NTMobile NTMobile IP IP IP IP 3.2 NTMobile 4 NTMobile NTMobile NTMobile NTM NTM DC Direction Coordinator RS Relay Server DC RS NTMobile NTM IP IP DC DNS NTM NAT DC Keep Alive NAT IP IP IP IP RS RS RS 1 6
NAT Router General Communication Encrypted Communication Through UDP Tunnel DC RS Internet NAT Router Wi-Fi Handover GN RS DC 4G Network NTM Node (fixed Node) NTM Node (after move) NTM Node (before move) 4 NTMobile 3.3 NTMobile NTM MN Mobile Node NTM CN Correspondent Node NTM N IPv4 RIPN IPv4 VIPN NTM N DC DCN 3.3.1 5 MN DCMN RIPMN DCMN MN MN VIPMN VIPMN DC Keep Alive 3.3.2 6 MN DCMN CN DCMN DNS DCCN DCCN CN DCMN MN CN MN CN MN CN DCMN MN CN 7
MN DCMN Registration Request RIPMN Application ID Registration Response VIPMN UDP Keep Alive 5 MN CN NAT NAT RS MN/CN RS 3.3.3 7 MN IP VIPMN VIPCN IP NTMobile IP RIPMN RIPCN CN MN CN NTMobile IP CN MN CN IP IP 3.4 NTMobile 8 NTMobile NTMobile API NTMobile NTMobile NTMobile API 8
MN DCMN DCCN CN Direction Request FQDNCN Node Information Request FQDNCN Node Information Response CN s Information Route Direction Route Direction NTM ACK NTM ACK Route Direction Tunnel Request Tunnel Response UDP Tunnel 6 ntmfw ntm init ntmfw getaddrinfo UDP / ntmfw sendto/ntmfw recvfrom TCP / ntmfw send/ntmfw recv ntmfw ntm init 5 ntmfw getaddrinfo 6 ntmfw sendto/ntmfw recvfrom ntmfw send/ntmfw recv 9
RIP:RIPMN VIP:VIPMN RIP:RIPCN VIP:VIPCN MN CN Application NTMobile NTMobile Application UDP Tunnel VIPMN VIPCN RIPMN RIPCN VIPMN VIPCN VIPMN VIPCN UDP Tunnel VIPMN VIPCN RIPMN RIPCN VIPMN VIPCN VIPMN VIPCN 7 10
Application NTMobile Framework NTMobile Framework Socket API lwip Library Capuslated Module Negotiation Module Tunnel Module Kernel Socket 8 NTMobile 11
4 NTMobile Java NTMobile Java NTMobile NTMobile Java JNA Java Native Access Java C Java NTMobile Java NTMobile Java API NTMobile 4.1 9 NTMobile Java Java 3 (i) api (ii) net (iii) structure (i) api NTMobile API 3.3.1 3.3.2 ntmfw ntm init ntmfw getaddrinfo api (ii) net Java API DatagramSocket NTMobile net Java API Java API DatagramSocket 1 setdatagramsocketimplfactory (iii) structure NTMobile Java structure NTMobile 4.2 Java NTM 10 Java NTMobile ntmfw ntm init ntmfw getaddrinfo UDP TCP 1 https://docs.oracle.com/javase/8/docs/api/java/net/datagramsocket.html 12
Java ラッパー api net structure 9 NTMobile Java ntmfw ntm init init ntmfw getaddrinfo getbyname api Java NTMobile ntmfw ntm init ntmfw getaddrinfo Java Java api init getbyname Java C JNA NTMobile ntmfw ntm init ntmfw getaddrinfo Java API Java Java API Java NTMobile NTMobile 13
Java アプリケーション Java ラッパー api net structure Java API JNA NTMobile フレームワーク 10 Java NTM 14
5 4 NTMobile Java NTMobile Java NTMobile NTM NTMobile Java NTMobile 5.1 1 2 NTM 11 1 VMware Workstation Player 1 DC MN CN DC MN CN IPv4 NTMobile Java 1 OS CPU Memory Windows 10 64bit Intel Core i7-4770 3.40GHz 8.00GB 2 NTM MN CN OS Ubuntu 14.04 32bit Ubuntu 14.04 32bit Linux Kernel 3.13.0-24-generic 3.13.0-24-generic CPU 1Core 1Core Memory 2.00GB 2.00GB 5.2 MN CN 3 4 11 3 4 1 http://www.vmware.com 15
Private Network MN CN DC 11 12 3 4 MN CN Java System 2 nanotime MN CN 7 2 5 2 Java 3 4 Linux NTMobile Java API UDP DatagramSocket send/receive / 12 Java NTMobile Linux 3 NTMobile [ms] NTMobile [ms] Java - 0.13 NTMobile - 2.91 Linux 0.07 0.07 0.07 3.11 4 NTMobile [ms] NTMobile [ms] Java - 0.16 NTMobile - 2.37 Linux 0.01 0.01 0.01 2.54 3 NTMobile 3.1 NTMobile Java 2 https://docs.oracle.com/javase/8/docs/api/java/lang/system.html 16
Java アプリケーション Java ラッパー Javaラッパー api net structure Java API JNA NTMobile フレームワーク NTMobile フレームワーク Linux Linux 12 0.13 4 NTMobile 2.5 NTMobile Java 0.16 NTMobile / 17
6 NTMobile Java Java NTMobile Java API NTMobile Java Java NTMobile Linux NTMobile Java Java NTMobile Java Java API NTMobile 18
19
[1] Perkins, C.: IP Mobility Support for IPv4, RFC 5944, IETF (2010). [2] Perkins, C., Johnson, D. and Arkko, J.: Mobility Support in IPv6, RFC 6275, IETF (2011). [3] Soliman, H.: Mobile IPv6 Support for Dual Stack Hosts and Routers, RFC 5555, IETF (2009). [4] Rosenberg, J., Mahy, R., Matthews, P. and Wing, D.: Session Traversal Utilities for NAT(STUN), RFC 5389, IETF (2008). [5] Mahy, R., Matthews, P. and Rosenberg, J.: Traversal Using Relays around NAT(TURN)): Relay Extensions to Session Traversal Utilities for NAT(STUN), RFC 5766, IETF (2010). [6] Rosenberg, J.: Interactive Connectivity Establishment(ICE): A Protocol for Network Address Translator(NAT) Traversal for Offer/Answer Protocols, RFC 5245, IETF (2010). [7] Westerlund, M. and Perkins, C.: IANA Registry for Interactive Connectivity Establishment(ICE) Options, RFC 6336, IETF (2011). [8] NTMobile Vol. 54, No. 1, pp. 367 379 (2013). [9] NTMobile Vol. 54, No. 1, pp. 380 397 (2013). [10] IPv4/IPv6 NTMobile Vol. 54, No. 2013, pp. 2288 2299 (2013). [11] Naito, K., Kamienoo, K., Suzuki, H., Watanabe, A., Mori, K. and Kobayashi, K.: End-to-end IP mobility platform in application layer for ios and Android OS, Proc. of IEEE CCNC (2014). 21
1 NTMobile SIP IPv4 28 Vol. 2016 B2-5, Sep. 2016. 23