Hello guys,
I am also trying to create a function that deletes all flow entries associated with a MAC address (see below) but its just simply not working as expected. Can someone please advise me if I am missing something basic here.
int
delete_flow ( uint64_t datapath_id, const uint8_t *macsa) {
struct ofp_match match;
memset( &match, 0, sizeof( struct ofp_match ) );
match.wildcards = ( OFPFW_ALL & ~OFPFW_DL_SRC );
memcpy( match.dl_src, macsa, OFP_ETH_ALEN );
buffer *flow_mod = create_flow_mod( get_transaction_id(), match, get_cookie(), OFPFC_DELETE, UINT16_MAX, UINT16_MAX, UINT16_MAX, UINT32_MAX, OFPP_NONE, OFPFF_SEND_FLOW_REM, NULL );
int ret = send_openflow_message( datapath_id, flow_mod );
printf ("delete flow ret = %d \n", ret);
free_buffer( flow_mod );
return ret;