/openbsd/usr.sbin/ospf6d/ |
H A D | lsack.c | 98 struct lsa_hdr lsa_hdr; in recv_ls_ack() local 114 while (len >= sizeof(lsa_hdr)) { in recv_ls_ack() 115 memcpy(&lsa_hdr, buf, sizeof(lsa_hdr)); in recv_ls_ack() 117 if (lsa_hdr_check(nbr, &lsa_hdr)) { in recv_ls_ack() 121 nbr->iface->self, &lsa_hdr); in recv_ls_ack() 122 (void)ls_retrans_list_del(nbr, &lsa_hdr); in recv_ls_ack() 125 buf += sizeof(lsa_hdr); in recv_ls_ack() 126 len -= sizeof(lsa_hdr); in recv_ls_ack() 141 lsa_hdr_check(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in lsa_hdr_check() argument 144 if ((ntohs(lsa_hdr->age) < 1) || (ntohs(lsa_hdr->age) > MAX_AGE)) { in lsa_hdr_check() [all …]
|
H A D | ospfe.c | 436 struct lsa_hdr lsa_hdr; in ospfe_dispatch_rde() local 441 struct lsa_hdr *lhp; in ospfe_dispatch_rde() 527 memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr)); in ospfe_dispatch_rde() 654 memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr)); in ospfe_dispatch_rde() 771 struct lsa_hdr lsa_hdr; in orig_rtr_lsa() local 959 lsa_hdr.ls_id = 0; in orig_rtr_lsa() 964 if (ibuf_set(buf, 0, &lsa_hdr, sizeof(lsa_hdr)) == -1) in orig_rtr_lsa() 984 struct lsa_hdr lsa_hdr; in orig_net_lsa() local 1028 if (ibuf_set(buf, 0, &lsa_hdr, sizeof(lsa_hdr)) == -1) in orig_net_lsa() 1048 struct lsa_hdr lsa_hdr; in orig_link_lsa() local [all …]
|
H A D | lsupdate.c | 48 lsa_flood(struct iface *iface, struct nbr *originator, struct lsa_hdr *lsa_hdr, in lsa_flood() argument 71 r = lsa_newer(lsa_hdr, le->le_lsa); in lsa_flood() 243 struct lsa_hdr lsa; in recv_ls_update() 333 ls_retrans_list_del(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in ls_retrans_list_del() argument 356 ls_retrans_list_get(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in ls_retrans_list_get() argument 571 lsa_hash_hdr(const struct lsa_hdr *hdr) in lsa_hash_hdr() 608 lsa_cache_get(struct lsa_hdr *lsa_hdr) in lsa_cache_get() argument 612 ref = lsa_cache_look(lsa_hdr); in lsa_cache_get() 627 ref->data, sizeof(struct lsa_hdr)); in lsa_cache_put() 635 lsa_cache_look(struct lsa_hdr *lsa_hdr) in lsa_cache_look() argument [all …]
|
H A D | ospfe.h | 32 struct lsa_hdr *lu_lsa; 43 struct lsa_hdr hdr; 101 void db_sum_list_add(struct nbr *, struct lsa_hdr *); 152 int lsa_hdr_check(struct nbr *, struct lsa_hdr *); 153 void ls_ack_list_add(struct iface *, struct lsa_hdr *); 164 void ls_req_list_add(struct nbr *, struct lsa_hdr *); 174 int lsa_flood(struct iface *, struct nbr *, struct lsa_hdr *, 178 void ls_retrans_list_add(struct nbr *, struct lsa_hdr *, 180 int ls_retrans_list_del(struct nbr *, struct lsa_hdr *); 188 struct lsa_ref *lsa_cache_get(struct lsa_hdr *); [all …]
|
H A D | rde.c | 266 struct lsa_hdr lsa_hdr, *db_hdr; in rde_dispatch_imsg() local 364 l >= sizeof(lsa_hdr); l -= sizeof(lsa_hdr)) { in rde_dispatch_imsg() 365 memcpy(&lsa_hdr, buf, sizeof(lsa_hdr)); in rde_dispatch_imsg() 366 buf += sizeof(lsa_hdr); in rde_dispatch_imsg() 369 lsa_hdr.ls_id, lsa_hdr.adv_rtr); in rde_dispatch_imsg() 383 sizeof(lsa_hdr)); in rde_dispatch_imsg() 529 memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr)); in rde_dispatch_imsg() 534 v = lsa_find(nbr->iface, lsa_hdr.type, lsa_hdr.ls_id, in rde_dispatch_imsg() 535 lsa_hdr.adv_rtr); in rde_dispatch_imsg() 1126 rde_req_list_exists(struct rde_nbr *nbr, struct lsa_hdr *lsa_hdr) in rde_req_list_exists() argument [all …]
|
H A D | lsreq.c | 115 ls_req_list_add(struct nbr *nbr, struct lsa_hdr *lsa) in ls_req_list_add() 131 ls_req_list_get(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in ls_req_list_get() argument 136 if ((lsa_hdr->type == le->le_lsa->type) && in ls_req_list_get() 137 (lsa_hdr->ls_id == le->le_lsa->ls_id) && in ls_req_list_get() 138 (lsa_hdr->adv_rtr == le->le_lsa->adv_rtr)) in ls_req_list_get()
|
H A D | rde.h | 146 int lsa_newer(struct lsa_hdr *, struct lsa_hdr *); 150 void lsa_del(struct rde_nbr *, struct lsa_hdr *);
|
H A D | ospf6.h | 279 struct lsa_hdr { struct 289 #define LS_CKSUM_OFFSET offsetof(struct lsa_hdr, ls_chksum) argument 292 struct lsa_hdr hdr;
|
H A D | neighbor.c | 714 struct lsa_hdr * 717 struct lsa_hdr *lsa_hdr = NULL; in lsa_hdr_new() local 719 if ((lsa_hdr = calloc(1, sizeof(*lsa_hdr))) == NULL) in lsa_hdr_new() 722 return (lsa_hdr); in lsa_hdr_new()
|
H A D | rde_lsdb.c | 137 lsa_newer(struct lsa_hdr *a, struct lsa_hdr *b) in lsa_newer() 295 sizeof(struct lsa_hdr)); in lsa_check() 527 lsa_del(struct rde_nbr *nbr, struct lsa_hdr *lsa) in lsa_del() 708 sizeof(struct lsa_hdr) - sizeof(struct lsa_rtr)) / in lsa_num_links() 714 return ((ntohs(v->lsa->hdr.len) - sizeof(struct lsa_hdr) - in lsa_num_links() 741 sizeof(struct lsa_hdr)); in lsa_snap() 971 sizeof(struct lsa_hdr))) in lsa_equal()
|
H A D | database.c | 89 ibuf_left(buf) >= sizeof(struct lsa_hdr); le = nle) { in send_db_description() 91 if (ibuf_add(buf, le->le_lsa, sizeof(struct lsa_hdr))) in send_db_description() 341 db_sum_list_add(struct nbr *nbr, struct lsa_hdr *lsa) in db_sum_list_add()
|
/openbsd/usr.sbin/ospfd/ |
H A D | lsack.c | 104 struct lsa_hdr lsa_hdr; in recv_ls_ack() local 120 while (len >= sizeof(lsa_hdr)) { in recv_ls_ack() 121 memcpy(&lsa_hdr, buf, sizeof(lsa_hdr)); in recv_ls_ack() 123 if (lsa_hdr_check(nbr, &lsa_hdr)) { in recv_ls_ack() 127 nbr->iface->self, &lsa_hdr); in recv_ls_ack() 128 (void)ls_retrans_list_del(nbr, &lsa_hdr); in recv_ls_ack() 131 buf += sizeof(lsa_hdr); in recv_ls_ack() 132 len -= sizeof(lsa_hdr); in recv_ls_ack() 147 lsa_hdr_check(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in lsa_hdr_check() argument 150 if ((ntohs(lsa_hdr->age) < 1) || (ntohs(lsa_hdr->age) > MAX_AGE)) { in lsa_hdr_check() [all …]
|
H A D | lsupdate.c | 45 lsa_flood(struct iface *iface, struct nbr *originator, struct lsa_hdr *lsa_hdr, in lsa_flood() argument 68 r = lsa_newer(lsa_hdr, le->le_lsa); in lsa_flood() 236 struct lsa_hdr lsa; in recv_ls_update() 326 ls_retrans_list_del(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in ls_retrans_list_del() argument 349 ls_retrans_list_get(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in ls_retrans_list_get() argument 560 lsa_hash_hdr(const struct lsa_hdr *hdr) in lsa_hash_hdr() 597 lsa_cache_get(struct lsa_hdr *lsa_hdr) in lsa_cache_get() argument 601 ref = lsa_cache_look(lsa_hdr); in lsa_cache_get() 616 ref->data, sizeof(struct lsa_hdr)); in lsa_cache_put() 624 lsa_cache_look(struct lsa_hdr *lsa_hdr) in lsa_cache_look() argument [all …]
|
H A D | ospfe.h | 32 struct lsa_hdr *lu_lsa; 43 struct lsa_hdr hdr; 110 void db_sum_list_add(struct nbr *, struct lsa_hdr *); 161 int lsa_hdr_check(struct nbr *, struct lsa_hdr *); 162 void ls_ack_list_add(struct iface *, struct lsa_hdr *); 173 void ls_req_list_add(struct nbr *, struct lsa_hdr *); 183 int lsa_flood(struct iface *, struct nbr *, struct lsa_hdr *, 187 void ls_retrans_list_add(struct nbr *, struct lsa_hdr *, 189 int ls_retrans_list_del(struct nbr *, struct lsa_hdr *); 197 struct lsa_ref *lsa_cache_get(struct lsa_hdr *); [all …]
|
H A D | ospfe.c | 482 struct lsa_hdr lsa_hdr; in ospfe_dispatch_rde() local 486 struct lsa_hdr *lhp; in ospfe_dispatch_rde() 593 if (l < sizeof(lsa_hdr)) in ospfe_dispatch_rde() 596 memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr)); in ospfe_dispatch_rde() 611 &lsa_hdr, imsg.data); in ospfe_dispatch_rde() 711 memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr)); in ospfe_dispatch_rde() 716 &lsa_hdr) == 0) in ospfe_dispatch_rde() 827 struct lsa_hdr lsa_hdr; in orig_rtr_lsa() local 1099 if (ibuf_set(buf, 0, &lsa_hdr, sizeof(lsa_hdr)) == -1) in orig_rtr_lsa() 1119 struct lsa_hdr lsa_hdr; in orig_net_lsa() local [all …]
|
H A D | rde.c | 253 struct lsa_hdr lsa_hdr, *db_hdr; in rde_dispatch_imsg() local 366 l >= sizeof(lsa_hdr); l -= sizeof(lsa_hdr)) { in rde_dispatch_imsg() 367 memcpy(&lsa_hdr, buf, sizeof(lsa_hdr)); in rde_dispatch_imsg() 368 buf += sizeof(lsa_hdr); in rde_dispatch_imsg() 376 lsa_hdr.ls_id, lsa_hdr.adv_rtr); in rde_dispatch_imsg() 390 sizeof(lsa_hdr)); in rde_dispatch_imsg() 542 memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr)); in rde_dispatch_imsg() 547 v = lsa_find(nbr->iface, lsa_hdr.type, lsa_hdr.ls_id, in rde_dispatch_imsg() 548 lsa_hdr.adv_rtr); in rde_dispatch_imsg() 1089 rde_req_list_exists(struct rde_nbr *nbr, struct lsa_hdr *lsa_hdr) in rde_req_list_exists() argument [all …]
|
H A D | lsreq.c | 117 ls_req_list_add(struct nbr *nbr, struct lsa_hdr *lsa) in ls_req_list_add() 133 ls_req_list_get(struct nbr *nbr, struct lsa_hdr *lsa_hdr) in ls_req_list_get() argument 138 if ((lsa_hdr->type == le->le_lsa->type) && in ls_req_list_get() 139 (lsa_hdr->ls_id == le->le_lsa->ls_id) && in ls_req_list_get() 140 (lsa_hdr->adv_rtr == le->le_lsa->adv_rtr)) in ls_req_list_get()
|
H A D | ospf.h | 251 struct lsa_hdr { struct 262 #define LS_CKSUM_OFFSET offsetof(struct lsa_hdr, ls_chksum) argument 265 struct lsa_hdr hdr;
|
H A D | rde.h | 136 int lsa_newer(struct lsa_hdr *, struct lsa_hdr *); 140 void lsa_del(struct rde_nbr *, struct lsa_hdr *);
|
H A D | neighbor.c | 714 struct lsa_hdr * 717 struct lsa_hdr *lsa_hdr = NULL; in lsa_hdr_new() local 719 if ((lsa_hdr = calloc(1, sizeof(*lsa_hdr))) == NULL) in lsa_hdr_new() 722 return (lsa_hdr); in lsa_hdr_new()
|
H A D | rde_lsdb.c | 133 lsa_newer(struct lsa_hdr *a, struct lsa_hdr *b) in lsa_newer() 279 sizeof(struct lsa_hdr)); in lsa_check() 441 lsa_del(struct rde_nbr *nbr, struct lsa_hdr *lsa) in lsa_del() 561 return ((ntohs(v->lsa->hdr.len) - sizeof(struct lsa_hdr) in lsa_num_links() 593 sizeof(struct lsa_hdr)); in lsa_snap() 868 sizeof(struct lsa_hdr))) in lsa_equal()
|
H A D | database.c | 91 ibuf_left(buf) >= MD5_DIGEST_LENGTH + sizeof(struct lsa_hdr); in send_db_description() 94 if (ibuf_add(buf, le->le_lsa, sizeof(struct lsa_hdr))) in send_db_description() 354 db_sum_list_add(struct nbr *nbr, struct lsa_hdr *lsa) in db_sum_list_add()
|
/openbsd/usr.sbin/tcpdump/ |
H A D | ospf.h | 95 struct lsa_hdr { struct 108 struct lsa_hdr ls_hdr; argument 200 struct lsa_hdr db_lshdr[1]; /* may repeat */ 218 struct lsa_hdr lsa_lshdr[1]; /* may repeat */
|
H A D | ospf6.h | 101 struct lsa_hdr { struct 120 struct lsa_hdr ls_hdr; argument 253 struct lsa_hdr db_lshdr[1]; /* may repeat */ 272 struct lsa_hdr lsa_lshdr[1]; /* may repeat */
|
/openbsd/usr.sbin/ospfctl/ |
H A D | ospfctl.c | 266 struct lsa_hdr *lsa_hdr; in show() local 320 lsa_hdr = imsg->data; in show() 321 output->db_simple(lsa_hdr, area_id, lasttype, ifname); in show() 322 lasttype = lsa_hdr->type; in show()
|