Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    bdbaccess 0.91

    Download button

    No screenshots available
    Downloads: 391  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.6/5)
    11 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Michael Robinton | More programs
    Perl Artistic License / FREE
    April 11th, 2008, 13:34 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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, data

    where 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 code

    MODE 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 NUMBER

    The 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 keys

    MODE 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, ... keyN

    where "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



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Berkeley reader | database access | Perl module | Berkeley | database | reader

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM