Added: incubator/trafficserver/site/trunk/docs/sdk/App_DeprecatedFunctions.html URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/App_DeprecatedFunctions.html?rev=831152&view=auto ============================================================================== --- incubator/trafficserver/site/trunk/docs/sdk/App_DeprecatedFunctions.html (added) +++ incubator/trafficserver/site/trunk/docs/sdk/App_DeprecatedFunctions.html Thu Oct 29 23:23:25 2009 @@ -0,0 +1,1436 @@ + + + +Appendix B. Deprecated Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Home +

Traffic Server Software Developers Kit

+
+ +
+
+

+Appendix B. Deprecated Functions

+
+

Table of Contents

+
+
Deprecated MIME Header Functions
+
+
INKMimeFieldCopy
+
INKMimeFieldCopyValues
+
INKMimeFieldCreate
+
INKMimeFieldDestroy
+
INKMimeFieldLengthGet
+
INKMimeFieldNameGet
+
INKMimeFieldNameSet
+
INKMimeFieldNext
+
INKMimeFieldValueAppend
+
INKMimeFieldValueDelete
+
INKMimeFieldValueGet
+
INKMimeFieldValueGetDate
+
INKMimeFieldValueGetInt
+
INKMimeFieldValueGetUint
+
INKMimeFieldValueInsertDate
+
INKMimeFieldValueInsertInt
+
INKMimeFieldValueInsertUint
+
INKMimeFieldValuesClear
+
INKMimeFieldValuesCount
+
INKMimeFieldValueSet
+
INKMimeFieldValueSetDate
+
INKMimeFieldValueSetInt
+
INKMimeFieldValueSetUint
+
INKMimeHdrFieldValueGet
+
INKMimeHdrFieldValueGetDate
+
INKMimeHdrFieldValueGetInt
+
INKMimeHdrFieldValueGetUInt
+
INKMimeHdrFieldValueInsert
+
INKMimeHdrFieldValueInsertDate
+
INKMimeHdrFieldValueInsertInt
+
INKMimeHdrFieldValueInsertUInt
+
INKMimeHdrFieldValueSet
+
INKMimeHdrFieldValueSetDate
+
INKMimeHdrFieldValueSetInt
+
INKMimeHdrFieldValueSetUInt
+
INKMimeHdrFieldDelete
+
INKMimeHdrFieldInsert
+
INKMimeHdrFieldRetrieve
+
+
Other Deprecated Functions
+
+
Statistic Functions
+
+
INKStatFloatRead
+
INKStatIntRead
+
+
IO Buffer Interface
+
+
INKIOBufferAppend
+
INKIOBufferBlockCreate
+
INKIOBufferDataCreate
+
+
Mutex Function
+
InkMutexTryLock
+
+
+
+

This appendix lists the functions that are deprecated in SDK 5.2 and + newer.

+
+

+Deprecated MIME Header Functions

+

The following MIME field functions are deprecated in SDK + 3.0.

+
+

+INKMimeFieldCopy

+

Copies a MIME field from one location to another.

+
+
Prototype
+

void INKMimeFieldCopy (INKMBuffer + dest_bufp,INKMLoc + dest_offset,INKMBuffer + src_bufp,INKMLoc + src_offset)

+
Description
+
+

Copies the contents of the MIME field located at + src_offset within the + marshal buffer src_bufp + to the MIME field located at + dest_offset within the + marshal buffer + dest_bufp. + INKMimeFieldCopy works correctly even if + src_bufp and + dest_bufp point to + different marshal buffers.

+
+ + + + + +
[Note]Note

You must first create the destination MIME field before + copying into it.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldCopyValues

+

Copies MIME field values from one location to another.

+
+
Prototype
+

void INKMimeFieldCopyValues (INKMBuffer + dest_bufp,INKMLoc + dest_offset,INKMBuffer + src_bufp,INKMLoc + src_offset)

+
Description
+

Copies the values contained within the MIME field located + at src_offset within the + marshal buffer src_bufp + to the MIME field located at + dest_offset within the + marshal buffer + dest_bufp. + INKMimeFieldCopyValues works correctly even + if src_bufp and + dest_bufp point to + different marshal buffers. + INKMIMEFieldCopyValues does not copy the + field’s name.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldCreate

+

Creates a new MIME field within a specified marshal + buffer.

+
+
Prototype
+

INKMLoc INKMimeFieldCreate (INKMBuffer + bufp)

+
Description
+
+

Creates a new MIME field with the marshal buffer + bufp. Returns the offset + location of the new MIME field.

+

Release the created INKMLoc with a + call to INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldDestroy

+

Deletes a specified MIME field from a marshal buffer.

+
+
Prototype
+

void INKMimeFieldDestroy (INKMBuffer + bufp,INKMLoc + offset)

+
Description
+
+

Destroys the MIME field located at + offset within the + marshal buffer + bufp.

+

Release the handle with a call to + INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldLengthGet

+

Calculates the length of a string representation of a specified + MIME field.

+
+
Prototype
+

int INKMimeFieldLengthGet (INKMBuffer + bufp,INKMLoc + offset)

+
Description
+

Calculates the length of the MIME field located at + offset within the + marshal buffer bufp if + it were returned as a string. This is the length of the MIME + field in its unparsed form.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldNameGet

+

Gets the name and length of a specified MIME field.

+
+
Prototype
+

const char* INKMimeFieldNameGet (INKMBuffer + bufp,INKMLoc + offset, int + *length)

+
Description
+
+

Returns the name of the field located at + offset within the + marshal buffer bufp. + INKMimeFieldNameGet places the length of + the returned string in the + length argument. If + length is + NULL then no attempt is made to de-reference + it.

+

Release the returned string with a call to + INKHandleStringRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldNameSet

+

Sets a specified MIME field’s name.

+
+
Prototype
+

void INKMimeFieldNameSet (INKMBuffer + bufp,INKMLoc + offset, const char + *name, int + length)

+
Description
+

Sets the name of the field located at + offset within the + marshal buffer bufp to + the string name. If + length is -1 then + INKMimeFieldNameSet assumes that name is + null-terminated. Otherwise, the length of the string name is + taken to be length. + INKMimeFieldNameSet copies the string to + within bufp, so it is + okay to modify or delete + name after calling + INKMimeFieldNameSet.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldNext

+

Returns the next MIME field after a specified MIME field in a + MIME header.

+
+
Prototype
+

INKMLoc INKMimeFieldNext (INKMBuffer + bufp,INKMLoc offset)

+
Description
+
+

Conceptually, there are a list of MIME fields in a MIME + header (see “About HTTP Headers”). + INKMimeFieldNext returns the location of + the next field in the list after the field located at + offset within the + marshal buffer + bufp.

+

Release the returned INKMLoc with a + call to INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueAppend

+

Appends a string to a specified value in a MIME field.

+
+
Prototype
+

INKMLoc INKMimeFieldNext (INKMBuffer + bufp,INKMLoc + offset)

+
Description
+
+

Conceptually, there are a list of MIME fields in a MIME + header (see “About HTTP Headers”). + INKMimeFieldNext returns the location of + the next field in the list after the field located at + offset within the + marshal buffer + bufp.

+

Release the returned INKMLoc with a + call to INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueDelete

+

Deletes a specified value from a MIME field.

+
+
Prototype
+

void INKMimeFieldValueDelete (INKMBuffer + bufp,INKMLoc + offset, int + idx)

+
Description
+

Removes and deletes a value from the MIME field located at + offset within the + marshal buffer bufp. The + idx parameter specifies + which value should be deleted. If + idx is not between 0 and + INKMimeFieldValuesCount (bufp, + offset) - 1 then no operation will be + performed.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueGet

+

Gets a specified field value from a MIME header.

+
+
Prototype
+

const char* INKMimeFieldValueGet (INKMBuffer + bufp, INKMLoc + offset, int + idx, int + *length)

+
Description
+
+

Retrieves a string value from within the MIME field + located at offset within + the marshal buffer bufp. + The idx parameter + specifies which field to retrieve. The fields are numbered from + 0 to INKMimeFieldValuesCount + (bufp, offset) - 1. If + idx does not lie within + that range then NULL will be returned. The length + of the returned string is placed in the + length argument. If + length is + NULL then no attempt is made to dereference + it.

+

Release the returned string with a call to + INKHandleStringRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueGetDate

+

Gets date value from a MIME field.

+
+
Prototype
+

time_t INKMimeFieldValueGetDate (INKMBuffer + bufp, INKMLoc + offset, int + idx)

+
Description
+

Retrieves a date value from within the MIME field located + at offset within the + marshal buffer bufp. The + idx parameter specifies + which field to retrieve. The fields are numbered from 0 to + INKMimeFieldValuesCount + (bufp, offset) - 1. If + idx does not lie within + that range, INKMimeFieldValueGetDate + returns (time_t) 0. All values are stored as + strings within the MIME field. + INKMimeFieldValueGetDate parses the string + value to return an integer date representation.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueGetInt

+

Gets an integer field value in a MIME field.

+
+
Prototype
+

int INKMimeFieldValueGetInt (INKMBuffer + bufp, INKMLoc + offset, int + idx)

+
Description
+

Retrieves an integer value from within the MIME field + located at offset within + the marshal buffer bufp. + The idx parameter + specifies which value within the field to retrieve. The fields + are numbered from 0 to + INKMimeFieldValuesCount + (bufp, offset) - 1. If + idx does not lie within + that range, INKMimeFieldValueGetInt returns + (int) 0. All values are stored as strings within + the MIME field. INKMimeFieldValueGetInt + parses the string value to return an integer.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueGetUint

+

Gets unsigned integer field value in a MIME field.

+
+
Prototype
+

unsigned int INKMimeFieldValueGetUint (INKMBuffer + bufp, INKMLoc + offset, int + idx)

+
Description
+

Retrieves an unsigned integer value from within the MIME + field located at offset + within the marshal buffer + bufp. The + idx parameter specifies + which field to retrieve. The fields are numbered from 0 to + INKMimeFieldValuesCount + (bufp, offset) - 1. If + idx does not lie within + that range, INKMimeFieldValueGetUnit + returns (unsigned int) 0. All values are stored as + strings within the MIME field. + INKMimeFieldValueGetUint parses the string + value to return an unsigned integer.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueInsertDate

+

Inserts a date value into a MIME field.

+
+
Prototype
+

INKMLoc INKMimeFieldValueInsertDate (INKMBuffer + bufp,INKMLoc + offset, time_t + value, int + idx)

+
Description
+
+

Inserts the date + value into the MIME + field located at offset + within the marshal buffer + bufp. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then the value is + prepended to the list of values in the field. Increasing values + of idx places the + value further down the + list of values. If idx + is -1 then the value is + appended to the list of values. Normal usage is to specify -1 + for idx so that the + value is appended to the + list of values. All values are stored as strings within the MIME + field. INKMimeFieldValueInsertDate simply + formats the date into a string and then calls + INKMimeFieldValueInsert.

+

Release the returned INKMLoc with a + call to INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueInsertInt

+

Inserts an integer value into a MIME field.

+
+
Prototype
+

INKMLoc INKMimeFieldValueInsertInt (INKMBuffer + bufp,INKMLoc + offset, int + value, int + idx)

+
Description
+
+

Inserts the integer + value into the MIME + field located at offset + within the marshal buffer + bufp. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then the value is + prepended to the list of values in the field. Increasing values + of idx places the + value further down the + list of values. If idx + is -1 then the value is + appended to the list of values. Normal usage is to specify -1 + for idx so that the + value is appended to the + list of values. All values are stored as strings within the MIME + field. INKMimeFieldValueInsertInt simply + formats the integer into a string and then calls + INKMimeFieldValueInsert.

+

Release the returned INKMLoc with a + call to INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueInsertUint

+

Inserts an unsigned integer value into a MIME field.

+
+
Prototype
+

INKMLoc INKMimeFieldValueInsertUint (INKMBuffer + bufp,INKMLoc + offset, unsigned int + value, int + idx)

+
Description
+
+

Inserts the unsigned integer + value into the MIME + field located at offset + within the marshal buffer + bufp. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then the value will be + prepended to the list of values in the field. Increasing values + of idx will place the + value further down the + list of values. If idx + is -1 then the value + will be appended to the list of values. Normal usage is to + specify -1 for idx so + that the value will be + appended to the list of values. All values are stored as strings + within the MIME field. + INKMimeFieldValueInsertUint simply formats + the unsigned integer into a string and then calls + INKMimeFieldValueInsert.

+

Release the returned INKMLoc with a + call to INKHandleMLocRelease.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValuesClear

+

Clears all values in a MIME field.

+
+
Prototype
+

void INKMimeFieldValuesClear (INKMBuffer + bufp, INKMLoc + offset)

+
Description
+

Removes and destroys all of the values within the MIME + field located at offset + within the marshal buffer + bufp.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValuesCount

+

Counts the values in a MIME field.

+
+
Prototype
+

int INKMimeFieldValuesCount (INKMBuffer + bufp, INKMLoc + offset)

+
Description
+

Returns a count of the number of values in the MIME field + located at offset within + the marshal buffer + bufp.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueSet

+

Sets a value in a MIME field.

+
+
Prototype
+

void INKMimeFieldValueSet (INKMBuffer + bufp, INKMLoc + offset, int + idx, const char + *value, int + length)

+
Description
+

Sets a value in the MIME field located at + offset within the + marshal buffer bufp to + the string value. If + length is -1 then it is + assumed that value is + null-terminated. Otherwise, the length of the string + value is taken to be + length. The string is + copied to within bufp, + so it is okay to modify or delete + value after calling + INKMimeFieldValueSet. The + idx parameter specifies + which value in the field to change. If + idx is not between 0 and + INKMimeFieldValuesCount + (bufp, offset) - 1 then + no operation will be performed.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueSetDate

+

Sets a date value in a MIME field.

+
+
Prototype
+

void INKMimeFieldValueSetDate (INKMBuffer + bufp,INKMLoc + offset, int + idx, time_t + value)

+
Description
+

Sets a value in the MIME field located at + offset within the + marshal buffer bufp to + the data value. The + idx parameter specifies + which value in the field to change. If + idx is not between 0 and + INKMimeFieldValuesCount + (bufp, offset) - 1 then + no operation will be performed. All values are stored as strings + within the MIME field. + INKMimeFieldValueSetDate simply formats the + date into a string and then calls + INKMimeFieldValueSet.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueSetInt

+

Sets an integer value in a MIME field.

+
+
Prototype
+

void INKMimeFieldValueSetInt (INKMBuffer + bufp,INKMLoc + offset, int + idx, int + value)

+
Description
+

Sets a value in the MIME field located at + offset within the + marshal buffer bufp to + the integer value. The + idx parameter specifies + which value in the field to change. If + idx is not between 0 and + INKMimeFieldValuesCount + (bufp, offset) - 1 then + no operation will be performed. All values are stored as strings + within the MIME field. + INKMimeFieldValueSetInt simply formats the + integer into a string and then calls + INKMimeFieldValueSet.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeFieldValueSetUint

+

Sets an unsigned integer value in a MIME field.

+
+
Prototype
+

void INKMimeFieldValueSetUint (INKMBuffer + bufp,INKMLoc + offset, int + idx, unsigned int + value)

+
Description
+

Sets a value in the MIME field located at + offset within the + marshal buffer bufp to + the unsigned integer + value. The + idx parameter specifies + which value in the field to change. If + idx is not between 0 and + INKMimeFieldValuesCount + (bufp, offset) - 1 then + no operation will be performed. All values are stored as strings + within the MIME field. + INKMimeFieldValueSetUint simply formats the + unsigned integer into a string and then calls + INKMimeFieldValueSet.

+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeHdrFieldValueGet

+

Gets a specified field value from a MIME header.

+
+
Prototype
+

const char* INKMimeHdrFieldValueGet (INKMBuffer + bufp, INKMLoc + hdr_loc, INKMLoc + field, int + idx, int + *value_len_ptr)

+
Description
+
+

Retrieves a string value from within the MIME field + located at field within + the marshal buffer bufp. + The idx parameter + specifies which field to retrieve. The fields are numbered from + 0 to INKMimeHdrFieldValuesCount + (bufp, hdr, field) - 1. + If idx does not lie + within that range then NULL will be returned. The + length of the returned string is placed in the + value_len_ptr argument. + If value_len_ptr is + NULL then no attempt is made to dereference + it.

+

This API has been deprecated by + INKMimeHdrFieldValueStringGet.

+
+
Returns
+

A pointer to the specified field value in the MIME header. + Release with a call to + INKHandleStringRelease.

+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueGetDate

+

Gets date value from a MIME field.

+
+
Prototype
+

time_t INKMimeHdrFieldValueGetDate (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx)

+
Description
+
+

Retrieves a date value from within the MIME field located + at field within the + marshal buffer bufp. The + idx parameter specifies + which field to retrieve. The fields are numbered from 0 to + INKMimeHdrFieldValuesCount + (bufp, hdr, field) -1. + If idx does not lie + within that range, + INKMimeHdrFieldValueGetDate returns + (time_t) 0. All values are stored as strings within + the MIME field. INKMimeHdrFieldValueGetDate + parses the string value to return an integer date + representation.

+

This API has been deprecated by + INKMimeHdrFieldValueDateGet.

+
+
Returns
+

The date value from the specified MIME header.

+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueGetInt

+

Gets an integer field value in a MIME field.

+
+
Prototype
+

int INKMimeHdrFieldValueGetInt (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx, int + *value_len-ptr)

+
Description
+
+

Retrieves an integer value from within the MIME field + located at field within + the marshal buffer bufp. + The idx parameter + specifies which value within the field to retrieve. The fields + are numbered from 0 to + INKMimeHdrFieldValuesCount + (bufp, hdr, field) - 1. + If idx does not lie + within that range, + INKMimeHdrFieldValueGetInt returns + (int) 0. All values are stored as strings within + the MIME field. INKMimeHdrFieldValueGetInt + parses the string value to return an integer.

+

This API has been deprecated by + INKMimeHdrFieldValueIntGet.

+
+
Returns
+

The interger value from the specified MIME field.

+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueGetUInt

+

Gets unsigned integer field value in a MIME field.

+
+
Prototype
+

unsigned int INKMimeHdrFieldValueGetUInt (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx)

+
Description
+
+

Retrieves an unsigned integer value from within the MIME + field located at field + within the marshal buffer + bufp. The + idx parameter specifies + which field to retrieve. The fields are numbered from 0 to + INKMimeHdrFieldValuesCount + (bufp, hdr, field) - 1. + If idx does not lie + within that range, + INKMimeHdrFieldValueGetUnit returns + (unsigned int) 0. All values are stored as strings + within the MIME field. + INKMimeHdrFieldValueGetUInt parses the + string value to return an unsigned integer.

+

It is not possible to determine if + INKMimeHdrFieldValueGetUInt is returning an + unsigned int value in error. If you need to check for errors in + MIME header field values, you can fetch the header as a string + and examine it. Here is some sample code that fetches MIME + headers from marshal buffers into strings using + INKMimeHdrFieldValueGet instead. The + context of this example is that the plugin is processing an HTTP + transaction and has access to a transaction.

+

This API has been deprecated by + INKMimeHdrFieldValueUIntGet.

+
+
Returns
+

The unsigned integer value from the specified MIME + field.

+
Example
+
static void
+handle_string (INKHttpTxn txnp, INKCont contp) {
+    INKMBuffer bufp;
+    INKMLoc hdr_loc;
+    INKMLoc field;
+    int len;
+    char* output_string;
+    const char* value;
+/* Fetch  the transaction's client request header into a marshal buffer. */
+    if (!INKHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) { 
+        INKError ("couldn't retrieve client request header\n"); 
+        goto done;
+    }
+    field=INKMimeHdrFieldRetrieve(bufp, hdr_loc, 
+                                  INK_MIME_FIELD_CONTENT_LENGTH);
+         
+    if (!field) { 
+        INKError ("Content-Length field not found.\n"); 
+        INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+        goto done;
+    } 
+    /* Obtain the value of the content length (normally an 
+     * unsigned int) as a string. */
+    value=INKMimeHdrFieldValueGet (bufp, hdr_loc, field, 0, &len); 
+ 
+    if ((!value) || (len<=0))}
+        INKHandleMLocRelease (bufp, hdr_loc, field);
+        INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+        goto done;
+    }
+    /* Allocate the string with an extra byte for the string terminator. */
+    output_string = (char*) INKmalloc(len + 1);
+         
+    /* Copy the value. */
+    strncpy (output_string, value, len);
+
+    /* Terminate the string */
+    output_string[len] = '\0';
+/* Now that you have the MIME fields as a string, you can do 
+       whatever you want to do with it, for example, print it, or 
+       make sure it's an unsigned integer: either by using the
+       atol C function or by scanning each ASCII character.  */ 
+    INKDebug("my-plugin", "%s", output_string);
+     
+    /* Release handles and allocated memory. */    
+    INKHandleStringRelease (bufp, field, value);
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueInsert

+

Inserts a value into a specified location within a MIME + field.

+
+
Prototype
+

INKMLoc INKMimeHdrFieldValueInsert (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, const char + *value, int + length, int + idx)

+
Description
+
+

Inserts the string + value into the MIME + field located at field + within the marshal buffer + bufp. If + length is -1 then + INKMimeHdrFieldValueInsert assumes that + value is + null-terminated. Otherwise, the length of the string + value is taken to be + length. + INKMimeHdrFieldValueInsert copies the string to within + bufp, so it is okay to + modify or delete value + after calling INKMimeHdrFieldValueSet. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then INKMimeHdrFieldValueInsert prepends + the value to the list of + values in the field. Increasing values of + idx place the + value further down the + list of values. If idx + is -1, INKMimeHdrFieldValueInsert appends + the value to the list of + values. Normal usage is to specify -1 for + idx so that the + value is appended to the + list of values.

+

This API has been deprecated by + INKMimeHdrFieldValueStringInsert.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueInsertDate

+

Inserts a date value into a MIME field.

+
+
Prototype
+

INKMLoc INKMimeHdrFieldValueInsertDate (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, time_t + value, int + idx)

+
Description
+
+

Inserts the data + value into the MIME + field located at field + within the marshal buffer + bufp. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then the value is + prepended to the list of values in the field. Increasing values + of idx places the + value further down the + list of values. If idx + is -1 then the value is + appended to the list of values. Normal usage is to specify -1 + for idx so that the + value is appended to the + list of values. All values are stored as strings within the MIME + field. INKMimeHdrFieldValueInsertDate + simply formats the date into a string and then calls + INKMimeHdrFieldValueInsert.

+
+ + + + + +
[Note]Note

Do not use the return value + (INKMLoc) of this function. Future + versions will be changed to void.

+

This API has been deprecated by + INKMimeHdrFieldValueDateInsert.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueInsertInt

+

Inserts an integer value into a MIME field.

+
+
Prototype
+

INKMLoc INKMimeHdrFieldValueInsertInt (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + value, int + idx)

+
Description
+
+

Inserts the integer + value into the MIME + field located at field + within the marshal buffer + bufp. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then the value is + prepended to the list of values in the field. Increasing values + of idx places the + value further down the + list of values. If idx + is -1 then the value is + appended to the list of values. Normal usage is to specify -1 + for idx so that the + value is appended to the + list of values. All values are stored as strings within the MIME + field. INKMimeHdrFieldValueInsertInt simply + formats the integer into a string and then calls + INKMimeHdrFieldValueInsert.

+

This API has been deprecated by + INKMimeHdrFieldValueIntInsert.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueInsertUInt

+

Inserts an unsigned integer value into a MIME field.

+
+
Prototype
+

INKMLoc INKMimeHdrFieldValueInsertUInt (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, unsigned int + value, int + idx)

+
Description
+
+

Inserts the unsigned integer + value into the MIME + field located at field + within the marshal buffer + bufp. The + idx parameter specifies + where the inserted value + should be put with respect to the other values already in the + MIME field. If idx is 0 + then the value will be + prepended to the list of values in the field. Increasing values + of idx will place the + value further down the + list of values. If idx + is -1 then the value + will be appended to the list of values. Normal usage is to + specify -1 for idx so + that the value will be + appended to the list of values. All values are stored as strings + within the MIME field. + INKMimeHdrFieldValueInsertUInt simply + formats the unsigned integer into a string and then calls + INKMimeHdrFieldValueInsert.

+

This API has been deprecated by + INKMimeHdrFieldValueUIntInsert.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueSet

+

Sets a value in a MIME field.

+
+
Prototype
+

void INKMimeHdrFieldValueSet (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx, const char + *value, int + length)

+
Description
+
+

Sets a value in the MIME field located at + field within the marshal + buffer bufp to the + string value. If + length is -1 then it is + assumed that value is + null-terminated. Otherwise, the length of the string + value is taken to be + length. The string is + copied to within bufp, + so it is okay to modify or delete + value after calling + INKMimeHdrFieldValueSet. The + idx parameter specifies + which value in the field to change. If + idx is not between 0 and + INKMimeHdrFieldValuesCount + (bufp, hdr, field) - 1 + then no operation will be performed.

+

This API has been deprecated by + INKMimeHdrFieldValueStringSet.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueSetDate

+

Sets a date value in a MIME field.

+
+
Prototype
+

void INKMimeHdrFieldValueSetDate (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx, time_t + value)

+
Description
+

Sets a value in the MIME field located at + field within the marshal + buffer bufp to the date + value. The + idx parameter specifies + which value in the field to change. If the + idx is not between 0 and + INKMimeHdrFieldValuesCount + (bufp, hdr, field) -1 + then no operation will be performed. All values are stored as + strings within the MIME field. + INKMimeHdrFieldValueSetDate simply formats + the date into a string and then calls + INKMimeHdrFieldValueSet.

+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueSetInt

+

Sets an integer value within a MIME field.

+
+
Prototype
+

void INKMimeHdrFieldValueSetInt (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx, int + value)

+
Description
+
+

Sets a value in the MIME field located at + field within the marshal + buffer bufp to the + integer value. The + idx parameter specifies + which value in the field to change. If + idx is not between 0 and + INKMimeHdrFieldValuesCount + (bufp, hdr, field) - 1 + then no operation will be performed. All values are stored as + strings within the MIME field. + INKMimeHdrFieldValueSetInt simply formats + the integer into a string and then calls + INKMimeHdrFieldValueSet.

+

This API has been deprecated by + INKMimeHdrFieldValueIntSet.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldValueSetUInt

+

Sets a value in a MIME field to a specified unsigned + integer.

+
+
Prototype
+

void INKMimeHdrFieldValueSetUInt (INKMBuffer + bufp, INKMLoc + hdr, INKMLoc + field, int + idx, unsigned int + value)

+
Description
+
+

Sets a value in the MIME field located at + field within the marshal + buffer bufp to the + unsigned integer value. + The idx parameter + specifies which value in the field to change. If + idx is not between 0 and + INKMimeHdrFieldValuesCount + (bufp, hdr, field) - 1 + then no operation will be performed. All values are stored as + strings within the MIME field. + INKMimeHdrFieldValueSetUInt simply formats + the unsigned integer into a string and then calls + INKMimeHdrFieldValueSet.

+

This API has been deprecated by + INKMimeHdrFieldValueUIntSet.

+
+
First release
+

Traffic Server 3.5

+
+
+
+

+INKMimeHdrFieldDelete

+

Destroys a MIME header field.

+
+
Prototype
+

void INKMimeHdrFieldDelete (INKMBuffer + bufp, INKMLoc + hdr_loc, INKMLoc + field)

+
Description
+
+

Deletes the MIME field located at + field within the MIME + header located at + hdr_loc in the marshal + buffer bufp.

+

Make sure you release the INKMLoc + handle field with a call to + INKHandleMLocRelease.

+

This API has been deprecated by + INKMimeHdrFieldDestroy.

+
+
First release
+

Traffic Server 3.0

+
+
+
+

+INKMimeHdrFieldInsert

+

Appends a field in a MIME header.

+
+
Prototype
[... 63 lines stripped ...]