1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

[sys/net/sixlowpan/sixlownd.h sys/net/sixlowpan/sixlownd.c]

* abr_addr argument in abr_update_cache as pointer rather then value
* constants for 6CO C flag added
This commit is contained in:
mlenders 2011-06-22 15:25:42 +02:00
parent 0989fe650c
commit 4ac4e750fe
2 changed files with 6 additions and 4 deletions

View File

@ -526,7 +526,7 @@ void recv_rtr_adv(void){
}
if (abro_found) {
abr_update_cache(abro_version,abro_addr,found_contexts,found_con_len,found_prefixes,found_pref_len);
abr_update_cache(abro_version,&abro_addr,found_contexts,found_con_len,found_prefixes,found_pref_len);
}
if(trigger_ns >= 0){
@ -1076,7 +1076,7 @@ static abr_cache_t *abr_get_oldest(){
}
abr_cache_t *abr_update_cache(
uint16_t version, ipv6_addr_t abr_addr,
uint16_t version, ipv6_addr_t *abr_addr,
lowpan_context_t **contexts, uint8_t contexts_num,
plist_t **prefixes, uint8_t prefixes_num){
abr_cache_t *abr = NULL;
@ -1086,7 +1086,7 @@ abr_cache_t *abr_update_cache(
abr = &(abr_cache[abr_count++]);
}
abr->version = version;
abr->abr_addr = abr_addr;
memcpy(&abr->abr_addr, abr_addr, sizeof (ipv6_addr_t));
memcpy(abr->contexts, contexts, contexts_num * sizeof (lowpan_context_t*));
abr->contexts_num = contexts_num;
memcpy(abr->prefixes, prefixes, prefixes_num * sizeof (lowpan_context_t*));

View File

@ -62,6 +62,8 @@
#define OPT_6CO_LTIME 5 // geeigneten Wert finden
#define OPT_6CO_FLAG_C 0x10
#define OPT_6CO_FLAG_CID 0x0F
#define OPT_6CO_FLAG_C_VALUE_SET 1
#define OPT_6CO_FLAG_C_VALUE_UNSET 0
/* authoritative border router option */
#define OPT_ABRO_TYPE 33
#define OPT_ABRO_LEN 3
@ -220,7 +222,7 @@ void plist_add(ipv6_addr_t *addr, uint8_t size, uint32_t val_ltime,
uint32_t pref_ltime, uint8_t adv_opt, uint8_t l_a_reserved1);
void set_llao(opt_stllao_t *sllao, uint8_t type, uint8_t length);
abr_cache_t *abr_update_cache(
uint16_t version, ipv6_addr_t abr_addr,
uint16_t version, ipv6_addr_t *abr_addr,
lowpan_context_t **contexts, uint8_t contexts_num,
plist_t **prefixes, uint8_t prefixes_num);
nbr_cache_t * nbr_cache_search(ipv6_addr_t *ipaddr);