Software Defined Networking
1752805 Members
5368 Online
108789 Solutions
New Discussion

how to forward packets to OpenDaylight controller

 
zhang0peter
New Member

how to forward packets to OpenDaylight controller

i use Open vSwitch and OpenDaylight.i want to forward packets to controller. what i want to do is build a firewall, so ovs first send all packets to controller, and the controller will judge whether the packet should be blocked or not. i add following code in datapath/datapath.c/ovs_dp_process_packet()

    struct dp_upcall_info upcall;
    int error;
    memset(&upcall, 0, sizeof(upcall));
    upcall.cmd = OVS_PACKET_CMD_MISS;
    upcall.portid = ovs_vport_find_upcall_portid(p, skb);
    upcall.mru = OVS_CB(skb)->mru;
    error = ovs_dp_upcall(dp, skb, key, &upcall, 0);

what i want to do is upcall the packets to controller even if they match the flowtable. but after i complie the code, it doesn't work. so how to upcall packets to controller ?