* [B.A.T.M.A.N.] How to send message/execute script on clients from server?
@ 2014-02-06 9:34 Le Tran Dat
2014-02-06 9:55 ` Simon Wunderlich
0 siblings, 1 reply; 8+ messages in thread
From: Le Tran Dat @ 2014-02-06 9:34 UTC (permalink / raw)
To: b.a.t.m.a.n
Hi,
I would like to know if batman adv [2013.2.0] supports a way to
send/receive message between server and client?
I have setup a mesh network which has 1 server and several clients. I
want to broadcast a message to all the clients from the server. The
message might contain one more many parameters that I want all clients
will use these parameters for their configuration.
It would be very convenience if I could execute a script remotely on
clients from the server via batman adv without knowing their IP
address.
Thanks,
Dat
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 9:34 [B.A.T.M.A.N.] How to send message/execute script on clients from server? Le Tran Dat
@ 2014-02-06 9:55 ` Simon Wunderlich
2014-02-06 12:06 ` Le Tran Dat
0 siblings, 1 reply; 8+ messages in thread
From: Simon Wunderlich @ 2014-02-06 9:55 UTC (permalink / raw)
To: b.a.t.m.a.n
Hi Dat,
> Hi,
>
> I would like to know if batman adv [2013.2.0] supports a way to
> send/receive message between server and client?
>
> I have setup a mesh network which has 1 server and several clients. I
> want to broadcast a message to all the clients from the server. The
> message might contain one more many parameters that I want all clients
> will use these parameters for their configuration.
>
> It would be very convenience if I could execute a script remotely on
> clients from the server via batman adv without knowing their IP
> address.
batman-adv does not allow that by itself, but you can find various ways to do
that. For example, install an HTTP server and let the clients download scripts
from the default router in your routing table which hopefully points to your
server. Another alternative would be to use alfred[1], which is designed to
distribute data through a mesh network and to be used by clients. You can use
it to send any kind of data over your mesh network. I would not exactly send
shellscripts over it (might be a security problem), but configuration
parameters should work just fine.
Cheers,
Simon
[1] http://www.open-mesh.org/projects/open-mesh/wiki/Alfred
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 9:55 ` Simon Wunderlich
@ 2014-02-06 12:06 ` Le Tran Dat
2014-02-06 12:40 ` Simon Wunderlich
2014-02-06 12:42 ` Antonio Quartulli
0 siblings, 2 replies; 8+ messages in thread
From: Le Tran Dat @ 2014-02-06 12:06 UTC (permalink / raw)
To: Simon Wunderlich; +Cc: b.a.t.m.a.n
Hi Simon,
Thanks for your response. I've read about Alfred, tomorrow I will try
installing Alfred.
I am browsing the source code of batman adv and if I am not wrong I
can create and send a user-defined message.
I think I can broadcast something like a "struct sk_buff *skb;" to all
clients. However I don't think this one is a good way since it may
impact to the current design of batman adv. How do you think?
One more question, why browsing source code, I can not find the
definition of struct sk_buff; where could I find it?
P/S: I forgot to give the detail of my issue is that I do not know the IP
addresses of all clients but I want to be able to send the
configuration to them.
Is it possible for Alfred to send those configuration without knowing
cients' IP address by using mac-address only?
I haven't tried with IPv6 before. I have no IPv6 knowledge.
Thanks,
Dat
On Thu, Feb 6, 2014 at 1:55 AM, Simon Wunderlich <sw@simonwunderlich.de> wrote:
> Hi Dat,
>
>> Hi,
>>
>> I would like to know if batman adv [2013.2.0] supports a way to
>> send/receive message between server and client?
>>
>> I have setup a mesh network which has 1 server and several clients. I
>> want to broadcast a message to all the clients from the server. The
>> message might contain one more many parameters that I want all clients
>> will use these parameters for their configuration.
>>
>> It would be very convenience if I could execute a script remotely on
>> clients from the server via batman adv without knowing their IP
>> address.
>
> batman-adv does not allow that by itself, but you can find various ways to do
> that. For example, install an HTTP server and let the clients download scripts
> from the default router in your routing table which hopefully points to your
> server. Another alternative would be to use alfred[1], which is designed to
> distribute data through a mesh network and to be used by clients. You can use
> it to send any kind of data over your mesh network. I would not exactly send
> shellscripts over it (might be a security problem), but configuration
> parameters should work just fine.
>
> Cheers,
> Simon
>
> [1] http://www.open-mesh.org/projects/open-mesh/wiki/Alfred
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 12:06 ` Le Tran Dat
@ 2014-02-06 12:40 ` Simon Wunderlich
2014-02-06 12:42 ` Antonio Quartulli
1 sibling, 0 replies; 8+ messages in thread
From: Simon Wunderlich @ 2014-02-06 12:40 UTC (permalink / raw)
To: Le Tran Dat; +Cc: b.a.t.m.a.n
Hello Dat,
> Hi Simon,
>
> Thanks for your response. I've read about Alfred, tomorrow I will try
> installing Alfred.
>
> I am browsing the source code of batman adv and if I am not wrong I
> can create and send a user-defined message.
> I think I can broadcast something like a "struct sk_buff *skb;" to all
> clients. However I don't think this one is a good way since it may
> impact to the current design of batman adv. How do you think?
well in theory you can do a lot of things, but in practice I'd really not
recommend to send userspace-specific stuff through the kernel. I think it would
be better to just a userspace tool (alfred, wget/httpd, netcat, your own tool)
to transfer this kind of data.
>
> One more question, why browsing source code, I can not find the
> definition of struct sk_buff; where could I find it?
This is part of the linux kernel headers, to be found in
include/linux/skbuff.h. Again, you should really look into sending this kind of
information via userspace, e.g. use an UDP-socket and send a broadcast
message. In case you have never done something like that, have a look
at that guide:
http://beej.us/guide/bgnet/
>
> P/S: I forgot to give the detail of my issue is that I do not know the IP
> addresses of all clients but I want to be able to send the
> configuration to them.
> Is it possible for Alfred to send those configuration without knowing
> cients' IP address by using mac-address only?
Yes, that is possible.
>
> I haven't tried with IPv6 before. I have no IPv6 knowledge.
That's not a problem, just turn on IPv6 in your system and the interface will
get a link-local address assigned automatically.
Cheers,
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 12:06 ` Le Tran Dat
2014-02-06 12:40 ` Simon Wunderlich
@ 2014-02-06 12:42 ` Antonio Quartulli
2014-02-06 12:54 ` Le Tran Dat
1 sibling, 1 reply; 8+ messages in thread
From: Antonio Quartulli @ 2014-02-06 12:42 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking,
Simon Wunderlich
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
On 06/02/14 13:06, Le Tran Dat wrote:
> Hi Simon,
>
> Thanks for your response. I've read about Alfred, tomorrow I will try
> installing Alfred.
>
> I am browsing the source code of batman adv and if I am not wrong I
> can create and send a user-defined message.
> I think I can broadcast something like a "struct sk_buff *skb;" to all
> clients. However I don't think this one is a good way since it may
> impact to the current design of batman adv. How do you think?
>
> One more question, why browsing source code, I can not find the
> definition of struct sk_buff; where could I find it?
>
> P/S: I forgot to give the detail of my issue is that I do not know the IP
> addresses of all clients but I want to be able to send the
> configuration to them.
> Is it possible for Alfred to send those configuration without knowing
> cients' IP address by using mac-address only?
Instead of touching the batman-adv code or using Alfred you could just
open a socket on the bat0 interface and send raw Ethernet frames having
the broadcast address as destination.
This is something you can do with any Ethernet compatible interface (so
also with your normal eth0) and therefore also with batman-adv.
Regards,
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 12:42 ` Antonio Quartulli
@ 2014-02-06 12:54 ` Le Tran Dat
2014-02-06 12:59 ` Antonio Quartulli
0 siblings, 1 reply; 8+ messages in thread
From: Le Tran Dat @ 2014-02-06 12:54 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi Antonio,
Could you explain more about opening a socket on the bat0 interface?
Should I write a new user space deamon or write it inside batman adv?
Thanks
Dat
On Thu, Feb 6, 2014 at 4:42 AM, Antonio Quartulli
<antonio@meshcoding.com> wrote:
> On 06/02/14 13:06, Le Tran Dat wrote:
>> Hi Simon,
>>
>> Thanks for your response. I've read about Alfred, tomorrow I will try
>> installing Alfred.
>>
>> I am browsing the source code of batman adv and if I am not wrong I
>> can create and send a user-defined message.
>> I think I can broadcast something like a "struct sk_buff *skb;" to all
>> clients. However I don't think this one is a good way since it may
>> impact to the current design of batman adv. How do you think?
>>
>> One more question, why browsing source code, I can not find the
>> definition of struct sk_buff; where could I find it?
>>
>> P/S: I forgot to give the detail of my issue is that I do not know the IP
>> addresses of all clients but I want to be able to send the
>> configuration to them.
>> Is it possible for Alfred to send those configuration without knowing
>> cients' IP address by using mac-address only?
>
> Instead of touching the batman-adv code or using Alfred you could just
> open a socket on the bat0 interface and send raw Ethernet frames having
> the broadcast address as destination.
>
> This is something you can do with any Ethernet compatible interface (so
> also with your normal eth0) and therefore also with batman-adv.
>
> Regards,
>
> --
> Antonio Quartulli
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 12:54 ` Le Tran Dat
@ 2014-02-06 12:59 ` Antonio Quartulli
2014-02-10 1:27 ` Le Tran Dat
0 siblings, 1 reply; 8+ messages in thread
From: Antonio Quartulli @ 2014-02-06 12:59 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
On 06/02/14 13:54, Le Tran Dat wrote:
> Hi Antonio,
>
> Could you explain more about opening a socket on the bat0 interface?
> Should I write a new user space deamon or write it inside batman adv?
everything is userspace in this case. It's about writing a program in
userspace that sends raw Ethernet frames. batman-adv in this case can be
seen like an Ethernet switch, so you can treat you bat0 like it was a
normal eth0 connected to this switch. No need to touch batman-adv at all.
Cheers,
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [B.A.T.M.A.N.] How to send message/execute script on clients from server?
2014-02-06 12:59 ` Antonio Quartulli
@ 2014-02-10 1:27 ` Le Tran Dat
0 siblings, 0 replies; 8+ messages in thread
From: Le Tran Dat @ 2014-02-10 1:27 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Thanks all,
I used alfred to share configuration parameters to the whole network.
Everything works fine.
Anyway, If I want to know any change of the current parameter then I
need to periodically check for every 5 minutes. Is there any event
triggered when a new value has just been set to alfred?
Thanks,
Dat
On Thu, Feb 6, 2014 at 8:59 PM, Antonio Quartulli
<antonio@meshcoding.com> wrote:
> On 06/02/14 13:54, Le Tran Dat wrote:
>> Hi Antonio,
>>
>> Could you explain more about opening a socket on the bat0 interface?
>> Should I write a new user space deamon or write it inside batman adv?
>
> everything is userspace in this case. It's about writing a program in
> userspace that sends raw Ethernet frames. batman-adv in this case can be
> seen like an Ethernet switch, so you can treat you bat0 like it was a
> normal eth0 connected to this switch. No need to touch batman-adv at all.
>
> Cheers,
>
> --
> Antonio Quartulli
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-02-10 1:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 9:34 [B.A.T.M.A.N.] How to send message/execute script on clients from server? Le Tran Dat
2014-02-06 9:55 ` Simon Wunderlich
2014-02-06 12:06 ` Le Tran Dat
2014-02-06 12:40 ` Simon Wunderlich
2014-02-06 12:42 ` Antonio Quartulli
2014-02-06 12:54 ` Le Tran Dat
2014-02-06 12:59 ` Antonio Quartulli
2014-02-10 1:27 ` Le Tran Dat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox