C++ Native Functions: com.ibm.streamsx.network.content

This page documents native functions that can be invoked from SPL, including the SPL interfaces that can be used to invoke each of the native functions.

Functions

public rstring EVENT()

This result function returns a string containing the name of the event that caused the output tuple to be produced. The value is one of 'FlowStart', 'FlowTLS', 'FlowData', 'FlowEnd', 'Request', 'Response', or 'FileChunk'.

public boolean EVENT_FILE_CHUNK()

This result function returns true if a chunk of a file within the current flow has been received, or false otherwise.

public boolean EVENT_FLOW_DATA()

This result function returns true if data for the current flow has been received, or false otherwise.

public boolean EVENT_FLOW_END()

This result function returns true if this is the last tuple of a flow, or false otherwise.

public boolean EVENT_FLOW_START()

This result function returns true if this is the first tuple of a new flow, or false otherwise.

public boolean EVENT_FLOW_TLS()

This result function returns true if this flow is encrypted using the TLS protocol, or false otherwise.

public boolean EVENT_REQUEST()

This result function returns true if request headers for a transaction within the current flow have been received, or false otherwise.

public boolean EVENT_RESPONSE()

This result function returns true if response headers for a transaction within the current flow flow have been received, or false otherwise.

public blob FILE_CHUNK_BINARY()

This result function returns the current chunk of the current file as a binary object, for 'FileChunk' events only. The function returns an empty 'blob' for all other events.

public uint64 FILE_CHUNK_COUNTER()

This result function returns a sequence number for this chunk of the current file, starting at zero, for 'FileChunk' events only. The function returns zero for all other events.

public boolean FILE_CHUNK_FINAL()

This result function returns true for the last chunk of the current file, for FileChunk events only, or false otherwise,

public boolean FILE_CHUNK_INITIAL()

This result function returns true for the first chunk of the curent file, for FileChunk events only, or false otherwise,

public uint64 FILE_CHUNK_LENGTH()

This result function returns the length of the current chunk of the current file, for 'FileChunk' events only. The function returns zero for all other events.

public uint64 FILE_CHUNK_LENGTH_SUM()

This result function returns the sum of the lengths of this and all preceding chunks of the current file, for 'FileChunk' events only. The function returns zero for all other events.

public rstring FILE_CHUNK_STRING()

This result function returns the current chunk of the current file as a string, for 'FileChunk' events only. The function returns an empty string for all other events.

public rstring FILE_CONTENT_CHARSET()

This result function returns the character set portion of the 'ContentType' header for the current file, if there is one, or an empty string if not.

public uint64 FILE_CONTENT_LENGTH()

This result function returns the value of the 'ContentLength' header for the current file, if there is one, or an empty string if not. Note that this value may be incorrect, if present, that is, the sum of the file chunks may be more or less than the length declared in the header.

public rstring FILE_CONTENT_TYPE()

This result function returns the value of the 'ContentType' header for the current file, if there is one, or an empty string if not.

public rstring FILE_FORMAT()

This result function returns the format of the current file, if there is one and the operator can determine it, or an empty string if not.

public uint64 FILE_ID()

This result function returns a unique numeric identifier for the current file. The same value is assigned to all events related to the file, and is not used again after the final chunk of the file, so applications can use this identifier to correlate all of the tuples related to it.

public uint64 FILE_ID_PARENT()

This result function returns the identifier of the file containing the current file, when the transaction contains a file containing other files, and the operator can decompose them, or zero if not.

public blob FLOW_DATA_BINARY()

This result function returns the flow data received as a binary object, for the 'FlowData' event only. The function returns an empty 'blob' for all other events in the flow.

public uint64 FLOW_DATA_COUNTER()

This result function returns a sequence number for the FlowData events within a particular flow, starting at zero for each new flow, as identified by the FLOW_ID() function.

public uint64 FLOW_DATA_LENGTH()

This result function returns the length of the flow data received, for the 'FlowData' event only. The function returns zero for all other events in the flow.

public rstring FLOW_DATA_STRING()

This result function returns the flow data received as a string, for the 'FlowData' event only. The function returns an empty string for all other events in the flow.

public rstring FLOW_DIRECTION()

This result function returns "SrcToDst" or "DstToSrc", where source and destination refer to the FLOW_xxxx_ADDRESS() functions, or "" if the operator cannot determine a direction.

public rstring FLOW_DISCONNECT_REASON()

This result function returns the reason a flow ended. The value is valid only for tuples emitted due to 'FlowEnd' events; an empty string is returned for all other events. The function may assign 'normal', 'clientAbort', 'serverAbort', 'shutdown', 'dataLoss', 'resources', or else '?' if the operator cannot determine why the flow ended.

public uint64 FLOW_DST_BYTES()

This result function returns the total number of bytes sent by the destination endpoint of the flow to the source endpoint, for the FlowEnd event only. The function returns zero for all other events in the flow.

public uint64 FLOW_DST_PACKETS()

This result function returns the total number of packets sent by the destination endpoint of the flow to the source endpoint, for the FlowEnd event only. The function returns zero for all other events in the flow.

public uint16 FLOW_DST_PORT()

This result function returns the UDP or TCP port number of the destination endpoint of this flow, if the flow's IP protocol is UDP or TCP, or zero otherwise.

public float64 FLOW_ELAPSED_TIME()

This result function returns the elapsed time of the flow in seconds, with a precision of microseconds, for the 'FlowEnd' event only. A value of zero is returned for all other events.

public float64 FLOW_END_TIME()

This result function returns the time when the flow ended, in seconds, relative to the beginning of the Unix epoch (midnight on January 1st, 1970 in Greenwich, England), with a precision of microseconds, for the 'FlowEnd' event only. A value of zero is returned for all other events.

public list<uint8>[6] FLOW_ETHER_DST_ADDRESS()

This result function returns the ethernet MAC address of the destination endpoint of this flow.

public list<uint8>[6] FLOW_ETHER_SRC_ADDRESS()

This result function returns the ethernet MAC address of the source endpoint of this flow.

public float64 FLOW_EVENT_TIME()

This result function returns the time of the current event, in seconds, relative to the beginning of the Unix epoch (midnight on January 1st, 1970 in Greenwich, England), with a precision of microseconds.

public uint64 FLOW_ID()

This result function returns a unique numeric identifier for the current flow. The same value is assigned to all events related to the flow, and is not used again after that flow's 'FlowEnd' event, so applications can use this identifier to correlate all of the tuples related to it.

public uint32 FLOW_IPV4_DST_ADDRESS()

This result function returns the IP version 4 address of the destination endpoint of this flow.

public uint32 FLOW_IPV4_SRC_ADDRESS()

This result function returns the IP version 4 address of the source endpoint of this flow.

public uint8 FLOW_IP_PROTOCOL()

This result function returns the value of the IP protocol field from the flow's IP headers, if it is an IP flow, or zero otherwise. For example, a value of '6' indicates that the flow uses the TCP protocol, and a value of '17' indicates that the flow uses the UDP protocol.

public rstring FLOW_PROTOCOL()

This result function returns the application protocol, if the operator can determine it, or an empty string if not. Its values are described in the file 'protocols.csv' in the toolkit.

public uint8 FLOW_PROTOCOL_CONFIDENCE()

This result function returns an integer from 1 to 3 indicating the operator's confidence in its identification of the application protocol (see the FLOW_PROTOCOL() result function), from 'low' to 'high', respectively.

public uint8 FLOW_PROTOCOL_DEPTH()

This result function returns a small value, usually between 0 and 7, indicating the nesting depth at which the application protocol (see the FLOW_PROTOCOL() result function) was identified.

public list<rstring> FLOW_REQUEST_HEADERS()

This result function returns the request headers of the current transaction of the current flow, if it has any, or an empty string if not.

public rstring FLOW_REQUEST_URI_AUTHORITY()

This result function returns the 'authority' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_FRAGMENT()

This result function returns the 'fragment' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_METHOD()

This result function returns the 'method' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_NORMALIZED()

This result function returns URI, the 'normalized' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_PATH()

This result function returns the 'path' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_QUERY()

This result function returns the 'query' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_RAW()

This result function returns the 'raw' URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_SCHEME()

This result function returns the 'scheme' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public rstring FLOW_REQUEST_URI_USERNAME()

This result function returns the 'username' portion of a URI, when the current transaction of the current flow has one, or an empty string if not.

public list<rstring> FLOW_RESPONSE_HEADERS()

This result function returns the response headers of the current transaction of the current flow, if it has any, or an empty string if not.

public uint32 FLOW_RESPONSE_STATUS_CODE()

This result function returns the response status code of the current transaction of the current flow, if it has any, or an empty string if not.

public uint64 FLOW_SRC_BYTES()

This result function returns the total number of bytes sent by the source endpoint of the flow to the destination endpoint, for the FlowEnd event only. The function returns zero for all other events in the flow.

public uint64 FLOW_SRC_PACKETS()

This result function returns the total number of packets sent by the source endpoint of the flow to the destination endpoint, for the FlowEnd event only. The function returns zero for all other events in the flow.

public uint16 FLOW_SRC_PORT()

This result function returns the UDP or TCP port number of the source endpoint of this flow, if the flow's IP protocol is UDP or TCP, or zero otherwise.

public float64 FLOW_START_TIME()

This result function returns the time when the flow started, in seconds, relative to the beginning of the Unix epoch (midnight on January 1st, 1970 in Greenwich, England), with a precision of microseconds.

public uint32 FLOW_TRANSACTION_ID()

This result function returns a unique numeric identifier for the current request/response pair within the current flow, when there is one, or zero if not. The same value is assigned to all events related to the transaction, and is not used again, so applications can use this identifier to correlate all of the tuples related to it.

public uint64 OPEN_FILES()

This result function returns the number of files that are open at the time the tuple is produced.

public uint64 OPEN_FILES_HIGH_WATER_MARK()

This result function returns the maximum number of files that were ever open simultaneously, since the operator started.

public uint64 OPEN_FLOWS()

This result function returns the number of flows that are open at the time the tuple is produced.

public uint64 OPEN_FLOWS_HIGH_WATER_MARK()

This result function returns the maximum number of flows that were ever open simultaneously, since the operator started.

public rstring TLS_RECORD_DIRECTION()

This result function returns the direction this TLS message is going, if the flow is encrypted with the 'transport-layer security' protocol, or an empty string if not.

public uint32 TLS_RECORD_LENGTH()

This result function returns the length of this TLS message, if the flow is encrypted with the 'transport-layer security' protocol, or '0' if not.

public boolean TLS_RECORD_MORE()

This result function indicates whether or not more TLS messages are coming, if the flow is encrypted with the 'transport-layer security' protocol, or false if not.

public uint32 TLS_RECORD_OFFSET()

This result function returns the offset of this TLS message, if the flow is encrypted with the 'transport-layer security' protocol, or '0' if not.

public rstring TLS_RECORD_TYPE()

This result function returns the type of TLS message found, if the flow is encrypted with the 'transport-layer security' protocol, or an empty string if not.

public rstring TLS_VERSION()

This result function returns the version of the TLS protocol being used, if the flow is encrypted with the 'transport-layer security' protocol, or an empty string if not.

public uint32 TUNNEL_IPV4_DST_ADDRESS()

This result function returns the IP version 4 address of the innermost destination endpoint within the tunnel.

public uint32 TUNNEL_IPV4_SRC_ADDRESS()

This result function returns the IP version 4 address of the innermost source endpoint within the tunnel.

public list<uint8>[16] TUNNEL_IPV6_DST_ADDRESS()

This result function returns the IP version 6 address of the innermost destination endpoint within the tunnel.

public list<uint8>[16] TUNNEL_IPV6_SRC_ADDRESS()

This result function returns the IP version 6 address of the innermost source endpoint within the tunnel.

public rstring TUNNEL_TYPE()

This result function returns characteristics of protocols found within another protocol. The TUNNEL_TYPE() function may assign "6IN4", "4IN6", "GRE", or "IP" if a tunnel is detected, or an empty string if not.