• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/quagga/ospf6d/

Lines Matching refs:header

55   start = (u_char *) lsa->header + sizeof (struct ospf6_lsa_header);
56 end = (u_char *) lsa->header + ntohs (lsa->header->length);
158 if (ntohs (lsa1->header->age) == OSPF_LSA_MAXAGE &&
159 ntohs (lsa2->header->age) != OSPF_LSA_MAXAGE)
161 if (ntohs (lsa1->header->age) != OSPF_LSA_MAXAGE &&
162 ntohs (lsa2->header->age) == OSPF_LSA_MAXAGE)
166 if (ntohs (lsa1->header->length) != ntohs (lsa2->header->length))
169 len = ntohs (lsa1->header->length) - sizeof (struct ospf6_lsa_header);
170 return memcmp (lsa1->header + 1, lsa2->header + 1, len);
181 if (ntohs (lsa1->header->length) != ntohs (lsa2->header->length))
183 /* Going beyond LSA headers to compare the payload only makes sense, when both LSAs aren't header-only. */
186 zlog_warn ("%s: only one of two (%s, %s) LSAs compared is header-only", __func__, lsa1->name, lsa2->name);
192 length = OSPF6_LSA_SIZE (lsa1->header) - sizeof (struct ospf6_lsa_header);
197 return memcmp (OSPF6_LSA_HEADER_END (lsa1->header),
198 OSPF6_LSA_HEADER_END (lsa2->header), length);
208 assert (lsa && lsa->header);
214 lsa->birth.tv_sec = now.tv_sec - ntohs (lsa->header->age);
221 then update age field of LSA header. return value is current age */
230 assert (lsa->header);
237 if (ntohs (lsa->header->age) >= OSPF_LSA_MAXAGE)
242 lsa->header->age = htons (OSPF_LSA_MAXAGE);
251 lsa->header->age = htons (age);
255 /* update age field of LSA header with adding InfTransDelay */
264 lsa->header->age = htons (age);
271 if (IS_OSPF6_DEBUG_LSA_TYPE (lsa->header->type))
300 lsa->header->age = htons (OSPF_LSA_MAXAGE);
313 assert (a && a->header);
314 assert (b && b->header);
317 seqnuma = (int32_t) ntohl (a->header->seqnum);
318 seqnumb = (int32_t) ntohl (b->header->seqnum);
327 cksuma = ntohs (a->header->checksum);
328 cksumb = ntohs (b->header->checksum);
358 inet_ntop (AF_INET, &lsa->header->id, id, sizeof (id));
359 inet_ntop (AF_INET, &lsa->header->adv_router, adv_router,
362 ospf6_lstype_name (lsa->header->type), id, adv_router);
367 ospf6_lsa_header_print_raw (struct ospf6_lsa_header *header)
370 inet_ntop (AF_INET, &header->id, id, sizeof (id));
371 inet_ntop (AF_INET, &header->adv_router, adv_router,
374 ospf6_lstype_name (header->type), id, adv_router);
376 ntohs (header->age), (u_long) ntohl (header->seqnum),
377 ntohs (header->checksum), ntohs (header->length));
384 ospf6_lsa_header_print_raw (lsa->header);
405 assert (lsa->header);
407 inet_ntop (AF_INET, &lsa->header->id, id, sizeof (id));
408 inet_ntop (AF_INET, &lsa->header->adv_router, adv_router,
411 type = ntohs(lsa->header->type);
412 handler = ospf6_get_lsa_handler (lsa->header->type);
418 ospf6_lstype_short_name (lsa->header->type),
420 (u_long) ntohl (lsa->header->seqnum),
426 ospf6_lstype_short_name (lsa->header->type),
428 (u_long) ntohl (lsa->header->seqnum));
439 ospf6_lstype_short_name (lsa->header->type),
441 (u_long) ntohl (lsa->header->seqnum), VNL);
451 start = (u_char *) lsa->header;
452 end = (u_char *) lsa->header + ntohs (lsa->header->length);
477 assert (lsa && lsa->header);
479 inet_ntop (AF_INET, &lsa->header->id, id, sizeof (id));
480 inet_ntop (AF_INET, &lsa->header->adv_router,
485 ospf6_lstype_name (lsa->header->type), VNL);
489 (u_long) ntohl (lsa->header->seqnum), VNL);
491 ntohs (lsa->header->checksum),
492 ntohs (lsa->header->length), VNL);
510 assert (lsa && lsa->header);
512 inet_ntop (AF_INET, &lsa->header->id, id, sizeof (id));
513 inet_ntop (AF_INET, &lsa->header->adv_router,
521 ospf6_lstype_name (lsa->header->type), VNL);
525 (u_long) ntohl (lsa->header->seqnum), VNL);
527 ntohs (lsa->header->checksum),
528 ntohs (lsa->header->length), VNL);
531 handler = ospf6_get_lsa_handler (lsa->header->type);
541 ospf6_lsa_create (struct ospf6_lsa_header *header)
548 lsa_size = ntohs (header->length); /* XXX vulnerable */
554 /* copy LSA from original header */
555 memcpy (new_header, header, lsa_size);
562 lsa->header = (struct ospf6_lsa_header *) new_header;
574 ospf6_lsa_create_headeronly (struct ospf6_lsa_header *header)
583 /* copy LSA from original header */
584 memcpy (new_header, header, sizeof (struct ospf6_lsa_header));
591 lsa->header = (struct ospf6_lsa_header *) new_header;
613 XFREE (MTYPE_OSPF6_LSA, lsa->header);
624 copy = ospf6_lsa_create_headeronly (lsa->header);
626 copy = ospf6_lsa_create (lsa->header);
670 assert (lsa && lsa->header);
676 if (IS_OSPF6_DEBUG_LSA_TYPE (lsa->header->type))
705 assert (old && old->header);
710 self = ospf6_lsdb_lookup (old->header->type, old->header->id,
711 old->header->adv_router, lsdb_self);
714 if (IS_OSPF6_DEBUG_LSA_TYPE (old->header->type))
721 self->header->age = htons (0);
722 self->header->seqnum =
723 ospf6_new_ls_seqnum (self->header->type, self->header->id,
724 self->header->adv_router, old->lsdb);
725 ospf6_lsa_checksum (self->header);
727 new = ospf6_lsa_create (self->header);
735 if (IS_OSPF6_DEBUG_LSA_TYPE (new->header->type))