Linux bluetooth development
 help / color / mirror / Atom feed
* Re: [Bluez-users] Adresse resolution in BlueZ
@ 2005-03-16 10:21 BZ Benny
  2005-03-16 10:37 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: BZ Benny @ 2005-03-16 10:21 UTC (permalink / raw)
  To: bluez-users

Hi Marcel,

Excuse me if I wasn't precise.

I know that the BD_ADDR is the MAC address it is
explained in the BNEP spec. and when I do ifconfig
bnep0 i see in the MAC address feild the BD_ADDR.

When we conect tow bluetooth devices with a PAN
connection, we use ifconfig to affect an IP address
for both our PC.

The IP address is in the IP layer.When the tcp stack
send an IP frame in the IP headers we find the IP
address of the sender and the IP address of the dst.

when BNEP receive this IP frame it needs to build its
BNEP headers. The BNEP header cantains (not in
ETHERNET_COMPRESSED) the BD_ADDR of the dst and the
src. BNEP needs to convert the IP address into
BD_ADDR.

So BNEP ask IP for such a thing. This BD_ADDR is
stored in an ARP table. the ARP table is in the IP
layer. The ARP table contains for any known IP address
its related BD_ADDR (or MAC address as you want).

If this IP isn't known like when we begin a conection
the IP layer send an ARP resolution request asking
which device owns this IP address. The device it have
this IP address reply with " this Ip address is owne
by this BD_ADDR"
so the IP layer store this BD_ADRR in this ARP table.

you can see that with #tcpdump -i bnep0.

The ARP protocol is explained here. 
http://www.ietf.org/rfc/rfc826.txt.

Actually this is the protocol between the IP layer and
the Ethernet layer. Since the BNEP have to replace the
Ethernet layer, I wanted to know how is implemented
address resolution in BNEP. Exactly how BNEP ask IP
for getting the BD_ADDR stored in the ARP table. 

regards
Benny



--- Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Benny,
> 
> > But, How could bnep build its bnep frame. BNEP
> receive
> > frome TCP/IP the IP address of the peer device.
> And
> > she needs to convert this IP adresse into a MAC
> > address so it needs to ask for the MAC adresse in
> the
> > ARP tables in the IP layer.
> > isn't it?
> 
> the MAC address of the virtual network card is the
> BD_ADDR. Both are
> part of the IEEE address range and they will never
> overlap.
> 
> Regards
> 
> Marcel
> 
> 
> 
> 
>
-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
>
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/bluez-users
> 


	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [Bluez-users] Adresse resolution in BlueZ
@ 2005-03-17 16:14 BZ Benny
  2005-03-17 16:56 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: BZ Benny @ 2005-03-17 16:14 UTC (permalink / raw)
  To: bluez-users


Hi all.


> Hi Benny,
> 
> > > This BNEP virtual network card is as dumb as a
> > normal 
> > > Ethernet network card. The networklayer knows
> our
> > MAC
> > > address (BD_ADDR) and 
> > 
> > Actually I'm talking about the peer MAC address.
> 
> you know that even BNEP is point-to-point and so you
> know the MAC
> address of the peer, because it is the remote
> BD_ADDR of the underlaying
> ACL link.
>
Am I not undertandbale ?
Is there someone who can understand me? 

I know that BNEP know the BD_ADDR of the peer device.
But BNEP need to make a coresspondance beteewn the
peer BD_ADDR address and the peer IP adress. This
corespondance is made by ARP? how did bnep ask it from
ARP.
If you read all my example in my last mail you will
understand my question.

regards,
imad.



	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [Bluez-users] Adresse resolution in BlueZ
@ 2005-03-17  9:20 BZ Benny
  2005-03-17 10:27 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: BZ Benny @ 2005-03-17  9:20 UTC (permalink / raw)
  To: bluez-users

Hi Marcel

> you like to see a problem where there is no problem.

I know that every thing is working in BlueZ but I just
want to know how your bnep virtual card works.

> This BNEP virtual network card is as dumb as a
normal 
> Ethernet network card. The networklayer knows our
MAC
> address (BD_ADDR) and 

Actually I'm talking about the peer MAC address.

> if you set the IP to the bnep0
> interface, the kernel TCP/IP can deal with any ARP
> requests by itself.


> Everything we need we get from the network layer.

No, there is a translation that every network card or
virtual network card had to do with ARP table in the
IP layer.


see the exemple below from:
http://www.ietf.org/rfc/rfc826.txt

An Example:
-----------

Let there exist machines X and Y that are on the same
10Mbit
Ethernet cable.  They have Ethernet address EA(X) and
EA(Y) and
DOD Internet addresses IPA(X) and IPA(Y) .  Let the
Ethernet type
of Internet be ET(IP).  Machine X has just been
started, and
sooner or later wants to send an Internet packet to
machine Y on
the same cable.  X knows that it wants to send to
IPA(Y) and
tells the hardware driver (here an Ethernet driver)
IPA(Y).  The
driver consults the Address Resolution module to
convert <ET(IP),
IPA(Y)> into a 48.bit Ethernet address, but because X
was just
started, it does not have this information.  It throws
the
Internet packet away and instead creates an ADDRESS
RESOLUTION
packet with
	(ar$hrd) = ares_hrd$Ethernet
	(ar$pro) = ET(IP)
	(ar$hln) = length(EA(X))
	(ar$pln) = length(IPA(X))
	(ar$op)  = ares_op$REQUEST
	(ar$sha) = EA(X)
	(ar$spa) = IPA(X)
	(ar$tha) = don't care
	(ar$tpa) = IPA(Y)
