Method for realizing mobile terminal, container phone communication function and cross-container communication method
A mobile terminal and container technology, which is applied in the field of mobile terminal and cross-container communication, can solve the problems of low container management efficiency of mobile terminals, and achieve the effects of ensuring normal telephone communication functions, improving container management efficiency, and simplifying the structure
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0068] Embodiment 1 of the present invention provides a method for realizing the communication function of the container phone, such as Figure 1b As shown, the specific process includes the following steps:
[0069] S101: Create a pair of socket interfaces connected to each other, and acquire a first file descriptor and a second file descriptor respectively pointing to the two socket interfaces.
[0070] In the embodiment of the present invention, the mobile terminal can use the socketpair function of Linux to create a pair of unnamed, interconnected socket interfaces: the first socket interface and the second socket interface; Two fd (file descriptor, file descriptor) of a socket interface: the first file descriptor fd1 and the second file descriptor fd2.
[0071] Wherein, fd1 is a file descriptor returned by the kernel (kernel) when creating the first socket interface; fd2 is a file descriptor returned by the kernel when creating the second socket interface. The first soc...
Embodiment 2
[0086] Such as figure 2 As shown, the socket interface pointed to by the file descriptor can be shared with the container in the mobile terminal through the following steps:
[0087] S201: Obtain the file structure of the socket interface pointed to by the file descriptor.
[0088] In the solution of the present invention, the sharing of the socket interface is actually a kind of file sharing. In the case of relatively complete container isolation, a device driver can be set in the mobile terminal, and the device node can be used to share files between systems through the sharing of file descriptors.
[0089]It is considered that in practical applications, when a file is created, the kernel is provided with a file (file) structure describing the file; and file sharing can be realized by sharing the file (file) structure. Therefore, in the embodiment of the present invention, the file descriptor of the file to be shared can be passed to the driver, and the driver uses the fg...
Embodiment 3
[0111] Based on the method for realizing the communication function of the container phone in the mobile terminal provided in the first embodiment, the third embodiment of the present invention provides a mobile terminal, such as image 3 As shown, the mobile terminal may include: an interface creation unit 301 , a channel construction unit 302 , and a channel sharing unit 303 .
[0112] Wherein, the interface creation unit 301 is configured to create a pair of socket interfaces connected to each other, and obtain two file descriptors respectively pointing to the two socket interfaces.
[0113] The channel construction unit 302 is used to use one of the two file descriptors acquired by the interface creation unit 301 as the socket access interface of the rild process.
[0114] The channel sharing unit 303 is used to share the socket interface pointed to by another file descriptor obtained by the interface creation unit 301 with each container in the mobile terminal, so that th...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


