X-Git-Url: http://olsr.org/git/?p=olsrd.git;a=blobdiff_plain;f=src%2Fmpr_selector_set.h;h=3c4e8569e3af27059cbd66cab534a706e7a1afa2;hp=4eb9ebc1d90e8c97fcd7697771cc53352ef77129;hb=db5e12d96993ff3d159a11c74a9d43e42355bb57;hpb=c8daf206205989d3166a454bb709dc9fff2b4843 diff --git a/src/mpr_selector_set.h b/src/mpr_selector_set.h index 4eb9ebc1..3c4e8569 100644 --- a/src/mpr_selector_set.h +++ b/src/mpr_selector_set.h @@ -1,6 +1,6 @@ /* * The olsr.org Optimized Link-State Routing daemon(olsrd) - * Copyright (c) 2004, Andreas Tønnesen(andreto@olsr.org) + * Copyright (c) 2004, Andreas Tonnesen(andreto@olsr.org) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,50 +37,35 @@ * the copyright holders. * */ - - #ifndef _OLSR_MPRS_SET #define _OLSR_MPRS_SET +#include "mantissa.h" +#include "defs.h" +#include "common/list.h" -struct mpr_selector -{ +struct mpr_selector { union olsr_ip_addr MS_main_addr; - clock_t MS_time; - struct mpr_selector *next; - struct mpr_selector *prev; + struct timer_entry *MS_timer; + struct list_node mprs_list; }; +extern uint16_t ansn; #if 0 -olsr_bool +bool olsr_is_mpr(void); #endif -olsr_u16_t -get_local_ansn(void); - -void -increase_local_ansn(void); - -void -olsr_init_mprs_set(void); - +void olsr_init_mprs(void); -struct mpr_selector * -olsr_add_mpr_selector(const union olsr_ip_addr *, float); +static INLINE uint16_t get_local_ansn(void) { return ansn; } +static INLINE void increase_local_ansn(void) { ansn++; } -struct mpr_selector * -olsr_lookup_mprs_set(const union olsr_ip_addr *); +struct mpr_selector *olsr_lookup_mprs_set(const union olsr_ip_addr *); - -int -olsr_update_mprs_set(const union olsr_ip_addr *, float); - - -void -olsr_time_out_mprs_set(void); +int olsr_update_mprs_set(const union olsr_ip_addr *, olsr_reltime); #if 0 void @@ -88,3 +73,10 @@ olsr_print_mprs_set(void); #endif #endif + +/* + * Local Variables: + * c-basic-offset: 2 + * indent-tabs-mode: nil + * End: + */