From: Francis Dupont Date: Mon, 27 Jun 2016 20:00:51 +0000 (+0200) Subject: [fdxhook] Added NOTES X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37802f54a3c325e8c2b61d383439bbf2c70ac9d8;p=thirdparty%2Fkea.git [fdxhook] Added NOTES --- diff --git a/src/hooks/external/NOTES b/src/hooks/external/NOTES index 924496d875..8cd4105083 100644 --- a/src/hooks/external/NOTES +++ b/src/hooks/external/NOTES @@ -2,7 +2,8 @@ Kea hooks in external (i.e., not C++) languages. (written before the implementation work so at the beginning of the design) -Asked for customers: hooks written in python (done), lua, ocaml (done), ... +Asked for customers: hooks written in python (done), lua, ocaml (done), +v8 (partial), ... Kea hook summary: - dynamic shared objects loaded from the config on hooks-libraries diff --git a/src/hooks/external/v8/NOTES b/src/hooks/external/v8/NOTES new file mode 100644 index 0000000000..5be6a0e092 --- /dev/null +++ b/src/hooks/external/v8/NOTES @@ -0,0 +1,40 @@ +Implementation notes for v8 + +Manifest: + - voption.h voption.cc: the C++ OptionPtr encapsulated into a v8 indirect + External with no methods ported. + + - vpkt4.h vpkt4.cc: the C++ Pkt4Ptr encapsulated into a v8 indirect + External with one method ported. + + one can complete these v8 types or/and new v8 type. + + - globals.h globals.cc: global values and functions, currently + only the print() function. + + - dso.cc: the kea framework and hook glue: on the kea / C side it is + a dynamic shared object providing the framework and hook entry points, + on the v8 side it embeds an interpreter which imports the v8 script + hook.js. + + voption.o, vpkt4.o, globals.o and dso.o are compiled into kea.so. + + - hook.js: the v8 / ECMAscript script which implements the v8 part of + hook handlers using v8 option and pkt4 implementations. + + - tests.cc: source of test program which loads the kea.so hook-library + and exercise the pkt4_receive hook. It gives an independent executable. + + - cshenv: C-shell script setting environment variables for a kea + distrib in /tmp/kea on OS X. + + - Makefile: make config file for OS X. + + - NOTES: this file. + +v8 external API supports only raw pointers. + +There is no proof the garbage collecting part is correct. BTW v8 is known +to not cleanup things (performance issue for Chrome). + +The documentation is nearly useless and the API unstable...