MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dump_rt_4

Function dump_rt_4

dpdk/app/test-fib/main.c:807–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805}
806
807static int
808dump_rt_4(struct rt_rule_4 *rt)
809{
810 FILE *f;
811 uint32_t i;
812
813 f = fopen(config.routes_file_s, "w");
814 if (f == NULL) {
815 printf("Can not open file %s\n", config.routes_file_s);
816 return -1;
817 }
818
819 for (i = 0; i < config.nb_routes; i++)
820 fprintf(f, NIPQUAD_FMT"/%d %"PRIu64"\n", NIPQUAD(rt[i].addr),
821 rt[i].depth, rt[i].nh);
822
823 fclose(f);
824 return 0;
825}
826
827static inline void
828print_depth_err(void)

Callers 1

run_v4Function · 0.85

Calls 1

printfFunction · 0.50

Tested by

no test coverage detected