<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Packet filtering with python API in Tools</title>
    <link>https://community.cisco.com/t5/tools/packet-filtering-with-python-api/m-p/3561738#M354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ALL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one suggest about how to filter the received frames using python APIs using source mac address/destination mac address for automation purpose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jul 2017 13:34:15 GMT</pubDate>
    <dc:creator>kasai</dc:creator>
    <dc:date>2017-07-18T13:34:15Z</dc:date>
    <item>
      <title>Packet filtering with python API</title>
      <link>https://community.cisco.com/t5/tools/packet-filtering-with-python-api/m-p/3561738#M354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ALL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one suggest about how to filter the received frames using python APIs using source mac address/destination mac address for automation purpose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 13:34:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/packet-filtering-with-python-api/m-p/3561738#M354</guid>
      <dc:creator>kasai</dc:creator>
      <dc:date>2017-07-18T13:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Packet filtering with python API</title>
      <link>https://community.cisco.com/t5/tools/packet-filtering-with-python-api/m-p/3561739#M355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinivasa,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRex Python API supports adding captures queues to the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A capture allows you define a queue with a specific size and then query it for its captured packets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to our docs:&lt;/P&gt;&lt;P&gt;&lt;A href="https://trex-tgn.cisco.com/trex/doc/trex_stateless.html#_packet_capturing_api_usage" title="https://trex-tgn.cisco.com/trex/doc/trex_stateless.html#_packet_capturing_api_usage"&gt;TRex Stateless Capture API Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you have queried for the packets, you can filter them using scapy however you like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the &lt;STRONG&gt;next&lt;/STRONG&gt; &lt;STRONG&gt;version&lt;/STRONG&gt;, packet captures will be enhanced to support &lt;STRONG&gt;BPF (Berkeley Packet Filters)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that even under high traffic you will be after to activate a capture and provide a BPF pattern to filter the correct traffic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;client.start_capture(rx_ports = [0, 1], bpf_filter = 'ether src 01:02:03:04:05:06')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will capture only packets that their source Ethernet address is 01:02:03:04:05:06&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BPF filter format is the same as supported by tcpdump and alike.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Itay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:30:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/packet-filtering-with-python-api/m-p/3561739#M355</guid>
      <dc:creator>imarom</dc:creator>
      <dc:date>2017-07-18T14:30:00Z</dc:date>
    </item>
  </channel>
</rss>

