• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/zebra/ospfd/

Lines Matching refs:new

229   struct ospf_lsa *new;
231 new = XCALLOC (MTYPE_OSPF_LSA, sizeof (struct ospf_lsa));
232 memset (new, 0, sizeof (struct ospf_lsa));
234 new->flags = 0;
235 new->lock = 1;
236 new->retransmit_counter = 0;
237 gettimeofday (&new->tv_recv, NULL);
238 new->tv_orig = new->tv_recv;
239 new->refresh_list = -1;
241 return new;
248 struct ospf_lsa *new;
253 new = XCALLOC (MTYPE_OSPF_LSA, sizeof (struct ospf_lsa));
255 memcpy (new, lsa, sizeof (struct ospf_lsa));
256 UNSET_FLAG (new->flags, OSPF_LSA_DISCARD);
257 new->lock = 1;
258 new->retransmit_counter = 0;
259 new->data = ospf_lsa_data_dup (lsa->data);
261 return new;
325 struct lsa_header *new;
327 new = (struct lsa_header *) XMALLOC (MTYPE_OSPF_LSA_DATA, size);
328 memset (new, 0, size);
330 return new;
337 struct lsa_header *new;
339 new = ospf_lsa_data_new (ntohs (lsah->length));
340 memcpy (new, lsah, ntohs (lsah->length));
342 return new;
670 /* Create new router-LSA. */
676 struct ospf_lsa *new;
704 new = ospf_lsa_new ();
705 new->area = area;
706 SET_FLAG (new->flags, OSPF_LSA_SELF);
709 new->data = ospf_lsa_data_new (length);
710 memcpy (new->data, lsah, length);
713 return new;
720 struct ospf_lsa *new;
722 /* Create new router-LSA instance. */
723 new = ospf_router_lsa_new (area);
726 if (new->data->adv_router.s_addr == 0)
730 ospf_lsa_discard (new);
735 new = ospf_lsa_install (NULL, new);
740 /* Flooding new LSA through area. */
741 ospf_flood_through_area (area, NULL, new);
746 new->data->type, inet_ntoa (new->data->id), new);
747 ospf_lsa_header_dump (new->data);
750 return new;
758 struct ospf_lsa *new;
766 /* Create new router-LSA instance. */
767 new = ospf_router_lsa_new (area);
768 new->data->ls_seqnum = lsa_seqnum_increment (lsa);
770 ospf_lsa_install (NULL, new);
773 ospf_flood_through_area (area, NULL, new);
779 new->data->type, inet_ntoa (new->data->id));
780 ospf_lsa_header_dump (new->data);
859 /* If LSA not exist in this Area, originate new. */
868 First flush old LSA, then originate new. */
922 struct ospf_lsa *new;
934 /* Create new stream for LSA. */
949 new = ospf_lsa_new ();
950 new->area = oi->area;
951 SET_FLAG (new->flags, OSPF_LSA_SELF);
954 new->data = ospf_lsa_data_new (length);
955 memcpy (new->data, lsah, length);
958 return new;
965 struct ospf_lsa *new;
967 /* Create new network-LSA instance. */
968 new = ospf_network_lsa_new (oi);
969 if (new == NULL)
973 new = ospf_lsa_install (oi, new);
978 /* Flooding new LSA through area. */
979 ospf_flood_through_area (oi->area, NULL, new);
984 new->data->type, inet_ntoa (new->data->id), new);
985 ospf_lsa_header_dump (new->data);
988 return new;
995 struct ospf_lsa *new;
1002 /* Create new network-LSA instance. */
1003 new = ospf_network_lsa_new (oi);
1004 if (new == NULL)
1006 new->data->ls_seqnum = lsa_seqnum_increment (lsa);
1008 ospf_lsa_install (oi, new);
1011 ospf_flood_through_area (area, NULL, new);
1016 new->data->type, inet_ntoa (new->data->id));
1017 ospf_lsa_header_dump (new->data);
1113 struct ospf_lsa *new;
1120 /* Create new stream for LSA. */
1134 new = ospf_lsa_new ();
1135 new->area = area;
1136 SET_FLAG (new->flags, OSPF_LSA_SELF);
1139 new->data = ospf_lsa_data_new (length);
1140 memcpy (new->data, lsah, length);
1143 return new;
1151 struct ospf_lsa *new;
1156 /* Create new summary-LSA instance. */
1157 new = ospf_summary_lsa_new (area, (struct prefix *) p, metric, id);
1160 new = ospf_lsa_install (NULL, new);
1165 /* Flooding new LSA through area. */
1166 ospf_flood_through_area (area, NULL, new);
1171 new->data->type, inet_ntoa (new->data->id), new);
1172 ospf_lsa_header_dump (new->data);
1175 return new;
1181 struct ospf_lsa *new;
1190 new = ospf_summary_lsa_new (lsa->area, &p, GET_METRIC (sl->metric),
1193 new->data->ls_seqnum = lsa_seqnum_increment (lsa);
1196 ospf_lsa_checksum (new->data);
1198 ospf_lsa_install (NULL, new);
1201 ospf_flood_through_area (new->area, NULL, new);
1207 new->data->type, inet_ntoa (new->data->id));
1208 ospf_lsa_header_dump (new->data);
1211 return new;
1240 struct ospf_lsa *new;
1247 /* Create new stream for LSA. */
1261 new = ospf_lsa_new ();
1262 new->area = area;
1263 SET_FLAG (new->flags, OSPF_LSA_SELF);
1266 new->data = ospf_lsa_data_new (length);
1267 memcpy (new->data, lsah, length);
1270 return new;
1278 struct ospf_lsa *new;
1283 /* Create new summary-LSA instance. */
1284 new = ospf_summary_asbr_lsa_new (area, (struct prefix *) p, metric, id);
1287 new = ospf_lsa_install (NULL, new);
1292 /* Flooding new LSA through area. */
1293 ospf_flood_through_area (area, NULL, new);
1298 new->data->type, inet_ntoa (new->data->id), new);
1299 ospf_lsa_header_dump (new->data);
1302 return new;
1308 struct ospf_lsa *new;
1317 new = ospf_summary_asbr_lsa_new (lsa->area, &p, GET_METRIC (sl->metric),
1320 new->data->ls_seqnum = lsa_seqnum_increment (lsa);
1323 ospf_lsa_checksum (new->data);
1325 ospf_lsa_install (NULL, new);
1328 ospf_flood_through_area (new->area, NULL, new);
1333 new->data->type, inet_ntoa (new->data->id));
1334 ospf_lsa_header_dump (new->data);
1337 return new;
1491 /* Create new external-LSA. */
1497 struct ospf_lsa *new;
1527 /* Create new stream for LSA. */
1542 new = ospf_lsa_new ();
1543 new->area = NULL;
1544 SET_FLAG (new->flags, OSPF_LSA_SELF|OSPF_LSA_APPROVED);
1547 new->data = ospf_lsa_data_new (length);
1548 memcpy (new->data, lsah, length);
1551 return new;
1692 struct ospf_lsa *new;
1733 /* Create new AS-external-LSA instance. */
1734 if ((new = ospf_external_lsa_new (ei, NULL)) == NULL)
1743 ospf_lsa_install (NULL, new);
1748 /* Flooding new LSA. only to AS (non-NSSA/STUB) */
1749 ospf_flood_through_as (NULL, new);
1754 ospf_install_flood_nssa (new, ei); /* Install/Flood Type-7 to all NSSAs */
1761 new->data->type, inet_ntoa (new->data->id), new);
1762 ospf_lsa_header_dump (new->data);
1765 return new;
1957 struct ospf_lsa *new;
1976 new = ospf_external_lsa_new (ei, &lsa->data->id);
1978 if (new == NULL)
1986 new->data->ls_seqnum = lsa_seqnum_increment (lsa);
1989 gettimeofday (&new->tv_orig, NULL);
1992 ospf_lsa_checksum (new->data);
1994 ospf_lsa_install (NULL, new); /* As type-5. */
1997 ospf_flood_through_as (NULL, new);
2002 ospf_install_flood_nssa (new, ei); /* Install/Flood per new rules */
2006 ospf_refresher_register_lsa (ospf_top, new);
2012 new->data->type, inet_ntoa (new->data->id));
2013 ospf_lsa_header_dump (new->data);
2025 ospf_router_lsa_install (struct ospf_lsa *new, int rt_recalc)
2027 struct ospf_area *area = new->area;
2037 if (IS_LSA_SELF (new))
2046 area->router_lsa_self = ospf_lsa_lock (new);
2050 new->data->type, inet_ntoa (new->data->id));
2053 return new;
2063 struct ospf_lsa *new,
2078 if (IS_LSA_SELF (new) && !CHECK_FLAG (new->flags, OSPF_LSA_RECEIVED))
2088 oi->network_lsa_self = ospf_lsa_lock (new);
2091 return new;
2096 ospf_summary_lsa_install (struct ospf_lsa *new, int rt_recalc)
2099 if (rt_recalc && !IS_LSA_SELF (new))
2110 ospf_summary_incremental_update(new); */
2119 if (IS_LSA_SELF (new))
2120 ospf_refresher_register_lsa (ospf_top, new);
2122 return new;
2127 ospf_summary_asbr_lsa_install (struct ospf_lsa *new, int rt_recalc)
2129 if (rt_recalc && !IS_LSA_SELF (new))
2139 ospf_summary_incremental_update(new);
2149 if (IS_LSA_SELF (new))
2150 ospf_refresher_register_lsa (ospf_top, new);
2152 return new;
2157 ospf_external_lsa_install (struct ospf_lsa *new, int rt_recalc)
2159 ospf_ase_register_external_lsa (new, ospf_top);
2168 if (!IS_LSA_SELF (new))
2169 ospf_ase_incremental_update (new, ospf_top);
2173 if (IS_LSA_SELF (new))
2174 ospf_refresher_register_lsa (ospf_top, new);
2176 return new;
2226 struct ospf_lsa *new = NULL;
2259 Installing a new LSA in the database, either as the result of
2262 new LSA should be compared to the old instance, if present. If
2304 new = ospf_router_lsa_install (lsa, rt_recalc);
2308 new = ospf_network_lsa_install (oi, lsa, rt_recalc);
2311 new = ospf_summary_lsa_install (lsa, rt_recalc);
2314 new = ospf_summary_asbr_lsa_install (lsa, rt_recalc);
2317 new = ospf_external_lsa_install (lsa, rt_recalc);
2323 new = ospf_opaque_lsa_install (lsa, rt_recalc);
2328 new = ospf_external_lsa_install (lsa, rt_recalc);
2333 if (new == NULL)
2334 return new; /* Installation failed, cannot proceed further -- endo. */
2348 dump_lsa_key (new),
2349 LOOKUP (ospf_lsa_type_msg, new->data->type));
2352 strcpy (area_str, inet_ntoa (new->area->area_id));
2354 dump_lsa_key (new),
2355 LOOKUP (ospf_lsa_type_msg, new->data->type), area_str);
2361 if (IS_LSA_MAXAGE (new) && !IS_LSA_SELF (new))
2365 new->data->type, inet_ntoa (new->data->id));
2369 return new;
2485 ospf_lsa_maxage_exist (struct ospf_lsa *new)
2490 if (((struct ospf_lsa *) node->data) == new)
2837 struct ospf_lsa *new)
2842 seqnum = ntohl (new->data->ls_seqnum) + 1;