Commit graph

5 commits

Author SHA1 Message Date
Maximilian Wilhelm
9d958892ed Free nodes of a lif_dict_find_all() result.
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-07-28 23:25:01 +02:00
Maximilian Wilhelm
f51c976b52 dict: Add lif_dict_add_once()
Add a function to add a key/value pair to the dict only if it doesn't exist
  within the dict already.

  As the dict is type agnostic this requires a comparator function to be given.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-07-28 22:44:22 +02:00
Maximilian Wilhelm
b1dfa609f9 dict: Add lif_dict_find_all().
As a dict can have multiple values for any given key we add a function to
  query all occurences of a given key and return them as a (new) list.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2020-07-28 22:41:41 +02:00
Ariadne Conill
86a83d9e95 implement /e/n/i parsing 2020-07-18 18:48:49 -06:00
Ariadne Conill
3f618d2a3b libifupdown: add a simple key-value dictionary based on linked lists 2020-07-18 03:11:43 -06:00