Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7518001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:37:39+00:00 2026-05-30T01:37:39+00:00

I am supposed to sniff on all network interfaces installed on fiven machine (Linux

  • 0

I am supposed to sniff on all network interfaces installed on fiven machine (Linux – Ubuntu). I am using pcap library for this purpose. So I am finding all capable devices using pcap_findalldevs(…) function, but the result are also usb and loopback devices, which I dont want to use.

Can you sugegst me, how to filter only network (ethernet and wifi) devices?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:37:40+00:00Added an answer on May 30, 2026 at 1:37 am

    I suppose it depends what you mean by “network” devices.

    If you mean IPv4/IPv6 devices, you can interrogate the pcap_if_t->address returned by pcap_findalldevs and look at each address’s addr.sa_family field to determine if that device supports AF_INET and/or AF_INET6. The loopback devices will (pcap_if_t->flags & PCAP_IF_LOOPBACK) != 0.

    The problem with that is that will include devices which are not Ethernet and WiFi, like Token Ring, IP-over-Firewire, PPP, and such. PCAP doesn’t provide a portable way to know the hardware type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is supposed to output what kind of shell I'm using, which
So, for a CS project I'm supposed to sniff a network stream and build
Isn't 1em supposed to be 16px across all browsers? I have this CSS *
This is supposed to be a no brainer but I still can’t figure it
This function is supposed to set descending order numbers on an IEnumerable<Order>, but it
What is supposed to happen if a package is installed in multiple libraries? For
supposed a variable named $xlnum value is as this 20,4,56,987,68,96..... the variable $xlnum value
Supposed I have the following code: <html:link onclick=jQuery('#add').data('name','${name}').dialog('open'); href=#> And with this, if ${name}
Supposed I have a test.lua file like this: myVar = 5 Food = function()
Supposed I have code like: <table> <tr style=background-color: red><td><pre>This is line one</pre></td></tr> <tr style=background-color:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.