#include <stdlib.h>
#include "../common.h"
#include "snippet_match_integrity_flags.h"
void
snippet_init_integrity_flags(void)
{
init_default_snippet();
}
void
snippet_match_integrity_flags_create_actions(
__rte_unused uint16_t port_id,
{
if (queue == NULL)
fprintf(stderr, "Failed to allocate memory for queue\n");
}
void
snippet_match_integrity_flags_create_patterns(
struct rte_flow_item *pattern)
{
if (integrity_spec == NULL)
fprintf(stderr, "Failed to allocate memory for integrity_spec\n");
integrity_spec->
level = 0;
integrity_spec->
l3_ok = 1;
if (integrity_mask == NULL)
fprintf(stderr, "Failed to allocate memory for integrity_mask\n");
integrity_mask->
level = 0;
integrity_mask->
l3_ok = 1;
integrity_mask->
l4_ok = 0;
if (ip_spec == NULL)
fprintf(stderr, "Failed to allocate memory for ip_spec\n");
if (ip_mask == NULL)
fprintf(stderr, "Failed to allocate memory for ip_mask\n");
ip_spec->
hdr.dst_addr = htonl(((192<<24) + (168<<16) + (1<<8) + 1));
ip_mask->
hdr.dst_addr = 0xffffffff;
ip_spec->
hdr.src_addr = htonl(((0<<24) + (0<<16) + (0<<8) + 0));
ip_mask->
hdr.src_addr = 0x0;
pattern[1].
spec = ip_spec;
pattern[1].
mask = ip_mask;
pattern[2].
spec = integrity_spec;
pattern[2].
mask = integrity_mask;
}
struct rte_flow_template_table *
snippet_match_integrity_flags_create_table(
{
return NULL;
}