diff options
author | ng0 <ng0@n0.is> | 2019-11-24 17:53:36 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-24 17:53:36 +0000 |
commit | a6e31c91476191a038e240c030a799247fde39fb (patch) | |
tree | 7aa8a5e321fb5fd09a36a7b5a38d289665f8c2ca /doc/handbook/chapters/developer.texi | |
parent | 138990b90684e2739f0441eb08717c7057ee8e8e (diff) | |
download | gnunet-a6e31c91476191a038e240c030a799247fde39fb.tar.gz gnunet-a6e31c91476191a038e240c030a799247fde39fb.zip |
handbook: comment removed win32 functionality.
comment, because (a) this includes material describing implementations
from the old drupal books and (b) because it might or might not serve
as a reference for future work.
Diffstat (limited to 'doc/handbook/chapters/developer.texi')
-rw-r--r-- | doc/handbook/chapters/developer.texi | 288 |
1 files changed, 144 insertions, 144 deletions
diff --git a/doc/handbook/chapters/developer.texi b/doc/handbook/chapters/developer.texi index 884fc8c9c..5f68f8e05 100644 --- a/doc/handbook/chapters/developer.texi +++ b/doc/handbook/chapters/developer.texi | |||
@@ -4174,7 +4174,7 @@ ask on the IRC channel. | |||
4174 | 4174 | ||
4175 | If you are a GNU/Linux user and you want to use the Bluetooth | 4175 | If you are a GNU/Linux user and you want to use the Bluetooth |
4176 | transport plugin you should install the | 4176 | transport plugin you should install the |
4177 | @command{BlueZ development libraries} (if they aren't already | 4177 | @command{BlueZ} development libraries (if they aren't already |
4178 | installed). | 4178 | installed). |
4179 | For instructions about how to install the libraries you should | 4179 | For instructions about how to install the libraries you should |
4180 | check out the BlueZ site | 4180 | check out the BlueZ site |
@@ -4183,16 +4183,16 @@ you have the necessary libraries, don't worry, just run the GNUnet | |||
4183 | configure script and you will be able to see a notification at the end | 4183 | configure script and you will be able to see a notification at the end |
4184 | which will warn you if you don't have the necessary libraries. | 4184 | which will warn you if you don't have the necessary libraries. |
4185 | 4185 | ||
4186 | If you are a Windows user you should have installed the | 4186 | @c If you are a Windows user you should have installed the |
4187 | @emph{MinGW}/@emph{MSys2} with the latest updates (especially the | 4187 | @c @emph{MinGW}/@emph{MSys2} with the latest updates (especially the |
4188 | @emph{ws2bth} header). If this is your first build of GNUnet on Windows | 4188 | @c @emph{ws2bth} header). If this is your first build of GNUnet on Windows |
4189 | you should check out the SBuild repository. It will semi-automatically | 4189 | @c you should check out the SBuild repository. It will semi-automatically |
4190 | assembles a @emph{MinGW}/@emph{MSys2} installation with a lot of extra | 4190 | @c assembles a @emph{MinGW}/@emph{MSys2} installation with a lot of extra |
4191 | packages which are needed for the GNUnet build. So this will ease your | 4191 | @c packages which are needed for the GNUnet build. So this will ease your |
4192 | work!@ Finally you just have to be sure that you have the correct drivers | 4192 | @c work!@ Finally you just have to be sure that you have the correct drivers |
4193 | for your Bluetooth device installed and that your device is on and in a | 4193 | @c for your Bluetooth device installed and that your device is on and in a |
4194 | discoverable mode. The Windows Bluetooth Stack supports only the RFCOMM | 4194 | @c discoverable mode. The Windows Bluetooth Stack supports only the RFCOMM |
4195 | protocol so we cannot turn on your device programatically! | 4195 | @c protocol so we cannot turn on your device programatically! |
4196 | 4196 | ||
4197 | @c FIXME: Change to unique title | 4197 | @c FIXME: Change to unique title |
4198 | @node How does it work2? | 4198 | @node How does it work2? |
@@ -4332,11 +4332,11 @@ sending data for benchmarking to the other peer. | |||
4332 | This scenario will try to connect the second peer to the first one and | 4332 | This scenario will try to connect the second peer to the first one and |
4333 | then start sending data for benchmarking. | 4333 | then start sending data for benchmarking. |
4334 | 4334 | ||
4335 | On Windows you cannot test the plugin functionality using two Bluetooth | 4335 | @c On Windows you cannot test the plugin functionality using two Bluetooth |
4336 | devices from the same machine because after you install the drivers there | 4336 | @c devices from the same machine because after you install the drivers there |
4337 | will occur some conflicts between the Bluetooth stacks. (At least that is | 4337 | @c will occur some conflicts between the Bluetooth stacks. (At least that is |
4338 | what happened on my machine : I wasn't able to use the Bluesoleil stack and | 4338 | @c what happened on my machine : I wasn't able to use the Bluesoleil stack and |
4339 | the WINDCOMM one in the same time). | 4339 | @c the WINDCOMM one in the same time). |
4340 | 4340 | ||
4341 | If you have two different machines and your configuration files are good | 4341 | If you have two different machines and your configuration files are good |
4342 | you can use the same scenario presented on the beginning of this section. | 4342 | you can use the same scenario presented on the beginning of this section. |
@@ -4364,7 +4364,7 @@ platforms. | |||
4364 | 4364 | ||
4365 | @itemize @bullet | 4365 | @itemize @bullet |
4366 | @item Linux functionality | 4366 | @item Linux functionality |
4367 | @item Windows functionality | 4367 | @c @item Windows functionality |
4368 | @item Pending Features | 4368 | @item Pending Features |
4369 | @end itemize | 4369 | @end itemize |
4370 | 4370 | ||
@@ -4375,7 +4375,7 @@ platforms. | |||
4375 | * THE INITIALIZATION:: | 4375 | * THE INITIALIZATION:: |
4376 | * THE LOOP:: | 4376 | * THE LOOP:: |
4377 | * Details about the broadcast implementation:: | 4377 | * Details about the broadcast implementation:: |
4378 | * Windows functionality:: | 4378 | @c * Windows functionality:: |
4379 | * Pending features:: | 4379 | * Pending features:: |
4380 | @end menu | 4380 | @end menu |
4381 | 4381 | ||
@@ -4522,68 +4522,68 @@ not we try to connect to it and in case of success we save the address and | |||
4522 | the socket on the list. If we are already connected to that device we | 4522 | the socket on the list. If we are already connected to that device we |
4523 | simply use the socket. | 4523 | simply use the socket. |
4524 | 4524 | ||
4525 | @node Windows functionality | 4525 | @c @node Windows functionality |
4526 | @subsubsection Windows functionality | 4526 | @c @subsubsection Windows functionality |
4527 | 4527 | ||
4528 | 4528 | ||
4529 | For Windows I decided to use the Microsoft Bluetooth stack which has the | 4529 | @c For Windows I decided to use the Microsoft Bluetooth stack which has the |
4530 | advantage of coming standard from Windows XP SP2. The main disadvantage is | 4530 | @c advantage of coming standard from Windows XP SP2. The main disadvantage is |
4531 | that it only supports the RFCOMM protocol so we will not be able to have | 4531 | @c that it only supports the RFCOMM protocol so we will not be able to have |
4532 | a low level control over the Bluetooth device. Therefore it is the user | 4532 | @c a low level control over the Bluetooth device. Therefore it is the user |
4533 | responsibility to check if the device is up and in the discoverable mode. | 4533 | @c responsibility to check if the device is up and in the discoverable mode. |
4534 | Also there are no tools which could be used for debugging in order to read | 4534 | @c Also there are no tools which could be used for debugging in order to read |
4535 | the data coming from and going to a Bluetooth device, which obviously | 4535 | @c the data coming from and going to a Bluetooth device, which obviously |
4536 | hindered my work. Another thing that slowed down the implementation of the | 4536 | @c hindered my work. Another thing that slowed down the implementation of the |
4537 | plugin (besides that I wasn't too accommodated with the win32 API) was that | 4537 | @c plugin (besides that I wasn't too accommodated with the win32 API) was that |
4538 | there were some bugs on MinGW regarding the Bluetooth. Now they are solved | 4538 | @c there were some bugs on MinGW regarding the Bluetooth. Now they are solved |
4539 | but you should keep in mind that you should have the latest updates | 4539 | @c but you should keep in mind that you should have the latest updates |
4540 | (especially the @emph{ws2bth} header). | 4540 | @c (especially the @emph{ws2bth} header). |
4541 | 4541 | ||
4542 | Besides the fact that it uses the Windows Sockets, the Windows | 4542 | @c Besides the fact that it uses the Windows Sockets, the Windows |
4543 | implementation follows the same principles as the GNU/Linux one: | 4543 | @c implementation follows the same principles as the GNU/Linux one: |
4544 | 4544 | ||
4545 | @itemize @bullet | 4545 | @c @itemize @bullet |
4546 | @item It has a initalization part where it initializes the | 4546 | @c @item It has a initalization part where it initializes the |
4547 | Windows Sockets, creates a RFCOMM socket which will be binded and switched | 4547 | @c Windows Sockets, creates a RFCOMM socket which will be binded and switched |
4548 | to the listening mode and registers a SDP service. In the Microsoft | 4548 | @c to the listening mode and registers a SDP service. In the Microsoft |
4549 | Bluetooth API there are two ways to work with the SDP: | 4549 | @c Bluetooth API there are two ways to work with the SDP: |
4550 | @itemize @bullet | 4550 | @c @itemize @bullet |
4551 | @item an easy way which works with very simple service records | 4551 | @c @item an easy way which works with very simple service records |
4552 | @item a hard way which is useful when you need to update or to delete the | 4552 | @c @item a hard way which is useful when you need to update or to delete the |
4553 | record | 4553 | @c record |
4554 | @end itemize | 4554 | @c @end itemize |
4555 | @end itemize | 4555 | @c @end itemize |
4556 | 4556 | ||
4557 | Since I only needed the SDP service to find out on which port the device | 4557 | @c Since I only needed the SDP service to find out on which port the device |
4558 | is listening on and that did not change, I decided to use the easy way. | 4558 | @c is listening on and that did not change, I decided to use the easy way. |
4559 | In order to register the service I used the @emph{WSASetService} function | 4559 | @c In order to register the service I used the @emph{WSASetService} function |
4560 | and I generated the @emph{Universally Unique Identifier} with the | 4560 | @c and I generated the @emph{Universally Unique Identifier} with the |
4561 | @emph{guidgen.exe} Windows's tool. | 4561 | @c @emph{guidgen.exe} Windows's tool. |
4562 | 4562 | ||
4563 | In the loop section the only difference from the GNU/Linux implementation | 4563 | @c In the loop section the only difference from the GNU/Linux implementation |
4564 | is that I used the @code{GNUNET_NETWORK} library for | 4564 | @c is that I used the @code{GNUNET_NETWORK} library for |
4565 | functions like @emph{accept}, @emph{bind}, @emph{connect} or | 4565 | @c functions like @emph{accept}, @emph{bind}, @emph{connect} or |
4566 | @emph{select}. I decided to use the | 4566 | @c @emph{select}. I decided to use the |
4567 | @code{GNUNET_NETWORK} library because I also needed to interact | 4567 | @c @code{GNUNET_NETWORK} library because I also needed to interact |
4568 | with the STDIN and STDOUT handles and on Windows | 4568 | @c with the STDIN and STDOUT handles and on Windows |
4569 | the select function is only defined for sockets, | 4569 | @c the select function is only defined for sockets, |
4570 | and it will not work for arbitrary file handles. | 4570 | @c and it will not work for arbitrary file handles. |
4571 | 4571 | ||
4572 | Another difference between GNU/Linux and Windows implementation is that in | 4572 | @c Another difference between GNU/Linux and Windows implementation is that in |
4573 | GNU/Linux, the Bluetooth address is represented in 48 bits | 4573 | @c GNU/Linux, the Bluetooth address is represented in 48 bits |
4574 | while in Windows is represented in 64 bits. | 4574 | @c while in Windows is represented in 64 bits. |
4575 | Therefore I had to do some changes on @emph{plugin_transport_wlan} header. | 4575 | @c Therefore I had to do some changes on @emph{plugin_transport_wlan} header. |
4576 | 4576 | ||
4577 | Also, currently on Windows the Bluetooth plugin doesn't have support for | 4577 | @c Also, currently on Windows the Bluetooth plugin doesn't have support for |
4578 | broadcast messages. When it receives a broadcast message it will skip it. | 4578 | @c broadcast messages. When it receives a broadcast message it will skip it. |
4579 | 4579 | ||
4580 | @node Pending features | 4580 | @node Pending features |
4581 | @subsubsection Pending features | 4581 | @subsubsection Pending features |
4582 | 4582 | ||
4583 | 4583 | ||
4584 | @itemize @bullet | 4584 | @itemize @bullet |
4585 | @item Implement the broadcast functionality on Windows @emph{(currently | 4585 | @c @item Implement the broadcast functionality on Windows @emph{(currently |
4586 | working on)} | 4586 | @c working on)} |
4587 | @item Implement a testcase for the helper :@ @emph{The testcase | 4587 | @item Implement a testcase for the helper :@ @emph{The testcase |
4588 | consists of a program which emulates the plugin and uses the helper. It | 4588 | consists of a program which emulates the plugin and uses the helper. It |
4589 | will simulate connections, disconnections and data transfers.} | 4589 | will simulate connections, disconnections and data transfers.} |
@@ -7612,7 +7612,7 @@ record types. | |||
7612 | * GNS plugins:: | 7612 | * GNS plugins:: |
7613 | * The GNS Client-Service Protocol:: | 7613 | * The GNS Client-Service Protocol:: |
7614 | * Hijacking the DNS-Traffic using gnunet-service-dns:: | 7614 | * Hijacking the DNS-Traffic using gnunet-service-dns:: |
7615 | * Serving DNS lookups via GNS on W32:: | 7615 | @c * Serving DNS lookups via GNS on W32:: |
7616 | * Importing DNS Zones into GNS:: | 7616 | * Importing DNS Zones into GNS:: |
7617 | @end menu | 7617 | @end menu |
7618 | 7618 | ||
@@ -7874,75 +7874,75 @@ Line 2 marks every other packet to a DNS-Server with mark 3 (chosen | |||
7874 | arbitrarily). The third line adds a routing policy based on this mark | 7874 | arbitrarily). The third line adds a routing policy based on this mark |
7875 | 3 via the routing table. | 7875 | 3 via the routing table. |
7876 | 7876 | ||
7877 | @node Serving DNS lookups via GNS on W32 | 7877 | @c @node Serving DNS lookups via GNS on W32 |
7878 | @subsection Serving DNS lookups via GNS on W32 | 7878 | @c @subsection Serving DNS lookups via GNS on W32 |
7879 | 7879 | ||
7880 | 7880 | ||
7881 | 7881 | ||
7882 | This section documents how the libw32nsp (and | 7882 | @c This section documents how the libw32nsp (and |
7883 | gnunet-gns-helper-service-w32) do DNS resolutions of DNS queries on the | 7883 | @c gnunet-gns-helper-service-w32) do DNS resolutions of DNS queries on the |
7884 | local system. This only applies to GNUnet running on W32. | 7884 | @c local system. This only applies to GNUnet running on W32. |
7885 | 7885 | ||
7886 | W32 has a concept of "Namespaces" and "Namespace providers". | 7886 | @c W32 has a concept of "Namespaces" and "Namespace providers". |
7887 | These are used to present various name systems to applications in a | 7887 | @c These are used to present various name systems to applications in a |
7888 | generic way. | 7888 | @c generic way. |
7889 | Namespaces include DNS, mDNS, NLA and others. For each namespace any | 7889 | @c Namespaces include DNS, mDNS, NLA and others. For each namespace any |
7890 | number of providers could be registered, and they are queried in an order | 7890 | @c number of providers could be registered, and they are queried in an order |
7891 | of priority (which is adjustable). | 7891 | @c of priority (which is adjustable). |
7892 | 7892 | ||
7893 | Applications can resolve names by using WSALookupService*() family of | 7893 | @c Applications can resolve names by using WSALookupService*() family of |
7894 | functions. | 7894 | @c functions. |
7895 | 7895 | ||
7896 | However, these are WSA-only facilities. Common BSD socket functions for | 7896 | @c However, these are WSA-only facilities. Common BSD socket functions for |
7897 | namespace resolutions are gethostbyname and getaddrinfo (among others). | 7897 | @c namespace resolutions are gethostbyname and getaddrinfo (among others). |
7898 | These functions are implemented internally (by default - by mswsock, | 7898 | @c These functions are implemented internally (by default - by mswsock, |
7899 | which also implements the default DNS provider) as wrappers around | 7899 | @c which also implements the default DNS provider) as wrappers around |
7900 | WSALookupService*() functions (see "Sample Code for a Service Provider" | 7900 | @c WSALookupService*() functions (see "Sample Code for a Service Provider" |
7901 | on MSDN). | 7901 | @c on MSDN). |
7902 | 7902 | ||
7903 | On W32 GNUnet builds a libw32nsp - a namespace provider, which can then be | 7903 | @c On W32 GNUnet builds a libw32nsp - a namespace provider, which can then be |
7904 | installed into the system by using w32nsp-install (and uninstalled by | 7904 | @c installed into the system by using w32nsp-install (and uninstalled by |
7905 | w32nsp-uninstall), as described in "Installation Handbook". | 7905 | @c w32nsp-uninstall), as described in "Installation Handbook". |
7906 | 7906 | ||
7907 | libw32nsp is very simple and has almost no dependencies. As a response to | 7907 | @c libw32nsp is very simple and has almost no dependencies. As a response to |
7908 | NSPLookupServiceBegin(), it only checks that the provider GUID passed to | 7908 | @c NSPLookupServiceBegin(), it only checks that the provider GUID passed to |
7909 | it by the caller matches GNUnet DNS Provider GUID, | 7909 | @c it by the caller matches GNUnet DNS Provider GUID, |
7910 | then connects to | 7910 | @c then connects to |
7911 | gnunet-gns-helper-service-w32 at 127.0.0.1:5353 (hardcoded) and sends the | 7911 | @c gnunet-gns-helper-service-w32 at 127.0.0.1:5353 (hardcoded) and sends the |
7912 | name resolution request there, returning the connected socket to the | 7912 | @c name resolution request there, returning the connected socket to the |
7913 | caller. | 7913 | @c caller. |
7914 | 7914 | ||
7915 | When the caller invokes NSPLookupServiceNext(), libw32nsp reads a | 7915 | @c When the caller invokes NSPLookupServiceNext(), libw32nsp reads a |
7916 | completely formed reply from that socket, unmarshalls it, then gives | 7916 | @c completely formed reply from that socket, unmarshalls it, then gives |
7917 | it back to the caller. | 7917 | @c it back to the caller. |
7918 | 7918 | ||
7919 | At the moment gnunet-gns-helper-service-w32 is implemented to ever give | 7919 | @c At the moment gnunet-gns-helper-service-w32 is implemented to ever give |
7920 | only one reply, and subsequent calls to NSPLookupServiceNext() will fail | 7920 | @c only one reply, and subsequent calls to NSPLookupServiceNext() will fail |
7921 | with WSA_NODATA (first call to NSPLookupServiceNext() might also fail if | 7921 | @c with WSA_NODATA (first call to NSPLookupServiceNext() might also fail if |
7922 | GNS failed to find the name, or there was an error connecting to it). | 7922 | @c GNS failed to find the name, or there was an error connecting to it). |
7923 | 7923 | ||
7924 | gnunet-gns-helper-service-w32 does most of the processing: | 7924 | @c gnunet-gns-helper-service-w32 does most of the processing: |
7925 | 7925 | ||
7926 | @itemize @bullet | 7926 | @c @itemize @bullet |
7927 | @item Maintains a connection to GNS. | 7927 | @c @item Maintains a connection to GNS. |
7928 | @item Reads GNS config and loads appropriate keys. | 7928 | @c @item Reads GNS config and loads appropriate keys. |
7929 | @item Checks service GUID and decides on the type of record to look up, | 7929 | @c @item Checks service GUID and decides on the type of record to look up, |
7930 | refusing to make a lookup outright when unsupported service GUID is | 7930 | @c refusing to make a lookup outright when unsupported service GUID is |
7931 | passed. | 7931 | @c passed. |
7932 | @item Launches the lookup | 7932 | @c @item Launches the lookup |
7933 | @end itemize | 7933 | @c @end itemize |
7934 | 7934 | ||
7935 | When lookup result arrives, gnunet-gns-helper-service-w32 forms a complete | 7935 | @c When lookup result arrives, gnunet-gns-helper-service-w32 forms a complete |
7936 | reply (including filling a WSAQUERYSETW structure and, possibly, a binary | 7936 | @c reply (including filling a WSAQUERYSETW structure and, possibly, a binary |
7937 | blob with a hostent structure for gethostbyname() client), marshalls it, | 7937 | @c blob with a hostent structure for gethostbyname() client), marshalls it, |
7938 | and sends it back to libw32nsp. If no records were found, it sends an | 7938 | @c and sends it back to libw32nsp. If no records were found, it sends an |
7939 | empty header. | 7939 | @c empty header. |
7940 | 7940 | ||
7941 | This works for most normal applications that use gethostbyname() or | 7941 | @c This works for most normal applications that use gethostbyname() or |
7942 | getaddrinfo() to resolve names, but fails to do anything with | 7942 | @c getaddrinfo() to resolve names, but fails to do anything with |
7943 | applications that use alternative means of resolving names (such as | 7943 | @c applications that use alternative means of resolving names (such as |
7944 | sending queries to a DNS server directly by themselves). | 7944 | @c sending queries to a DNS server directly by themselves). |
7945 | This includes some of well known utilities, like "ping" and "nslookup". | 7945 | @c This includes some of well known utilities, like "ping" and "nslookup". |
7946 | 7946 | ||
7947 | @node Importing DNS Zones into GNS | 7947 | @node Importing DNS Zones into GNS |
7948 | @subsection Importing DNS Zones into GNS | 7948 | @subsection Importing DNS Zones into GNS |