Has anyone tried adding multiple actions to a flow? If you have, can you post an example in c++ showing how its down. My method make the openflow switch throw errors about the packet it receives from Nox.
Thanks Hardeep On Sun, May 23, 2010 at 9:14 PM, kk yap <[email protected]> wrote: > Hi Hardeep, > > this looks correct. Have you looked at the packet sent using > wireshark? I would recommend that. > > Regards > KK > > On 23 May 2010 20:51, Hardeep Uppal <[email protected]> wrote: > > Hi, > > I am writing a Nox module that adds flow into the openflow switch. I have > > the module working correctly which adds one action ofp_action_output with > > the flow. > > I am not sure how to add multiple flows. I want to add the action > > ofp_action_tp_port defined in openflow.h. The struct for ofp_flow_mod has > > the array struct ofp_action_header actions[0]. I am not sure what the > > correct pointer arithmetic is to add the length of ofp_action_nw_addr and > > ofp_action_output. This is what I have > > ofp_action_nw_addr& action1 = *((ofp_action_nw_addr*)ofm->actions); > > memset(&action1, 0, sizeof(ofp_action_nw_addr)); > > action1.type = htons(OFPAT_SET_NW_DST); > > action1.len = htons(sizeof(ofp_action_nw_addr)); > > action1.nw_addr = l3_[2].addr; > > ofp_action_output& action2 = > *((ofp_action_output*)(((char*)ofm->actions) + > > sizeof(ofp_action_nw_addr))); > > memset(&action2, 0, sizeof(ofp_action_output)); > > action2.type = htons(OFPAT_OUTPUT); > > action2.len = htons(sizeof(ofp_action_output)); > > action2.max_len = htons(0); > > action2.port = htons(out_port); > > Can someone tell me what am I doing wrong? > > Thanks, > > Hardeep > > > > _______________________________________________ > > nox-dev mailing list > > [email protected] > > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > > > >
_______________________________________________ nox-dev mailing list [email protected] http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
