UDI_BUF_INSERT(3udi)


Insert bytes into a logical buffer

SYNOPSIS

#include <udi.h>

#define \

   UDI_BUF_INSERT( \

	callback, gcb, new_data, size, \

			      dst_buf, dst_off) \

		udi_buf_write(callback, gcb, new_data, \

			         size, dst_buf, dst_off, \

			          0, UDI_NULL_BUF_PATH)
 

ARGUMENTS callback, gcb are standard arguments described in the "Asynchronous Service Calls" section of "Calling Sequence and Naming Conventions".

new_data is a pointer to the new data bytes to insert into the buffer data. If set to NULL, the size bytes inserted into dst_buf at dst_off shall have unspecified values.

size is the number of bytes to insert into dst_buf.

dst_buf is a handle to the logical buffer into which to insert bytes.

dst_off is the logical offset from the first valid data byte in the buffer to the start of the insertion, in bytes.

DESCRIPTION UDI_BUF_INSERT inserts size bytes into dst_buf at offset dst_off, logically moving any data currently at dst_off "down" by size bytes.

The macro UDI_BUF_INSERT must be called as if it had the following functional interface, as can be derived from the above macro definition and the definition of udi_buf_write:

void UDI_BUF_INSERT (

	udi_buf_write_call_t *callback,

	udi_cb_t *gcb,

	void *new_data,

	udi_size_t size,

	udi_buf_t *dst_buf,

	udi_size_t dst_off );
 
typedef void udi_buf_write_call_t (

	udi_cb_t *gcb, 

	udi_buf_t *new_dst_buf );
 

REFERENCES udi_buf_write


UDI Core Specification Contents