xenanetworks / open-automation-chimera-core

XOA Chimera Core
https://docs.xenanetworks.com/projects/xoa-chimera-core
Apache License 2.0
0 stars 0 forks source link

How do you configure extended filter's protocol segment? #15

Closed leonardhyu closed 1 year ago

leonardhyu commented 1 year ago
image
fpfeng commented 1 year ago
    extend_filter_mode = await flow.shadow_filter.use_extended_mode()
    config = await extend_filter_mode.get()

    ethernet = dataset.ProtocolSegement(
        protocol_type=dataset.ProtocolOption.ETHERNET,
        value='000001111',
        mask='1110000',
    )
    ipv4_1 = dataset.ProtocolSegement(
        protocol_type=dataset.ProtocolOption.IP,
        value='000001111',
        mask='1110000',
    )
    ipv4_2 = dataset.ProtocolSegement(
        protocol_type=dataset.ProtocolOption.IP,
        value='000001111',
        mask='1110000',
    )
    config.protocol_segments = (ethernet, ipv4_1, ipv4_2)