All of lore.kernel.org
 help / color / mirror / Atom feed
* Can one program see another's scan-results?
@ 2012-07-10 19:02 Ben Greear
  2012-07-10 19:08 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2012-07-10 19:02 UTC (permalink / raw)
  To: linux-wireless

Is there a way to open a netlink socket and have it receive
all scan results (even those requested by other applications)?

Thanks,
Ben
-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can one program see another's scan-results?
  2012-07-10 19:02 Can one program see another's scan-results? Ben Greear
@ 2012-07-10 19:08 ` Johannes Berg
  2012-07-10 19:19   ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-07-10 19:08 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Tue, 2012-07-10 at 12:02 -0700, Ben Greear wrote:
> Is there a way to open a netlink socket and have it receive
> all scan results (even those requested by other applications)?

What do you mean by scan results? The results themselves? No, they are a
dump and unicast to one application. The fact that a scan finished? Yes,
of course.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can one program see another's scan-results?
  2012-07-10 19:08 ` Johannes Berg
@ 2012-07-10 19:19   ` Ben Greear
  2012-07-10 19:22     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2012-07-10 19:19 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 07/10/2012 12:08 PM, Johannes Berg wrote:
> On Tue, 2012-07-10 at 12:02 -0700, Ben Greear wrote:
>> Is there a way to open a netlink socket and have it receive
>> all scan results (even those requested by other applications)?
>
> What do you mean by scan results? The results themselves? No, they are a
> dump and unicast to one application. The fact that a scan finished? Yes,
> of course.

I'd like the results themselves..for instance, just piggyback on whatever
supplicant is already doing to get periodic updates, and of course I'd
end up requesting some scans myself from time to time if a user wanted
an immediate update.

I was hoping it could be something like just listening for network-device
and route updates like netlink already supports.

Since scanning is relatively slow and expensive, it seems like a good
idea to allow re-using the results...

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can one program see another's scan-results?
  2012-07-10 19:19   ` Ben Greear
@ 2012-07-10 19:22     ` Johannes Berg
  2012-07-10 19:31       ` Ben Greear
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2012-07-10 19:22 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Tue, 2012-07-10 at 12:19 -0700, Ben Greear wrote:
> On 07/10/2012 12:08 PM, Johannes Berg wrote:
> > On Tue, 2012-07-10 at 12:02 -0700, Ben Greear wrote:
> >> Is there a way to open a netlink socket and have it receive
> >> all scan results (even those requested by other applications)?
> >
> > What do you mean by scan results? The results themselves? No, they are a
> > dump and unicast to one application. The fact that a scan finished? Yes,
> > of course.
> 
> I'd like the results themselves..for instance, just piggyback on whatever
> supplicant is already doing to get periodic updates, and of course I'd
> end up requesting some scans myself from time to time if a user wanted
> an immediate update.
> 
> I was hoping it could be something like just listening for network-device
> and route updates like netlink already supports.
> 
> Since scanning is relatively slow and expensive, it seems like a good
> idea to allow re-using the results...

Well, umm.. you can just request the results? A la "iw wlan0 scan dump"?

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can one program see another's scan-results?
  2012-07-10 19:22     ` Johannes Berg
@ 2012-07-10 19:31       ` Ben Greear
  2012-07-10 19:39         ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2012-07-10 19:31 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On 07/10/2012 12:22 PM, Johannes Berg wrote:
> On Tue, 2012-07-10 at 12:19 -0700, Ben Greear wrote:
>> On 07/10/2012 12:08 PM, Johannes Berg wrote:
>>> On Tue, 2012-07-10 at 12:02 -0700, Ben Greear wrote:
>>>> Is there a way to open a netlink socket and have it receive
>>>> all scan results (even those requested by other applications)?
>>>
>>> What do you mean by scan results? The results themselves? No, they are a
>>> dump and unicast to one application. The fact that a scan finished? Yes,
>>> of course.
>>
>> I'd like the results themselves..for instance, just piggyback on whatever
>> supplicant is already doing to get periodic updates, and of course I'd
>> end up requesting some scans myself from time to time if a user wanted
>> an immediate update.
>>
>> I was hoping it could be something like just listening for network-device
>> and route updates like netlink already supports.
>>
>> Since scanning is relatively slow and expensive, it seems like a good
>> idea to allow re-using the results...
>
> Well, umm.. you can just request the results? A la "iw wlan0 scan dump"?

So, you could listen for the 'scan-complete' netlink message, and then
when you receive it, immediately go ask for a 'scan dump' for that interface,
and immediately get the last scan results?

Aside from a small race (what if something else did something to invalidate
those scan results), that sounds like it might be good enough to me.

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Can one program see another's scan-results?
  2012-07-10 19:31       ` Ben Greear
@ 2012-07-10 19:39         ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2012-07-10 19:39 UTC (permalink / raw)
  To: Ben Greear; +Cc: linux-wireless

On Tue, 2012-07-10 at 12:31 -0700, Ben Greear wrote:
> On 07/10/2012 12:22 PM, Johannes Berg wrote:
> > On Tue, 2012-07-10 at 12:19 -0700, Ben Greear wrote:
> >> On 07/10/2012 12:08 PM, Johannes Berg wrote:
> >>> On Tue, 2012-07-10 at 12:02 -0700, Ben Greear wrote:
> >>>> Is there a way to open a netlink socket and have it receive
> >>>> all scan results (even those requested by other applications)?
> >>>
> >>> What do you mean by scan results? The results themselves? No, they are a
> >>> dump and unicast to one application. The fact that a scan finished? Yes,
> >>> of course.
> >>
> >> I'd like the results themselves..for instance, just piggyback on whatever
> >> supplicant is already doing to get periodic updates, and of course I'd
> >> end up requesting some scans myself from time to time if a user wanted
> >> an immediate update.
> >>
> >> I was hoping it could be something like just listening for network-device
> >> and route updates like netlink already supports.
> >>
> >> Since scanning is relatively slow and expensive, it seems like a good
> >> idea to allow re-using the results...
> >
> > Well, umm.. you can just request the results? A la "iw wlan0 scan dump"?
> 
> So, you could listen for the 'scan-complete' netlink message, and then
> when you receive it, immediately go ask for a 'scan dump' for that interface,
> and immediately get the last scan results?

Yes.

> Aside from a small race (what if something else did something to invalidate
> those scan results), that sounds like it might be good enough to me.

There's not much that anything could do to do that.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-10 19:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 19:02 Can one program see another's scan-results? Ben Greear
2012-07-10 19:08 ` Johannes Berg
2012-07-10 19:19   ` Ben Greear
2012-07-10 19:22     ` Johannes Berg
2012-07-10 19:31       ` Ben Greear
2012-07-10 19:39         ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.