Revision ce4aca09 nest/route.h

View differences:

nest/route.h
48 48
  unsigned int hash;
49 49
};
50 50

  
51
typedef void (*fib_init_func)(struct fib_node *);
52

  
51 53
struct fib {
52 54
  pool *fib_pool;			/* Pool holding all our data */
53 55
  slab *fib_slab;			/* Slab holding all fib nodes */
......
57 59
  unsigned int hash_shift;		/* 16 - hash_log */
58 60
  unsigned int entries;			/* Number of entries */
59 61
  unsigned int entries_min, entries_max;/* Entry count limits (else start rehashing) */
60
  void (*init)(struct fib_node *);	/* Constructor */
62
  fib_init_func init;			/* Constructor */
61 63
};
62 64

  
63
void fib_init(struct fib *, pool *, unsigned node_size, unsigned hash_order, void (*init)(struct fib_node *));
65
void fib_init(struct fib *, pool *, unsigned node_size, unsigned hash_order, fib_init_func init);
64 66
void *fib_find(struct fib *, ip_addr *, int);	/* Find or return NULL if doesn't exist */
65 67
void *fib_get(struct fib *, ip_addr *, int); 	/* Find or create new if nonexistent */
66 68
void *fib_route(struct fib *, ip_addr, int);	/* Longest-match routing lookup */

Also available in: Unified diff