Patch to the Erlang Driver Toolkit

I am creating an Erlang-binding for the GSS API version 2.1 (IETF‘s RFC 2743 and RFC 2744). I am wrapping the GSS API C-binding functions in an Erlang port driver. The purpose is to be able to use GSS API implementations such as MIT Kerberos, Heimdal, GNU Shishi and Globus’ GSI in Erlang programs. And maybe, to implement a GSS API-based Erlang distribution layer similar to the existing TCP and SSL distribution layers.

Following Chris Newcombe’s advice, I am developing this port driver using the Erlang Driver Toolkit (EDTK), version 1.1, developed by Scott Lystig Fritchie. EDTK functionally covers well all my needs for Erlang / C communication. It generates stub implementations in Erlang and C for marshalling / unmarshalling Erlang terms and call directly the C functions to wrap. The specification of the interfaces are written in XML.

However, EDTK seems to be little maintained, in its XML format element and attribute names are not homogeneous, and it relies on an odd tool for XML processing (iMatix’s GSLgen) instead of using the XSLT standard which is just as powerful and is much more widespread. Until Chris Newcombe releases a new version (as he promised ^_-), I have developed a patch for EDTK 1.1 to correct a few bugs that have blocked me so far:

  • in <xtra_val/> elements (in <xtra_return/> elements), added support for argtype="out" or argtype="inout" arguments which are valmap values;
  • corrected a bug that appeared when specifying an argument (<arg/> element) that is a valmap value, and is of type argtype="inout";
  • arguments of type argtype="inout" are now dereferenced with & just like argtype="out" arguments, when calling a wrapped functions.