FreeBSD/sbin/ipfw/dummynet.c
/* print a mask and header for the subsequent list of flows */
print a mask and header for the subsequent list of flows
print a mask and header for the subsequent list of flows
static void
print_mask(struct ipfw_flow_id *id)
{
	if (!IS_IP6_FLOW_ID(id)) {
		printf("    "
		    "mask: %s 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n",
		    id->extra ? "queue," : "",
		    id->proto,
		    id->src_ip, id->src_port,
		    id->dst_ip, id->dst_port);
	} else {
		char buf[255];
		printf("\n        mask: %sproto: 0x%02x, flow_id: 0x%08x,  ",
		    id->extra ? "queue," : "",
		    id->proto, id->flow_id6);
		inet_ntop(AF_INET6, &(id->src_ip6), buf, sizeof(buf));
		printf("%s/0x%04x -> ", buf, id->src_port);
		inet_ntop(AF_INET6, &(id->dst_ip6), buf, sizeof(buf));
		printf("%s/0x%04x\n", buf, id->dst_port);
	}
}
static void print_mask ( struct ipfw_flow_id * id ) { if ( ! IS_IP6_FLOW_ID ( id ) ) { printf ( " " " \n " , id -> extra ? " " : " " , id -> proto , id -> src_ip , id -> src_port , id -> dst_ip , id -> dst_port ) ; } else { char buf [ 255 ] ; printf ( " \n " , id -> extra ? " " : " " , id -> proto , id -> flow_id6 ) ; inet_ntop ( AF_INET6 , & ( id -> src_ip6 ) , buf , sizeof ( buf ) ) ; printf ( " " , buf , id -> src_port ) ; inet_ntop ( AF_INET6 , & ( id -> dst_ip6 ) , buf , sizeof ( buf ) ) ; printf ( " \n " , buf , id -> dst_port ) ; } }
print a mask and header for the subsequent list of flows
print a mask and header for the subsequent list of flows