op_ici_attr_set_int64()

Abstract

Assigns the value of a 64-bit integer attribute in the specified ICI.

Syntax

op_ici_attr_set_int64 (iciptr, attr_name, value)
Argument Type Description
iciptr Ici * pointer to the ICI-of-interest
[A pointer to an ICI can be obtained from two KPs: op_ici_create() returns a pointer to a newly allocated ICI (in an ICI-sending process), and op_intrpt_ici() returns a pointer to an ICI associated with an incoming interrupt (in an ICI-receiving process).]
attr_name const char * name of the attribute-of-interest
value OpT_Int64 new value to assign to the specified attribute

Return Type

Compcode

OPC_COMPCODE_SUCCESS if the attribute value was successfully obtained; OPC_COMPCODE_FAILURE otherwise.

Example

OpT_Int64    dest_addr = 215;

/* Set this information in the interface control    */
/* information to be sent to the MAC layer.         */
if (op_ici_attr_set_int64 (intf_mac_req_iciptr, "dest_addr", dest_addr) == OPC_COMPCODE_FAILURE)
	fddi_gen_error ("Unable to set destination address in ICI", OPC_NIL, OPC_NIL);

Details

The specified attribute name must be one of the attributes defined in the ICI format that is the basis of the ICI pointed to by iciptr. Note that the value assigned by this KP will overwrite any value previously assigned to the attribute. In addition, the new value assigned to the attribute will be accessible to any other process which maintains a pointer to the ICI.

Purpose

Provides a mechanism for a process to set the contents of an ICI for communication to another process. This capability forms the “transmit” side of ICI-based communications between processes. Attributes can be set in a freshly created ICI (as in the case of a per-packet communication of parameters) or in an ICI that has already been sent to one or more target processes (as in the case of a persistent shared memory arrangement). Because the modified ICI might still be pointed to by its originating process, op_ici_attr_set_int64() can be used to set results that the originating process can then obtain via op_ici_attr_get_int64(). This type of two-way communication implemented with an ICI is typically implemented with the ICI accompanying a forced interrupt so that the originating process can obtain results immediately.

Errors

  • Program Abort: Segmentation violation. (due to an invalid ICI pointer, malformed ICI data structure, or incorrectly declared value argument).
  • Program Abort: KP requires process context.
  • Recoverable Error: Attribute name (<attr_name>) is unrecognized in ICI with format (<format_name>).

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com