/openbsd/usr.sbin/ldpd/ |
H A D | adjacency.c | 203 struct tnbr *tnbr; in tnbr_new() local 205 if ((tnbr = calloc(1, sizeof(*tnbr))) == NULL) in tnbr_new() 218 tnbr_del(struct tnbr *tnbr) in tnbr_del() argument 224 free(tnbr); in tnbr_del() 230 struct tnbr *tnbr; in tnbr_find() local 241 tnbr_check(struct tnbr *tnbr) in tnbr_check() argument 253 tnbr_update(struct tnbr *tnbr) in tnbr_update() argument 288 struct tnbr *tnbr; in tnbr_update_all() local 301 struct tnbr *tnbr = arg; in tnbr_hello_timer() local 308 tnbr_start_hello_timer(struct tnbr *tnbr) in tnbr_start_hello_timer() argument [all …]
|
H A D | printconf.c | 35 static void print_tnbr(struct tnbr *); 67 struct tnbr *tnbr; in print_af() local 95 LIST_FOREACH(tnbr, &conf->tnbr_list, entry) in print_af() 96 if (tnbr->af == af && tnbr->flags & F_TNBR_CONFIGURED) in print_af() 97 print_tnbr(tnbr); in print_af() 112 print_tnbr(struct tnbr *tnbr) in print_tnbr() argument 114 printf("\n\ttargeted-neighbor %s {\n", log_addr(tnbr->af, &tnbr->addr)); in print_tnbr() 115 printf("\t\ttargeted-hello-holdtime %u\n", tnbr->hello_holdtime); in print_tnbr() 116 printf("\t\ttargeted-hello-interval %u\n", tnbr->hello_interval); in print_tnbr()
|
H A D | hello.c | 37 send_hello(enum hello_type type, struct iface_af *ia, struct tnbr *tnbr) in send_hello() argument 68 af = tnbr->af; in send_hello() 69 holdtime = tnbr->hello_holdtime; in send_hello() 71 if ((tnbr->flags & F_TNBR_CONFIGURED) || tnbr->pw_count) in send_hello() 76 dst = tnbr->addr; in send_hello() 165 struct tnbr *tnbr = NULL; in recv_hello() local 249 if (tnbr && (tnbr->flags & F_TNBR_DYNAMIC) && in recv_hello() 252 tnbr = tnbr_check(tnbr); in recv_hello() 255 if (!tnbr) { in recv_hello() 263 tnbr_update(tnbr); in recv_hello() [all …]
|
H A D | l2vpn.c | 584 struct tnbr *tnbr; in ldpe_l2vpn_pw_init() local 586 tnbr = tnbr_find(leconf, pw->af, &pw->addr); in ldpe_l2vpn_pw_init() 587 if (tnbr == NULL) { in ldpe_l2vpn_pw_init() 588 tnbr = tnbr_new(leconf, pw->af, &pw->addr); in ldpe_l2vpn_pw_init() 589 tnbr_update(tnbr); in ldpe_l2vpn_pw_init() 593 tnbr->pw_count++; in ldpe_l2vpn_pw_init() 599 struct tnbr *tnbr; in ldpe_l2vpn_pw_exit() local 601 tnbr = tnbr_find(leconf, pw->af, &pw->addr); in ldpe_l2vpn_pw_exit() 602 if (tnbr) { in ldpe_l2vpn_pw_exit() 603 tnbr->pw_count--; in ldpe_l2vpn_pw_exit() [all …]
|
H A D | ldpe.h | 41 struct tnbr *target; 156 int send_hello(enum hello_type, struct iface_af *, struct tnbr *); 230 struct tnbr *tnbr_new(struct ldpd_conf *, int, union ldpd_addr *); 231 struct tnbr *tnbr_find(struct ldpd_conf *, int, union ldpd_addr *); 232 struct tnbr *tnbr_check(struct tnbr *); 233 void tnbr_update(struct tnbr *);
|
H A D | ldpd.c | 697 struct tnbr *tnbr; in main_imsg_send_config() local 722 sizeof(*tnbr)) == -1) in main_imsg_send_config() 929 struct tnbr *tnbr, *ttmp, *xt; in merge_tnbrs() local 932 if (!(tnbr->flags & F_TNBR_CONFIGURED)) in merge_tnbrs() 936 if ((xt = tnbr_find(xconf, tnbr->af, &tnbr->addr)) == NULL) { in merge_tnbrs() 938 tnbr->flags &= ~F_TNBR_CONFIGURED; in merge_tnbrs() 939 tnbr_check(tnbr); in merge_tnbrs() 941 LIST_REMOVE(tnbr, entry); in merge_tnbrs() 942 free(tnbr); in merge_tnbrs() 958 if (!(tnbr->flags & F_TNBR_CONFIGURED)) in merge_tnbrs() [all …]
|
H A D | ldpe.c | 217 struct tnbr *ntnbr; in ldpe_dispatch_main() 412 if ((ntnbr = malloc(sizeof(struct tnbr))) == NULL) in ldpe_dispatch_main() 414 memcpy(ntnbr, imsg.data, sizeof(struct tnbr)); in ldpe_dispatch_main() 717 struct tnbr *tnbr, *safe; in ldpe_remove_dynamic_tnbrs() local 719 LIST_FOREACH_SAFE(tnbr, &leconf->tnbr_list, entry, safe) { in ldpe_remove_dynamic_tnbrs() 720 if (tnbr->af != af) in ldpe_remove_dynamic_tnbrs() 723 tnbr->flags &= ~F_TNBR_DYNAMIC; in ldpe_remove_dynamic_tnbrs() 724 tnbr_check(tnbr); in ldpe_remove_dynamic_tnbrs()
|
H A D | parse.y | 106 static struct tnbr *conf_get_tnbr(union ldpd_addr *); 128 static struct tnbr *tnbr; variable 819 tnbr = conf_get_tnbr(&addr); 820 if (tnbr == NULL) 826 tnbr->hello_holdtime = defs->thello_holdtime; 827 tnbr->hello_interval = defs->thello_interval; 828 tnbr = NULL; 1469 static struct tnbr * 1472 struct tnbr *t; in conf_get_tnbr() 1596 struct tnbr *t; in clear_config()
|
H A D | ldpd.h | 290 struct tnbr { struct 291 LIST_ENTRY(tnbr) entry; 409 LIST_HEAD(, tnbr) tnbr_list;
|
H A D | lde.c | 386 struct tnbr *ntnbr; in lde_dispatch_parent() 503 if ((ntnbr = malloc(sizeof(struct tnbr))) == NULL) in lde_dispatch_parent() 505 memcpy(ntnbr, imsg.data, sizeof(struct tnbr)); in lde_dispatch_parent()
|