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


Ignore:
Timestamp:
2012-10-23T13:16:49Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ecf5b8
Parents:
32b3a12 (diff), b2ac3998 (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

    r32b3a12 rb800b0e  
    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.