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

Function dump_rt_6

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

Source from the content-addressed store, hash-verified

1011}
1012
1013static int
1014dump_rt_6(struct rt_rule_6 *rt)
1015{
1016 FILE *f;
1017 uint32_t i;
1018
1019 f = fopen(config.routes_file_s, "w");
1020 if (f == NULL) {
1021 printf("Can not open file %s\n", config.routes_file_s);
1022 return -1;
1023 }
1024
1025 for (i = 0; i < config.nb_routes; i++) {
1026 fprintf(f, NIPQUAD6_FMT"/%d %"PRIu64"\n", NIPQUAD6(rt[i].addr),
1027 rt[i].depth, rt[i].nh);
1028
1029 }
1030 fclose(f);
1031 return 0;
1032}
1033
1034static int
1035run_v6(void)

Callers 1

run_v6Function · 0.85

Calls 1

printfFunction · 0.50

Tested by

no test coverage detected