Skip to content

Replace POSIX hash api (hcreate, hsearch) with a more flexible hash table solution #189

Description

@royhills

arp-scan currently uses the POSIX hash table functions hcreate() and hsearch() defined in <search.h> to store the MAC/vendor mapping table. This has the disadvantage that the maximum table size must be specified in the hcreate() call and there is no way to increase the size after hash table creation, which requires defining a constant that must be changed if the size of the ieee database exceeds this limit, or making two passes through the mac/vendor file (one to determine the number of entries and another to load the data). Neither of these are ideal options.

I am considering using the M*LIB dictionary hash table implementation which does not have this limitation and generally seems to be a better and more modern implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions