Assigns an identifier to plugin configuration data.
unsigned int INKConfigSet (unsigned int
id
, void
*data
, INKConfigDestroyFunc
funcp
)
unsigned int
is
the identifier assigned to configuration
id
. Do not use 1 or 2
for data
because Traffic Server
internally assigns these IDs to parent and HTTP configurations.
You can enter 0 as id
,
however, and id
INKConfigSet
will allocate an
identifier for you (with a value of 3 or greater). There is an
internal upper limit of 100 for
.id
void
*
points to
the data that you are associating to
data
.id
INKConfigDestroyFunc
is a pointer to a
destroy function that's called when Traffic Server determines
there are no more references to data. The only argument for
funcp
is
funcp
. data
Sets the opaque data pointer
to be associated
with the configuration identifier
data
. If
id
is 0, then Traffic
Server allocates a new configuration identifier, and
id
INKConfigSet
returns this value. If
is non-zero, then
id
INKConfigSet
returns
. To make sure that
the configuration identifier stays within the recommended range
of 3 to 100, follow the code example in the previous
section.id
![]() |
Caution |
---|---|
Never pick a configuration identifier yourself. When you
need a new config ID, you must always pass 0 as |
The
parameter is a pointer to a destroy function that is
called with funcp
as its
only parameter when Traffic Server determines there are no
more references to
data
.data
![]() |
Note |
---|---|
Since the current data always has a reference count of at least 1, |
See the code snippet in the previous section for usage.
The unsigned int
that was assigned to the data. If the
input
is id
0
, then a new
configuration identifier is allocated (with value 3 or larger). If
the input
is id
0
, then the
return value is the available identifier allocated by Traffic
Server. If
is
non-zero, then the return value is
id
.id