bdbaccess

bdbaccess is a safe Berkeley DB reader.
Download

bdbaccess Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michael Robinton
  • Publisher web site:
  • http://search.cpan.org/~miker/Net-DNS-Codes-0.09/Codes.pm

bdbaccess Tags


bdbaccess Description

bdbaccess is a safe Berkeley DB reader. bdbaccess is a safe Berkeley DB reader.bdbaccess is a C daemon that provides access to Berkeley DB files via a unix domain socket. bdbaccess is configured for concurrent use of the database, allowing similtaneous access and update of the database by other applications.An application can access the data from a database opened by bdbaccess using one of the following methods: Open the domain socket. Send a query of the form: how, number, name where: how is a single byte = 0 for access by key = 1 - 255 for access by record number and: number is 32 bits how = 0, number is a packed network address how = 1-255, number is a record number or zero and: name is the database to access TERMINATED with a NULL ""NOTE: the key, be it a network address or a record number, should be in network order. inet_aton produces packed addresses in the correct order, however record numbers must be packed correctly and natively are dependent on whether your host has a big endian or litte endian operating system.bdbaccess will respond in one of 3 modes depending on the access request.MODE 1: For requests where how = 0 or 1, The response will be as follows: key, datawhere key is a 32 bit packed network address and data contains either a 32 bit integer or a string depending on the database queried.If there is a database error, inlcuding the record not being found, the key will return INADDR_NONE, which is equivalent to inet_aton('255.255.255.255'), and the data will contain the integer value of the BerkeleyDB failure codeMODE 2: For any request where how is 1 or greater, specifiying a record number of zero (0) - which does not exist - will result in:RETRIEVING DATABASE STATISTICS and VERSION NUMBERThe first record number in a Berkeley DB is record number ONE (1), there is no record ZERO (0). If the bdbaccess daemon is queried by record for record ZERO, it will return the version number of the underlying database in a form that can be unpacked by inet_ntoa. The returned data record will contain the number of keys or unique records currently in the database. Both of these will be 32 bit fields. version number, number of keysMODE 3: For any request where how is 1 or greater and the record number specified is one (1) or more, the bdbaccess daemon will return: uchar number, key1, key2, ... keyNwhere "uchar number" is an 8 bit field containing the number of keys returned, followed by N 32 bit fields containing packed network addresses. The first key returned will be from the record number specified in the query, followed by number+1, and so on... The daemon will return "how" records or what is available if it is less than the number requested (zero is a good answer).Requirements:· Perl Requirements: · Perl


bdbaccess Related Software