ryu中的match项

这里写图片描述

上图是一张流表项的组成部分,其中match fileds是用来做流表匹配的,当一条数据流过来,该如何对这条流进行处理,交换机会先对数据进行匹配,如果匹配结果和一条流表项的match fileds是符合的,那么便会对这条流做相应的处理,在ryu中match fileds中包含哪些可以来匹配流的项呢?我们来看源码。在ryu中匹配域是由OFPMatch这个类来生成的一个实体,根据这个类的说明我们可以了解它定义了哪些匹配项以及在下流表时match fileds是如何生成的。

class OFPMatch(StringifyMixin):
    """
    Flow Match Structure

    This class is implementation of the flow match structure having
    compose/query API.
    There are new API and old API for compatibility. the old API is
    supposed to be removed later.

    You can define the flow match by the keyword arguments.
    The following arguments are available.

    ================ =============== ==================================
    Argument         Value           Description
    ================ =============== ==================================
    in_por
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值