• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Interface filtering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Interface filtering


  • Subject: RE: Interface filtering
  • From: "Carl Smith" <email@hidden>
  • Date: Tue, 12 Apr 2005 09:26:40 -0400
  • Thread-topic: Interface filtering

" Since you are using an interface filter, then the packets you get from

a specific interface are either all from a wireless connection, or none
are.  Perhaps I am missing the point of your question."

Well you could have a situation where the machine is both wired, DSL
cable or something, and unwired, having a wireless nic card installed,
so in my case there is a en0 and a en1. So if I only wanted to intercept
the packets from the wireless card, I was wondering if there was some
way I could do that. But it sounds like maybe not.

Thanks for the information
Carl


-----Original Message-----
From: darwin-kernel-bounces+csmith=email@hidden
[mailto:darwin-kernel-bounces+csmith=email@hidden]
On Behalf Of Justin Walker
Sent: Monday, April 11, 2005 7:50 PM
To: darwin-kernel Dev
Subject: Re: Interface filtering


On Apr 11, 2005, at 16:23, Carl Smith wrote:

> I have my Ethernet interface filtering in place and am trapping the
> packets as they come through the interface filter, I was just
wondering
> if there was some way to tell which packets from the interface may be
> from a wireless connection or not?

Since you are using an interface filter, then the packets you get from
a specific interface are either all from a wireless connection, or none
are.  Perhaps I am missing the point of your question.

> In my filter I am passed a struct ifnet and the mbuf. I see that in
the
> struct ifnet it gives me the interface name, i.e. 'en', 'lo' and so
on,
> and with this I was just wondering if there is some variable in the
> struct that might also tell me if it is wireless or not.

There is nothing in the name that will give you a hint, and all will
identified as ethernet, at the "BSD network device" layer.

There is probably a mechanism available to distinguish wireless devices
from others, at the IOKit layer, but I don't know what it is (perhaps
the archives will tell).  There is provision for maintaining this info
at the BSD/network layer (the if_data substructure of the ifnet
structure), but I don't know that this is ever filled in, and in any
case, this would be done by the driver, so I can't say you can count on
it.

Anyone else?

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
"Weaseling out of things is what separates us from the animals.
  Well, except the weasel."
       - Homer J Simpson
--------

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
ch.com

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Interface filtering
      • From: Justin Walker <email@hidden>
  • Prev by Date: Re: Interface filtering
  • Next by Date: Re: Interface filtering
  • Previous by thread: Re: Interface filtering
  • Next by thread: Re: Interface filtering
  • Index(es):
    • Date
    • Thread