Skip to content

Commit

Permalink
Minor comment and documentation tweaks. Add the python directory whic…
Browse files Browse the repository at this point in the history
…h contains my first cut at a libfko Python wrapper module.

git-svn-id: file:///home/mbr/svn/fwknop/trunk@302 510a4753-2344-4c79-9c09-4d669213fbeb
  • Loading branch information
Damien Stuart committed Nov 26, 2010
1 parent 04ebf6c commit 00bc99a
Show file tree
Hide file tree
Showing 9 changed files with 1,514 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Makefile.am
Expand Up @@ -37,6 +37,9 @@ EXTRA_DIST = \
perl/FKO/lib/FKO.pm \
perl/FKO/lib/FKO_Constants.pl \
perl/FKO/Changes \
python/README \
python/setup.py \
python/fkomodule.c \
win32/config.h \
win32/fwknop-client.vcproj \
win32/getopt.c \
Expand Down
14 changes: 7 additions & 7 deletions doc/libfko.texi
Expand Up @@ -796,12 +796,12 @@ For example:
Set the random value portion of the spa data to the given value (@var{val}).
The given value must be a pointer to a 16-character decimal numeric string
or NULL. If the value is NULL, the function generate a new random value.
If a string value is provided, it must not a 16-character decimal string,
the function will return @code{FKO_ERROR_INVALID_DATA}.
If a string value is provided, it must be a 16-character decimal string.
Otherwise, the function will return @code{FKO_ERROR_INVALID_DATA}.
@end deftypefun

@deftypefun int fko_set_username (@w{fko_ctx_t @var{ctx}, const char @var{*spoof_user}});
Set the username field of the @acronym{SPA} data. If @var{spoof_user} is NULL,
@deftypefun int fko_set_username (@w{fko_ctx_t @var{ctx}, const char @var{*username}});
Set the username field of the @acronym{SPA} data. If @var{username} is NULL,
libfko will first look for the environment variable @env{SPOOF_USER}
and use its value if found. Otherwise, it will try to determine the username
itself using various methods starting with @code{cuser} or @code{getlogin},
Expand Down Expand Up @@ -941,7 +941,7 @@ current context to the address @var{rand_val} is pointing to. The return value
is an FKO error status.
@end deftypefun

@deftypefun int fko_get_timestamp (@w{fko_ctx_t @var{ctx}, unsigned int @var{*timestamp}});
@deftypefun int fko_get_timestamp (@w{fko_ctx_t @var{ctx}, time_t @var{*timestamp}});
Sets the value of the @var{timestamp} variable to the timestamp value
associated with the current context. The return value is an FKO error
status.
Expand Down Expand Up @@ -1078,13 +1078,13 @@ fingerprint associated with the current context to the address @var{sig_fpr}
is pointing to. The return value is an FKO error status.
@end deftypefun

@deftypefun int fko_get_gpg_signature_summary (@w{fko_ctx_t @var{ctx}, unsigned char @var{*sig_sum}});
@deftypefun int fko_get_gpg_signature_summary (@w{fko_ctx_t @var{ctx}, int @var{*sig_sum}});
Sets the value of the @var{sig_sum} variable to the @acronym{GPG} signature
summary value associated with the current context. The return value is an FKO
error status.
@end deftypefun

@deftypefun int fko_get_gpg_signature_status (@w{fko_ctx_t @var{ctx}, unsigned char @var{*sig_stat}});
@deftypefun int fko_get_gpg_signature_status (@w{fko_ctx_t @var{ctx}, int @var{*sig_stat}});
Sets the value of the @var{sig_stat} variable to the @acronym{GPG} signature
error status value associated with the current context. The return value is an
FKO error status.
Expand Down
19 changes: 19 additions & 0 deletions python/README
@@ -0,0 +1,19 @@
fko python module version 1.0
==============================

This module is essentially a Python wrapper for the Firewall Knock
Operator library, "libfko". See the "libfko" documentation for
additional information on the functionality provided by "libfko"
and usage overview.

Before attempting to build this module, libfko needs to be installed on
the system.

To build and install the module:

* Build with "python setup.py build"
* Install with "python setup.py install"

Note: This version is just a plain wrapper around libfko. I do plan to
make a more complete OO Python module that wraps this one. --DSS

0 comments on commit 00bc99a

Please sign in to comment.