//--------------------------------------------------------------------------------------------------------------------- int pmip_cache_exists(const struct in6_addr *our_addr, const struct in6_addr *peer_addr) { pmip_entry_t *bce; int type; bce = pmip_cache_get(our_addr, peer_addr); if (bce == NULL) { return -1; } //dbg("PMIP cache entry does exist with type: %d\n", (bce->type)); type = bce->type; pmipcache_release_entry(bce); return type; }
//--------------------------------------------------------------------------------------------------------------------- int pmip_cache_exists(const ip6mn_nai_t *mn_nai, const struct in6_addr *mag_addr) { pmip_entry_t *bce; int type; bce = pmip_cache_get(mn_nai, mag_addr); if (bce == NULL) { dbg("PMIP cache wasn't found for: "); dbg_buf_string(&mn_nai->nai, sizeof(ip6mn_nai_t)); dbg(" <=> %x:%x:%x:%x:%x:%x:%x:%x\n", NIP6ADDR(mag_addr)); return -1; } dbg("PMIP cache entry does exist with type: %d\n", (bce->type)); type = bce->type; pmipcache_release_entry(bce); return type; }