CN116931846A - Method for finding and using local network printer by cloud desktop and storage medium - Google Patents
Method for finding and using local network printer by cloud desktop and storage medium Download PDFInfo
- Publication number
- CN116931846A CN116931846A CN202310716751.2A CN202310716751A CN116931846A CN 116931846 A CN116931846 A CN 116931846A CN 202310716751 A CN202310716751 A CN 202310716751A CN 116931846 A CN116931846 A CN 116931846A
- Authority
- CN
- China
- Prior art keywords
- address
- network printer
- local client
- network
- cloud desktop
- 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
- 238000000034 method Methods 0.000 title claims abstract description 28
- 230000004044 response Effects 0.000 claims abstract description 42
- 238000007639 printing Methods 0.000 claims abstract description 39
- 238000012544 monitoring process Methods 0.000 claims description 5
- 230000006854 communication Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 4
- 238000004891 communication Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 5
- 238000002955 isolation Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/148—Migration or transfer of sessions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1278—Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
- G06F3/1285—Remote printer device, e.g. being remote from client or server
- G06F3/1289—Remote printer device, e.g. being remote from client or server in server-client-printer device configuration, e.g. the server does not see the printer
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/452—Remote windowing, e.g. X-Window System, desktop virtualisation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method and a storage medium for discovering and using a local network printer by a cloud desktop, wherein the method comprises the following steps: the cloud desktop intercepts the broadcast data packet and sends the broadcast data packet to the local client; the local client modifies and broadcasts the source address and the destination address of the broadcast data packet according to the address of the local client and the broadcast address of the local network where the local client is located; the local client receives a response packet returned by the network printer, and modifies the destination address of the response packet according to the address of the cloud desktop; the cloud desktop intercepts an equipment information request and sends the equipment information request to the network printer through a local client, and receives an equipment information data packet returned by the network printer through the local client; creating network printer devices on the local client and the cloud desktop respectively; and acquiring a printing request through a network printer equipment port of the cloud desktop, and sending the printing request to a network printer through the network printer equipment port of the local client. The invention can directly find and use the local network printer on the cloud desktop.
Description
Technical Field
The present invention relates to the field of network printers, and in particular, to a method and a storage medium for discovering and using a local network printer on a cloud desktop.
Background
The cloud desktop is an application of cloud computing technology in a system, namely, a virtualization technology is simply used to install a virtualization software in a server in a data center machine room, and then virtual machines of a plurality of desktops are created by configuring the software, wherein the virtual machines have relatively independent CPU and memory resources, so that an actual server can be divided into a plurality of virtual machines, and the virtual machines are provided for a plurality of users to be used independently, and different users can not mutually preempt the CPU and the memory resources and can not mutually conflict due to the operation of the same machine.
The network printer is a new printer operating mode that is different from the traditional printer. Compared with the traditional printer which needs to be directly connected to a working computer through a cable for use, the network printer can be queried by all working computers in a local area network through an access network by the built-in network card, and can be added to any computer, so that the trouble of connecting wires is avoided, printing can be carried out one to many, and the printing distance is greatly expanded.
However, when the user is using the cloud desktop, because the network environment where the cloud desktop is located is often isolated from the network environment where the local client is located, even when such a printer device that has access to the network and has network sharing opened is in the client lan where the user is located, the device can only be queried by the local client, but cannot be queried by the cloud desktop in a different network environment. This results in the inability of the user to directly connect and operate the network printer device in the local client lan environment at the cloud desktop.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: a method and a storage medium for discovering and using a local network printer on a cloud desktop are provided, so that a user can directly discover and use the local network printer on the cloud desktop.
In order to solve the technical problems, the invention adopts the following technical scheme: a method of cloud desktop discovery and use of a local network printer, comprising:
when a cloud desktop sends a broadcast data packet, intercepting the broadcast data packet, and sending the broadcast data packet to a local client, wherein the broadcast data packet is used for searching a network printer;
the local client modifies the source address and the destination address of the broadcast data packet according to the address of the local client and the broadcast address of the local network where the local client is located, and broadcasts the modified broadcast data packet;
the local client receives a response packet returned by the network printer according to the broadcast data packet, modifies the destination address of the response packet according to the address of the cloud desktop, and sends the modified response packet to the cloud desktop;
when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, sending the device information request to the network printer through the local client, and receiving a device information data packet returned by the network printer through the local client;
according to the device information data packet, a first network printer device is established on a local client, and a second network printer device is established on a cloud desktop;
the cloud desktop acquires a printing request by monitoring a port corresponding to the second network printer device, and sends the printing request to the network printer through the port corresponding to the first network printer device in the local client side, so that the network printer performs printing operation according to the printing request.
The invention also proposes a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements a method as described above.
The invention has the beneficial effects that: the network printer is found and created on the cloud desktop through redirecting the communication process between the cloud desktop and the network printer in the local network environment; after the network printer device is established, port mapping is carried out on the ports of the network printer device, so that the cloud desktop can be used for the network printer in the local network environment. The invention enables the user to directly find and use the local network printer on the cloud desktop without being unable to use the network sharing device due to isolation of the network environment, thereby improving user experience.
Drawings
FIG. 1 is a flow chart of a method of cloud desktop discovery and use of a local network printer of the present invention;
FIG. 2 is a schematic flow diagram of a network printer discovered and used in the prior art;
fig. 3 is a flowchart of a method according to a first embodiment of the present invention.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
Referring to fig. 1, a method for discovering and using a local network printer by a cloud desktop includes:
when a cloud desktop sends a broadcast data packet, intercepting the broadcast data packet, and sending the broadcast data packet to a local client, wherein the broadcast data packet is used for searching a network printer;
the local client modifies the source address and the destination address of the broadcast data packet according to the address of the local client and the broadcast address of the local network where the local client is located, and broadcasts the modified broadcast data packet;
the local client receives a response packet returned by the network printer according to the broadcast data packet, modifies the destination address of the response packet according to the address of the cloud desktop, and sends the modified response packet to the cloud desktop;
when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, sending the device information request to the network printer through the local client, and receiving a device information data packet returned by the network printer through the local client;
according to the device information data packet, a first network printer device is established on a local client, and a second network printer device is established on a cloud desktop;
the cloud desktop acquires a printing request by monitoring a port corresponding to the second network printer device, and sends the printing request to the network printer through the port corresponding to the first network printer device in the local client side, so that the network printer performs printing operation according to the printing request.
From the above description, the beneficial effects of the invention are as follows: the user can directly find and use the local network printer on the cloud desktop, and user experience is improved.
Further, when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, sending the device information request to the network printer through the local client, and receiving a device information data packet returned by the network printer through the local client; according to the device information data packet, a first network printer device is created on a local client, and a second network printer device is created on a cloud desktop, specifically:
when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, and sending the device information request to a local client, wherein the device information request is used for requesting device information from the network printer;
the local client modifies the source address and the destination address of the equipment information request according to the address of the local client and the address of the network printer, and sends the modified equipment information request to the network printer;
the local client receives an equipment information data packet returned by the network printer according to the equipment information request, and creates first network printer equipment according to the equipment information data packet;
the local client modifies the destination address of the equipment information data packet according to the address of the cloud desktop, and sends the modified equipment information data packet to the cloud desktop;
and the cloud desktop creates a second network printer device according to the device information data packet.
As can be seen from the above description, the device information request and feedback between the cloud desktop and the local network printer are redirected through the local client, so that the cloud desktop can complete the communication process of handshaking with the network printer, and the creation of the corresponding network printer device on the cloud desktop is completed.
Further, the cloud desktop acquires a print request by monitoring a port corresponding to the second network printer device, and sends the print request to the network printer through the port corresponding to the first network printer device in the local client, so that the network printer performs a print operation according to the print request, specifically:
the cloud desktop monitors a port corresponding to the second network printer device, acquires a printing request for accessing the port, and sends the printing request to a local client;
the local client modifies the source address and the destination address of the printing request according to the address of the local client and the address of the network printer, and sends the printing request to the network printer through a port corresponding to the first network printer device so that the network printer performs printing operation according to the printing request.
As can be seen from the above description, after the network printer device on the cloud desktop is created, a layer of port mapping is performed through the ports occupied by the network printer, so that the request made by the user for the network printer can be sent to the network printer in the local client network environment.
Further, the local client modifies the source address and the destination address of the broadcast data packet according to the address of the local client and the broadcast address of the local network, specifically:
the local client terminal respectively modifies the source IP address, the source MAC address and the source network card information in the broadcast data packet into the IP address, the MAC address and the network card information of the local client terminal;
the local client modifies the destination IP address and the destination MAC address in the broadcast data packet into the broadcast address of the local network where the local client is located, and modifies the destination network card information into the network card information of the gateway of the local network where the local client is located.
As can be seen from the above description, the destination address of the broadcast data packet is modified to be the broadcast address of the local area network where the local client is located, so that the broadcast data packet can be broadcast in the local area network; the local client can receive the response packet returned by the network printer by modifying the source address of the broadcast data packet to the address of the local client.
Further, the modifying the destination address of the response packet according to the address of the cloud desktop specifically includes:
and respectively modifying the destination IP address, the destination MAC address and the destination network card information of the response packet into the IP address, the MAC address and the network card information of the cloud desktop.
As can be seen from the above description, the cloud desktop can receive the response packet by modifying the destination address of the response packet to the address of the cloud desktop.
Further, the local client modifies the source address and the destination address of the device information request according to the address of the local client and the address of the network printer, specifically:
the local client terminal respectively modifies the source IP address, the source MAC address and the source network card information of the equipment information request into the IP address, the MAC address and the network card information of the local client terminal, and respectively modifies the destination IP address, the destination MAC address and the destination network card information of the equipment information request into the IP address, the MAC address and the network card information of the network printer.
As can be seen from the above description, the network printer can receive the device information request by modifying the destination address of the device information request to the address of the network printer; the source address of the equipment information request is modified to be the address of the local client, so that the local client can receive the equipment information data packet returned by the network printer.
Further, the local client modifies the destination address of the device information data packet according to the address of the cloud desktop, specifically:
and the local client modifies the destination IP address, the destination MAC address and the destination network card information of the equipment information data packet into the IP address, the MAC address and the network card information of the cloud desktop respectively.
As can be seen from the above description, the cloud desktop can receive the device information data packet by modifying the destination address of the device information data packet to the address of the cloud desktop.
Further, the local client side and the cloud desktop are communicated through a virtual channel.
The invention also proposes a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, implements a method as described above.
Example 1
Referring to fig. 2-3, a first embodiment of the present invention is as follows: a method of cloud desktop discovery and use of local network printers.
Before describing the embodiment, a procedure of the prior art from discovery to connection and finally successful printing of a file by a network printer is described, as shown in fig. 2, after the network printer is connected, the network printer is assigned an IP address in a local area network, and at this time, the network printer becomes a network device in the local area network, and can receive all broadcast data packets in the local area network.
When the user selects to add a network printer, the user's working computer will send broadcast notice to the local area network where it is located, and inquire whether all network devices in the local area network are printers shared by the network. The packet is sent in the form of UDP.
When the network printer in the local area network receives the broadcast packet, a point-to-point response packet is initiated according to the source IP address in the broadcast packet, and then the working computer of the user receives the response packet and sends the confirmation information back, so that the handshake of the two parties is completed. And then the network printer sends the equipment information (including information of manufacturers, models, functions and the like) to the working computer of the user in the form of a message, and after the working computer collects the equipment information, the corresponding equipment driver can be installed according to the information, and finally the equipment addition is completed.
After the network printer is added, generally, the network printer occupies a port 9100 on the user's working computer, when the user tries to print, the data such as these operations and the print file data stream are all sent to the network printer through the port, and the network printer receives these data and performs the corresponding operations, so that the function of network printing can be realized.
Therefore, in this embodiment, in order to implement a function of allowing a user to query and connect to a network printer in a local client network on a cloud desktop, a data packet carrying information exchanged between both parties in the above-mentioned flow is reprocessed. For searching a broadcast packet initiated by a user on a cloud desktop, a service is required to intercept the broadcast packet and resend the broadcast at a local client, and then a response packet from a network printer received by the local client is sent back to the cloud desktop as a response, so that the cloud desktop can directly create a network printer device from a network environment of the local client. In this process, all the data packets need to be repackaged with information such as source IP and destination IP, MAC addresses, etc. due to the different network environments, so as to enable devices in different network environments to communicate.
Specifically, as shown in fig. 3, the method of the present embodiment includes the following steps:
s1: when the cloud desktop sends a broadcast data packet for searching the network printer, the broadcast data packet is intercepted, and the broadcast data packet is sent to a local client.
Specifically, when the user selects to search for the printer on the cloud desktop, the cloud desktop sends out a broadcast data packet to the network segment. For example, when a cloud desktop with an IP address 192.168.4.192 sends a broadcast for searching for a network printer device, the destination IP address in the message is 192.168.4.255, which means that all devices with network segment 4 will receive the broadcast, and the source IP address in the broadcast is the IP address of the cloud desktop itself, that is 192.168.4.192. If the network printer of the network segment receives the broadcast, the IP address of the cloud desktop is obtained from the message, and a response is sent. Therefore, the interception service of the cloud desktop intercepts the broadcast data packet and sends the broadcast data packet to the specific service of the local client through the virtual channel between the local client and the cloud desktop.
S2: and the local client modifies the source address and the target address of the broadcast data packet according to the address of the local client and the broadcast address of the local network where the local client is located, and broadcasts the modified broadcast data packet.
Specifically, the local client modifies the source IP address in the broadcast data packet into the own IP address, modifies the source MAC address into the own MAC address, and modifies the source network card information into the own network card information; and modifying the destination IP address and the destination MAC address in the broadcast data packet into the broadcast address of the local area network where the local client is located, and modifying the destination network card information into the network card information of the gateway of the local area network where the local client is located.
For example, assuming that the IP address of the local client is 192.168.45.Xxx, the destination IP address of the modified broadcast packet is 192.168.45.255, and the source IP address, that is, the IP address of the local client, the MAC address and the network card information are modified accordingly, otherwise, the response packet returned by the network printer cannot be received by the local client.
The local client then broadcasts the modified broadcast data packet over the local area network.
S3: and the local client receives a response packet returned by the network printer according to the broadcast data packet, modifies the destination address of the response packet according to the address of the cloud desktop, and sends the modified response packet to the cloud desktop.
Specifically, after a network printer in the local area network receives the broadcast data packet, a response packet is returned to the local client, where the source IP address, the source MAC address and the source network card information in the response packet are the IP address, the MAC address and the network card information of the network printer, and the destination IP address, the destination MAC address and the destination network card information are the IP address, the MAC address and the network card information of the local client.
The source address does not need to be modified, and the local client modifies the destination address into the address of the cloud desktop, namely, the destination IP address, the destination MAC address and the destination network card information of the response packet are respectively modified into the IP address, the MAC address and the network card information of the cloud desktop.
And then the modified response packet is sent to the corresponding service of the cloud desktop through a virtual channel between the local client and the cloud desktop, a corresponding network request is initiated on the cloud desktop by the service, and finally the network request is received and processed by a network card of the cloud desktop.
S4: when the cloud desktop sends the equipment information request according to the response packet, intercepting the equipment information request and sending the equipment information request to a local client.
Specifically, after receiving the response packet, the cloud desktop sends a device information request, where the device information request is used to request device information to the network printer, that is, the destination address of the device information request is the source address of the response packet, that is, the address of the network printer. At the moment, the equipment information request is intercepted, and the equipment information request is sent to the local client through a virtual channel between the local client and the cloud desktop.
S5: the local client modifies the source address and the destination address of the equipment information request according to the address of the local client and the address of the network printer, and sends the modified equipment information request to the network printer.
In step S3, the local client may obtain the IP address, the MAC address, and the network card information of the network printer according to the received response packet. In this step, the local client modifies the source IP address, the source MAC address, and the source network card information of the device information request to its own IP address, MAC address, and network card information, and modifies the destination IP address, destination MAC address, and destination network card information of the device information request to the IP address, MAC address, and network card information of the network printer, respectively.
S6: and the local client receives an equipment information data packet returned by the network printer according to the equipment information request, and creates first network printer equipment according to the equipment information data packet.
Specifically, after receiving the device information request, the network printer returns a device information data packet to the local client, and the local client can locally create the first network printer according to the device information in the device information data packet, namely, according to the device driver corresponding to the network printer, to finish the local addition of the device. The equipment information comprises information of manufacturers, models, functions and the like.
S7: and the local client modifies the destination address of the equipment information data packet according to the address of the cloud desktop and sends the modified equipment information data packet to the cloud desktop.
Specifically, the local client may further modify the destination IP address, the destination MAC address, and the destination network card information of the device information packet into the IP address, the MAC address, and the network card information of the cloud desktop, respectively. And then the modified equipment information data packet is sent to the cloud desktop through a virtual channel between the local client and the cloud desktop.
S8: and the cloud desktop creates a second network printer device according to the device information data packet.
After the cloud desktop receives the device information data packet, installing a corresponding device driver on the cloud desktop according to the device information in the device information data packet, and completing the addition of the device on the cloud desktop.
After creating a network printer from the local client network environment on the cloud desktop, the user cannot directly operate the network printer on the cloud desktop. Because the network printer sent to the IP address is in another network, namely the address of the network printer is in the local client network environment, the cloud desktop cannot be directly accessed, a layer of port proxy is also required to be made on the port occupied by the network printer, so that the request made by the user on the network printer can be sent to the corresponding network printer in the local client network environment, and finally, the function of using the network printer on the cloud desktop by the user can be realized.
Specifically, the method of the present embodiment further includes the following steps:
s9: the cloud desktop monitors a port corresponding to the second network printer device, acquires a printing request accessing the port, and sends the printing request to a local client.
Specifically, a corresponding service on the cloud desktop establishes a SOCKET monitor, receives all requests for accessing the port, and sends the requests to the local client through the virtual channel.
S10: the local client modifies the source address and the destination address of the printing request according to the address of the local client and the address of the network printer, and sends the printing request to the network printer through a port corresponding to the first network printer device so that the network printer performs printing operation according to the printing request.
Specifically, after receiving the print request, the local client modifies the source address of the print request to the address of the local client, modifies the destination address of the print request to the address of the network printer, and then sends the print request to the network printer through the port corresponding to the first network printer device.
The network printer in the local client environment receives this print request and performs the printing operation.
Further, if the network printer needs to return the feedback information, the feedback information is also sent to the local client, and the local client modifies the destination address of the feedback information into the address of the cloud desktop, so that the feedback information is sent to the cloud desktop, and the printing is notified to be completed.
According to the embodiment, the user can directly find and use the local network printer on the cloud desktop, network sharing equipment can not be used due to isolation of a network environment, and user experience is improved.
Example two
The present embodiment is a computer-readable storage medium corresponding to the above embodiment, and has a computer program stored thereon, which when executed by a processor, implements the steps of the method for cloud desktop discovery and use of a local network printer as in the above embodiment, and achieves the same technical effects, which will not be described here.
In summary, according to the method and the storage medium for discovering and using the local network printer by the cloud desktop, the network printer is discovered and created on the cloud desktop through redirecting the communication process between the cloud desktop and the network printer in the local network environment; after the network printer device is established, port mapping is carried out on the ports of the network printer device, so that the cloud desktop can be used for the network printer in the local network environment. The invention enables the user to directly find and use the local network printer on the cloud desktop without being unable to use the network sharing device due to isolation of the network environment, thereby improving user experience.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.
Claims (9)
1. A method of cloud desktop discovery and use of a local network printer, comprising:
when a cloud desktop sends a broadcast data packet, intercepting the broadcast data packet, and sending the broadcast data packet to a local client, wherein the broadcast data packet is used for searching a network printer;
the local client modifies the source address and the destination address of the broadcast data packet according to the address of the local client and the broadcast address of the local network where the local client is located, and broadcasts the modified broadcast data packet;
the local client receives a response packet returned by the network printer according to the broadcast data packet, modifies the destination address of the response packet according to the address of the cloud desktop, and sends the modified response packet to the cloud desktop;
when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, sending the device information request to the network printer through the local client, and receiving a device information data packet returned by the network printer through the local client;
according to the device information data packet, a first network printer device is established on a local client, and a second network printer device is established on a cloud desktop;
the cloud desktop acquires a printing request by monitoring a port corresponding to the second network printer device, and sends the printing request to the network printer through the port corresponding to the first network printer device in the local client side, so that the network printer performs printing operation according to the printing request.
2. The method for discovering and using a local network printer according to claim 1, wherein when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, sending the device information request to the network printer through a local client, and receiving a device information data packet returned by the network printer through the local client; according to the device information data packet, a first network printer device is created on a local client, and a second network printer device is created on a cloud desktop, specifically:
when the cloud desktop sends a device information request according to the response packet, intercepting the device information request, and sending the device information request to a local client, wherein the device information request is used for requesting device information from the network printer;
the local client modifies the source address and the destination address of the equipment information request according to the address of the local client and the address of the network printer, and sends the modified equipment information request to the network printer;
the local client receives an equipment information data packet returned by the network printer according to the equipment information request, and creates first network printer equipment according to the equipment information data packet;
the local client modifies the destination address of the equipment information data packet according to the address of the cloud desktop, and sends the modified equipment information data packet to the cloud desktop;
and the cloud desktop creates a second network printer device according to the device information data packet.
3. The method for discovering and using a local network printer according to claim 1, wherein the cloud desktop acquires a print request by monitoring a port corresponding to the second network printer device, and sends the print request to the network printer through the port corresponding to the first network printer device in the local client, so that the network printer performs a printing operation according to the print request, specifically:
the cloud desktop monitors a port corresponding to the second network printer device, acquires a printing request for accessing the port, and sends the printing request to a local client;
the local client modifies the source address and the destination address of the printing request according to the address of the local client and the address of the network printer, and sends the printing request to the network printer through a port corresponding to the first network printer device so that the network printer performs printing operation according to the printing request.
4. The method for discovering and using a local network printer according to claim 1, wherein the local client modifies the source address and the destination address of the broadcast packet according to the address of the local client and the broadcast address of the local network in which the local client is located, specifically:
the local client terminal respectively modifies the source IP address, the source MAC address and the source network card information in the broadcast data packet into the IP address, the MAC address and the network card information of the local client terminal;
the local client modifies the destination IP address and the destination MAC address in the broadcast data packet into the broadcast address of the local network where the local client is located, and modifies the destination network card information into the network card information of the gateway of the local network where the local client is located.
5. The method for discovering and using the local network printer by the cloud desktop according to claim 1, wherein the modifying the destination address of the response packet according to the address of the cloud desktop is specifically as follows:
and respectively modifying the destination IP address, the destination MAC address and the destination network card information of the response packet into the IP address, the MAC address and the network card information of the cloud desktop.
6. The method for discovering and using a local network printer according to claim 2, wherein the local client modifies the source address and the destination address of the device information request according to the address of the local client and the address of the network printer, specifically:
the local client terminal respectively modifies the source IP address, the source MAC address and the source network card information of the equipment information request into the IP address, the MAC address and the network card information of the local client terminal, and respectively modifies the destination IP address, the destination MAC address and the destination network card information of the equipment information request into the IP address, the MAC address and the network card information of the network printer.
7. The method for discovering and using a local network printer by a cloud desktop according to claim 2, wherein the local client modifies the destination address of the device information packet according to the address of the cloud desktop, specifically:
and the local client modifies the destination IP address, the destination MAC address and the destination network card information of the equipment information data packet into the IP address, the MAC address and the network card information of the cloud desktop respectively.
8. The method of discovering and using local network printers according to any of claims 1-7, wherein communication between the local client and the cloud desktop is via a virtual channel.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310716751.2A CN116931846A (en) | 2023-06-16 | 2023-06-16 | Method for finding and using local network printer by cloud desktop and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310716751.2A CN116931846A (en) | 2023-06-16 | 2023-06-16 | Method for finding and using local network printer by cloud desktop and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116931846A true CN116931846A (en) | 2023-10-24 |
Family
ID=88393312
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310716751.2A Pending CN116931846A (en) | 2023-06-16 | 2023-06-16 | Method for finding and using local network printer by cloud desktop and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116931846A (en) |
-
2023
- 2023-06-16 CN CN202310716751.2A patent/CN116931846A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8429304B2 (en) | Information processing apparatus and communication control method | |
JP5178539B2 (en) | Information processing apparatus, information processing apparatus control method, session management system, and program | |
JP3411159B2 (en) | Mobile computer support system | |
US8549286B2 (en) | Method and system for forwarding data between private networks | |
US20130111066A1 (en) | Device and Method for Split DNS Communications | |
JP2002502152A (en) | Proxy server for TCP / IP network address mobile terminal | |
CN109729187B (en) | Proxy communication method, system, device and storage medium | |
JP2005525750A (en) | Peer-to-peer network communication by network address translation (NAT) | |
JP5425320B2 (en) | Information processing apparatus, information processing apparatus control method, and program | |
CN112583618B (en) | Method, device and computing equipment for providing network service for business | |
US7468804B2 (en) | Techniques for printer-side network cluster printing | |
CN112333017B (en) | Service configuration method, device, equipment and storage medium | |
WO2021056738A1 (en) | Distributed system nat traversal method, apparatus, and device, and storage medium | |
US20230291706A1 (en) | Method for accessing network, media gateway, electronic device and storage medium | |
CN112968965B (en) | Metadata service method, server and storage medium for NFV network node | |
CN113364741A (en) | Application access method and proxy server | |
US10992635B2 (en) | Establishing connection between different overlay networks using edge application gateway | |
CN114025009B (en) | Method, system, proxy server and device for forwarding request | |
KR20050050954A (en) | Device for controlling network device on private network and method thereof | |
US11005706B2 (en) | Method for configuring forwarding table for user equipment, apparatus, and system | |
KR100597405B1 (en) | System and method for relaying data by use of socket applicaton program | |
CN116931846A (en) | Method for finding and using local network printer by cloud desktop and storage medium | |
WO2023007248A1 (en) | System and method for independent binding of virtual networks overlay using a physical network topology | |
US7095746B1 (en) | Method and apparatus for sub-network devices without direct layer-2 communication and coupled to a common forwarding agent interface to communicate through layer-3 | |
JP2000022708A (en) | Mobile terminal for mobile ip system and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |