Commit Graph

20 Commits

Author SHA1 Message Date
Milos Gajdos
e22c4b4c07
table package is no more. Cleaned up unnecessary code, too. 2019-07-27 16:04:08 +01:00
Milos Gajdos
1e94d9fe5a
Router cleanup and refactoring for win and profit.
This commit adds the following changes to router package:
* it refactors Advertise() function which now does only what
it claims to do: advertising
* various router packages functions/methods have been renamed to make
their functionality more obvious and more in line with what they actually do
* function documentation changes related to the above bullet points
2019-07-24 17:16:52 +01:00
Milos Gajdos
35a1de91a9
Advertise full table every minute. 2019-07-11 12:39:20 +01:00
Asim Aslam
5b565f9f10 update comment 2019-07-10 07:56:52 +01:00
Asim Aslam
9955ed2034 move table 2019-07-10 07:56:18 +01:00
Asim Aslam
c36107e811 cleanup consts 2019-07-10 07:51:24 +01:00
Asim Aslam
a08b64c8ab remove the string methods 2019-07-10 07:50:33 +01:00
Asim Aslam
0a1b657221 visual cleanup of router code 2019-07-10 07:45:27 +01:00
Milos Gajdos
265271008e
Simplified processEvents loop; Added router Announcement. 2019-07-09 15:46:31 +01:00
Milos Gajdos
b82245429e
Simplified table logic. Lookup tests. mucp/cient update 2019-07-09 15:46:31 +01:00
Milos Gajdos
cc590f5f2c
Table now has a dedicated package inside router package. 2019-07-09 15:46:31 +01:00
Milos Gajdos
0c1a28a9b6
Router routing table management. Table route hashes. Status codes changed.
We now manage routing table actions using dedicated functions run on
either registry or services in the registry.

Routing table now uses Route.Hash() instead of maintaining its own hash
struct filed which previously performed these operations.

Various names of variables have been changed to make them more concise.
2019-07-09 15:46:31 +01:00
Milos Gajdos
d6c07dfb16
Update is now Advert 2019-07-09 15:46:30 +01:00
Milos Gajdos
ea872f6900
Updated error statements; Update ships list of events. 2019-07-09 15:46:30 +01:00
Milos Gajdos
cff46c3fd8
Added Init state. Recreate exit and advertise channels when recovering
In order to differentiate between intialized and other states we
introduced a new state: Init. The router is in this state only when it's
created.

We have cleaned up router status management which is now handled by
manageStatus function only.
2019-07-01 15:46:26 +01:00
Milos Gajdos
32300eadc1
Added Router Status which allows to track router status 2019-07-01 15:46:25 +01:00
Milos Gajdos
8ad2f73ad6
Advertisement is now Update; started bit is now running. 2019-07-01 15:46:25 +01:00
Milos Gajdos
9d7420658d
Changed router interface. Added table watcher. Advertise routes
* Changed router interface to return Advertisement channel
* Added default gateway route to the routing table if supplied
* Watch table for updates and advertise to the network
* We hash the routes on 3-tuple (Destination, Gateway, Network)
2019-07-01 15:46:25 +01:00
Asim Aslam
43297f731c Add default router 2019-06-27 12:57:23 +01:00
Asim Aslam
3f97743e34 Move router and proxy into network package 2019-06-21 17:20:31 +01:00