#include <vnet/ip/ip.h>
#include <vnet/plugin/plugin.h>
-#include <vnet/udp/udp.h>
+#include <vnet/udp/udp_local.h>
#include <ioam/ipfixcollector/ipfixcollector.h>
ipfix_collector_main_t ipfix_collector_main;
* This function can be used by other VPP graph nodes to receive IP-FIX packets
* with a particular setid.
*
- * @param vlib_main_t Vlib main of the graph node which is interseted in
+ * @param vm Vlib main of the graph node which is interested in
* getting IP-Fix packet.
- * @param ipfix_client_add_del_t Structure describing the client node which
+ * @param info Structure describing the client node which
* is interested in getting the IP-Fix packets for
* a SetID.
*
client->set_id = info->ipfix_setid;
hash_set (cm->client_reg_table, info->ipfix_setid, i);
+
+ if (!udp_is_valid_dst_port (UDP_DST_PORT_ipfix, 1))
+ udp_register_dst_port (vm, UDP_DST_PORT_ipfix,
+ ipfix_collector_node.index, 1);
+
return 0;
}
cm->client_reg_pool = NULL;
cm->client_reg_table = hash_create (0, sizeof (uword));
- udp_register_dst_port (vm,
- UDP_DST_PORT_ipfix,
- ipfix_collector_node.index, 1 /* is_ip4 */ );
return error;
}