CN103812956A - Method and device for switching IPv4/IPv6 applications and intelligent mobile terminal - Google Patents
Method and device for switching IPv4/IPv6 applications and intelligent mobile terminal Download PDFInfo
- Publication number
- CN103812956A CN103812956A CN201210455233.1A CN201210455233A CN103812956A CN 103812956 A CN103812956 A CN 103812956A CN 201210455233 A CN201210455233 A CN 201210455233A CN 103812956 A CN103812956 A CN 103812956A
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- ipv4
- intelligent mobile
- ipv6
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to a method and a device for switching IPv4/IPv6 applications and an intelligent mobile terminal, wherein the method comprises the steps of receiving a URL (Uniform Resource Locator) request sent out by the upper-layer application program of the intelligent mobile terminal, sending a domain name resolution request to a DNS (Domain Name Resolution) server through a DNS client according to the URL request, and invoking a socket interface corresponding to the operating system of the intelligent mobile terminal according to the type of an IP (Internet Protocol) address returned by the DNS server to establish network connection corresponding to the type of the IP address. The method and the device provide a fast and economic solution for the process of transition from the IPv4 application to the IPv6 application, no matter whether the upper-layer application program of the intelligent mobile terminal is the IPv4 application to the IPv6 application, the solution can be utilized to switch to the corresponding IPv4 or IPv6 network, and as a result, the application program development interface of IPv4 and IPv6 are unified, the development cost is reduced and the development period is sped up.
Description
Technical field
The present invention relates to mobile terminal technology, relate in particular to a kind of IPv4/IPv6 application conversion method, device and intelligent mobile terminal.
Background technology
IPv4 is the effective solution that current IPv4 address is used up gradually to IPv6 transition, and in the process being widely used along with IPv6, IPv4 and IPv6 will be the state coexisting in a long time.For intelligent mobile terminal, in order to realize better applicability, need to support IPv4 and IPv6 agreement simultaneously.
But, IPv4 on current intelligent mobile terminal and IPv6 application programming interfaces (Application Programming Interface is called for short API) call different, therefore application programs, need to develop two versions for IPv4 and IPv6 agreement, cannot reuse.And intelligent mobile terminal also cannot be supported unified api interface at present.
Summary of the invention
The object of the invention is to propose a kind of IPv4/IPv6 application conversion method, device and intelligent mobile terminal, can unify the API of IPv4 and IPv6, make the application development unification of IPv4 and IPv6, reduce overlapping development.
For achieving the above object, the invention provides a kind of IPv4/IPv6 application conversion method, comprising:
URL(uniform resource locator) (Universal Resource Locator the is called for short URL) request that the upper level applications of reception intelligent mobile terminal is sent;
Send domain name mapping request by domain name system client to domain name system (Domain Name System is called for short DNS) server according to described URL(uniform resource locator) request;
The type of the IP address of returning according to domain name system server, calls the sockets interface foundation corresponding with the operating system of the described intelligent mobile terminal network corresponding with the type of described IP address and is connected.
The operation of calling the sockets interface corresponding with the operating system of described intelligent mobile terminal further, is specially:
If the operating system of described intelligent mobile terminal is Windows mobile or Windows phone platform, call the Winsock interface that described Windows mobile or Windowsphone platform are corresponding;
If the operating system of described intelligent mobile terminal is Linux or Android platform, call the BSD sockets interface that described Linux or Android platform are corresponding.
Further, the operation that the described foundation network corresponding with the type of described IP address connects is specially:
If the IP address that domain name system server returns is IPv4 address, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and set up the connection of IPv4 network;
If the IP address that domain name system server returns is IPv6 address, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and set up the connection of IPv6 network.
For achieving the above object, the invention provides a kind of IPv4/IPv6 application conversion equipment, comprising:
Upper strata adaptation unit, the URL(uniform resource locator) request of sending for receiving the upper level applications of intelligent mobile terminal;
Management conversion unit, there is domain name system interface, for sending domain name mapping request by domain name system client to domain name system server according to described URL(uniform resource locator) request, and carry out conversion, the data envelope of IPv4 agreement and IPv6 agreement and call bottom IP agreement;
Lower floor's adaptation unit, for the type of the IP address returned according to domain name system server, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and sets up the network corresponding with the type of described IP address and be connected.
Further, described lower floor adaptation unit comprises:
Sockets interface calling module, for in the time that the operating system of described intelligent mobile terminal is Windows mobile or Windows phone platform, call the Winsock interface that described Windows mobile or Windows phone platform are corresponding, and in the time that the operating system of described intelligent mobile terminal is Linux or Android platform, call the BSD sockets interface that described Linux or Android platform are corresponding;
Network connects sets up module, while being IPv4 address for the IP address of returning at domain name system server, call the sockets interface corresponding with the operating system of described intelligent mobile terminal by described sockets interface calling module and set up the connection of IPv4 network, and the IP address of returning at domain name system server is while being IPv6 address, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal by described sockets interface calling module and set up IPv6 network and connect.
Further, lower floor's adaptation unit also comprises:
Operation system information acquisition module, obtains the operation system information of described intelligent mobile terminal for obtaining function by operation system information.
For achieving the above object, the invention provides a kind of intelligent mobile terminal that comprises aforementioned IPv4/IPv6 application conversion equipment, wherein also comprise: application layer part, intermediate layer part, drive part and air interface part, described IPv4/IPv6 application conversion equipment is arranged on described intermediate layer part.
Based on technique scheme, the present invention asks to obtain corresponding IP address to dns server according to the intelligent mobile terminal URL that application program is sent at the middle and upper levels, and call the sockets interface corresponding with the operating system of intelligent mobile terminal according to the IP address class type obtaining and set up the network corresponding with the type of this IP address and be connected, for applying to IPv6 application transient process, IPv4 provides the solution of economy fast by this process, no matter the upper level applications of intelligent mobile terminal is IPv4 application or IPv6 application, all can utilize solution of the present invention to be switched to corresponding IPv4 or IPv6 network, unified IPv4 and IPv6 application development interface, reduce development cost, the accelerate development cycle.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the module composition schematic diagram of an embodiment of intelligent mobile terminal of the present invention.
Fig. 2 is the module composition schematic diagram of an embodiment of IPv4/IPv6 application conversion equipment of the present invention.
Fig. 3 is the module composition schematic diagram of another embodiment of IPv4/IPv6 application conversion equipment of the present invention.
Fig. 4 is the schematic flow sheet of an embodiment of IPv4/IPv6 application conversion method of the present invention.
Embodiment
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
As shown in Figure 1, be the module composition schematic diagram of an embodiment of intelligent mobile terminal of the present invention.In the present embodiment, the composition of the functional module in intelligent mobile terminal comprises: application layer part, intermediate layer part, drive part and air interface part.Wherein, various application examples are all arranged on application layer part as IPv4 application, IPv6 apply and support the application (being abbreviated as IPv4/IPv6 application) of IPv4 and IPv6 simultaneously.
Intermediate layer part comprises that socket application programming interfaces (Socket API), transmission control protocol/User Datagram Protoco (UDP) (TCP/UDP) processing module, IPv4 protocol process module, IPv6 protocol process module, IP package manager, wireless lan (wlan) adaptation layer, the PPP connection processing module based on IPv4 agreement and the PPP based on IPv6 agreement connect processing module.In the present embodiment, intermediate layer part is also provided with IPv4/IPv6 application conversion equipment, and its concrete formation will describe in detail hereinafter, wouldn't describe in detail here.
Drive part comprises that WLAN drives and USB/universal asynchronous receiving-transmitting transmitter (USB/UART) drives.Air interface part comprises WLAN air interface and code division multiple access (CDMA)/EVDO air interface.
In the intelligent mobile terminal of the present embodiment, IPv4/IPv6 application conversion equipment can be used as middleware and is added in existing intelligent mobile terminal, software alteration amount is smaller, and development cost is low, and is suitable for Rapid transplant and adaptation in different operating system.
Fig. 2 has provided the module composition schematic diagram of an embodiment of IPv4/IPv6 application conversion equipment of the present invention.As can be seen from Figure 2, IPv4/IPv6 application conversion equipment specifically comprises: upper strata adaptation unit 1, management conversion unit 2 and lower floor's adaptation unit 3.Its URL request that responsible upper level applications that receives application layer part in intelligent mobile terminal of adaptation unit 1 is sent at the middle and upper levels.Management conversion unit 2 has DNS interface, is responsible for the URL request received according to upper strata adaptation unit, sends DNS request by DNS client to dns server.Management conversion unit 2 can communicate by the DNS client in DNS interface and intelligent mobile terminal.In addition, management conversion unit 2 can also be responsible for conversion, the data envelope of IPv4 agreement and IPv6 agreement and call the functions such as bottom IP agreement.Lower floor's adaptation unit 3 is responsible for the type of the IP address of returning according to dns server, calls the socket corresponding with the operating system of intelligent mobile terminal (Socket) the interface foundation network corresponding with the type of IP address and is connected.
Lower floor's adaptation unit 3 can specifically comprise: sockets interface calling module 31 is connected with network sets up module 32.Wherein, sockets interface calling module 31 is responsible for calling corresponding sockets interface according to the operating system of intelligent mobile terminal, if when the operating system of intelligent mobile terminal is Windows mobile or Windows phone platform, call the Winsock interface that Windowsmobile or Windows phone platform are corresponding; If when the operating system of intelligent mobile terminal is Linux or Android platform, call the BSD sockets interface that described Linux or Android platform are corresponding.
Network connects when setting up IP address that module 32 is responsible for returning at dns server and being IPv4 address, call the sockets interface corresponding with the operating system of intelligent mobile terminal by sockets interface calling module 31 and set up the connection of IPv4 network, and the IP address of returning at domain name system server is while being IPv6 address, calls the sockets interface corresponding with the operating system of intelligent mobile terminal by sockets interface calling module 31 and set up IPv6 network and connect.
The operation system information of intelligent mobile terminal can by developer according to intelligent mobile terminal based on platform corresponding compiler toggle is set, be for example arranged to Socket=Winsock, or Socket=BSD socket.In another embodiment shown in Fig. 3, also can set in advance, and the operation system information acquisition module 33 being comprised by lower floor's adaptation unit is realized, this module is responsible for being obtained function (being Getosinfo ()) and being obtained by operation system information the operation system information of described intelligent mobile terminal.
Based on multiple embodiment of IPv4/IPv6 application conversion equipment described above and intelligent mobile terminal, below by Fig. 4, one embodiment of IPv4/IPv6 application conversion method of the present invention is described.In the present embodiment, IPv4/IPv6 application conversion method comprises:
The URL request that the upper level applications of step 101, reception intelligent mobile terminal is sent;
The type of step 103, the IP address returned according to dns server, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and sets up the network corresponding with the type of described IP address and be connected.
In the present embodiment, upper strata adaptation unit in IPv4/IPv6 application conversion equipment can receive the URL request that the upper level applications of the application layer part of intelligent mobile terminal is sent, and management conversion unit can be asked to send DNS request by DNS client to dns server according to this URL, ask corresponding IP address class type to obtain the URL that this upper level applications sends at present, in the time that dns server has returned to IP address, lower floor's adaptation unit just can determine that the network of setting up based on which kind of agreement connects according to IP address, and call the corresponding sockets interface of operating system platform with intelligent mobile terminal.
If the operating system of intelligent mobile terminal is Windows mobile or Windowsphone platform, call the Winsock interface that described Windows mobile or Windows phone platform are corresponding; If the operating system of intelligent mobile terminal is Linux or Android platform, call the BSD sockets interface that described Linux or Android platform are corresponding.Operation system information can arrange compiler toggle by developer according to operation platform in advance, also can obtain by Getosinfo () function.
If the IP address that dns server returns is IPv4 address, lower floor's adaptation unit calls the sockets interface corresponding with the operating system of intelligent mobile terminal and sets up the connection of IPv4 network; If the IP address that dns server returns is IPv6 address, lower floor's adaptation unit calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and sets up the connection of IPv6 network.
By the explanation of each embodiment above, the present invention provides the solution of economy fast for IPv4 applies to IPv6 application transient process, no matter the upper level applications of intelligent mobile terminal is IPv4 application or IPv6 application, all can utilize solution of the present invention to be switched to corresponding IPv4 or IPv6 network, unified IPv4 and IPv6 application development interface, reduce development cost, the accelerate development cycle.Moreover, IPv4/IPv6 application conversion equipment of the present invention can also be in different operating system Rapid transplant and adaptation, cross-platform ability is strong, has improved the diversity of mobile phone.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of program command, aforesaid program can be stored in a computer read/write memory medium, this program, in the time carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Finally should be noted that: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit; Although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the field are to be understood that: still can modify or part technical characterictic is equal to replacement the specific embodiment of the present invention; And not departing from the spirit of technical solution of the present invention, it all should be encompassed in the middle of the technical scheme scope of request protection of the present invention.
Claims (7)
1. an IPv4/IPv6 application conversion method, comprising:
The URL(uniform resource locator) request that the upper level applications of reception intelligent mobile terminal is sent;
Send domain name mapping request by domain name system client to domain name system server according to described URL(uniform resource locator) request;
The type of the IP address of returning according to domain name system server, calls the sockets interface foundation corresponding with the operating system of the described intelligent mobile terminal network corresponding with the type of described IP address and is connected.
2. IPv4/IPv6 application conversion method according to claim 1, wherein said operation of calling the sockets interface corresponding with the operating system of described intelligent mobile terminal is specially:
If the operating system of described intelligent mobile terminal is Windows mobile or Windows phone platform, call the Winsock interface that described Windows mobile or Windowsphone platform are corresponding;
If the operating system of described intelligent mobile terminal is Linux or Android platform, call the BSD sockets interface that described Linux or Android platform are corresponding.
3. IPv4/IPv6 application conversion method according to claim 2, the operation that the wherein said foundation network corresponding with the type of described IP address connects is specially:
If the IP address that domain name system server returns is IPv4 address, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and set up the connection of IPv4 network;
If the IP address that domain name system server returns is IPv6 address, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and set up the connection of IPv6 network.
4. an IPv4/IPv6 application conversion equipment, comprising:
Upper strata adaptation unit, the URL(uniform resource locator) request of sending for receiving the upper level applications of intelligent mobile terminal;
Management conversion unit, there is domain name system interface, for sending domain name mapping request by domain name system client to domain name system server according to described URL(uniform resource locator) request, and carry out conversion, the data envelope of IPv4 agreement and IPv6 agreement and call bottom IP agreement;
Lower floor's adaptation unit, for the type of the IP address returned according to domain name system server, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal and sets up the network corresponding with the type of described IP address and be connected.
5. IPv4/IPv6 application conversion equipment according to claim 4, wherein said lower floor adaptation unit comprises:
Sockets interface calling module, for in the time that the operating system of described intelligent mobile terminal is Windows mobile or Windows phone platform, call the Winsock interface that described Windows mobile or Windows phone platform are corresponding, and in the time that the operating system of described intelligent mobile terminal is Linux or Android platform, call the BSD sockets interface that described Linux or Android platform are corresponding;
Network connects sets up module, while being IPv4 address for the IP address of returning at domain name system server, call the sockets interface corresponding with the operating system of described intelligent mobile terminal by described sockets interface calling module and set up the connection of IPv4 network, and the IP address of returning at domain name system server is while being IPv6 address, calls the sockets interface corresponding with the operating system of described intelligent mobile terminal by described sockets interface calling module and set up IPv6 network and connect.
6. IPv4/IPv6 application conversion equipment according to claim 5, wherein lower floor's adaptation unit also comprises:
Operation system information acquisition module, obtains the operation system information of described intelligent mobile terminal for obtaining function by operation system information.
7. one kind comprises the intelligent mobile terminal of the arbitrary described IPv4/IPv6 application conversion equipment of claim 4 ~ 6, wherein also comprise: application layer part, intermediate layer part, drive part and air interface part, described IPv4/IPv6 application conversion equipment is arranged on described intermediate layer part.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210455233.1A CN103812956A (en) | 2012-11-14 | 2012-11-14 | Method and device for switching IPv4/IPv6 applications and intelligent mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210455233.1A CN103812956A (en) | 2012-11-14 | 2012-11-14 | Method and device for switching IPv4/IPv6 applications and intelligent mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103812956A true CN103812956A (en) | 2014-05-21 |
Family
ID=50709148
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210455233.1A Pending CN103812956A (en) | 2012-11-14 | 2012-11-14 | Method and device for switching IPv4/IPv6 applications and intelligent mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103812956A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104155044A (en) * | 2014-07-14 | 2014-11-19 | 华南理工大学 | Measuring device and measuring method for cable force of cable-stayed bridge based on mobile terminal |
CN109218783A (en) * | 2018-08-08 | 2019-01-15 | 深圳市天威视讯股份有限公司 | Intelligent set top box |
CN109618016A (en) * | 2018-12-10 | 2019-04-12 | 深圳市网心科技有限公司 | A kind of transmission processing method, correlation technique and the relevant apparatus of DNS request |
CN110677405A (en) * | 2019-09-26 | 2020-01-10 | 北京金山云网络技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN111511041A (en) * | 2019-01-31 | 2020-08-07 | 大唐移动通信设备有限公司 | Remote connection method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005093999A1 (en) * | 2004-03-29 | 2005-10-06 | Elias Assad | Systems and methods of registering and utilizing domain names |
CN1893423A (en) * | 2005-07-05 | 2007-01-10 | 北京航空航天大学 | Server-end application system IPv4/IPv6 transition method based on SPI technology |
CN101079904A (en) * | 2007-06-15 | 2007-11-28 | 中兴通讯股份有限公司 | Implementation method for IPV6 supported by Java virtual machine |
CN102724233A (en) * | 2011-06-03 | 2012-10-10 | 北京天地互连信息技术有限公司 | Method for realizing communication with IPv6 process by IPv4 protocol stack in information appliance system |
-
2012
- 2012-11-14 CN CN201210455233.1A patent/CN103812956A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005093999A1 (en) * | 2004-03-29 | 2005-10-06 | Elias Assad | Systems and methods of registering and utilizing domain names |
CN1893423A (en) * | 2005-07-05 | 2007-01-10 | 北京航空航天大学 | Server-end application system IPv4/IPv6 transition method based on SPI technology |
CN101079904A (en) * | 2007-06-15 | 2007-11-28 | 中兴通讯股份有限公司 | Implementation method for IPV6 supported by Java virtual machine |
CN102724233A (en) * | 2011-06-03 | 2012-10-10 | 北京天地互连信息技术有限公司 | Method for realizing communication with IPv6 process by IPv4 protocol stack in information appliance system |
Non-Patent Citations (1)
Title |
---|
蓝集明: ""IPv4/IPv6过渡技术的研究"", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104155044A (en) * | 2014-07-14 | 2014-11-19 | 华南理工大学 | Measuring device and measuring method for cable force of cable-stayed bridge based on mobile terminal |
CN109218783A (en) * | 2018-08-08 | 2019-01-15 | 深圳市天威视讯股份有限公司 | Intelligent set top box |
CN109218783B (en) * | 2018-08-08 | 2021-05-04 | 深圳市天威视讯股份有限公司 | Intelligent set-top box |
CN109618016A (en) * | 2018-12-10 | 2019-04-12 | 深圳市网心科技有限公司 | A kind of transmission processing method, correlation technique and the relevant apparatus of DNS request |
CN111511041A (en) * | 2019-01-31 | 2020-08-07 | 大唐移动通信设备有限公司 | Remote connection method and device |
CN110677405A (en) * | 2019-09-26 | 2020-01-10 | 北京金山云网络技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN110677405B (en) * | 2019-09-26 | 2021-10-26 | 北京金山云网络技术有限公司 | Data processing method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3024175B1 (en) | Method and system for remote management of network devices | |
CN102930705B (en) | Device control method and device | |
CN103812956A (en) | Method and device for switching IPv4/IPv6 applications and intelligent mobile terminal | |
US20060034256A1 (en) | System and method for service discovery during connection setup in a wireless environment | |
EP2680491B1 (en) | Method for establishing channel for managing an IPv4 terminal | |
US20160344688A1 (en) | Communicating via IPv6-only Networks Using IPv4 Literal Identifiers | |
AU2003249479A1 (en) | Method and switching device providing mobile ip functionality for a non-mobile-ip capable mobile node | |
CN103109517A (en) | Double-stack terminal accessing service method, terminal and system | |
US11855894B2 (en) | Control system, server, terminal device, control device, communication control method, and recording medium | |
KR20140012673A (en) | Method and system of providing internet protocol(ip) data communication in a nfc peer to peer communication environment | |
CN105359458A (en) | Network device communication method and network device | |
CN103763754A (en) | Method, device and system for processing data | |
KR101029457B1 (en) | Network address translation based mobility management | |
CN102244687B (en) | Method, device and system for acquiring multi-address message | |
CN104519061A (en) | Message forwarding method, device and system | |
CN102387221A (en) | Data forwarding method and system | |
CN100561983C (en) | IP address-based networking implementation method, Radio Access Network and server | |
CN109547394A (en) | A kind of bootstrap source code generation method and business board | |
CN102546845B (en) | Business access method, device and system | |
US7738432B2 (en) | Dynamic network activation apparatus, systems, and methods | |
CN106850871B (en) | Method for realizing DHCP server with single physical network card and multiple VLANs | |
CN102761629B (en) | The method of dns server address, Apparatus and system are set | |
CN102833287A (en) | Distributed file system and method for visiting data resource in distributed system | |
CN104080038A (en) | Positioning method and positioning equipment | |
CN104378301B (en) | A kind of data processing method and data processing equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140521 |
|
RJ01 | Rejection of invention patent application after publication |