|I have read several tutorials how to manipulate (Linux) "hosts" file.
I need to "connect" Raspberry Pi to PC , using bluetooth.
I really do not care which is server or client end of the connection.
I like to test each piece of hardware by doing local loopback first.
I would like to run such local loopback on each end of the connection separately , using separate code application. I do have the basic - socket / bind / read / write working.
I understand that local "loopback" IP is in range 127.0.0.0 to 127.255.255.255.
1. Can I "bind" created socket to name "localhost" to run such local loopback - using 32 bit address?
2. How can I do same using 128 bit address, ip6 protocol ? AKA how to put ip6 "name" into my C++ code ? ::1 has "multiple" names
3. Is doing "remote loopback" feasible?
Ideally - instruct LOCAL hardware to connect via socket to REMOTE hardware running in "remote loopback"? Or in another words - is there REMOTE loopback IP ? Or do I have to have remote software to emulate such loopback?
4. The communication / socket from (local) RPi woudl "connect / bind " to which IP on remote (PC) hardware?
5. Similar - the communication / socket from (local) PC woudl bind to which IP on now remote - RPi hardware?
Item 5 and 6 would be in "simplex" communication - each one way only - at least for now.
I have not found a decent description of ip6 "names" .
For example -what does ip6-allnodes accomplish ?
Here is a copy of RPi hosts file
::1 localhost ip6-localhost ip6-loopback
And here is hosts file on PC
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
Minor comments / questions
The RPi has only ONE bluetooth hardware , but in hosts it has TWO IP addresses / names
The PC has THREE bluetooth hardware, but blutooth manager will identify only TWO.
Appreciate any constructive comments.