MCPcopy Index your code
hub / github.com/F-Stack/f-stack / print_mask

Function print_mask

tools/ipfw/dummynet.c:392–412  ·  view source on GitHub ↗

print a mask and header for the subsequent list of flows */

Source from the content-addressed store, hash-verified

390
391/* print a mask and header for the subsequent list of flows */
392static void
393print_mask(struct ipfw_flow_id *id)
394{
395 if (!IS_IP6_FLOW_ID(id)) {
396 printf(" "
397 "mask: %s 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n",
398 id->extra ? "queue," : "",
399 id->proto,
400 id->src_ip, id->src_port,
401 id->dst_ip, id->dst_port);
402 } else {
403 char buf[255];
404 printf("\n mask: %sproto: 0x%02x, flow_id: 0x%08x, ",
405 id->extra ? "queue," : "",
406 id->proto, id->flow_id6);
407 inet_ntop(AF_INET6_LINUX, &(id->src_ip6), buf, sizeof(buf));
408 printf("%s/0x%04x -> ", buf, id->src_port);
409 inet_ntop(AF_INET6_LINUX, &(id->dst_ip6), buf, sizeof(buf));
410 printf("%s/0x%04x\n", buf, id->dst_port);
411 }
412}
413
414static void
415print_header(struct ipfw_flow_id *id)

Callers 2

print_flowset_parmsFunction · 0.85
list_pipesFunction · 0.85

Calls 2

inet_ntopFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected