Beispiel #1
0
def _handle_VendorIn(event):
    in_msg = InMessage(event.ofp)

    if in_msg.is_packet_in:

        if in_msg.reason == 'MATCH_TABLE_MISS':

            out_msg = OutMessage()

            if in_msg.port == 1:
                out_msg.packet_out([2], in_msg.packet_data)
            elif in_msg.port == 2:
                out_msg.packet_out([1], in_msg.packet_data)

            event.connection.send(out_msg)
def _handle_VendorIn(event):
    in_msg = InMessage(event.ofp)

    if in_msg.is_packet_in:

        if in_msg.reason == "MATCH_TABLE_MISS":

            out_msg = OutMessage()

            if in_msg.port == 1:
                out_msg.packet_out([2], in_msg.packet_data)
            elif in_msg.port == 2:
                out_msg.packet_out([1], in_msg.packet_data)

            event.connection.send(out_msg)
Beispiel #3
0
def _handle_VendorIn(event):
    in_msg = InMessage(event.ofp)

    if in_msg.is_packet_in:

        if in_msg.reason == 'SEND_TO_CONTROLLER':
            out_msg = OutMessage()

            ports = []
            for i in range(1, PORT_COUNT + 1):
                if i != in_msg.port:
                    ports.append(i)

            out_msg.packet_out(ports, in_msg.packet_data)

            event.connection.send(out_msg)
def _handle_VendorIn(event):
    in_msg = InMessage(event.ofp)

    if in_msg.is_packet_in:

        if in_msg.reason == 'SEND_TO_CONTROLLER':
            out_msg = OutMessage()

            ports = []
            for i in range(1, PORT_COUNT + 1):
                if i != in_msg.port:
                    ports.append(i)

            out_msg.packet_out(ports, in_msg.packet_data)

            event.connection.send(out_msg)