Changeset efdfebc in mainline for uspace/lib/nic/include/nic_addr_db.h


Ignore:
Timestamp:
2012-11-06T21:03:44Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
338810f
Parents:
de73242 (diff), 94795812 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/include/nic_addr_db.h

    rde73242 refdfebc  
    4343#endif
    4444
    45 #include <adt/hash_set.h>
    46 
    47 /**
    48  * Initial size of DB's hash set
    49  */
    50 #define NIC_ADDR_DB_INIT_SIZE   8
    51 /**
    52  * Maximal length of addresses in the DB (in bytes).
    53  */
    54 #define NIC_ADDR_MAX_LENGTH             16
     45#include <adt/hash_table.h>
    5546
    5647/**
     
    5849 */
    5950typedef struct nic_addr_db {
    60         hash_set_t set;
     51        hash_table_t set;
    6152        size_t addr_len;
    6253} nic_addr_db_t;
    6354
    64 /**
    65  * Helper structure for keeping the address in the hash set.
    66  */
    67 typedef struct nic_addr_entry {
    68         link_t item;
    69         size_t addr_len;
    70         uint8_t addr[NIC_ADDR_MAX_LENGTH];
    71 } nic_addr_entry_t;
    7255
    7356extern int nic_addr_db_init(nic_addr_db_t *db, size_t addr_len);
    7457extern void nic_addr_db_clear(nic_addr_db_t *db);
    7558extern void nic_addr_db_destroy(nic_addr_db_t *db);
    76 extern size_t nic_addr_db_count(const nic_addr_db_t *db);
    7759extern int nic_addr_db_insert(nic_addr_db_t *db, const uint8_t *addr);
    7860extern int nic_addr_db_remove(nic_addr_db_t *db, const uint8_t *addr);
    79 extern void nic_addr_db_remove_selected(nic_addr_db_t *db,
    80         int (*func)(const uint8_t *, void *), void *arg);
    8161extern int nic_addr_db_contains(const nic_addr_db_t *db, const uint8_t *addr);
    8262extern void nic_addr_db_foreach(const nic_addr_db_t *db,
Note: See TracChangeset for help on using the changeset viewer.