if (data[0] == IPFIX_protocolIdentifier_ICMP) printf("ICMP"); else if (data[0] == IPFIX_protocolIdentifier_TCP) printf("TCP"); else if (data[0] == IPFIX_protocolIdentifier_UDP) printf("UDP"); else if (data[0] == IPFIX_protocolIdentifier_RAW) printf("RAW"); else printf("unknownProtocol");
switch (data[0]) { case IPFIX_protocolIdentifier_ICMP: printf("ICMP"); return; case IPFIX_protocolIdentifier_TCP: printf("TCP"); return; case IPFIX_protocolIdentifier_UDP: printf("UDP"); return; case IPFIX_protocolIdentifier_RAW: printf("RAW"); return; default: printf("unknownProtocol"); return; }
static void printProtocol(FieldType type, FieldData* data) {	if (type.length != 1) {		errorf("Protocol with length %d unparseable", type.length);		return;		}	if (data[0] == IPFIX_protocolIdentifier_ICMP) printf("ICMP");	else if (data[0] == IPFIX_protocolIdentifier_TCP) printf("TCP");	else if (data[0] == IPFIX_protocolIdentifier_UDP) printf("UDP");	else if (data[0] == IPFIX_protocolIdentifier_RAW) printf("RAW");	else printf("unknownProtocol");	}