and broadcasts this packet to everybody on the cable.

Machine Y gets this packet, and determines that it
understands
the hardware type (Ethernet), that it speaks the
indicated
protocol (Internet) and that the packet is for it
((ar$tpa)=IPA(Y)).  It enters (probably replacing any
existing
entry) the information that <ET(IP), IPA(X)> maps to
EA(X).  It
then notices that it is a request, so it swaps fields,
putting
EA(Y) in the new sender Ethernet address field
(ar$sha), sets the
opcode to reply, and sends the packet directly (not
broadcast) to
EA(X).  At this point Y knows how to send to X, but X
still
doesn't know how to send to Y.

Machine X gets the reply packet from Y, forms the map
from
<ET(IP), IPA(Y)> to EA(Y), notices the packet is a
reply and
throws it away.  The next time X's Internet module
tries to send
a packet to Y on the Ethernet, the translation will
succeed, and
the packet will (hopefully) arrive.  If Y's Internet
module then
wants to talk to X, this will also succeed since Y has
remembered
the information from X's request for Address
Resolution.
-------------------------------------
In this exemple we talk about a translation of
IP->MAC.
When I do a #ping "dstIP". The IP layer sends an IP
frame to BNEP the BNEP layer reads the dstIP from the
IP frame. BNEP had to translate destIP->destMAC.It ask
ARP table for such a thing. If ARP knows dstIP it make
the transation for BNEP. If it dosen't it sends an ARP
request to all the peer devices (Broadcast). And ARP
fill the tables with the ARP reply from the peer
devices. After that ARP is able to make translation
for BNEP.

My question is how BNEP ask ARP for such a
translation? I know that for Ethernet such thing is
made in the driver code. 

Regards,
Benny



	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [Bluez-users] Adresse resolution in BlueZ
@ 2005-03-16  9:40 BZ Benny
  2005-03-16  9:47 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: BZ Benny @ 2005-03-16  9:40 UTC (permalink / raw)
  To: bluez-users



But, How could bnep build its bnep frame. BNEP receive
frome TCP/IP the IP address of the peer device. And
she needs to convert this IP adresse into a MAC
address so it needs to ask for the MAC adresse in the
ARP tables in the IP layer.
isn't it?


--- Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Benny,
> 
> > I wasn't talking about DNS but ARP.
> 
> it is the same. We are a virtual network card and so
> the ARP part is
> done by the TCP/IP stack.
> 
> Regards
> 
> Marcel
> 
> 
> 
> 
>
-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
>
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/bluez-users
> 


	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [Bluez-users] Adresse resolution in BlueZ
@ 2005-03-16  9:28 BZ Benny
  2005-03-16  9:32 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: BZ Benny @ 2005-03-16  9:28 UTC (permalink / raw)
  To: bluez-users

hi,
I wasn't talking about DNS but ARP.

regards
--- Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Benny,
> 
> > The Adresse resolution in bluez is done in the
> BNEP
> > isn"t it?
> > 
> > But I see in the specification of BNEP that the
> > adresse resolution may be handled by PAN layer. Is
> > BlueZ like that because it was the best solution
> for
> > implementing PAN on linux.
> 
> since BNEP is a virtual network, it has nothing to
> do with DNS.
> 
> Regards
> 
> Marcel
> 
> 
> 
> 
>
-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
>
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/bluez-users
> 


	

	
		
Découvrez nos promotions exclusives "destination de la Tunisie, du Maroc, des Baléares et la Rép. Dominicaine sur Yahoo! Voyages :
http://fr.travel.yahoo.com/promotions/mar14.html


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Bluez-users] Adresse resolution in BlueZ
@ 2005-03-09 16:28 BZ Benny
  2005-03-09 18:00 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: BZ Benny @ 2005-03-09 16:28 UTC (permalink / raw)
  To: bluez maillinglist

Hi,

The Adresse resolution in bluez is done in the BNEP
isn"t it?

But I see in the specification of BNEP that the
adresse resolution may be handled by PAN layer. Is
BlueZ like that because it was the best solution for
implementing PAN on linux.

regards,
benny



	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

end of thread, other threads:[~2005-03-17 16:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-16 10:21 [Bluez-users] Adresse resolution in BlueZ BZ Benny
2005-03-16 10:37 ` Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2005-03-17 16:14 BZ Benny
2005-03-17 16:56 ` Marcel Holtmann
2005-03-17  9:20 BZ Benny
2005-03-17 10:27 ` Marcel Holtmann
2005-03-16  9:40 BZ Benny
2005-03-16  9:47 ` Marcel Holtmann
2005-03-16  9:28 BZ Benny
2005-03-16  9:32 ` Marcel Holtmann
2005-03-09 16:28 BZ Benny
2005-03-09 18:00 ` Marcel Holtmann

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