Summary of the invention
Embodiment of the present invention provides a kind of method, Apparatus and system that dns server address is set; The access terminals equipment of providing services on the Internet for the main frame of operation Mac OS X operating system at present can be solved and automatic configuration of IP v6DNS server address can't be realized; There is manual configuration dns server address complex operation; Inefficient problem can dispose dns server address automatically, and is simple to operate, efficient is high.
A kind of method that dns server address is set, the main frame that is used to operation Mac OS X operating system is provided with dns server address, has set up with said main frame that IPv6 is connected and main frame has been provided with the IP address, comprising:
Receive the querying command that said main frame sends, dns server address is back to said main frame according to querying command, so that the API of the said Mac OS of said host computer invokes X operating system, for said main frame is provided with this dns server address.
A kind of device that dns server address is set, the main frame that is used to operation Mac OS X operating system is provided with dns server address, comprising: be used for setting up the linkage unit that IPv6 is connected with the main frame of operation Mac OS X operating system, also comprise:
Receiving element and main control unit; Wherein,
Said receiving element is connected with said linkage unit, is used to receive the querying command that said main frame sends, and is sent to said main control unit;
Said main control unit is connected with said receiving element, is used for dns server address being back to said main frame according to querying command, so that the API of the said Mac OS of said host computer invokes X operating system, for said main frame is provided with this dns server address.
A kind of method that dns server address is set, the main frame that is used to operation Mac OS X operating system is provided with dns server address, and said main frame has set up with access terminals equipment that IPv6 is connected and said main frame has been provided with the IP address, comprising:
Obtain dns server address through querying command from said access terminals equipment;
Call the API of said Mac OS X operating system, the dns server address that obtains for said main frame setting.
A kind of device that dns server address is set is used for moving the main frame of Mac OS X operating system, comprising: be used for setting up the connection that IPv6 is connected with access terminals equipment and set up the unit, also comprise:
Master control processing unit and address setting unit; Wherein,
Said master control processing unit is set up the unit connection with said the connection, is used for obtaining dns server address and being sent to said address setting unit from said access terminals equipment through querying command;
Said address setting unit; Be connected with said master control processing unit; Be used for according to said master control processing unit calling the API of said Mac OS X operating system the dns server address that obtains for said main frame setting from the dns server address that access terminals equipment obtains.
A kind of system that dns server address is set comprises:
The main frame and the access terminals equipment of operation Mac OS X operating system, the device that dns server address is set that access terminals equipment adopts the embodiment of the invention two to provide;
Be provided with the device that dns server address is set that the embodiment of the invention four provides in the said main frame, said device is connected with said access terminals devices communicating, is used to be provided with the dns server address of said main frame.
Can find out by the above-mentioned technical scheme that provides; Mac OS X operating system main frame through operation in the embodiment of the present invention cooperates with access terminals equipment; Utilize querying command, obtain the dns server address information of configuration usefulness after, automatically accomplish configuration to the main frame dns server address.Thereby can realize utilizing the access terminals equipment of realizing the network service to dispose the main frame dns server address of Mac OS X operating system automatically, need not user's manual operations, improve convenience and the allocative efficiency used.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on embodiments of the invention, those of ordinary skills belong to protection scope of the present invention not making the every other embodiment that is obtained under the creative work prerequisite.
Core of the present invention is: (access terminals equipment can be the equipment that provides network to be connected for the main frame that moves Mac OS X operating system with access terminals equipment to make the main frame that moves Mac OS X operating system; Like wireless Internet card or router, modulator-demodulator etc.) set up IPv6 and connect after; Through cooperating of access terminals equipment and said main frame; After obtaining the dns server address information of configuration usefulness, accomplish configuration automatically to the main frame dns server address of operation Mac OS X operating system.
Embodiment one
Present embodiment provides a kind of method that dns server address is set; The main frame that is used to operation Mac OS X operating system is provided with dns server address; Access terminals equipment has set up with said main frame that IPv6 is connected and main frame has been provided with the IP address, and this method is as shown in Figure 1, may further comprise the steps:
Step 1 receives the querying command that main frame sends, and according to querying command dns server address is back to said main frame;
Step 2 makes the API of the said Mac OS of said host computer invokes X operating system, for main frame is provided with this dns server address.
In the above-mentioned steps 1, according to querying command dns server address is back to said main frame and is: obtain dns server address from said access terminals equipment through USB order or HTTP order.Concrete which kind of querying command that adopts can be confirmed according to the type of access terminals equipment, if access terminals equipment is the usb data card, then can adopt the USB order, if access terminals equipment is the router of Ethernet interface, then querying command can adopt the HTTP order.
In the said method, access terminals equipment and said main frame set up that IPv6 is connected and main frame is provided with the IP address and can is:
Access terminals equipment receives the ICMPv6 order that main frame sends, and according to the ICMPv6 order that receives the IP address is back to main frame, makes main frame that this IP address is set.Wherein according to the ICMPv6 order that receives the IP address being back to main frame is:
Access terminals equipment utilizes the ICMPv6 object to return the IP address to said main frame according to the ICMPv6 request of the inquiry IP address that receives, and the IP address of returning is the IPv6 address.
In the said method, IP address that access terminals equipment obtains and dns server address are IP address and the dns server address that access terminals obtains from network side in the connection procedure of foundation and network side.
Embodiment two
Present embodiment provides a kind of device that dns server address is set; The main frame that is used to operation Mac OS X operating system is provided with dns server address; This device can be used as the access terminals equipment that the network connection is provided to the main frame of operation Mac OS X operating system; As can be wireless Internet card or router, modulator-demodulator etc.), as shown in Figure 2, this device comprises: linkage unit 21, receiving element 22 and main control unit 23;
Wherein, linkage unit 21 is used for setting up IPv6 with the main frame of operation Mac OS X operating system and is connected;
Receiving element 22 is connected with linkage unit 21, is used to receive the ICMPv6 order that main frame sends, and is sent to said main control unit; And be used to receive the querying command that said main frame sends, and be sent to said main control unit;
Main control unit 23 is connected with receiving element 22, is used for according to the ICMPv6 order that receives the IP address being back to said main frame, so that said main frame is provided with this IP address; And dns server address is back to said main frame according to querying command, so that the API of the said Mac OS of said host computer invokes X operating system, for main frame is provided with this dns server address.
Embodiment three
The embodiment of the invention provides a kind of method that dns server address is set; The main frame that is used to operation Mac OS X operating system is provided with dns server address; Said main frame has set up with access terminals equipment that IPv6 is connected and main frame has been provided with the IP address, and this method is as shown in Figure 3, may further comprise the steps:
Step 31 is obtained dns server address through querying command from said access terminals equipment;
Step 32 is called the API of said Mac OS X operating system, the dns server address that obtains for said main frame setting.
In the above-mentioned steps 31, obtain dns server address through querying command from said access terminals equipment and be: obtain dns server address from said access terminals equipment through USB order or HTTP order.Concrete which kind of querying command that adopts can be confirmed according to the type of access terminals equipment, if access terminals equipment is the usb data card, then can adopt the USB order, if access terminals equipment is the router of Ethernet interface, then querying command can adopt the HTTP order.
In the said method, operation Mac OS X operating system main frame and access terminals equipment set up that IPv6 is connected and main frame is provided with the IP address and can is:
Main frame obtains the IP address from access terminals equipment, the IP address that the main frame setting is obtained through the ICMPv6 order.Wherein main frame obtains the IP address through ICMPv6 order from access terminals equipment and specifically may further comprise the steps:
Confirm to send the ICMPv6 that inquires about the IP address to said access terminals equipment and to ask with after access terminals equipment is set up IPv6 and is connected;
Receive the IP address that said access terminals equipment returns according to the ICMPv6 request of said inquiry IP address.Can receive the IP address that access terminals equipment utilization ICMPv6 object returns, the IP address of returning is the IPv6 address.
In the said method, main frame is IP address and the dns server address that access terminals obtains from network side the connection procedure of foundation and network side from IP address and the dns server address that access terminals equipment obtains.
To combine Fig. 4 that embodiment of the invention method is done to describe in detail further below.
The main frame of operation Mac OS X operating system is connected with the access terminals devices communicating; And the driver and the resident process of on main frame, installing with the access terminals coordinative composition of equipments (are the core resident service processes; Be the resident process of highest administrator authority that obtains the Mac OS X operating system of main frame operation); Main frame can be connected to the IPv6 network through access terminals equipment, after access terminals equipment is connected to the IPv6 network, DNS information is passed to the driver of access terminals equipment; Driver passes through resident process with DNS information, by the application program interface function (API) of this resident process transfer Mac OS X operating system with the DNS information setting in main frame.
As shown in Figure 4, step 41 is: the driver (being and the supporting driver of access terminals) that moves on the main frame of operation Mac OS X operating system is set up IPv6 with access terminals equipment and is connected;
Step 42 is: main frame receives the connection notice that access terminals equipment is sent through the driver of operation on it;
Step 43 is: main frame is asked to access terminals equipment query IP address through ICMPv6request through the driver of operation on it;
Step 44 is: main frame receives the IP address that access terminals equipment returns through ICMPv6 response through the driver of operation on it;
Step 45 is: the IP address that the operating system of moving on the main frame obtains according to the driver that moves on the main frame, the IP address of configure host automatically;
Step 46 is: main frame passes through querying command to access terminals equipment query dns server address through the driver of operation on it;
Step 47 is: main frame receives the dns server address that access terminals equipment returns through the driver of operation on it, and transparent transmission is to the resident process on the main frame that runs on that obtains the root authority;
Step 48 is: the API that runs on the resident process transfer Mac OS X operating system on the main frame utilizes the dns server address of receiving that dns server address is set.
In the flow process of above-mentioned Fig. 4, belong to from step 41 to step 44 and to set up that IPv6 connects and obtain the process of IP address through the ICMPv6 order; In step 46, main frame is inquired about dns server address through the driver of operation on it from access terminals equipment; Main frame passes through dns server address the resident process of moving on the main frame through the driver of operation on it in the step 47; The dns server address of main frame is set by the resident process transfer API of system that moves on this main frame in the step 48.
In the said method, that moves on the main frame should resident process just have root authority (be system's highest administrator authority, otherwise can't carry out the API that dns server address is set) when mounted; When the operating system of each main frame restarts, can start automatically like this.
Through the method that the embodiment of the invention provides, realized on Mac OS X operating system, setting up after the connection of IPv6 network, can realize the dns server address of automatic configure host, need not user's manual operations.
Embodiment four
Present embodiment provides a kind of device that dns server address is set, and is used for moving the main frame of Mac OS X operating system, and as shown in Figure 5, this device comprises: connect and set up unit 51, master control processing unit 52 and address setting unit 53;
Wherein, connect and set up unit 51, be used for setting up IPv6 and be connected with access terminals equipment;
Master control processing unit 52 is set up unit 51 and is connected with being connected, be used for confirming that access terminals equipment that main frame connects is set up IPv6 and connected after, obtain the IP address through the ICMPv6 order from access terminals equipment, and be sent to the address setting unit; And be used for obtaining dns server address and being sent to the address setting unit from access terminals equipment through querying command;
Address setting unit 53 is connected with master control processing unit 52, and being used for according to the master control processing unit is that main frame is provided with this IP address from the IP address that access terminals equipment obtains; And be used for according to the master control processing unit calling the API of said Mac OS X operating system the dns server address that obtains for the main frame setting from the dns address that access terminals equipment obtains.
Embodiment five
Present embodiment provides a kind of system that dns server address is set, and is as shown in Figure 6, and this system comprises:
The main frame 61 and access terminals equipment 63 of operation Mac OS X operating system, the device that dns server address is set that access terminals equipment 63 adopts above-mentioned enforcement two to provide;
Be provided with the device that dns server address is set 62 that the foregoing description four provides in the said main frame, said device 62 is connected with said access terminals equipment 63 communications, is used to be provided with the dns server address of said main frame 61.
Description through above execution mode; The those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform; Can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product, and this computer software product is stored in the storage medium that can read, like the floppy disk of computer; Hard disk or CD etc.; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; The variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claims.