* [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
@ 2012-11-28 4:15 liu muye
2012-11-28 5:02 ` Marek Lindner
2012-11-28 23:02 ` liu muye
0 siblings, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-28 4:15 UTC (permalink / raw)
To: b.a.t.m.a.n
Hello:
This is Muye again. I have encountered another problem recently when I
am using B.A.T.M.A.N to do the socket programming.
Currently, I have three nodes. Namely, node A, node B, and node C. The
testing environment is a hall way in our department.
I put node A in one end of the hall way, node C in another end of the
hall way. Node B is in the middle of the hall way.
I can ping node C from node A and vice versa. In node A, I can
traceroute to node C. The traceroute shows it needs to go through node
B.
However, when I send packet from node A to node C. Node C does not
receive anything. But if I send packet from node A to node B, node B
can receive that packet.
Not sure what happened. The link shown below is the program I used to
send packet. Both source and destination are MAC address.
https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
I greatly appreciate any suggestion, comment, and help.
Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 4:15 [B.A.T.M.A.N.] batman-adv: Raw Socket Communication liu muye
@ 2012-11-28 5:02 ` Marek Lindner
2012-11-28 23:02 ` liu muye
1 sibling, 0 replies; 18+ messages in thread
From: Marek Lindner @ 2012-11-28 5:02 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi,
> However, when I send packet from node A to node C. Node C does not
> receive anything. But if I send packet from node A to node B, node B
> can receive that packet.
> Not sure what happened. The link shown below is the program I used to
> send packet. Both source and destination are MAC address.
>
> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f0
> 60cb/attachment.c
haven't looked at the code but it sounds like you are using the wrong mac
addresses ? Do you use the respective bat0 mac address as source and
destination for your packets ?
Cheers,
Marek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 4:15 [B.A.T.M.A.N.] batman-adv: Raw Socket Communication liu muye
2012-11-28 5:02 ` Marek Lindner
@ 2012-11-28 23:02 ` liu muye
2012-11-28 23:09 ` liu muye
1 sibling, 1 reply; 18+ messages in thread
From: liu muye @ 2012-11-28 23:02 UTC (permalink / raw)
To: b.a.t.m.a.n
One follow up question:
When I do batctl o. It shows the MAC address of my network interface.
In my case, is ah0.
Not sure what to do in order to show the MAC address of the bat0.
Thanks
Muye Liu
On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
> Hello:
>
> This is Muye again. I have encountered another problem recently when I
> am using B.A.T.M.A.N to do the socket programming.
>
> Currently, I have three nodes. Namely, node A, node B, and node C. The
> testing environment is a hall way in our department.
>
> I put node A in one end of the hall way, node C in another end of the
> hall way. Node B is in the middle of the hall way.
>
> I can ping node C from node A and vice versa. In node A, I can
> traceroute to node C. The traceroute shows it needs to go through node
> B.
>
> However, when I send packet from node A to node C. Node C does not
> receive anything. But if I send packet from node A to node B, node B
> can receive that packet.
> Not sure what happened. The link shown below is the program I used to
> send packet. Both source and destination are MAC address.
>
> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>
> I greatly appreciate any suggestion, comment, and help.
>
> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:02 ` liu muye
@ 2012-11-28 23:09 ` liu muye
2012-11-28 23:18 ` Antonio Quartulli
2012-11-28 23:29 ` liu muye
0 siblings, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-28 23:09 UTC (permalink / raw)
To: b.a.t.m.a.n
Besides, when do batctl ping. I am using the MAC address of ah0. I can
ping other node.
If the MAC address is wrong, I think I cannot even ping another node,
or traceroute to another node.
Thanks
On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
> One follow up question:
>
> When I do batctl o. It shows the MAC address of my network interface.
> In my case, is ah0.
> Not sure what to do in order to show the MAC address of the bat0.
>
> Thanks
> Muye Liu
>
> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>> Hello:
>>
>> This is Muye again. I have encountered another problem recently when I
>> am using B.A.T.M.A.N to do the socket programming.
>>
>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>> testing environment is a hall way in our department.
>>
>> I put node A in one end of the hall way, node C in another end of the
>> hall way. Node B is in the middle of the hall way.
>>
>> I can ping node C from node A and vice versa. In node A, I can
>> traceroute to node C. The traceroute shows it needs to go through node
>> B.
>>
>> However, when I send packet from node A to node C. Node C does not
>> receive anything. But if I send packet from node A to node B, node B
>> can receive that packet.
>> Not sure what happened. The link shown below is the program I used to
>> send packet. Both source and destination are MAC address.
>>
>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>
>> I greatly appreciate any suggestion, comment, and help.
>>
>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:09 ` liu muye
@ 2012-11-28 23:18 ` Antonio Quartulli
2012-11-28 23:29 ` liu muye
1 sibling, 0 replies; 18+ messages in thread
From: Antonio Quartulli @ 2012-11-28 23:18 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]
Something is not correct in your reasoning:
batctl ping/traceroute is a debug mechanism in which you make two _nodes_
communicate with each other, therefore here you use the node identifier which is
the MAC address that you can also read in batctl o output.
When you want to send _payload data_ over bat0 (and this is what your program is
trying to do), then you are acting as _client_
and your source mac address is not your ah0's address anymore but it is the one
associated to your bat0. To see it just run "ifconfig bat0" and and look at the
HWAddr info.
Cheers,
On Wed, Nov 28, 2012 at 06:09:48PM -0500, liu muye wrote:
> Besides, when do batctl ping. I am using the MAC address of ah0. I can
> ping other node.
> If the MAC address is wrong, I think I cannot even ping another node,
> or traceroute to another node.
>
> Thanks
>
> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
> > One follow up question:
> >
> > When I do batctl o. It shows the MAC address of my network interface.
> > In my case, is ah0.
> > Not sure what to do in order to show the MAC address of the bat0.
> >
> > Thanks
> > Muye Liu
> >
> > On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
> >> Hello:
> >>
> >> This is Muye again. I have encountered another problem recently when I
> >> am using B.A.T.M.A.N to do the socket programming.
> >>
> >> Currently, I have three nodes. Namely, node A, node B, and node C. The
> >> testing environment is a hall way in our department.
> >>
> >> I put node A in one end of the hall way, node C in another end of the
> >> hall way. Node B is in the middle of the hall way.
> >>
> >> I can ping node C from node A and vice versa. In node A, I can
> >> traceroute to node C. The traceroute shows it needs to go through node
> >> B.
> >>
> >> However, when I send packet from node A to node C. Node C does not
> >> receive anything. But if I send packet from node A to node B, node B
> >> can receive that packet.
> >> Not sure what happened. The link shown below is the program I used to
> >> send packet. Both source and destination are MAC address.
> >>
> >> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
> >>
> >> I greatly appreciate any suggestion, comment, and help.
> >>
> >> Thanks
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:09 ` liu muye
2012-11-28 23:18 ` Antonio Quartulli
@ 2012-11-28 23:29 ` liu muye
2012-11-28 23:35 ` Antonio Quartulli
2012-11-28 23:48 ` liu muye
1 sibling, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-28 23:29 UTC (permalink / raw)
To: b.a.t.m.a.n
OK, Thanks for the clarification. Just wonder if there is any way to
get the MAC address of bat0 on other end.
For example: I got node A and node C. I want to send data packet from
node A to node C. The MAC address of bat0 in nodeA is the source. Just
wandering if there is a way to get the MAC address of bat0 in node C
without physically show up in front of node C and run these commands.
Thank you so much
On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
> Besides, when do batctl ping. I am using the MAC address of ah0. I can
> ping other node.
> If the MAC address is wrong, I think I cannot even ping another node,
> or traceroute to another node.
>
> Thanks
>
> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>> One follow up question:
>>
>> When I do batctl o. It shows the MAC address of my network interface.
>> In my case, is ah0.
>> Not sure what to do in order to show the MAC address of the bat0.
>>
>> Thanks
>> Muye Liu
>>
>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>>> Hello:
>>>
>>> This is Muye again. I have encountered another problem recently when I
>>> am using B.A.T.M.A.N to do the socket programming.
>>>
>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>>> testing environment is a hall way in our department.
>>>
>>> I put node A in one end of the hall way, node C in another end of the
>>> hall way. Node B is in the middle of the hall way.
>>>
>>> I can ping node C from node A and vice versa. In node A, I can
>>> traceroute to node C. The traceroute shows it needs to go through node
>>> B.
>>>
>>> However, when I send packet from node A to node C. Node C does not
>>> receive anything. But if I send packet from node A to node B, node B
>>> can receive that packet.
>>> Not sure what happened. The link shown below is the program I used to
>>> send packet. Both source and destination are MAC address.
>>>
>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>>
>>> I greatly appreciate any suggestion, comment, and help.
>>>
>>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:29 ` liu muye
@ 2012-11-28 23:35 ` Antonio Quartulli
2012-11-28 23:48 ` liu muye
1 sibling, 0 replies; 18+ messages in thread
From: Antonio Quartulli @ 2012-11-28 23:35 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 2971 bytes --]
On Wed, Nov 28, 2012 at 06:29:56PM -0500, liu muye wrote:
> OK, Thanks for the clarification. Just wonder if there is any way to
> get the MAC address of bat0 on other end.
>
> For example: I got node A and node C. I want to send data packet from
> node A to node C. The MAC address of bat0 in nodeA is the source. Just
> wandering if there is a way to get the MAC address of bat0 in node C
> without physically show up in front of node C and run these commands.
You can have a look at the global translation table.
As described on our wiki[1], there you find all the
_clients_ announced by each node in the network. The problem is that if a node
has other clients connected to the mesh through a bridge, than you will see
many entries corresponding to the same node and you will not be able to
distinguish bat0's macc address from other clients.
Cheers,
[1] http://www.open-mesh.org/projects/batman-adv/wiki/Understand-your-batman-adv-network#translation-tables
>
> Thank you so much
>
>
>
> On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
> > Besides, when do batctl ping. I am using the MAC address of ah0. I can
> > ping other node.
> > If the MAC address is wrong, I think I cannot even ping another node,
> > or traceroute to another node.
> >
> > Thanks
> >
> > On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
> >> One follow up question:
> >>
> >> When I do batctl o. It shows the MAC address of my network interface.
> >> In my case, is ah0.
> >> Not sure what to do in order to show the MAC address of the bat0.
> >>
> >> Thanks
> >> Muye Liu
> >>
> >> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
> >>> Hello:
> >>>
> >>> This is Muye again. I have encountered another problem recently when I
> >>> am using B.A.T.M.A.N to do the socket programming.
> >>>
> >>> Currently, I have three nodes. Namely, node A, node B, and node C. The
> >>> testing environment is a hall way in our department.
> >>>
> >>> I put node A in one end of the hall way, node C in another end of the
> >>> hall way. Node B is in the middle of the hall way.
> >>>
> >>> I can ping node C from node A and vice versa. In node A, I can
> >>> traceroute to node C. The traceroute shows it needs to go through node
> >>> B.
> >>>
> >>> However, when I send packet from node A to node C. Node C does not
> >>> receive anything. But if I send packet from node A to node B, node B
> >>> can receive that packet.
> >>> Not sure what happened. The link shown below is the program I used to
> >>> send packet. Both source and destination are MAC address.
> >>>
> >>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
> >>>
> >>> I greatly appreciate any suggestion, comment, and help.
> >>>
> >>> Thanks
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:29 ` liu muye
2012-11-28 23:35 ` Antonio Quartulli
@ 2012-11-28 23:48 ` liu muye
2012-11-28 23:56 ` Antonio Quartulli
2012-11-29 0:02 ` liu muye
1 sibling, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-28 23:48 UTC (permalink / raw)
To: b.a.t.m.a.n
So, if I understood correctly. The best way to do is to run command
"ifconfig bat0" on both sides and fill in the HWAddr info accordingly.
Thanks
On Wed, Nov 28, 2012 at 6:29 PM, liu muye <lmy19901031@gmail.com> wrote:
> OK, Thanks for the clarification. Just wonder if there is any way to
> get the MAC address of bat0 on other end.
>
> For example: I got node A and node C. I want to send data packet from
> node A to node C. The MAC address of bat0 in nodeA is the source. Just
> wandering if there is a way to get the MAC address of bat0 in node C
> without physically show up in front of node C and run these commands.
>
> Thank you so much
>
>
>
> On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
>> Besides, when do batctl ping. I am using the MAC address of ah0. I can
>> ping other node.
>> If the MAC address is wrong, I think I cannot even ping another node,
>> or traceroute to another node.
>>
>> Thanks
>>
>> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>>> One follow up question:
>>>
>>> When I do batctl o. It shows the MAC address of my network interface.
>>> In my case, is ah0.
>>> Not sure what to do in order to show the MAC address of the bat0.
>>>
>>> Thanks
>>> Muye Liu
>>>
>>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>> Hello:
>>>>
>>>> This is Muye again. I have encountered another problem recently when I
>>>> am using B.A.T.M.A.N to do the socket programming.
>>>>
>>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>>>> testing environment is a hall way in our department.
>>>>
>>>> I put node A in one end of the hall way, node C in another end of the
>>>> hall way. Node B is in the middle of the hall way.
>>>>
>>>> I can ping node C from node A and vice versa. In node A, I can
>>>> traceroute to node C. The traceroute shows it needs to go through node
>>>> B.
>>>>
>>>> However, when I send packet from node A to node C. Node C does not
>>>> receive anything. But if I send packet from node A to node B, node B
>>>> can receive that packet.
>>>> Not sure what happened. The link shown below is the program I used to
>>>> send packet. Both source and destination are MAC address.
>>>>
>>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>>>
>>>> I greatly appreciate any suggestion, comment, and help.
>>>>
>>>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:48 ` liu muye
@ 2012-11-28 23:56 ` Antonio Quartulli
2012-11-29 0:02 ` liu muye
1 sibling, 0 replies; 18+ messages in thread
From: Antonio Quartulli @ 2012-11-28 23:56 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 2985 bytes --]
if your destination node has some clients or bat0 is bridged, yes (this is the
common case).
Otherwise you can look into the global translation table and get the only MAC
address corresponding to that node.
Cheers,
On Wed, Nov 28, 2012 at 06:48:55PM -0500, liu muye wrote:
> So, if I understood correctly. The best way to do is to run command
> "ifconfig bat0" on both sides and fill in the HWAddr info accordingly.
>
> Thanks
>
> On Wed, Nov 28, 2012 at 6:29 PM, liu muye <lmy19901031@gmail.com> wrote:
> > OK, Thanks for the clarification. Just wonder if there is any way to
> > get the MAC address of bat0 on other end.
> >
> > For example: I got node A and node C. I want to send data packet from
> > node A to node C. The MAC address of bat0 in nodeA is the source. Just
> > wandering if there is a way to get the MAC address of bat0 in node C
> > without physically show up in front of node C and run these commands.
> >
> > Thank you so much
> >
> >
> >
> > On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
> >> Besides, when do batctl ping. I am using the MAC address of ah0. I can
> >> ping other node.
> >> If the MAC address is wrong, I think I cannot even ping another node,
> >> or traceroute to another node.
> >>
> >> Thanks
> >>
> >> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
> >>> One follow up question:
> >>>
> >>> When I do batctl o. It shows the MAC address of my network interface.
> >>> In my case, is ah0.
> >>> Not sure what to do in order to show the MAC address of the bat0.
> >>>
> >>> Thanks
> >>> Muye Liu
> >>>
> >>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
> >>>> Hello:
> >>>>
> >>>> This is Muye again. I have encountered another problem recently when I
> >>>> am using B.A.T.M.A.N to do the socket programming.
> >>>>
> >>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
> >>>> testing environment is a hall way in our department.
> >>>>
> >>>> I put node A in one end of the hall way, node C in another end of the
> >>>> hall way. Node B is in the middle of the hall way.
> >>>>
> >>>> I can ping node C from node A and vice versa. In node A, I can
> >>>> traceroute to node C. The traceroute shows it needs to go through node
> >>>> B.
> >>>>
> >>>> However, when I send packet from node A to node C. Node C does not
> >>>> receive anything. But if I send packet from node A to node B, node B
> >>>> can receive that packet.
> >>>> Not sure what happened. The link shown below is the program I used to
> >>>> send packet. Both source and destination are MAC address.
> >>>>
> >>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
> >>>>
> >>>> I greatly appreciate any suggestion, comment, and help.
> >>>>
> >>>> Thanks
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-28 23:48 ` liu muye
2012-11-28 23:56 ` Antonio Quartulli
@ 2012-11-29 0:02 ` liu muye
2012-11-29 0:05 ` Antonio Quartulli
2012-11-29 0:09 ` liu muye
1 sibling, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-29 0:02 UTC (permalink / raw)
To: b.a.t.m.a.n
Even though all my nodes are running batman-adv. I still do the same
thing to obtain the MAC address of bat0.
Is that right?
Thanks
On Wed, Nov 28, 2012 at 6:48 PM, liu muye <lmy19901031@gmail.com> wrote:
> So, if I understood correctly. The best way to do is to run command
> "ifconfig bat0" on both sides and fill in the HWAddr info accordingly.
>
> Thanks
>
> On Wed, Nov 28, 2012 at 6:29 PM, liu muye <lmy19901031@gmail.com> wrote:
>> OK, Thanks for the clarification. Just wonder if there is any way to
>> get the MAC address of bat0 on other end.
>>
>> For example: I got node A and node C. I want to send data packet from
>> node A to node C. The MAC address of bat0 in nodeA is the source. Just
>> wandering if there is a way to get the MAC address of bat0 in node C
>> without physically show up in front of node C and run these commands.
>>
>> Thank you so much
>>
>>
>>
>> On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
>>> Besides, when do batctl ping. I am using the MAC address of ah0. I can
>>> ping other node.
>>> If the MAC address is wrong, I think I cannot even ping another node,
>>> or traceroute to another node.
>>>
>>> Thanks
>>>
>>> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>> One follow up question:
>>>>
>>>> When I do batctl o. It shows the MAC address of my network interface.
>>>> In my case, is ah0.
>>>> Not sure what to do in order to show the MAC address of the bat0.
>>>>
>>>> Thanks
>>>> Muye Liu
>>>>
>>>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>> Hello:
>>>>>
>>>>> This is Muye again. I have encountered another problem recently when I
>>>>> am using B.A.T.M.A.N to do the socket programming.
>>>>>
>>>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>>>>> testing environment is a hall way in our department.
>>>>>
>>>>> I put node A in one end of the hall way, node C in another end of the
>>>>> hall way. Node B is in the middle of the hall way.
>>>>>
>>>>> I can ping node C from node A and vice versa. In node A, I can
>>>>> traceroute to node C. The traceroute shows it needs to go through node
>>>>> B.
>>>>>
>>>>> However, when I send packet from node A to node C. Node C does not
>>>>> receive anything. But if I send packet from node A to node B, node B
>>>>> can receive that packet.
>>>>> Not sure what happened. The link shown below is the program I used to
>>>>> send packet. Both source and destination are MAC address.
>>>>>
>>>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>>>>
>>>>> I greatly appreciate any suggestion, comment, and help.
>>>>>
>>>>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 0:02 ` liu muye
@ 2012-11-29 0:05 ` Antonio Quartulli
2012-11-29 0:09 ` liu muye
1 sibling, 0 replies; 18+ messages in thread
From: Antonio Quartulli @ 2012-11-29 0:05 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
On Wed, Nov 28, 2012 at 07:02:50PM -0500, liu muye wrote:
> Even though all my nodes are running batman-adv. I still do the same
> thing to obtain the MAC address of bat0.
> Is that right?
well, all your nodes must run batman-adv :-)
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 0:02 ` liu muye
2012-11-29 0:05 ` Antonio Quartulli
@ 2012-11-29 0:09 ` liu muye
2012-11-29 2:49 ` liu muye
1 sibling, 1 reply; 18+ messages in thread
From: liu muye @ 2012-11-29 0:09 UTC (permalink / raw)
To: b.a.t.m.a.n
Yes. Thanks for your help. I will try the way you suggested.
On Wed, Nov 28, 2012 at 7:02 PM, liu muye <lmy19901031@gmail.com> wrote:
> Even though all my nodes are running batman-adv. I still do the same
> thing to obtain the MAC address of bat0.
> Is that right?
>
> Thanks
>
> On Wed, Nov 28, 2012 at 6:48 PM, liu muye <lmy19901031@gmail.com> wrote:
>> So, if I understood correctly. The best way to do is to run command
>> "ifconfig bat0" on both sides and fill in the HWAddr info accordingly.
>>
>> Thanks
>>
>> On Wed, Nov 28, 2012 at 6:29 PM, liu muye <lmy19901031@gmail.com> wrote:
>>> OK, Thanks for the clarification. Just wonder if there is any way to
>>> get the MAC address of bat0 on other end.
>>>
>>> For example: I got node A and node C. I want to send data packet from
>>> node A to node C. The MAC address of bat0 in nodeA is the source. Just
>>> wandering if there is a way to get the MAC address of bat0 in node C
>>> without physically show up in front of node C and run these commands.
>>>
>>> Thank you so much
>>>
>>>
>>>
>>> On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>> Besides, when do batctl ping. I am using the MAC address of ah0. I can
>>>> ping other node.
>>>> If the MAC address is wrong, I think I cannot even ping another node,
>>>> or traceroute to another node.
>>>>
>>>> Thanks
>>>>
>>>> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>> One follow up question:
>>>>>
>>>>> When I do batctl o. It shows the MAC address of my network interface.
>>>>> In my case, is ah0.
>>>>> Not sure what to do in order to show the MAC address of the bat0.
>>>>>
>>>>> Thanks
>>>>> Muye Liu
>>>>>
>>>>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>>> Hello:
>>>>>>
>>>>>> This is Muye again. I have encountered another problem recently when I
>>>>>> am using B.A.T.M.A.N to do the socket programming.
>>>>>>
>>>>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>>>>>> testing environment is a hall way in our department.
>>>>>>
>>>>>> I put node A in one end of the hall way, node C in another end of the
>>>>>> hall way. Node B is in the middle of the hall way.
>>>>>>
>>>>>> I can ping node C from node A and vice versa. In node A, I can
>>>>>> traceroute to node C. The traceroute shows it needs to go through node
>>>>>> B.
>>>>>>
>>>>>> However, when I send packet from node A to node C. Node C does not
>>>>>> receive anything. But if I send packet from node A to node B, node B
>>>>>> can receive that packet.
>>>>>> Not sure what happened. The link shown below is the program I used to
>>>>>> send packet. Both source and destination are MAC address.
>>>>>>
>>>>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>>>>>
>>>>>> I greatly appreciate any suggestion, comment, and help.
>>>>>>
>>>>>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 0:09 ` liu muye
@ 2012-11-29 2:49 ` liu muye
2012-11-29 3:25 ` Marek Lindner
2012-11-29 19:52 ` liu muye
0 siblings, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-29 2:49 UTC (permalink / raw)
To: b.a.t.m.a.n
Hello:
Now I switch to MAC address of bat0 as the source and destination
address. In this case, I only have two nodes. Node A and node C.
Now, I cannot send packet from node A to node C, and vice versa.
However, when I do batctl tcpdump bat0 on the receiver side, I can see
print out shown in the following.
Warning - packet contains unknown ether type: 0x1337.
Not sure what should I do now.
Thanks
On Wed, Nov 28, 2012 at 7:09 PM, liu muye <lmy19901031@gmail.com> wrote:
> Yes. Thanks for your help. I will try the way you suggested.
>
>
>
> On Wed, Nov 28, 2012 at 7:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>> Even though all my nodes are running batman-adv. I still do the same
>> thing to obtain the MAC address of bat0.
>> Is that right?
>>
>> Thanks
>>
>> On Wed, Nov 28, 2012 at 6:48 PM, liu muye <lmy19901031@gmail.com> wrote:
>>> So, if I understood correctly. The best way to do is to run command
>>> "ifconfig bat0" on both sides and fill in the HWAddr info accordingly.
>>>
>>> Thanks
>>>
>>> On Wed, Nov 28, 2012 at 6:29 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>> OK, Thanks for the clarification. Just wonder if there is any way to
>>>> get the MAC address of bat0 on other end.
>>>>
>>>> For example: I got node A and node C. I want to send data packet from
>>>> node A to node C. The MAC address of bat0 in nodeA is the source. Just
>>>> wandering if there is a way to get the MAC address of bat0 in node C
>>>> without physically show up in front of node C and run these commands.
>>>>
>>>> Thank you so much
>>>>
>>>>
>>>>
>>>> On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>> Besides, when do batctl ping. I am using the MAC address of ah0. I can
>>>>> ping other node.
>>>>> If the MAC address is wrong, I think I cannot even ping another node,
>>>>> or traceroute to another node.
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>>> One follow up question:
>>>>>>
>>>>>> When I do batctl o. It shows the MAC address of my network interface.
>>>>>> In my case, is ah0.
>>>>>> Not sure what to do in order to show the MAC address of the bat0.
>>>>>>
>>>>>> Thanks
>>>>>> Muye Liu
>>>>>>
>>>>>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>>>> Hello:
>>>>>>>
>>>>>>> This is Muye again. I have encountered another problem recently when I
>>>>>>> am using B.A.T.M.A.N to do the socket programming.
>>>>>>>
>>>>>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>>>>>>> testing environment is a hall way in our department.
>>>>>>>
>>>>>>> I put node A in one end of the hall way, node C in another end of the
>>>>>>> hall way. Node B is in the middle of the hall way.
>>>>>>>
>>>>>>> I can ping node C from node A and vice versa. In node A, I can
>>>>>>> traceroute to node C. The traceroute shows it needs to go through node
>>>>>>> B.
>>>>>>>
>>>>>>> However, when I send packet from node A to node C. Node C does not
>>>>>>> receive anything. But if I send packet from node A to node B, node B
>>>>>>> can receive that packet.
>>>>>>> Not sure what happened. The link shown below is the program I used to
>>>>>>> send packet. Both source and destination are MAC address.
>>>>>>>
>>>>>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>>>>>>
>>>>>>> I greatly appreciate any suggestion, comment, and help.
>>>>>>>
>>>>>>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 2:49 ` liu muye
@ 2012-11-29 3:25 ` Marek Lindner
2012-11-29 3:28 ` Antonio Quartulli
2012-11-29 19:52 ` liu muye
1 sibling, 1 reply; 18+ messages in thread
From: Marek Lindner @ 2012-11-29 3:25 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
HI,
> Now I switch to MAC address of bat0 as the source and destination
> address. In this case, I only have two nodes. Node A and node C.
>
> Now, I cannot send packet from node A to node C, and vice versa.
> However, when I do batctl tcpdump bat0 on the receiver side, I can see
> print out shown in the following.
>
> Warning - packet contains unknown ether type: 0x1337.
>
> Not sure what should I do now.
this just means that batctl does not know how to print this packet type. Not
surprising - you just created the packet type yourself. How should batctl know
about it ?
I'd say if you get this warning on the other end your packet was successfully
delivered.
Antonio, wouldn't it be possible to get the bat0 mac address from the global
table even if there were other clients bridged into that node ? The bat0 entry
should be the only one with the no_purge flag set.
Cheers,
Marek
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 3:25 ` Marek Lindner
@ 2012-11-29 3:28 ` Antonio Quartulli
0 siblings, 0 replies; 18+ messages in thread
From: Antonio Quartulli @ 2012-11-29 3:28 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]
On Thu, Nov 29, 2012 at 11:25:33AM +0800, Marek Lindner wrote:
>
> HI,
>
> > Now I switch to MAC address of bat0 as the source and destination
> > address. In this case, I only have two nodes. Node A and node C.
> >
> > Now, I cannot send packet from node A to node C, and vice versa.
> > However, when I do batctl tcpdump bat0 on the receiver side, I can see
> > print out shown in the following.
> >
> > Warning - packet contains unknown ether type: 0x1337.
> >
> > Not sure what should I do now.
>
> this just means that batctl does not know how to print this packet type. Not
> surprising - you just created the packet type yourself. How should batctl know
> about it ?
>
> I'd say if you get this warning on the other end your packet was successfully
> delivered.
>
> Antonio, wouldn't it be possible to get the bat0 mac address from the global
> table even if there were other clients bridged into that node ? The bat0 entry
> should be the only one with the no_purge flag set.
That is a local flag. It is not advertised and so not reported by the Global
Translation Table.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 2:49 ` liu muye
2012-11-29 3:25 ` Marek Lindner
@ 2012-11-29 19:52 ` liu muye
2012-11-29 20:33 ` Sven Eckelmann
2012-11-30 2:41 ` Marek Lindner
1 sibling, 2 replies; 18+ messages in thread
From: liu muye @ 2012-11-29 19:52 UTC (permalink / raw)
To: b.a.t.m.a.n
Hello:
By looking at the packet.h from the batctl source code. I found this:
#define BATADV_ETH_P_BATMAN 0x4305 /* unofficial/not registered Ethertype */
I guess it would be the packet type batman would recognized. When I
set the type to 0x4305.
However, I cannot even see any output from the receiver side when I
run batctl tcpdump bat0 on it.
Just wondering if you guys can have simple examples about the socket
programming on B.A.T.M.A.N.
Thank you so much
On Wed, Nov 28, 2012 at 9:49 PM, liu muye <lmy19901031@gmail.com> wrote:
> Hello:
>
> Now I switch to MAC address of bat0 as the source and destination
> address. In this case, I only have two nodes. Node A and node C.
>
> Now, I cannot send packet from node A to node C, and vice versa.
> However, when I do batctl tcpdump bat0 on the receiver side, I can see
> print out shown in the following.
>
> Warning - packet contains unknown ether type: 0x1337.
>
> Not sure what should I do now.
>
> Thanks
>
> On Wed, Nov 28, 2012 at 7:09 PM, liu muye <lmy19901031@gmail.com> wrote:
>> Yes. Thanks for your help. I will try the way you suggested.
>>
>>
>>
>> On Wed, Nov 28, 2012 at 7:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>>> Even though all my nodes are running batman-adv. I still do the same
>>> thing to obtain the MAC address of bat0.
>>> Is that right?
>>>
>>> Thanks
>>>
>>> On Wed, Nov 28, 2012 at 6:48 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>> So, if I understood correctly. The best way to do is to run command
>>>> "ifconfig bat0" on both sides and fill in the HWAddr info accordingly.
>>>>
>>>> Thanks
>>>>
>>>> On Wed, Nov 28, 2012 at 6:29 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>> OK, Thanks for the clarification. Just wonder if there is any way to
>>>>> get the MAC address of bat0 on other end.
>>>>>
>>>>> For example: I got node A and node C. I want to send data packet from
>>>>> node A to node C. The MAC address of bat0 in nodeA is the source. Just
>>>>> wandering if there is a way to get the MAC address of bat0 in node C
>>>>> without physically show up in front of node C and run these commands.
>>>>>
>>>>> Thank you so much
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Nov 28, 2012 at 6:09 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>>> Besides, when do batctl ping. I am using the MAC address of ah0. I can
>>>>>> ping other node.
>>>>>> If the MAC address is wrong, I think I cannot even ping another node,
>>>>>> or traceroute to another node.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> On Wed, Nov 28, 2012 at 6:02 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>>>> One follow up question:
>>>>>>>
>>>>>>> When I do batctl o. It shows the MAC address of my network interface.
>>>>>>> In my case, is ah0.
>>>>>>> Not sure what to do in order to show the MAC address of the bat0.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Muye Liu
>>>>>>>
>>>>>>> On Tue, Nov 27, 2012 at 11:15 PM, liu muye <lmy19901031@gmail.com> wrote:
>>>>>>>> Hello:
>>>>>>>>
>>>>>>>> This is Muye again. I have encountered another problem recently when I
>>>>>>>> am using B.A.T.M.A.N to do the socket programming.
>>>>>>>>
>>>>>>>> Currently, I have three nodes. Namely, node A, node B, and node C. The
>>>>>>>> testing environment is a hall way in our department.
>>>>>>>>
>>>>>>>> I put node A in one end of the hall way, node C in another end of the
>>>>>>>> hall way. Node B is in the middle of the hall way.
>>>>>>>>
>>>>>>>> I can ping node C from node A and vice versa. In node A, I can
>>>>>>>> traceroute to node C. The traceroute shows it needs to go through node
>>>>>>>> B.
>>>>>>>>
>>>>>>>> However, when I send packet from node A to node C. Node C does not
>>>>>>>> receive anything. But if I send packet from node A to node B, node B
>>>>>>>> can receive that packet.
>>>>>>>> Not sure what happened. The link shown below is the program I used to
>>>>>>>> send packet. Both source and destination are MAC address.
>>>>>>>>
>>>>>>>> https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/attachments/20111206/52f060cb/attachment.c
>>>>>>>>
>>>>>>>> I greatly appreciate any suggestion, comment, and help.
>>>>>>>>
>>>>>>>> Thanks
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 19:52 ` liu muye
@ 2012-11-29 20:33 ` Sven Eckelmann
2012-11-30 2:41 ` Marek Lindner
1 sibling, 0 replies; 18+ messages in thread
From: Sven Eckelmann @ 2012-11-29 20:33 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: liu muye
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
On Thursday 29 November 2012 14:52:08 liu muye wrote:
> Hello:
>
> By looking at the packet.h from the batctl source code. I found this:
>
> #define BATADV_ETH_P_BATMAN 0x4305 /* unofficial/not registered Ethertype
> */
>
> I guess it would be the packet type batman would recognized. When I
> set the type to 0x4305.
> However, I cannot even see any output from the receiver side when I
> run batctl tcpdump bat0 on it.
I think we already had this topic and I've already explained you that you
should not fiddle with batman-adv internals when you try to send data from
point a to point b.
> Just wondering if you guys can have simple examples about the socket
> programming on B.A.T.M.A.N.
As I told you more than once that batman-adv is transparent for your
application: http://beej.us/guide/bgnet/
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [B.A.T.M.A.N.] batman-adv: Raw Socket Communication
2012-11-29 19:52 ` liu muye
2012-11-29 20:33 ` Sven Eckelmann
@ 2012-11-30 2:41 ` Marek Lindner
1 sibling, 0 replies; 18+ messages in thread
From: Marek Lindner @ 2012-11-30 2:41 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Hi,
> By looking at the packet.h from the batctl source code. I found this:
>
> #define BATADV_ETH_P_BATMAN 0x4305 /* unofficial/not registered Ethertype
> */
>
> I guess it would be the packet type batman would recognized. When I
> set the type to 0x4305.
> However, I cannot even see any output from the receiver side when I
> run batctl tcpdump bat0 on it.
you apparently have misunderstood the meaning of "batctl does not know your
packet type". Even if you used wireshark or tcpdump or any other packet dump
analyzer - nobody knows your packet because you just made it up yourself!
Now comes the funny part: Nobody needs to know your packet type except for
your application! As long as your application can read what you are sending
you are good.
If you have more questions I urge you to join our IRC channel (#batman on
freenode) and continue the discussion there. You seem to be confused about
what is going on.
Cheers,
Marek
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2012-11-30 2:41 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 4:15 [B.A.T.M.A.N.] batman-adv: Raw Socket Communication liu muye
2012-11-28 5:02 ` Marek Lindner
2012-11-28 23:02 ` liu muye
2012-11-28 23:09 ` liu muye
2012-11-28 23:18 ` Antonio Quartulli
2012-11-28 23:29 ` liu muye
2012-11-28 23:35 ` Antonio Quartulli
2012-11-28 23:48 ` liu muye
2012-11-28 23:56 ` Antonio Quartulli
2012-11-29 0:02 ` liu muye
2012-11-29 0:05 ` Antonio Quartulli
2012-11-29 0:09 ` liu muye
2012-11-29 2:49 ` liu muye
2012-11-29 3:25 ` Marek Lindner
2012-11-29 3:28 ` Antonio Quartulli
2012-11-29 19:52 ` liu muye
2012-11-29 20:33 ` Sven Eckelmann
2012-11-30 2:41 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox