Next: , Up: Preparation   [Contents][Index]

2.1 Header

All standard interfaces (data types and functions) of the official GSS API are defined in the header file gss/api.h. The file is taken verbatim from the RFC (after correcting a few typos) where it is known as gssapi.h. However, to be able to co-exist gracefully with other GSS-API implementation, the name gssapi.h was changed.

The header file gss.h includes gss/api.h, and declares a few non-standard extensions (by including gss/ext.h), takes care of including header files related to all supported mechanisms (e.g., gss/krb5.h) and finally adds C++ namespace protection of all definitions. Therefore, including gss.h in your project is recommended over gss/api.h. If using gss.h instead of gss/api.h causes problems, it should be regarded a bug.

You must include either file in all programs using the library, either directly or through some other header file, like this:

#include <gss.h>

The name space of GSS is gss_* for function names, gss_* for data types and GSS_* for other symbols. In addition the same name prefixes with one prepended underscore are reserved for internal use and should never be used by an application.

Each supported GSS mechanism may want to expose mechanism specific functionality, and can do so through one or more header files under the gss/ directory. The Kerberos 5 mechanism uses the file gss/krb5.h, but again, it is included (with C++ namespace fixes) from gss.h.