Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Honda CR-V Hybrid Lineup Expanded in Malaysia From RM178,200

    vivo V70 – Top 7 Flagship Features You Will Love

    Apple iPad Air with M4 Officially Launches in Malaysia From RM2,799

    Facebook X (Twitter) Instagram
    • Artificial Intelligence
    • Business Technology
    • Cryptocurrency
    • Gadgets
    • Gaming
    • Health
    • Software and Apps
    • Technology
    Facebook X (Twitter) Instagram Pinterest Vimeo
    Tech AI Verse
    • Home
    • Artificial Intelligence

      What the polls say about how Americans are using AI

      February 27, 2026

      Tensions between the Pentagon and AI giant Anthropic reach a boiling point

      February 21, 2026

      Read the extended transcript: President Donald Trump interviewed by ‘NBC Nightly News’ anchor Tom Llamas

      February 6, 2026

      Stocks and bitcoin sink as investors dump software company shares

      February 4, 2026

      AI, crypto and Trump super PACs stash millions to spend on the midterms

      February 2, 2026
    • Business

      Weighing up the enterprise risks of neocloud providers

      March 3, 2026

      A stolen Gemini API key turned a $180 bill into $82,000 in two days

      March 3, 2026

      These ultra-budget laptops “include” 1.2TB storage, but most of it is OneDrive trial space

      March 1, 2026

      FCC approves the merger of cable giants Cox and Charter

      February 28, 2026

      Finding value with AI and Industry 5.0 transformation

      February 28, 2026
    • Crypto

      Strait of Hormuz Shutdown Shakes Asian Energy Markets

      March 3, 2026

      Wall Street’s Inflation Alarm From Iran — What It Means for Crypto

      March 3, 2026

      Ethereum Price Prediction: What To Expect From ETH In March 2026

      March 3, 2026

      Was Bitcoin Hijacked? How Institutional Interests Shaped Its Narrative Since 2015

      March 3, 2026

      XRP Whales Now Hold 83.7% of All Supply – What’s Next For Price?

      March 3, 2026
    • Technology

      Spotify’s new feature makes it easier to find popular audiobooks

      March 3, 2026

      This portable JBL Grip Bluetooth speaker is so good at 20% off

      March 3, 2026

      ‘AI’ could dox your anonymous posts

      March 3, 2026

      Microsoft says new Teams location feature isn’t for ’employee tracking’

      March 3, 2026

      OpenAI got ‘sloppy’ about the wrong thing

      March 3, 2026
    • Others
      • Gadgets
      • Gaming
      • Health
      • Software and Apps
    Check BMI
    Tech AI Verse
    You are at:Home»Technology»tc-ematch(8) extended matches for use with “basic”, “cgroup” or “flow” filters
    Technology

    tc-ematch(8) extended matches for use with “basic”, “cgroup” or “flow” filters

    TechAiVerseBy TechAiVerseDecember 28, 2025No Comments4 Mins Read1 Views
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr Email Reddit
    tc-ematch(8) extended matches for use with “basic”, “cgroup” or “flow” filters
    Share
    Facebook Twitter LinkedIn Pinterest WhatsApp Email

    tc-ematch(8) extended matches for use with “basic”, “cgroup” or “flow” filters


    ematch(8)                         Linux                         ematch(8)
    

    NAME         top

           ematch - extended matches for use with "basic", "cgroup"  or
           "flow" filters
    

    SYNOPSIS         top

           tc filter add .. basic match EXPR .. flowid ..
    
           EXPR := TERM [ { and | or } EXPR ]
    
           TERM := [ not ] { MATCH | '(' EXPR ')' }
    
           MATCH := module '(' ARGS ')'
    
           ARGS := ARG1 ARG2 ..
    

    MATCHES         top

       cmp
           Simple comparison ematch: arithmetic compare of packet data to a
           given value.
    
           cmp( ALIGN at OFFSET [ ATTRS ] { eq | lt | gt } VALUE )
    
           ALIGN := { u8 | u16 | u32 }
    
           ATTRS := [ layer LAYER ] [ mask MASK ] [ trans ]
    
           LAYER := { link | network | transport | 0..2 }
    
       meta
           Metadata ematch
    
           meta( OBJECT { eq | lt |gt } OBJECT )
    
           OBJECT := { META_ID |  VALUE }
    
           META_ID := id [ shift SHIFT ] [ mask MASK ]
    
           meta attributes:
    
                  random 32 bit random value
    
                  loadavg_1 Load average in last 5 minutes
    
                  nf_mark Netfilter mark
    
                  vlan Vlan tag
    
                  sk_rcvbuf Receive buffer size
    
                  sk_snd_queue Send queue length
    
           A full list of meta attributes can be obtained via
    
           # tc filter add dev eth1 basic match 'meta(list)'
    
       nbyte
           match packet data byte sequence
    
           nbyte( NEEDLE at OFFSET [ layer LAYER ] )
    
           NEEDLE := { string | c-escape-sequence  }
    
           OFFSET := int
    
           LAYER := { link | network | transport | 0..2 }
    
       u32
           u32 ematch
    
           u32( ALIGN VALUE MASK at [ nexthdr+ ] OFFSET )
    
           ALIGN := { u8 | u16 | u32 }
    
       ipset
           test packet against ipset membership
    
           ipset( SETNAME FLAGS )
    
           SETNAME := string
    
           FLAGS := { FLAG [, FLAGS] }
    
           The flag options are the same as those used by the iptables "set"
           match.
    
           When using the ipset ematch with the "ip_set_hash:net,iface" set
           type, the interface can be queried using "src,dst (source ip
           address, outgoing interface) or "src,src" (source ip address,
           incoming interface) syntax.
    
       ipt
           test packet against xtables matches
    
           ipt( [-6] -m MATCH_NAME FLAGS )
    
           MATCH_NAME := string
    
           FLAGS := { FLAG [, FLAGS] }
    
           The flag options are the same as those used by the xtable match
           used.
    
       canid
           ematch rule to match CAN frames
    
           canid( IDLIST )
    
           IDLIST :=  IDSPEC[IDLIST]
    
           IDSPEC := { ’sff’ CANID | ’eff’ CANID }
    
           CANID := ID[:MASK]
    
           ID, MASK := hexadecimal number (i.e. 0x123)
    

    CAVEATS         top

           The ematch syntax uses '(' and ')' to group expressions. All
           braces need to be escaped properly to prevent shell commandline
           from interpreting these directly.
    
           When using the ipset ematch with the "ifb" device, the outgoing
           device will be the ifb device itself, e.g. "ifb0".  The original
           interface (i.e. the device the packet arrived on) is treated as
           the incoming interface.
    

    EXAMPLE & USAGE         top

           # tc filter add .. basic match ...
    
           # 'cmp(u16 at 3 layer 2 mask 0xff00 gt 20)'
    
           # 'meta(nfmark gt 24)' and 'meta(tcindex mask 0xf0 eq 0xf0)'
    
           # 'nbyte("ababa" at 12 layer 1)'
    
           # 'u32(u16 0x1122 0xffff at nexthdr+4)'
    
           Check if packet source ip address is member of set named bulk:
    
           # 'ipset(bulk src)'
    
           Check if packet source ip and the interface the packet arrived on
           is member of "hash:net,iface" set named interactive:
    
           # 'ipset(interactive src,src)'
    
           Check if packet matches an IPSec state with reqid 1:
    
           # 'ipt(-m policy --dir in --pol ipsec --reqid 1)'
    

    AUTHOR         top

           The extended match infrastructure was added by Thomas Graf.
    

    COLOPHON         top

           This page is part of the iproute2 (utilities for controlling
           TCP/IP networking and traffic) project.  Information about the
           project can be found at 
           ⟨http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2⟩.
           If you have a bug report for this manual page, send it to
           netdev@vger.kernel.org, shemminger@osdl.org.  This page was
           obtained from the project's upstream Git repository
           ⟨https://git.kernel.org/pub/scm/network/iproute2/iproute2.git⟩ on
           2025-08-11.  (At that time, the date of the most recent commit
           that was found in the repository was 2025-08-08.)  If you discover
           any rendering problems in this HTML version of the page, or you
           believe there is a better or more up-to-date source for the page,
           or you have corrections or improvements to the information in this
           COLOPHON (which is not part of the original manual page), send a
           mail to man-pages@man7.org
    
    iproute2                      6 August 2012                     ematch(8)
    

    Pages that refer to this page:
    tc(8), 
    tc-basic(8), 
    tc-bpf(8), 
    tc-cgroup(8), 
    tc-flow(8)


    Share. Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Telegram Email
    Previous ArticleScientists discover beer bottle in the Mariana Trench (2024)
    Next Article Why AI job loss headlines miss the bigger story
    TechAiVerse
    • Website

    Jonathan is a tech enthusiast and the mind behind Tech AI Verse. With a passion for artificial intelligence, consumer tech, and emerging innovations, he deliver clear, insightful content to keep readers informed. From cutting-edge gadgets to AI advancements and cryptocurrency trends, Jonathan breaks down complex topics to make technology accessible to all.

    Related Posts

    Spotify’s new feature makes it easier to find popular audiobooks

    March 3, 2026

    This portable JBL Grip Bluetooth speaker is so good at 20% off

    March 3, 2026

    ‘AI’ could dox your anonymous posts

    March 3, 2026
    Leave A Reply Cancel Reply

    Top Posts

    Ping, You’ve Got Whale: AI detection system alerts ships of whales in their path

    April 22, 2025703 Views

    Lumo vs. Duck AI: Which AI is Better for Your Privacy?

    July 31, 2025286 Views

    6.7 Cummins Lifter Failure: What Years Are Affected (And Possible Fixes)

    April 14, 2025164 Views

    6 Best MagSafe Phone Grips (2025), Tested and Reviewed

    April 6, 2025124 Views
    Don't Miss
    Gadgets March 4, 2026

    Honda CR-V Hybrid Lineup Expanded in Malaysia From RM178,200

    Honda CR-V Hybrid Lineup Expanded in Malaysia From RM178,200 Honda Malaysia has officially launched the…

    vivo V70 – Top 7 Flagship Features You Will Love

    Apple iPad Air with M4 Officially Launches in Malaysia From RM2,799

    Apple Launches iPhone 17e in Malaysia from RM2,999

    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    • YouTube
    • Vimeo

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    About Us
    About Us

    Welcome to Tech AI Verse, your go-to destination for everything technology! We bring you the latest news, trends, and insights from the ever-evolving world of tech. Our coverage spans across global technology industry updates, artificial intelligence advancements, machine learning ethics, and automation innovations. Stay connected with us as we explore the limitless possibilities of technology!

    Facebook X (Twitter) Pinterest YouTube WhatsApp
    Our Picks

    Honda CR-V Hybrid Lineup Expanded in Malaysia From RM178,200

    March 4, 20262 Views

    vivo V70 – Top 7 Flagship Features You Will Love

    March 4, 20262 Views

    Apple iPad Air with M4 Officially Launches in Malaysia From RM2,799

    March 4, 20262 Views
    Most Popular

    7 Best Kids Bikes (2025): Mountain, Balance, Pedal, Coaster

    March 13, 20250 Views

    VTOMAN FlashSpeed 1500: Plenty Of Power For All Your Gear

    March 13, 20250 Views

    Best TV Antenna of 2025

    March 13, 20250 Views
    © 2026 TechAiVerse. Designed by Divya Tech.
    • Home
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms & Conditions

    Type above and press Enter to search. Press Esc to cancel.