CN1323352C - Start and update method for VxWorks operation system based dynamic host computer configuration protocol server - Google Patents

Start and update method for VxWorks operation system based dynamic host computer configuration protocol server Download PDF

Info

Publication number
CN1323352C
CN1323352C CNB021375607A CN02137560A CN1323352C CN 1323352 C CN1323352 C CN 1323352C CN B021375607 A CNB021375607 A CN B021375607A CN 02137560 A CN02137560 A CN 02137560A CN 1323352 C CN1323352 C CN 1323352C
Authority
CN
China
Prior art keywords
dhcp
address
record
vxworks
dhcp server
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.)
Expired - Fee Related
Application number
CNB021375607A
Other languages
Chinese (zh)
Other versions
CN1490720A (en
Inventor
石伟
周晓星
沈勇
付智敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CNB021375607A priority Critical patent/CN1323352C/en
Publication of CN1490720A publication Critical patent/CN1490720A/en
Application granted granted Critical
Publication of CN1323352C publication Critical patent/CN1323352C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to a method for realizing the startup and update of a dynamic host configuration protocol server on the basis of a VxWorks operating system. The present invention has the improvement that firstly, the startup method of the DHCP server is modified to make the DHCP server independent of a VxWorks kernel, and a startup opportunity is controlled by an application program; secondly, address records are simultaneously and permanently stored by a database method, and the dynamic update of the content in a memory address pool is realized. The present invention has the effect that the present invention solves the problems of inconvenient startup, incomplete refresh address recording function, etc. in the VxWorks with the DHCPS server. The present invention makes the DHCPS server independent of the VxWorks kernel, permanently stores the addresses records by a database, and dynamically updates the content in the memory address pool. Thus, the DHCPS server is easy to maintain and manage.

Description

A kind of based on vxworks operating system realization Dynamic Host Configuration Protocol server startup and method for updating
Technical field
The present invention relates to a kind of based on vxworks operating system realization Dynamic Host Configuration Protocol server startup and method for updating, specifically be a kind of based on vxworks operating system, realize Dynamic Host Configuration Protocol server by application program launching and the method that dynamically updates the memory address pond, being specially adapted to needs finish the network system of the non-disk workstation of bootstrapping by DHCP (DHCP).
Background technology
Vxworks operating system is a kind of embedded real-time operating system that U.S. WindRiver company released in the eighties in 20th century.The application of VxWorks real time operating system in recent years is more and more wider, is one of communication system embedded OS commonly used.Vxworks operating system is supported the TCP/IP network protocol stack, and the user calls by interface function, can realize many application protocols easily.These agreements are embedded in the vxworks operating system kernel, and code can not be revised.
DHCP (DHCP) is one of application layer protocol of vxworks operating system support.The DHCP agreement adopts client/server (Client/Server) mode, is made of two parts: DHCP Server and DHCP Client.After DHCP Client starts, do not have the IP address of oneself, need, to DHCP Server application IP address by protocol interaction.DHCP Server is according to the client computer distributing IP address of certain rule to the request of sending.
Vxworks operating system provides Hook Function for DHCP Server, makes things convenient for permanent storage space that the user opens up oneself with the memory address record.After the system start-up, DHCP Server puts into the memory address pond from the permanent storage space reading of data.The user can will write permanent memory space and memory address pond by Hook Function about configuration information.
But, the embedded DHCP Server of vxworks operating system when starting and the VxWorks kernel bundle, on the one hand, in application program, DHCP Server tends to use file system or database, and file system or database generally just can start after the kernel startup is finished, and embedded DHCP Server Starting mode lacks dirigibility.On the other hand, in system's operational process, bring in constant renewal in DHCP Server memory address pond, but vxworks operating system only provides the function that increases record at present, can't delete, updating memory address pool record according to the user's request needs.
Summary of the invention
The object of the present invention is to provide a kind of based on vxworks operating system realization Dynamic Host Configuration Protocol server startup and method for updating.
The present invention is directed to the deficiency of the embedded DHCP Server of above-mentioned VxWorks, do the improvement of two aspects.The one, the Starting mode of modification DHCP Server makes it to be independent of the VxWorks kernel, and startup is controlled by application program opportunity; The 2nd, adopt database mode permanent storage address record simultaneously, realize dynamically updating the content in the memory address pond.
The present invention is achieved in that a kind of based on vxworks operating system realization Dynamic Host Configuration Protocol server startup and method for updating, it is characterized in that may further comprise the steps:
Make the vxworks operating system kernel: when making the VxWorks kernel, do not add DHCP Server assembly, make DHCP Server assembly and VxWorks kernel relatively independent;
Write DHCP Server Hook Function: Hook Function associates permanent address memory block and memory address pond, and vxworks operating system guarantees the consistance that writes down in database and the memory address pond by Hook Function;
After vxworks operating system kernel and database startup, invokes application starts DHCP Server;
Dynamically update the memory address pond of DHCP Server: in order to the HASH of stored memory address pool information table, realize dynamically updating to record increase, record deletion, record modification by the operation vxworks operating system.
Describedly when making the kernel of vxworks operating system, the header file relevant with DHCP Server extracted, dress up the application program of a DHCP Server by encode seal;
After vxworks operating system started, DHCPServer restarted in first initialization data storehouse system;
DHCP Server reads the address and records in the memory address pond from database.
Described VxWorks system provides two Hook Function interfaces, and by Hook Function, DHCPServer writes dhcp address information and lease information or reads from database, with guarantee database and memory field synchronously.
Described DHCP Server application program is used for the startup of DHCP Server, may further comprise the steps:
Binding DHCP Server is to the Network Interface Unit of appointment, and described Network Interface Unit must be supported the Ethernet data hardwood form of standard, can receive and dispatch broadcast packet;
The pointer of Hook Function is passed to vxworks operating system;
Start the dhcpStart thread, be used to handle the request that DHCP Client sends;
Hook Function is called in dhcpStart thread initialization DHCP Server memory address pond, with the content importing memory address pond of permanent address memory block.
Described method further may further comprise the steps:
Make the vxworks operating system kernel, do not comprise DHCP Server;
Write Hook Function, set up the incidence relation in database and internal storage data district;
After the system start-up, start the VxWorks kernel automatically;
After kernel starts, initialization data storehouse at first;
The application call system function starts DHCP Server;
After the startup, the system call Hook Function reads all records in the database in the memory address pond;
In system's operational process, dynamically update the memory address pond, comprise increase, deletion and the modification of memory address pond record;
When revising the memory address pond, the application call Hook Function upgrades data-base recording simultaneously, to keep synchronous.
The memory address pond of the described DHCP of dynamically updating Server is to realize by data structure hash-member and dhcp-resource in the operation HASH chained list:
When increasing address record, apply for new hash-member and dhcp-resource, the content that write down the address is put into dhcp-resource, be added in the address link list by hash-member then;
When deleting address record, application program finds the address record of needs deletion from the record of address according to the key word of address record, after finding the hash-member that this address is recorded in, this hash-member is deleted from address link list, and discharge this hash-member and the shared internal memory of dhcp-resource, to avoid memory overflow.
When upgrading address record, or find this record, the corresponding contents among the dhcp-resource is revised, or find this record, delete pairing hash-member of this record and dhcp-resource, discharge corresponding internal memory, increase amended being recorded in the address link list again.
Effect of the present invention: solved VxWorks and carried startup inconvenience among the DHCP Server, problems such as scheduler writing function imperfection.It makes DHCP Server be independent of the VxWorks kernel.Adopt database permanent storage address record.Content in the dynamic updating memory address pool of energy.Make DHCP Server more easy care and management.
Description of drawings
Fig. 1 is a DHCP Server operational flow diagram;
Fig. 2 is the storage synoptic diagram in memory address pond.
Embodiment
The startup that DHCP Server is independent of the VxWorks kernel mainly is divided into following three steps:
At first, make the making of VxWorks kernel.When making the VxWorks kernel, do not add DHCP Server assembly.Make DHCP Server and VxWorks kernel relatively independent.
The second, write DHCP Server Hook Function.Hook Function associates permanent address memory block and memory address pond.The VxWorks system guarantees the consistance that writes down in database and the memory address pond by it.
The 3rd, after vxworks operating system kernel and database startup, invokes application starts DHCP Server.
Dynamically updating of DHCP Server memory address pond comprises increase record, deletion record and amendment record, and the present invention has furtherd investigate the file layout of memory address pond information, finds that VxWorks adopts HASH table mode canned data; By operation HASH table, realize dynamically updating of record.
The DHCP Server and the kernel that carry in the vxworks operating system bind together.Generally must be when kernel be made, with the networking component adding of DHCP Server; And the startup of DHCPServer starts with kernel.Have a very big shortcoming to be like this, when the permanent address storage space will just can be written into after kernel starts, DHCP Server just can't read the address and record in the memory address pond from database when starting.
Improvement of the present invention is not bind DHCP Server assembly when making the VxWorks kernel.Adopt but will the header file relevant extract, dress up the application program of a DHCP Server by encode seal with DHCP Server.Like this after the VxWorks system start-up, can first initialization data storehouse system etc. related work, restart DHCP Server.DHCPServer just can read the address and recorded in the memory address pond from database this moment.
Vxworks operating system provides two Hook Function interfaces.By Hook Function, DHCPServer can write dhcp address information and lease information or read from database, guarantees the synchronous of database and memory field.
It is to read to write conveniently that the present invention adopts the benefit of database storing mode, has avoided complicated character to handle.In addition, the maintenance of database and inquiry also standard very.
DHCP Server application program is responsible for the startup of DHCP Server, and performing step is as follows:
Binding DHCP Server is to the Network Interface Unit of appointment.Network Interface Unit must be supported the Ethernet data hardwood form of standard, can receive and dispatch broadcast packet.
Please the pointer with Hook Function passes to vxworks operating system.
Start the dhcpStart thread.It is responsible for handling the request that DHCP Client sends.The principal function of this thread is provided by VxWorks.Mode with dynamic link libraries offers the user.
Hook Function is called in dhcpStart thread initialization DHCP Server memory address pond, with the content importing memory address pond of permanent address memory block.
An important content of the present invention is to realize dynamically updating DHCP Server memory address pond.Vxworks operating system only provides the increase function to the memory address pond of DHCP Server.If the system memory address pond has an address record wrong, and is not right as parameter, perhaps to delete a record in the address pool, only way is restarted VxWorks exactly, and this certainly will cause the interruption of system.
Deep analysis has been carried out as can be known in memory address pond to DHCP Server: store in HASH chained list mode in discovery memory address pond, and there is a default records in system in chained list, and it is the linked list head in memory address pond, does not allow deletion.After this, the address record of user's increase will be increased in this chained list.But only providing, system increases the function that records address pool.Can not delete and change.After understanding fully its address link list structure, just can directly operate, as increasing, delete and revising to the internal memory address pool.So just guaranteed and under the situation of not restarting VxWorks, to have dynamically updated and to have safeguarded the memory address pond, satisfied the DHCP request of client.
Below in conjunction with accompanying drawing the present invention is described in further detail:
Fig. 1 is a DHCP Server operational flow diagram, is respectively described below:
Step 1-1: make the vxworks operating system kernel, do not comprise DHCP Server;
Step 1-2: write Hook Function, set up the incidence relation in database and internal storage data district;
Step 1-3: after the system start-up, start the VxWorks kernel automatically;
Step 1-4: after kernel starts, initialization data storehouse at first;
Step 1-5: the application call system function starts DHCP Server;
Step 1-6: after the startup, the system call Hook Function reads all records in the database in the memory address pond;
Step 1-7: in system's operational process, dynamically update the memory address pond, comprise increase, deletion and the modification of address pool record;
Step 1-8: when revising the memory address pond, the application call Hook Function upgrades data-base recording simultaneously, to keep synchronous.
Fig. 2 is the storage synoptic diagram in memory address pond.The memory address pond of DHCP Server adopts HASH chained list mode to store.Two very important data structures are wherein arranged, hash-member and dhcp-resource.Two members are arranged: point to the pointer of next hash-member, the pointer of sensing dhcp-resource among the hash-member.Dhcp-resource is used for storing every address record, comprising offering the various parameters of DHCPClient.
When the record of an address of needs increase, just can apply for new hash-member and dhcp-resource.The content of address record is put into dhcp-resource.Be added in the address link list by hash-member then.
When the record of an address of needs deletion, application program finds the address record of needs deletion from the record of address according to the key word of address record.After finding the hash-member that this address is recorded in, just this hash-member can be deleted from address link list, and discharge this hash-member and the shared internal memory of dhcp-resource.To avoid memory overflow.
When the record of an address of needs renewal, two kinds of methods are arranged.The one, find this record, the corresponding contents among the dhcp-resource is revised.Another kind method is to find this record, deletes pairing hash-member of this record and dhcp-resource, discharges corresponding internal memory.Increase amended being recorded in the address link list again.

Claims (5)

  1. Realize that based on vxworks operating system Dynamic Host Configuration Protocol server starts and method for updating, is characterized in that this method may further comprise the steps for 1 one kinds:
    Make the vxworks operating system kernel: when making the VxWorks kernel, the header file relevant with DHCPServer extracted, dress up the application program of a DHCP Server by encode seal, do not add DHCP Server assembly, make DHCP Server assembly and VxWorks kernel relatively independent;
    Write DHCP Server Hook Function: Hook Function associates database and memory address pond, vxworks operating system passes through Hook Function, content with the permanent address memory block during system start-up imports the memory address pond, upgrade data-base recording when the memory address pond is upgraded, guarantee the consistance that writes down in database and the memory address pond;
    After vxworks operating system kernel and database startup, invokes application starts DHCP Server;
    Dynamically update the memory address pond of DHCP Server: in order to the HASH of stored memory address pool information table, realize dynamically updating to record increase, record deletion, record modification by the operation vxworks operating system.
  2. 2 realize that according to claim 1 Dynamic Host Configuration Protocol server starts and method for updating, it is characterized in that DHCP Server restarts in first initialization data storehouse system after vxworks operating system starts;
    DHCP Server reads the address and records in the memory address pond from database.
  3. 3 realize that according to claim 1 Dynamic Host Configuration Protocol server starts and method for updating, it is characterized in that described VxWorks system provides two Hook Function interfaces, pass through Hook Function, DHCP Server writes dhcp address information and lease information or reads from database, to guarantee the synchronous of database and memory field.
  4. 4 realize that according to claim 1 Dynamic Host Configuration Protocol server starts and method for updating, is characterized in that described DHCP Server application program is used for the startup of DHCP Server, may further comprise the steps:
    Binding DHCP Server is to the Network Interface Unit of appointment, and described Network Interface Unit must be supported the Ethernet data frame format of standard, can receive and dispatch broadcast packet;
    The pointer of Hook Function is passed to vxworks operating system;
    Start the dhcpStart thread, be used to handle the request that DHCP Client sends;
    Hook Function is called in dhcpStart thread initialization DHCP Server memory address pond, with the content importing memory address pond of database.
  5. 5 realize that according to claim 1 Dynamic Host Configuration Protocol server starts and method for updating, and the memory address pond that it is characterized in that the described DHCP of dynamically updating Server is to realize by data structure hash_member and dhcp_resource in the operation HASH chained list:
    When increasing address record, apply for new hash_member and dhcp_resource, the content that write down the address is put into dhcp_resource, be added in the address link list by hash_member then;
    When deleting address record, application program finds the address record of needs deletion from the record of address according to the key word of address record, after finding the ha sh_member that this address is recorded in, this hash_member is deleted from address link list, and discharge this hash_member and the shared internal memory of dhcp_resource, to avoid memory overflow;
    When upgrading address record, or find this record, the corresponding contents among the dhcp_resource is revised, or find this record, delete pairing hash_member of this record and dhcp_resource, discharge corresponding internal memory, increase amended being recorded in the address link list again.
CNB021375607A 2002-10-17 2002-10-17 Start and update method for VxWorks operation system based dynamic host computer configuration protocol server Expired - Fee Related CN1323352C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021375607A CN1323352C (en) 2002-10-17 2002-10-17 Start and update method for VxWorks operation system based dynamic host computer configuration protocol server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021375607A CN1323352C (en) 2002-10-17 2002-10-17 Start and update method for VxWorks operation system based dynamic host computer configuration protocol server

Publications (2)

Publication Number Publication Date
CN1490720A CN1490720A (en) 2004-04-21
CN1323352C true CN1323352C (en) 2007-06-27

Family

ID=34147069

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021375607A Expired - Fee Related CN1323352C (en) 2002-10-17 2002-10-17 Start and update method for VxWorks operation system based dynamic host computer configuration protocol server

Country Status (1)

Country Link
CN (1) CN1323352C (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7499991B2 (en) * 2005-11-10 2009-03-03 International Business Machines Corporation Autonomic application server unneeded process disablement
CN103455424B (en) * 2013-09-18 2015-12-02 哈尔滨工业大学 Based on Dram leakage detection method and the device of vxworks operating system
CN108874882A (en) * 2018-05-04 2018-11-23 广州四九游网络科技有限公司 A kind of data processing method of THINKPHP frame
CN112231013B (en) * 2020-10-14 2023-06-02 天津津航计算技术研究所 Method for establishing target server after IP address is changed by embedded VxWorks system
CN112231176B (en) * 2020-10-14 2023-03-03 天津津航计算技术研究所 Simple and convenient log recording method for VxWorks operating system
CN114374734A (en) * 2021-12-17 2022-04-19 北京电子工程总体研究所 VxWorks-based dynamic self-adaptive network configuration method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302016A (en) * 1999-12-02 2001-07-04 三星电子株式会社 Fast startor and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302016A (en) * 1999-12-02 2001-07-04 三星电子株式会社 Fast startor and method

Also Published As

Publication number Publication date
CN1490720A (en) 2004-04-21

Similar Documents

Publication Publication Date Title
JP4035872B2 (en) File format conversion method, file system, information system and electronic commerce system using the same
JP5342302B2 (en) Firmware update system, firmware distribution server, and program
US20030070162A1 (en) Information processor having multi OS and its OS update method
CN105893115B (en) The method and system of differentiation deployment virtual machine
CN104182255A (en) Method and terminal for upgrading library files of system application
JP2007018399A (en) Condition-based snapshot acquisition method and system
CN101882132A (en) Creating and reading method and device for virtual FAT file system
US7584466B1 (en) Management tree management in a mobile handset
WO2016165597A1 (en) Processing method and device for data storage
US20080005531A1 (en) Data Storage Device
CN108037937A (en) A kind of method of dynamic more new resources
CN108415736A (en) The method, apparatus and equipment of program process are marked using process filesystem
CN1323352C (en) Start and update method for VxWorks operation system based dynamic host computer configuration protocol server
US11936741B2 (en) Workspace databases
CN110413376A (en) A kind of method, equipment and the storage medium of Virtual Machine Manager USB device
CN114528255A (en) Metadata management method, electronic device and computer program product
CN106850825A (en) Client's end block level cache optimization method under a kind of mobile lucidification disposal environment
WO2021128893A1 (en) Method and system for identifying garbage data, electronic device, and storage medium
US20120260022A1 (en) Handling commands within a write-once read-many storage device configuration
CN111459619A (en) Method and device for realizing service based on cloud platform
WO2022223038A1 (en) Key name generation method and device, and computer readable storage medium
CN115562590A (en) Method, system, equipment and storage medium for using cloud hard disk by cloud host
WO2018028321A1 (en) Method and apparatus for managing virtual external storage device, and terminal
CN109656881B (en) Method and system for realizing dynamic file management based on FAT16 technology
CN101390166B (en) Method and apparatus for playbacking optical disc

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070627

Termination date: 20131017