LM_GET_CONFIG(3)

NAME
lm_get_config, lm_next_conf - search the license file for a specified feature
lm_auth_data - get feature info for a checked out feature

SYNOPSIS
#include <lm_client.h>

CONFIG *lm_get_config(feature)
char *feature;

CONFIG *lm_next_conf(feature,pos)
char *feature;
CONFIG **pos;

CONFIG *lm_auth_data(feature)
char *feature;

CONFIG *lm_test_conf()

typedef struct config {				/* Feature data line */
	char feature[MAX_FEATURE_LEN+1];	/* Ascii name */
	double version;				/* Feature's version */
	char daemon[MAX_DAEMON_NAME+1];	/* DAEMON to serve */
	char date[DATE_LEN+1];			/* Expiration date */
	int users;					/* Licensed # users */
	char code[MAX_CRYPT_LEN+1];		/* encryption code */
	char user_string[MAX_USER_DEFINED+1];
				    				/* User-defined string */
	struct hostid id;				/* Licensed host */
	LM_SERVER *server;				/* License server(s) */
	struct config *next;			/* Ptr to next one */
} CONFIG;

DESCRIPTION
lm_get_config() looks in the license file for a specified feature and returns information about that feature.

feature is the name of the feature to look for in the license file.

lm_next_conf() looks in the license file for a specified feature starting at a specified location within the file.

feature is the name of the feature to look for in the license file.

pos is a pointer to a variable containing the place to start the search. The first license file line in the first file is (CONFIG *) 0.

lm_auth_data() returns the feature line that was actually used to authorize a feature. You must call lm_checkout first to check out the feature; then you can call lm_auth_data to get the information which was used for checking out that feature.

lm_test_conf() returns the feature line that was used to determine the results of the previous call to lm_checkout with a flag parameter of LM_CO_LOCALTEST.

NOTES
FLEXlm allows multiple valid feature lines in a license file, for example when multiple node-locked feature lines exists. lm_get_config() always returns the first matching feature in the file; lm_next_conf() can be used to get information about the other feature lines with the same name. If you need the actual line which was used to check out a feature, be sure to use lm_auth_data instead of lm_get_config.

Calling lm_get_config(feature) is the same as calling lm_next_conf(feature,&n) where n is a pointer to a (CONFIG *) that has been set to (CONFIG *) 0.

RETURN VALUE
lm_get_config(), lm_next_conf(), and lm_auth_data() return a pointer to a structure which contains all of the feature line information. In all cases, this structure belongs to the FLEXlm functions, and must not be modified by the caller. On an error, lm_get_config(), lm_next_conf(), and lm_auth_data() return NULL, and set an error code into _lm_errno.

lm_next_conf() updates the value of the variable pointed to by pos to point to the next line after the line returned. This is the appropriate value for the next call to lm_next_conf() to scan through the entire license file.

SEE ALSO
lm_flush_config(3).