Linux wireless drivers development
 help / color / mirror / Atom feed
* Listing established mesh connections
@ 2008-12-10 15:13 Keir
  2008-12-10 15:28 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Keir @ 2008-12-10 15:13 UTC (permalink / raw)
  To: Andrey Yurovsky, linux-wireless, devel

Hi,

I was wondering if there was an efficient way to get a list of
established mesh connections for a given mesh network?  I'm working on
a custom link metric (Packet pair) for the o11s stack and want to
unicast a packet to each established connection.  I have been reading
through the HWMP code, but it doesn't seem clear to me how this code
gets a list of its neighbors.

Cheers

Keir

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

* Re: Listing established mesh connections
  2008-12-10 15:13 Listing established mesh connections Keir
@ 2008-12-10 15:28 ` Johannes Berg
       [not found]   ` <e27b78a40812110314w409a0294w1e73d40d9d34fac5@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2008-12-10 15:28 UTC (permalink / raw)
  To: Keir; +Cc: Andrey Yurovsky, linux-wireless, devel

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

On Wed, 2008-12-10 at 15:13 +0000, Keir wrote:
> Hi,
> 
> I was wondering if there was an efficient way to get a list of
> established mesh connections for a given mesh network?  I'm working on
> a custom link metric (Packet pair) for the o11s stack and want to
> unicast a packet to each established connection.  I have been reading
> through the HWMP code, but it doesn't seem clear to me how this code
> gets a list of its neighbors.

I think "iw dev wlan0 station dump" will give you what you want?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Listing established mesh connections
       [not found]   ` <e27b78a40812110314w409a0294w1e73d40d9d34fac5@mail.gmail.com>
@ 2008-12-11 13:55     ` Johannes Berg
  2008-12-11 14:12       ` Johannes Berg
       [not found]       ` <e27b78a40812110639w212d4b72v3ad5d54246b191cf@mail.gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2008-12-11 13:55 UTC (permalink / raw)
  To: Keir; +Cc: Andrey Yurovsky, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

[dropping o11s list, keeps telling me it drops my mail]

On Thu, 2008-12-11 at 11:14 +0000, Keir wrote:
> Hi,
> 
> No, I mean I want to do this within the C code of the mesh stack.

Oh. Well, is that what you want? If it is, then you can iterate the
sta_info list in the stack and check the sdata.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Listing established mesh connections
  2008-12-11 13:55     ` Johannes Berg
@ 2008-12-11 14:12       ` Johannes Berg
       [not found]       ` <e27b78a40812110639w212d4b72v3ad5d54246b191cf@mail.gmail.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2008-12-11 14:12 UTC (permalink / raw)
  To: Keir; +Cc: Andrey Yurovsky, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

On Thu, 2008-12-11 at 14:55 +0100, Johannes Berg wrote:
> [dropping o11s list, keeps telling me it drops my mail]
> 
> On Thu, 2008-12-11 at 11:14 +0000, Keir wrote:
> > Hi,
> > 
> > No, I mean I want to do this within the C code of the mesh stack.
> 
> Oh. Well, is that what you want? If it is, then you can iterate the
> sta_info list in the stack and check the sdata.

I mean, if that command prints what you want then you can easily
reproduce the same list in the kernel.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: Listing established mesh connections
       [not found]       ` <e27b78a40812110639w212d4b72v3ad5d54246b191cf@mail.gmail.com>
@ 2008-12-11 17:05         ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2008-12-11 17:05 UTC (permalink / raw)
  To: Keir; +Cc: Andrey Yurovsky, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

On Thu, 2008-12-11 at 14:39 +0000, Keir wrote:
> Yea I had that thought, but I wasn't sure how many items there would
> be in that list, or whether there was a less than linear time way to
> do it.  I did look into the IW code, but i found it quite hard to
> follow through that back into libnl and from there back into the
> kernel.

Well, it's pretty much

rcu_read_lock()
list_for_each_entry_rcu(sta, &local->sta_list) {
	if (sta->sdata != mesh_sdata)
		continue;
	do something with sta
}
rcu_read_unlock();

I'd think.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2008-12-11 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 15:13 Listing established mesh connections Keir
2008-12-10 15:28 ` Johannes Berg
     [not found]   ` <e27b78a40812110314w409a0294w1e73d40d9d34fac5@mail.gmail.com>
2008-12-11 13:55     ` Johannes Berg
2008-12-11 14:12       ` Johannes Berg
     [not found]       ` <e27b78a40812110639w212d4b72v3ad5d54246b191cf@mail.gmail.com>
2008-12-11 17:05         ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox