msg(MSG_ERROR, "processIpfixPacket: Unsupported Set ID - expected 2/3/4/256+, got %d", tmpid); }
if(tmpid >= IPFIX_SetId_Data_Start) { processDataSet(ipfixReceiver, tmpsid, set); } else { msg(MSG_ERROR, "processIpfixPacket: Unsupported Set ID - expected 2/3/4/256+, got %d", tmpid); } }
static int processIpfixPacket(IpfixReceiver* ipfixReceiver, byte* message, uint16_t length) {	uint16_t tmpid;	SourceID tmpsid;	IpfixHeader* header = (IpfixHeader*)message;	if(ntohs(header->length) != length) { 		DPRINTF("Bad message length - expected %#06x, got %#06x\n", length, ntohs(header->length));		return -1;	}	/* pointer to first set */	IpfixSetHeader* set = (IpfixSetHeader*)&header->data;	/* pointer beyond message */	IpfixSetHeader* setX = (IpfixSetHeader*)((char*)message + length); 	while(set < setX) {		tmpid=ntohs(set->id);                tmpsid=ntohs(header->sourceId);				switch(tmpid) {		case IPFIX_SetId_Data_Start:			processDataSet(ipfixReceiver, tmpsid, set);                        break;		case IPFIX_SetId_DataTemplate:			processDataTemplateSet(ipfixReceiver, tmpsid, set);                        break;		case IPFIX_SetId_Template:			processTemplateSet(ipfixReceiver, tmpsid, set);                        break;		case IPFIX_SetId_OptionsTemplate:			processOptionsTemplateSet(ipfixReceiver, tmpsid, set);			break;		default:			msg(MSG_ERROR, "processIpfixPacket: Unsupported Set ID - expected 2/3/4/256+, got %d", tmpid);		}		set = (IpfixSetHeader*)((byte*)set + ntohs(set->length));	}	return 0;}