[WLANware] Rapid Mesh Protokoll Development Toolkit

Daniel Poelzleithner poelzi at poelzi.org
Thu Nov 9 21:55:35 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

René Hellmann wrote:


> Aloha,

> das hört sich interessant an; need more input ;-)

Mhh, ich werde ein trac für aufsetzen und svn anlegen. Ich hab einfach
mal angefangen die batman sourcen umzubauen, so als kleines untergerüst.

Der Netzwerk code generator ist in Python geschrieben und wir nur
gebraucht wenn man das Protokoll ändert.

Ein Beispielpacket sieht dann in etwa so aus:

- -
    name: ROUTE_TEST
    opcode: 0x129
    type: packet
    lua-handler: process_route_test
    structure:
      - Originator:
      		type: ipaddress
      - O_Seq:
      		type: uint8
            info: Sequencenumber of the Originator
      - S_Seq:
      		type: uint8
            info: Sequencenumber of the sending Node
      - Cost:
      		type: uint16
            info: |
            	The cost normally means the impact on the mesh. Backbone
links for example should
            	have a lower cost then a normal mesh node
      - FillRate:
      		type: uint8
            info: |
            	Percent of route usage. This is usally the largest percent
on a single route, or a mixture of
                free percentages of all more or less equal routes to a Node
      - Metric:
      		type: uint8
            info: |
            	We count the metric by hand, so we are independent from
	info: |
      This is the main packet that controlles how content packets flow
in the network


ist im prinzip eine einfache yaml Datei. Daraus wird dann eine große
header Datei mit den Packeten classen (momtan erzeugt der nur c++ code,
aber das ist mit c nicht so elegant zu lösen), eine Packet Verarbeitungs
c Datei und noch parser Stubs.

Will man z.B. ein hello packet schicken
ROUTE_TEST rt = new ROUTE_TEST;
rt.S_Seq = 12;
rt.Cost += 2;
...
framework_send(rt);

Intern wird dann rt->Assemble(); aufgerufen, der einen Puffer mit dem
Packet erstellt.
Kann natürlich noch mehr, siehe https://mc.sh.nu:8000/wiki/GenCode/Usage
Ich hatte das Teil für ein TCP Protokoll entwickelt, aber ich werde es
entsprechend für UDP anpassen und z.B. kontrollierte Autofragmentierung
einbauen. Wenn man z.B. eine Liste von Daten schicken will die größer
als 1500 Byte sind, muß man nicht mehrere kleine Packete bauen, sondern
erstellt eines, und die Assemble Funktion macht dann mehrere kleine
draus und achtet auch auf die MTU. Olsr macht das z.B. nicht richtig :(

Ich hab einen gehackten toloa++ bindings generator den ich einsetzten
werde. Dann reicht es nur seine header dateien sauber zu halten und
schon kann man mit lua direkt zugreifen.

Lua eignet sich da sehr hervorragend denke ich, es ist schlank und
schnell, eigendlich genau sein einsatzgebiet.

Ob ich den code generator auf plain C umschreiben soll, da bin ich mir
noch total unschlüssig. Ich will auf jedenfall, daß es gut auf einen
linksys passt.
Die Utilities aus dem mirror-city project sind wirklich erste sahne und
sehr schnell, die werde ich wohl wieder nehmen. Zap ist ein göttlicher
Programmierer :)


Liebe Grüße
 Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFU5XHy/mkIQp7AD0RAurhAKChZndNZUte8cZ91CBeyY978edT9wCfRB+L
UYhtOZfd+07GE4TSQmCXeCQ=
=3YQE
-----END PGP SIGNATURE-----



More information about the WLANware mailing list