Lines Matching refs:ka
323 natt_keepalive_delete (struct natt_ka_addrs *ka) in natt_keepalive_delete() argument
325 TAILQ_REMOVE (&ka_tree, ka, chain); in natt_keepalive_delete()
326 racoon_free (ka->src); in natt_keepalive_delete()
327 racoon_free (ka->dst); in natt_keepalive_delete()
328 racoon_free (ka); in natt_keepalive_delete()
335 struct natt_ka_addrs *ka, *next = NULL; in natt_keepalive_send() local
340 for (ka = TAILQ_FIRST(&ka_tree); ka; ka = next) { in natt_keepalive_send()
341 next = TAILQ_NEXT(ka, chain); in natt_keepalive_send()
343 s = getsockmyaddr(ka->src); in natt_keepalive_send()
345 natt_keepalive_delete(ka); in natt_keepalive_send()
349 saddr2str_fromto("%s->%s", ka->src, ka->dst)); in natt_keepalive_send()
351 ka->src, ka->dst, 1); in natt_keepalive_send()
373 struct natt_ka_addrs *ka = NULL, *new_addr; in natt_keepalive_add() local
375 TAILQ_FOREACH (ka, &ka_tree, chain) { in natt_keepalive_add()
376 if (cmpsaddrstrict(ka->src, src) == 0 && in natt_keepalive_add()
377 cmpsaddrstrict(ka->dst, dst) == 0) { in natt_keepalive_add()
378 ka->in_use++; in natt_keepalive_add()
380 saddr2str_fromto("%s->%s", src, dst), ka->in_use); in natt_keepalive_add()
430 struct natt_ka_addrs *ka, *next = NULL; in natt_keepalive_remove() local
434 for (ka = TAILQ_FIRST(&ka_tree); ka; ka = next) { in natt_keepalive_remove()
435 next = TAILQ_NEXT(ka, chain); in natt_keepalive_remove()
438 saddr2str_fromto("%s->%s", src, dst), ka->in_use); in natt_keepalive_remove()
440 if (cmpsaddrstrict(ka->src, src) == 0 && in natt_keepalive_remove()
441 cmpsaddrstrict(ka->dst, dst) == 0 && in natt_keepalive_remove()
442 -- ka->in_use <= 0) { in natt_keepalive_remove()
446 natt_keepalive_delete (ka); in natt_keepalive_remove()