repo_name
stringlengths 5
122
| path
stringlengths 3
232
| text
stringlengths 6
1.05M
|
|---|---|---|
j420247/ARO
|
5.0.0/ARO.Core/src/c/ARONetmoncap/NmApi.h
|
#pragma once
#ifndef __NM_API_HEADER__
#define __NM_API_HEADER__
#ifndef MAC_ADDRESS_SIZE
#define MAC_ADDRESS_SIZE 6
#endif
#ifndef NM_STATUS_API_VERSION_MISMATCHED
#define NM_STATUS_API_VERSION_MISMATCHED 0xE111000CL
#endif
const USHORT NMAPI_MAC_ADDRESS_SIZE = MAC_ADDRESS_SIZE;
const USHORT NMAPI_GUID_SIZE = 16;
///
/// <summary><c>NmCaptureFileMode</c>Network Monitor capture file expansion mode</summary>
/// <remarks>
/// </remarks>
typedef enum _NmCaptureFileMode : UINT32
{
NmCaptureFileWrapAround,
NmCaptureFileChain,
NmCaptureFileLastFlag
} NmCaptureFileMode;
///
/// <summary><c>NmCaptureCallbackExitMode</c>Capture callback function exit mode</summary>
/// <remarks>
/// NmCaptureStopAndDiscard - NmStopCapture/NmPauseCapture returns immediately user's capture callback function will not be called after
/// NmStopCapture/NmPauseCapture returns
/// </remarks>
typedef enum _NmCaptureCallbackExitMode : UINT32
{
NmDiscardRemainFrames = 1,
NmReturnRemainFrames = 2,
} NmCaptureCallbackExitMode;
///
/// <summary><c>NmAdapterOpState</c>Network Monitor driver adapter operational states</summary>
/// <remarks>
/// </remarks>
typedef enum _NmAdapterOpState
{
NmAdapterStateNone,
NmAdapterStateBound,
NmAdapterStateStopped,
NmAdapterStateCapturing,
NmAdapterStatePaused,
} NmAdapterOpState;
///
/// <summary><c>NmAdapterCaptureMode</c>Network Monitor driver adapter capture mode</summary>
/// <remarks>
/// </remarks>
typedef enum _NmAdapterCaptureMode
{
NmLocalOnly,
NmPromiscuous
} NmAdapterCaptureMode;
///
/// <summary><c>NM_FRAME_CALLBACK</c>Callback function definition for frame capturing</summary>
/// <remarks>
/// The user function must use __stdcall calling convention.
/// </remarks>
typedef VOID (CALLBACK *NM_FRAME_CALLBACK)(HANDLE hCaptureEngine,
ULONG ulAdapterIndex,
PVOID pCallerContext,
HANDLE hFrame);
///
/// <summary><c>NM_NPL_PARSER_CALLBACK</c>Callback function definition for parser compile, frame parsing process status</summary>
/// <remarks>
/// The user function must use __stdcall calling convention.
/// </remarks>
typedef VOID (CALLBACK *NM_NPL_PARSER_CALLBACK)(PVOID pCallerContext,
ULONG dwStatusCode,
LPCWSTR lpDescription,
ULONG ulType);
///
/// <summary><c>NmCallbackMsgType</c>Status levels of the call back message</summary>
/// <remarks>
/// </remarks>
typedef enum _NmCallbackMsgType
{
NmApiCallBackMsgTypeNone,
NmApiCallBackMsgTypeError,
NmApiCallBackMsgTypeWarning,
NmApiCallBackMsgTypeInformation,
NmApiCallBackMsgTypeLast
} NmCallbackMsgType;
///
/// <summary><c>NmNplParserLoadingOption</c>NPL loading option</summary>
/// <remarks>
/// By default the NmLoadNplOptionNone is used. Only the user specified NPL path(s) are loaded.
/// If both NmAppendRegisteredNplSets and a NPL path are specified, the resulting NPL parser will include
/// Both and the specified NPL path(s) are prefixed.
/// </remarks>
typedef enum _NmNplParserLoadingOption
{
NmLoadNplOptionNone,
NmAppendRegisteredNplSets
} NmNplParserLoadingOption;
///
/// <summary><c>NmFrameParserOptimizeOption</c>Frame parser optimization options</summary>
/// <remarks>
/// Options used when create frame parser.
/// </remarks>
typedef enum _NmFrameParserOptimizeOption
{
///
/// Create frame parser without optimization according to the added filter
///
NmParserOptimizeNone = 0,
///
/// Create frame parser optimized based on added filters, fields and properties
///
NmParserOptimizeFull = 1,
NmParserOptimizeLast
} NmFrameParserOptimizeOption;
///
/// <summary><c>NmFrameParsingOption</c>Frame parser parsing options</summary>
/// <remarks>
/// Options used by NmParseFrame function.
/// </remarks>
typedef enum _NmFrameParsingOption : UINT32
{
NmParsingOptionNone = 0,
///
/// Provide full path name of the current field if specified
///
NmFieldFullNameRequired = 1,
///
/// Provide the name of the protocol that contains the current field if specified
///
NmContainingProtocolNameRequired = 2,
///
/// Provide data type name of the current field
///
NmDataTypeNameRequired = 4,
///
/// Use caller specified frame number
///
NmUseFrameNumberParameter = 8,
///
/// Provide the display string of the field
///
NmFieldDisplayStringRequired = 16,
///
/// Provide the frame conversation information
///
NmFrameConversationInfoRequired = 32,
NmParsingOptionLast
} NmFrameParsingOption;
///
/// <summary><c>FRAME_PARSING_OPTION_MAX</c>The maximum value NmFrameParsingOption can be</summary>
/// <remarks>
/// If there are n flags defined, The NmParsingOptionLast is 2^n - 1. If n = 5, the constant is 63.
/// </remarks>
const UINT32 FRAME_PARSING_OPTION_MAX = ((NmParsingOptionLast - 1) * 2 - 1);
///
/// <summary><c>NmConversationOption</c>Frame parser conversation configuration options</summary>
/// <remarks>
/// </remarks>
typedef enum _NmConversationConfigOption : UINT32
{
NmConversationOptionNone,
NmConversationOptionLast
} NmConversationOption;
///
/// <summary><c>NmReassemblyOption</c>Frame parser reassembly configuration options</summary>
/// <remarks>
/// </remarks>
typedef enum _NmReassemblyConfigOption : UINT32
{
NmReassemblyOptionNone,
NmReassemblyOptionLast
} NmReassemblyOption;
///
/// <summary><c>NmFrameFragmentationType</c>Fragmentation types returned in parsed frames</summary>
/// <remarks>
/// </remarks>
typedef enum _NmFrameFragmentationType
{
FragmentTypeNone,
FragmentTypeStart,
FragmentTypeMiddle,
FragmentTypeEnd
} NmFrameFragmentationType;
/// <summary><c>NmParsedFieldProperty</c>The name string properties in parsed field</summary>
/// <remarks>
/// </remarks>
typedef enum _NmParsedFieldNames
{
NmFieldNamePath,
NmFieldDataTypeName,
NmFieldContainingProtocolName,
NmFieldDisplayString
} NmParsedFieldNames;
///
/// <summary><c>NmMvsKeyType</c>Key types of the multi-value storage property</summary>
/// <remarks>
/// The NmMvsKeyTypeNumber, NmMvsKeyTypeByteArray, NmMvsKeyTypeByteArray are the key types for retrieving the
/// Multi-value storage properties.
///
/// The NmMvsKeyTypeArrayIndex type is used as index value when retrieve property in the group property array.
/// </remarks>
typedef enum _NmMvsKeyType
{
NmMvsKeyTypeNone,
NmMvsKeyTypeNumber,
NmMvsKeyTypeString,
NmMvsKeyTypeByteArray,
NmMvsKeyTypeArrayIndex,
NmMvsKeyTypeLast
} NmMvsKeyType;
///
/// <summary>
/// <c>NmPropertyScope</c>
/// Scopes of properties. It is reported in the property info.
/// </summary>
/// <remarks>
/// </remarks>
///
typedef enum _NmPropertyScope
{
NmPropertyScopeNone = 0,
NmPropertyScopeConversation = 1,
NmPropertyScopeGlobal = 2,
NmPropertyScopeFrame = 4
} NmPropertyScope;
///
/// <summary>
/// <c>NmPropertyContainerType</c>
/// The property aggregation form.
/// The regular form is a single value of NmPropertyValueType that can be addressed by just property name.
/// The multi-value storage is a set of properties that share the same name but different keys.
/// The array is a set of properties that stored in array and retrieved by name and index.
/// An array property is in the regular form if there is only one element. The NmGetPropertyInfo may return
/// Container type NmPropertyContainerTypeValue if the key is not added along in NmAddProperty.
/// </summary>
/// <remarks>
/// </remarks>
///
typedef enum _NmPropertyContainerType
{
NmPropertyContainerTypeNone = 0,
NmPropertyContainerTypeValue,
NmPropertyContainerTypeMvs,
NmPropertyContainerTypeArray
} NmPropertyContainerType;
///
/// <summary>
/// <c>NmPropertyValueType</c>
/// Type of the property value.
/// </summary>
/// <remarks>
/// Number value is in signed or unsigned integer format
/// String value is in wide char format
/// Byte Blob is in byte array
///
/// The value type of properties, in the same multi value storage property addressed
/// By different keys or in the same property group by different indexes,
/// Can be different.
/// </remarks>
///
typedef enum _NmPropertyValueType
{
NmPropertyValueNone,
NmPropertyValueSignedNumber,
NmPropertyValueUnsignedNumber,
NmPropertyValueString,
NmPropertyValueByteBlob
} NmPropertyValueType, *PNmPropertyValueType;
///
/// <summary><c>NM_CAPTURE_STATISTICS</c></summary>
/// <remarks>
/// The statistics is per adapter in API. To get the totals for the whole engine, caller can
/// sum up all capturing adapters.
/// The EngineDropCount represents dropped frames caused by capture engine in user mode for each adapter.
/// </remarks>
typedef struct _NM_CAPTURE_STATISTICS
{
USHORT Size;
/// The frame drop count in driver
UINT64 DriverDropCount;
/// The count of frames that are filtered by driver.
UINT64 DriverFilteredCount;
/// The count of frames that have be seen in driver.
UINT64 DriverSeenCount;
/// The frame drop count in capture engine.
UINT64 EngineDropCount;
} NM_CAPTURE_STATISTICS,*PNM_CAPTURE_STATISTICS;
///
/// <summary><c>NM_PROPERTY_STORAGE_KEY</c></summary>
/// <remarks>
/// NM_PROPERTY_STORAGE_KEY is used with property name or id obtained from NmAddProperty.
/// KeyNumber, KeyString and KeyBuffer are for Multi-Value storage. The KeyLength is required for KeyBuffer.
/// ArrayIndex is for specifying the array index of the property group specified by NmMvsKeyTypeArrayIndex.
/// </remarks>
typedef struct _NM_PROPERTY_STORAGE_KEY
{
USHORT Size;
ULONG KeyLength;
NmMvsKeyType KeyType;
union
{
/// The numeric key for the property in the multi value storage
UINT64 KeyNumber;
/// The wide string key for the property in the multi value storage. It must be null terminated.
LPWSTR KeyString;
/// The key in the form of byte array for the property in the multi value storage
PBYTE KeyBuffer;
/// The index for the property in the property group
UINT64 ArrayIndex;
} Key;
} NM_PROPERTY_STORAGE_KEY, *PNM_PROPERTY_STORAGE_KEY;
///
/// Contains runtime information for instantiated properties
///
typedef struct _NM_PROPERTY_INFO
{
/// For version control
USHORT Size;
/// Property Scope
NmPropertyScope Scope;
/// Property container type, e.g., MVS, Array.
NmPropertyContainerType ContainerType;
/// The element count of the name excluding the terminator.
/// When no name buffer is provided, i.e., Name parameter is NULL, NameSize is only used as output
/// Parameter that returns the actual name length.
/// When the name buffer is provided, the NameSize are both input and output parameters.
/// The NameSize acts as a input parameter specifying the buffer length. The name's actual length
/// Is also returned by NmGetPropertyInfo.
USHORT NameSize;
/// Property string added by NmAddProperty. If a buffer is assigned when call NmGetPropertyInfo,
/// The NameSize must specify the buffer length (in element count.) NmGetPropertyInfo returns the
/// Property Name in the buffer if the buffer has enough space. Or buffer over flow error is returned.
LPWSTR Name;
/// The data type of the property. If the value type is string, the terminator is not included.
NmPropertyValueType ValueType;
/// The size of the value in BYTE. If the value type is string, the terminator is excluded.
ULONG ValueSize;
/// number of items in Array. The regular an multi-value storage properties have only one item
ULONG ItemCount;
} NM_PROPERTY_INFO, *PNM_PROPERTY_INFO;
/// <summary><c>NM_FRAGMENTATION_INFO</c>Fragmentation information returned in parsed frames</summary>
/// <remarks>
/// </remarks>
typedef struct _NM_FRAGMENTATION_INFO
{
USHORT Size;
WCHAR FragmentedProtocolName[MAX_PATH];
WCHAR PayloadProtocolName[MAX_PATH];
NmFrameFragmentationType FragmentType;
} NM_FRAGMENTATION_INFO, *PNM_FRAGMENTATION_INFO;
///
/// <summary><c>NM_NIC_ADAPTER_INFO</c> Contain adapter information.</summary>
/// <remarks>
/// </remarks>
///
typedef struct _NM_NIC_ADAPTER_INFO
{
USHORT Size;
UCHAR PermanentAddr[MAC_ADDRESS_SIZE];
UCHAR CurrentAddr[MAC_ADDRESS_SIZE];
NDIS_MEDIUM MediumType;
NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
WCHAR ConnectionName[MAX_PATH];
WCHAR FriendlyName[MAX_PATH];
WCHAR Guid[MAX_PATH];
///
/// Network adapter operational state. Indicates if the network adapter is bound, capturing, pause or stopped
///
NmAdapterOpState OpState;
///
/// Indicates if the network adapter is enabled or disabled. It only can be enabled if it is bound to the Network Monitor driver
///
BOOL Enabled;
BOOL PModeEnabled;
///
/// Frame indication callback is assigned per adapter
///
NM_FRAME_CALLBACK CallBackFunction;
} NM_NIC_ADAPTER_INFO, *PNM_NIC_ADAPTER_INFO;
///
/// <summary><c>NM_API_CONFIGURATION</c>Contain all configurable API parameters</summary>
/// <remarks>
/// </remarks>
///
typedef struct _NM_API_CONFIGURATION
{
///
/// Caller sets the member 'Size' when pass in allocated buffer
///
USHORT Size;
///
/// Configurable limits that overwrite default API settings
///
ULONG RawFrameHandleCountLimit;
ULONG ParsedFrameHandleCountLimit;
ULONG CaptureEngineHandleCountLimit;
ULONG NplParserHandleCountLimit;
ULONG FrameParserConfigHandleCountLimit;
ULONG FrameParserHandleCountLimit;
ULONG CaptureFileHandleCountLimit;
///
/// API threading mode for COM initialization. Only support COINIT_MULTITHREADED and COINIT_APARTMENTTHREADED
///
COINIT ThreadingMode;
///
/// Configurable default feature/behavior parameters
///
NmConversationOption ConversationOption;
NmReassemblyOption ReassemblyOption;
NmCaptureFileMode CaptureFileMode;
NmFrameParsingOption FrameParsingOption;
NmCaptureCallbackExitMode CaptureCallbackExitMode;
///
/// Hard limits the API enforce (not configurable)
///
ULONG MaxCaptureFileSize;
ULONG MinCaptureFileSize;
/// Maximum number of handles per handle type
ULONG MaxApiHandleLimit;
} NM_API_CONFIGURATION, *PNM_API_CONFIGURATION;
///
/// <summary><c>NM_PROTOCOL_SEQUENCE_CONFIG</c>Data structure for API user to specify NPL properties and fields
/// For frame order correction support.
/// </summary>
/// <remarks>
/// </remarks>
///
typedef struct _NM_PROTOCOL_SEQUENCE_CONFIG
{
///
/// API verifies the member 'Size' against the size of its version. They must match.
///
USHORT Size;
///
/// The names of the properties containing the values to form the key
/// to identify the group of the frames to get in order. If multiple names are used,
/// They are separated by semicolons. The string must be NULL terminated.
///
LPWSTR GroupKeyString;
///
/// The name of the property containing the frame's sequence number.
///
LPWSTR SequencePropertyString;
///
/// The name of the property containing the frame's next sequence number.
///
LPWSTR NextSequencePropertyString;
} NM_PROTOCOL_SEQUENCE_CONFIG, *PNM_PROTOCOL_SEQUENCE_CONFIG;
///
/// <summary><c>NM_OPEN_CAP_PARAMETER</c>Data structure for calling NmOpCaptureFileInOrder</summary>
///
/// <remarks>
/// </remarks>
///
typedef struct _NM_ORDER_PARSER_PARAMETER
{
///
/// API verifies the member 'Size' against the size of its version. They must match.
///
USHORT Size;
///
/// The frame parser used for handling out of order frames. It must be built from a frame parser
/// Configuration that has sequence information specified by NM_PROTOCOL_SEQUENCE_CONFIG.
///
HANDLE FrameParser;
///
/// For future option flags.
///
ULONG Option;
} NM_ORDER_PARSER_PARAMETER, *PNM_ORDER_PARSER_PARAMETER;
///
/// <summary><c>NM_PARSED_DATA_FIELD</c> Return structure contains the parsed field.</summary>
/// <remarks>
/// Returned to caller from NmGetParsedFieldInfo function
/// </remarks>
///
typedef struct _NM_PARSED_FIELD_INFO
{
///
/// API verifies the member 'Size' against the size of its version. They must match.
///
USHORT Size;
USHORT FieldIndent;
///
/// The size of the string that holds the full path of the data field if the NmFrameParseOptions
/// NmFieldFullNameRequired is set, e.g., Frame.Ethernet.IPv4.SourceAddress; Otherwise it is the size
/// of the current field name only
///
USHORT NamePathLength;
///
/// The size of the string that contains the name of the NPL data type if the NmFrameParseOptions
/// NmDataTypeNameRequired is set, e.g., L"UINT16"; Otherwise it is zero.
///
USHORT NplDataTypeNameLength;
///
/// The size of the string that contains the protocol containing the field if the NmFrameParseOptions
/// NmContainingProtocolNameRequired is set; Otherwise it is zero
///
USHORT ProtocolNameLength;
///
/// The size of the display string of the field if the NmFrameParseOptions
/// NmFieldDisplayStringRequired is set; Otherwise it is zero
///
USHORT DisplayStringLength;
///
/// Offset in current protocol
///
ULONG ProtocolBitOffset;
///
/// Field offset in frame
///
ULONG FrameBitOffset;
///
/// Length of the field in bits
///
ULONG FieldBitLength;
///
/// The variant type defined as in VARENUM
///
USHORT ValueType;
///
/// The size of the buffer required to hold the field value represented in VARIANT struct including
/// The length of the content if the VARIANT contains a pointer to ARRAY or string.
///
USHORT ValueBufferLength;
} NM_PARSED_FIELD_INFO, *PNM_PARSED_FIELD_INFO;
///
/// <summary><c>NM_PARSED_FIELD_INFO_EX</c> Return structure contains the parsed field.information</summary>
/// <remarks>
/// Returned to caller from NmGetParsedFieldInfoEx function
/// </remarks>
///
typedef struct _NM_PARSED_FIELD_INFO_EX
{
///
/// API verifies the member 'Size' against the size of its version. They must match.
///
USHORT Size;
USHORT FieldIndent;
///
/// The size of the string that holds the full path of the data field if the NmFrameParseOptions
/// NmFieldFullNameRequired is set, e.g., Frame.Ethernet.IPv4.SourceAddress; Otherwise it is the size
/// of the current field name only
///
USHORT NamePathLength;
///
/// The size of the string that contains the name of the NPL data type if the NmFrameParseOptions
/// NmDataTypeNameRequired is set, e.g., L"UINT16"; Otherwise it is zero.
///
USHORT NplDataTypeNameLength;
///
/// The size of the string that contains the protocol containing the field if the NmFrameParseOptions
/// NmContainingProtocolNameRequired is set; Otherwise it is zero
///
USHORT ProtocolNameLength;
///
/// The size of the display string of the field if the NmFrameParseOptions
/// NmFieldDisplayStringRequired is set; Otherwise it is zero
///
USHORT DisplayStringLength;
///
/// Offset in current protocol
///
ULONG ProtocolBitOffset;
///
/// Field offset in frame
///
ULONG FrameBitOffset;
///
/// Length of the field in bits
///
ULONG FieldBitLength;
///
/// The variant type defined as in VARENUM
///
USHORT ValueType;
///
/// The size of the buffer required to hold the field value represented in VARIANT struct including
/// The length of the content if the VARIANT contains a pointer to ARRAY or string.
///
ULONG ValueBufferLength;
} NM_PARSED_FIELD_INFO_EX, *PNM_PARSED_FIELD_INFO_EX;
///
/// <summary><c>NM_TIME</c>Data structure for NmGetFrameTimeStampEx and NmBuildRawFrameFromBufferEx function</summary>
///
/// <remarks>
/// </remarks>
///
typedef struct _NM_TIME
{
///
/// Size of structure that is set by the caller.
///
DWORD NmTimeStampSize;
///
/// UTC Time Stamp.
///
FILETIME TimeStamp;
///
/// TRUE if the time is originally UTC. FALSE if the time was local and converted to UTC.
///
BOOL IsUTC;
///
/// TRUE if the time zone information exists.
///
BOOL HasTZI;
///
/// Time zone information for the frame.
/// If TRUE == isUTC and TRUE == hasTZI, TZI contains correct time zone information
/// If TRUE == isUTC and FALSE == hasTZI, TZI does not contain time zone information
/// if FALSE == isUTC and FALSE == hasTZI, Time stamp is originally local time and converted to UTC using LocalFileTimeToFileTime(). TZI does not contain time zone information.
/// If FALSE == isUTC and TRUE == hasTZI, At the moment, there is no scenario to be this case.
TIME_ZONE_INFORMATION TZI;
} NM_TIME, *PNM_TIME;
//////////////////////////////////////////////
///
///NmApi function declarations
///
//////////////////////////////////////////////
/// <summary><c>NmGetApiVersion</c>Query current version</summary>
/// <remarks>
/// The API version matches Network Monitor engine version.
/// </remarks>
/// <example> This sample shows how to call the NmGetApiVersion method.
/// <code>
/// USHORT majorNumber = 0;
/// USHORT minorNumber = 0;
/// USHORT BuildNumber = 0;
/// USHORT RevisionNumber = 0;
/// NmGetApiVersion(&majorNumber, &minorNumber, &BuildNumber, &RevisionNumber);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="Major">[out] Major version number</param>
/// <param name="Minor">[out] Minor version number</param>
/// <param name="Build">[out] Build number</param>
/// <param name="Revision">[out] Revision number</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>Return nothing</returns>
extern "C" VOID WINAPI NmGetApiVersion(__out PUSHORT Major, __out PUSHORT Minor, __out PUSHORT Build, __out PUSHORT Revision);
/// <summary><c>NmGetApiConfiguration</c>Return current API configuration parameters</summary>
/// <remarks>
/// Caller provides the non-null pointer of the NM_API_CONFIGURATION struct.
/// </remarks>
/// <example> This sample shows how to call the NmGetApiConfiguration method.
/// <code>
/// NM_API_CONFIGURATION apiConfiguration;
/// apiConfiguration.Size = sizeof(NM_API_CONFIGURATION);
/// NmGetApiConfiguration(&apiConfiguration);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pConfiguration">[out] Struct pointer for API to fill</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// NM_API_VERSION_MISMATCHED: The version of NM_API_CONFIGURATION struct is different
/// ERROR_BAD_ARGUMENTS: pConfiguration is NULL.
/// </returns>
extern "C" ULONG WINAPI NmGetApiConfiguration(__in PNM_API_CONFIGURATION pConfiguration);
/// <summary><c>NmApiInitialize</c>Overwrite default configuration.</summary>
/// <remarks>
/// Caller needs to provide storage for NM_API_CONFIGURATION struct.
/// </remarks>
/// <example> This sample shows how to call the NmApiInitialize method.
/// <code>
/// ULONG status = ERROR_SUCCESS;
/// NM_API_CONFIGURATION apiConfig;
/// apiConfig.Size = sizeof(NM_API_CONFIGURATION);
/// // specify all configuration parameters before call
/// status = NmApiInitialize(&apiConfig);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ApiConfig">[in] Caller specified API configuration parameter struct</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// NM_API_VERSION_MISMATCHED: The version of NM_API_CONFIGURATION struct is different
/// ERROR_INVALID_STATE: Cannot change API configuration
/// </returns>
extern "C" ULONG WINAPI NmApiInitialize(__in_opt PNM_API_CONFIGURATION ApiConfig);
/// <summary><c>NmApiClose</c>Release API resources</summary>
/// <remarks>
/// Should be called when done with the API
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// </returns>
extern "C" ULONG WINAPI NmApiClose();
/// <summary><c>NmOpenCaptureEngine</c>Open a capture engine</summary>
/// <remarks>
///
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="phCaptureEngine">[out] The returned handle to the capture engine object on success</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_INVALID_STATE: The operation is not available.
/// ERROR_NOT_ENOUGH_MEMORY: Fail to allocate memory for the object.
/// </returns>
extern "C" ULONG WINAPI NmOpenCaptureEngine(__out PHANDLE phCaptureEngine);
/// <summary><c>NmGetAdapterCount</c>Return number of the adapters that the capture engine can access</summary>
/// <remarks>
///
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The capture engine under query</param>
/// <param name="pulCount">[out] The returned count of adapters</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found capture engine specified
/// </returns>
extern "C" ULONG WINAPI NmGetAdapterCount(__in HANDLE hCaptureEngine , __out PULONG pulCount);
/// <summary><c>NmGetAdapter</c>Get adapter information from the capture engine</summary>
/// <remarks>
/// Caller can use name, GUID etc. to select adapter to use. The adapter index should be within the
/// Range returned by NmGetAdapterCount method. Caller needs to provide the storage of the
/// NM_FRAME_CALLBACK struct.
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The handle of the capture engine object</param>
/// <param name="ulIndex">[in] The index number of the adapter to retrieve</param>
/// <param name="pNMAdapterInfo">[out] The returned adapter information struct</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: Either the capture engine or the adapter indicated by index is not found.
/// NM_API_VERSION_MISMATCHED: The version of NM_NIC_ADAPTER_INFO struct is different
/// </returns>
extern "C" ULONG WINAPI NmGetAdapter(__in HANDLE hCaptureEngine, __in ULONG ulIndex, __out PNM_NIC_ADAPTER_INFO pNMAdapterInfo);
/// <summary><c>NmConfigAdapter</c>Configure the adapter with the frame indication callback and the caller context.</summary>
/// <remarks>
/// The current callback function and context will overwrite the previous ones. The adapter index number
/// Must be in the range returned from NmGetAdapterCount method.
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The handle to the target capture engine</param>
/// <param name="ulIndex">[in] The index number of the target adapter</param>
/// <param name="CallbackFunction">[in] The frame indication callback function pointer to set</param>
/// <param name="pCallerContext">[in] The caller context pointer</param>
/// <param name="ExitMode">[in] The callback function exit mode</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_NOT_FOUND: Either the capture engine or the adapter is not found.
/// </returns>
extern "C" ULONG WINAPI NmConfigAdapter(__in HANDLE hCaptureEngine,
__in ULONG ulIndex,
__in NM_FRAME_CALLBACK CallbackFunction,
__in PVOID pCallerContext,
__in NmCaptureCallbackExitMode ExitMode = NmDiscardRemainFrames);
/// <summary><c>NmStartCapture</c>Start capture on the specified capture engine and adapter</summary>
/// <remarks>
/// Capture mode can be PMODE and LocalOnly.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The handle to the target capture engine</param>
/// <param name="ulAdapterIndex">[in] The index number of the target adapter</param>
/// <param name="CaptureMode">[in] The capture mode, PMODE or LOCAL_ONLY</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_NOT_FOUND: not found capture engine or adapter specified
/// ERROR_INVALID_STATE: Cannot pause at current state
/// </returns>
extern "C" ULONG WINAPI NmStartCapture(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex, __in NmAdapterCaptureMode CaptureMode);
/// <summary><c>NmPauseCapture</c>Pause the capture</summary>
/// <remarks>
///
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The handle to the target capture engine</param>
/// <param name="ulAdapterIndex">[in] The index number of the target adapter</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_INVALID_STATE: Cannot pause at current state
/// ERROR_NOT_FOUND: not found capture engine or adapter specified
/// </returns>
extern "C" ULONG WINAPI NmPauseCapture(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex);
/// <summary><c>NmResumeCapture</c>Resume the capture that is previously paused</summary>
/// <remarks>
/// Cannot resume after NmStopCapture is called. The frame indication callback is no longer invoked
/// Until NmResumeCapture method is called
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The handle to the target capture engine</param>
/// <param name="ulAdapterIndex">[in] The index number of the target adapter</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_INVALID_STATE: Cannot resume at current state
/// ERROR_NOT_FOUND: not found capture engine or adapter specified
/// </returns>
extern "C" ULONG WINAPI NmResumeCapture(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex);
/// <summary><c>NmStopCapture</c>Stop capture on given capture engine and adapter</summary>
/// <remarks>
/// The frame indication callback is no longer invoked.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The handle to the target capture engine</param>
/// <param name="ulAdapterIndex">[in] The index number of the target adapter</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_INVALID_STATE: Cannot stop at current state
/// ERROR_NOT_FOUND: not found capture engine or adapter specified
/// </returns>
extern "C" ULONG WINAPI NmStopCapture(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex);
//////////////////////////////////////////////////////
/// Parsing functions
//////////////////////////////////////////////////////
/// <summary><c>NmLoadNplParser</c>Load NPL scripts and create NPL parser</summary>
/// <remarks>
/// Callback function is invoked for compile error/warning/info.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pFileName">[in] The start parser script file name</param>
/// <param name="ulFlags">[in] Option flags</param>
/// <param name="CallbackFunction">[in] The parser compiler error callback function pointer</param>
/// <param name="pCallerContext">[in] The caller context pointer that will be passed back to the callback function</param>
/// <param name="phNplParser">[Out] The returned handle to the NPL parser object</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: Fail to create NPL parser object
/// </returns>
extern "C" ULONG WINAPI NmLoadNplParser(__in LPCWSTR pFileName,
__in NmNplParserLoadingOption ulFlags,
__in NM_NPL_PARSER_CALLBACK CallbackFunction,
__in PVOID pCallerContext,
__out PHANDLE phNplParser);
/// <summary><c>NmCreateFrameParserConfiguration</c>Create frame parser configuration that contains the filter and field configuration</summary>
/// <remarks>
/// All the frame parser features including conversation and reassembly must be added in the configuration before creating the frame parser.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hNplParser">[in] The handle of the NPL parser used for the frame parser</param>
/// <param name="CallbackFunction">[in] The compiler error callback function pointer</param>
/// <param name="pCallerContext">[in] The caller context pointer that will be passed back to the callback function</param>
/// <param name="phFrameParserConfiguration">[out] The returned handle of the frame parser configuration object</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: Fail to create frame parser configuration object.
/// ERROR_NOT_FOUND: not found specified NPL parser
///
/// </returns>
extern "C" ULONG WINAPI NmCreateFrameParserConfiguration(__in HANDLE hNplParser,
__in NM_NPL_PARSER_CALLBACK CallbackFunction,
__in PVOID pCallerContext,
__out PHANDLE phFrameParserConfiguration);
/// <summary><c>NmAddFilter</c>Add filter for optimizing frame parser</summary>
/// <remarks>
/// The filter id is used to evaluate the state of the filter on a parsed frame.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the target frame parser configuration object</param>
/// <param name="pFilterString">[in] The text of the filter</param>
/// <param name="pulFilterId">[out] The returned filter index in the frame parser</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// </returns>
extern "C" ULONG WINAPI NmAddFilter(__in HANDLE hFrameParserConfiguration, __in LPCWSTR pFilterString, __out PULONG pulFilterId);
/// <summary><c>NmAddField</c>Add field for optimizing frame parser</summary>
/// <remarks>
/// All the fields are enumerated in the parsed frame if no field is added. The field id is used to retrieve the field
/// In the parsed frame. Caller needs to provide unique fully qualified field name, e.g., TCP.Option.Ack.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the target frame parser configuration object</param>
/// <param name="pFilterString">[in] The text of the field</param>
/// <param name="pulFilterId">[out] The returned field index in the frame parser</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// </returns>
extern "C" ULONG WINAPI NmAddField(__in HANDLE hFrameParserConfiguration, __in LPCWSTR pFqfnString, __out PULONG pulFieldId);
/// <summary><c>NmAddProperty</c>Add a property to the configuration.</summary>
/// <remarks>
/// The property name should have scope prefix such as Conversation, Global, etc. If not specified,
/// The frame property is the default scope.
/// The multi-value storage property name can contain the key, e.g., Property.myMvs$[key] as in NPL parser. The key can be number, string or other property name.
/// The array property name can contain the index, e.g., Global.myArray[3] as in NPL parser.
/// </remarks>
/// <example> This sample shows how to call the NmAddProperty method.
/// <code>
/// HANDLE hFrameParserConfiguration;
/// ULONG myPropID;
/// NmAddProperty(hFrameParserConfiguration, L"Property.TCPPayloadLength", &myPropID);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] Frame Parser Configuration Handle</param>
/// <param name="pPropertyString">[in] Fully qualified name of the property.</param>
/// <param name="pulPropertyId">[out] Returned ID used to reference the property.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// ERROR_INVALID_PARAMETER: The specified property name is invalid
/// </returns>
extern "C" ULONG WINAPI NmAddProperty(__in HANDLE hFrameParserConfiguration, __in LPCWSTR pPropertyString, __out PULONG pulPropertyId);
/// <summary><c>NmAddSequenceOrderConfig</c>Add protocol sequence order configurations</summary>
/// <remarks>
/// The protocol sequence configuration includes the properties that define the related protocols' sequence control data such
/// As TCP sequence number.
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfig">[in] Caller provided sequence configuration data</param>
/// <param name="pSeqConfig">[in] Caller provided sequence configuration data</param>
/// <param name="pulConfigId">[out] The retrieval ID of the configuration added to the frame parser configuration</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: Fail to allocate memory to store the configuration.
/// </returns>
extern "C" ULONG WINAPI NmAddSequenceOrderConfig(__in HANDLE hFrameParserConfig,
__in PNM_PROTOCOL_SEQUENCE_CONFIG pSeqConfig,
__out PULONG pulConfigId);
/// <summary><c>NmConfigReassembly</c>Enable or disable reassembly</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the target frame parser configuration object</param>
/// <param name="Option">[in] Reassembly options</param>
/// <param name="bEnable">[in] Action to take, enable or disable</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// </returns>
extern "C" ULONG WINAPI NmConfigReassembly(__in HANDLE hFrameParserConfiguration, __in NmReassemblyOption Option, __in BOOL bEnable);
/// <summary><c>NmConfigConversation</c>Configure conversation options</summary>
/// <remarks>
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the target frame parser configuration object</param>
/// <param name="Option">[in] conversation configuration options</param>
/// <param name="bEnable">[in] Action to take, enable or disable</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// </returns>
extern "C" ULONG WINAPI NmConfigConversation(__in HANDLE hFrameParserConfiguration, __in NmConversationOption Option, __in BOOL bEnable);
/// <summary><c>NmConfigStartDataType</c>Configure start data type</summary>
/// <remarks>
/// By default, the frame parser starts parsing a frame from the Network Monitor built-in protocol "Frame".
/// This function lets the caller set the data type to start at. This is useful for parsing an arbitrary
/// Data buffer with a frame parser starting from the data type that is configured with this function.
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the target frame parser configuration object</param>
/// <param name="pStartDataTypeName">[in] The name of the data type that the created frame parser starts with</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// ERROR_INSUFFICIENT_BUFFER: The given start type name is longer than 260 characters.
/// </returns>
extern "C" ULONG WINAPI NmConfigStartDataType(__in HANDLE hFrameParserConfiguration, __in LPCWSTR pStartDataTypeName);
/// <summary><c>NmGetStartDataType</c>Return the start data type of the given frame parser configuration</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the target frame parser configuration object</param>
/// <param name="ulBufferLength">[in] Caller buffer length</param>
/// <param name="pStartDataTypeName">[out] Caller buffer to hold the name of the data type that the created frame parser starts with</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// ERROR_INSUFFICIENT_BUFFER: The truncated name is in provided buffer
/// </returns>
extern "C" ULONG WINAPI NmGetStartDataType(__in HANDLE hFrameParserConfiguration,
__in ULONG ulBufferELength,
__out_ecount(ulBufferELength) LPWSTR pStartDataTypeName);
/// <summary><c>NmCreateFrameParser</c>Create frame parser from given configuration</summary>
/// <remarks>
/// The optimization option is set to NmParserOptimizeNone by default that no optimization is applied.
/// The existing native applications do not need to recompile. The new application can take advantage of this flag to
/// Force optimization in the scenario where no field is added. Without this option, the caller can only get a non-optimized
/// Parser so that all the fields are included in the parsed frame. With this option, an optimized frame parser can be
/// generated to serve the dedicated filtering scenarios.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParserConfiguration">[in] The handle of the source frame parser configuration object</param>
/// <param name="phFrameParser">[out] The returned handle of the frame parser</param>
/// <param name="OptimizeOption">[in] The optimization flag for creating the frame parser</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser configuration
/// </returns>
extern "C" ULONG WINAPI NmCreateFrameParser(__in HANDLE hFrameParserConfiguration,
__out PHANDLE phFrameParser,
__in NmFrameParserOptimizeOption OptimizeOption = NmParserOptimizeNone);
/// <summary><c>NmParseFrame</c>Parse the raw Network Monitor frame and return it in parsed format</summary>
/// <remarks>
/// The parsed frame contains the frame information, filter state and enumeration of fields. When reassembly is
/// Enabled, the last fragment of the payload completing the reassembly process and insert the reassembled raw frame.
/// The ulFrameNumber parameter is for conversation or global properties if using frame number as the key. If the same
/// Frame number is used for different frames, the properties' values may be overwritten by the last instance.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] The handle of the frame parser used to parse the given raw frame object</param>
/// <param name="hRawFrame">[in] The handle of the target raw frame to parser</param>
/// <param name="ulFrameNumber">[in] The frame number should be used in parsing process if enabled by option flag</param>
/// <param name="ulOption">[in] See flag definition NmFrameParsingOption</param>
/// <param name="phParsedFrame">[out] The handle to the result parsed frame object</param>
/// <param name="InsertedRawFrameCount">[out] the handle of the inserted raw frame object as the result of parsing, e.g., reassembly</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser or raw frame
/// </returns>
extern "C" ULONG WINAPI NmParseFrame(__in HANDLE hFrameParser,
__in HANDLE hRawFrame,
__in ULONG ulFrameNumber,
__in ULONG ulOption,
__out PHANDLE phParsedFrame,
__out PHANDLE phInsertedRawFrame);
/// <summary><c>NmParseBuffer</c>Parse the given data buffer and return it in parsed format</summary>
/// <remarks>
/// The data buffer contains the byte array that can be a raw frame, part of raw frame or any arbitrary data.
/// The parsed frame contains the fabricated frame information. The filter state and enumeration of field are supported.
/// The inter frame reassembly is not supported since it requires multiple frames and conversation that are
/// Not available in buffer mode.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] The handle of the frame parser used to parse the Given frame object</param>
/// <param name="pDataBuffer">[in] The pointer to the target data buffer</param>
/// <param name="ulBufferLength">[in] length of the data buffer in previous parameter</param>
/// <param name="ulFrameNumber">[in] The frame number should be used in parsing process if enabled by option flag</param>
/// <param name="ulOption">[in] See flag definition NmFrameParsingOption</param>
/// <param name="phParsedFrame">[out] The handle to the result parsed frame object</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser or raw frame
/// </returns>
extern "C" ULONG WINAPI NmParseBuffer(__in HANDLE hFrameParser,
__in_ecount(ulBufferLength) PBYTE pDataBuffer,
__in ULONG ulBufferLength,
__in ULONG ulFrameNumber,
__in ULONG ulOption,
__out PHANDLE phParsedFrame);
/// <summary><c>NmBuildRawFrameFromBuffer</c>Build a raw frame using a given data buffer</summary>
/// <remarks>
/// The data buffer is transformed to a raw frame object. The media type, time stamp are optional. Their default
/// Values are zero.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pDataBuffer">[in] The pointer to the target data buffer</param>
/// <param name="ulBufferLength">[in] length of the data buffer in previous parameter</param>
/// <param name="ulMedia">[in] Media type of the target raw frame</param>
/// <param name="ullTimeStamp">[in] Capture time stamp of the target raw frame</param>
/// <param name="phRawFrame">[out] The handle to the result parsed frame object</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: No space to build the new frame
/// </returns>
extern "C" ULONG WINAPI NmBuildRawFrameFromBuffer(
__in_ecount(ulBufferLength) PBYTE pDataBuffer,
__in ULONG ulBufferLength,
__in ULONG ulMedia,
__in UINT64 ullTimeStamp,
__out PHANDLE phRawFrame);
/// <summary><c>NmBuildRawFrameFromBufferEx</c>Build a raw frame using a given data buffer</summary>
/// <remarks>
/// Same as NmBuildRawFrameFromBuffer but stores time zone information
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pDataBuffer">[in] The pointer to the target data buffer</param>
/// <param name="ulBufferLength">[in] length of the data buffer in previous parameter</param>
/// <param name="ulMedia">[in] Media type of the target raw frame</param>
/// <param name="pTime">[in] Capture time information of the target raw frame</param>
/// <param name="phRawFrame">[out] The handle to the result parsed frame object</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: No space to build the new frame
/// </returns>
extern "C" ULONG WINAPI NmBuildRawFrameFromBufferEx(
__in_ecount(ulBufferLength) PBYTE pDataBuffer,
__in ULONG ulBufferLength,
__in ULONG ulMedia,
__in PNM_TIME pTime,
__out PHANDLE phRawFrame);
/// <summary><c>NmGetFrameFragmentInfo</c>Return fragment information of the given parsed frame</summary>
/// <remarks>
/// Raw frame does not aware of its fragment type. Only parsing the frame can tell when reassembly is enabled.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="pFragmentationInfo">[out] Caller provided struct pointer</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame
/// ERROR_INSUFFICIENT_BUFFER: If the protocol name length is longer than the buffer in PNmReassemblyInfo struct
/// </returns>
extern "C" ULONG WINAPI NmGetFrameFragmentInfo(__in HANDLE hParsedFrame, __out PNM_FRAGMENTATION_INFO pFragmentationInfo);
/// <summary><c>NmGetFilterCount</c>Return configured filter count in the given frame parser</summary>
/// <remarks>
///
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] frame parser under inspection</param>
/// <param name="pulFilterCount">[out] number of filters of the given frame parser. It is zero if return code is not success</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser
/// </returns>
extern "C" ULONG WINAPI NmGetFilterCount(__in HANDLE hFrameParser, __out PULONG pulFilterCount);
/// <summary><c>NmEvaluateFilter</c>Return the state of specified filter in given parsed frame</summary>
/// <remarks>
///
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame to evaluate</param>
/// <param name="ulFilterId">[in] The identify number of the filter</param>
/// <param name="pbPassFilter">[out] The filter evaluation result. TRUE means pass; FALSE means not pass</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame
/// </returns>
extern "C" ULONG WINAPI NmEvaluateFilter(__in HANDLE hParsedFrame, __in ULONG ulFilterId, __out PBOOL pbPassFilter);
/// <summary><c>NmGetFieldCount</c>Return number of fields enumerated in the given parsed frame</summary>
/// <remarks>
///
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target frame</param>
/// <param name="pulFieldCount">[out] The number of fields returned in parsed frame</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame
/// </returns>
extern "C" ULONG WINAPI NmGetFieldCount(__in HANDLE hParsedFrame, __out PULONG pulFieldCount);
/// <summary><c>NmGetParsedFieldInfo</c>Return the field information of a parsed frame specified by field index number</summary>
/// <remarks>
/// The pointer to field is valid until the parsed frame containing the field is closed.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field to get</param>
/// <param name="ulOption">[in] The retrieve flag</param>
/// <param name="pParsedFieldInfo">[out] The pointer to the parsed field buffer</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// ERROR_ARITHMETIC_OVERFLOW: The field length is greater than 65535
/// NM_STATUS_API_VERSION_MISMATCHED: The pParsedFieldInfo.Size is not initialized or it is different from the version of the API version.
/// </returns>
extern "C" ULONG WINAPI NmGetParsedFieldInfo(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __in ULONG ulOption, __out PNM_PARSED_FIELD_INFO pParsedFieldInfo);
/// <summary><c>NmGetParsedFieldInfoEx</c>Return the field information of a parsed frame specified by field index number</summary>
/// <remarks>
/// The pointer to field is valid until the parsed frame containing the field is closed.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field to get</param>
/// <param name="ulOption">[in] The retrieve flag</param>
/// <param name="pParsedFieldInfo">[out] The pointer to the parsed field buffer</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// NM_STATUS_API_VERSION_MISMATCHED: The pParsedFieldInfo.Size is not initialized or it is different from the version of the API version.
/// </returns>
extern "C" ULONG WINAPI NmGetParsedFieldInfoEx(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __in ULONG ulOption, __out PNM_PARSED_FIELD_INFO_EX pParsedFieldInfoEx);
/// <summary><c>NmGetFieldName</c>Return the names of the parsed field specified by field id</summary>
/// <remarks>
/// ulBufferLength is element count.
/// </remarks>
/// <example> Description
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field to get</param>
/// <param name="RequestedName">[in] The enum to select intended name property</param>
/// <param name="ulBufferLength">[in] The length of caller provided buffer length</param>
/// <param name="pBuffer">[out] The caller provided buffer</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// ERROR_INSUFFICIENT_BUFFER: If ulBufferLength is shorted than the name length
/// </returns>
extern "C" ULONG WINAPI NmGetFieldName(__in HANDLE hParsedFrame,
__in ULONG ulFieldId,
__in NmParsedFieldNames RequestedName,
__in ULONG ulBufferElementCount,
__out_ecount(ulBufferElementCount)LPWSTR pNameBuffer);
/// <summary><c>NmGetFieldOffsetAndSize</c>Return the offset and size of the field specified by field id</summary>
/// <remarks>
/// The returned field size is in unit of bit
/// </remarks>
/// <example> Description
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="pulFieldOffset">[out] The pointer to the returned field offset</param>
/// <param name="pulFieldSize">[out] The pointer to the returned field size</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// </returns>
extern "C" ULONG WINAPI NmGetFieldOffsetAndSize(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __out PULONG pulFieldOffset, __out PULONG pulFieldSize);
/// <summary><c>NmGetFieldValueNumber8Bit</c>Return number type field value</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="pubNumber">[out] The value of the requested field</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// </returns>
extern "C" ULONG WINAPI NmGetFieldValueNumber8Bit(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __out PUINT8 pubNumber);
/// <summary><c>NmGetFieldValueNumber16Bit</c>Return number type field value</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="puiNumber">[out] The value of the requested field</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// </returns>
extern "C" ULONG WINAPI NmGetFieldValueNumber16Bit(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __out PUINT16 puiNumber);
/// <summary><c>NmGetFieldValueNumber32Bit</c>Return number type field value</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="pulNumber">[out] The value of the requested field</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// </returns>
extern "C" ULONG WINAPI NmGetFieldValueNumber32Bit(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __out PUINT32 pulNumber);
/// <summary><c>NmGetFieldValueNumber64Bit</c>Return number type field value</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="pullNumber">[out] The value of the requested field</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// </returns>
extern "C" ULONG WINAPI NmGetFieldValueNumber64Bit(__in HANDLE hParsedFrame, __in ULONG ulFieldId, __out PUINT64 pullNumber);
/// <summary><c>NmGetFieldValueByteArray</c>Return byte array type field value</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="ulLength">[in] The size of the array in byte</param>
/// <param name="pByteBuffer">[out] The value of the requested field</param>
/// <param name="pulReturnLength">[out] The number of bytes returned in the buffer</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// ERROR_INSUFFICIENT_BUFFER: Not enough space in buffer, data is not copied
/// ERROR_RESOURCE_NOT_AVAILABLE: The field is a container so the content is not available
/// </returns>
extern "C" ULONG WINAPI NmGetFieldValueByteArray(__in HANDLE hParsedFrame,
__in ULONG ulFieldId,
__in ULONG ulLength,
__out_ecount_part(ulLength, *pulReturnLength) PBYTE pByteBuffer,
__out PULONG pulReturnLength);
/// <summary><c>NmGetFieldValueString</c>Return string array type field value</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="ulElementLength">[in] The size of string buffer in element unit</param>
/// <param name="pString">[out] The value of the requested field</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// ERROR_INSUFFICIENT_BUFFER: Not enough space in buffer, partial sting is copied.
/// </returns>
extern "C" ULONG WINAPI NmGetFieldValueString(__in HANDLE hParsedFrame,
__in ULONG ulFieldId,
__in ULONG ulElementLength,
__out_ecount(ulElementLength) LPWSTR pString);
/// <summary><c>NmGetFieldInBuffer</c>Get the field in user provided buffer </summary>
/// <remarks>
/// Only the content up to the buffer length is copied. Caller may call NmGetFieldOffsetAndSize to get the size
/// Before calling this function with proper buffer length. Or call this function twice if first time failed with
/// ERROR_INSUFFICIENT_BUFFER status. Allocate new buffer length according to the return length.
///
/// All fields with values can be retrieved. The return data is in the same order as it on wire.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] The handle of the target parsed frame</param>
/// <param name="ulFieldId">[in] The identify number of the field</param>
/// <param name="ulBufferLength">[in] The length of caller provided buffer</param>
/// <param name="pFieldBuffer">[out] caller provided buffer</param>
/// <param name="pulReturnLength">[out] actual number of byte copied</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified parsed frame or field
/// ERROR_INSUFFICIENT_BUFFER: Not enough space in buffer, data is not copied.
/// </returns>
extern "C" ULONG WINAPI NmGetFieldInBuffer(__in HANDLE hParsedFrame,
__in ULONG ulFieldId,
__in ULONG ulBufferLength,
__out_ecount_part(ulBufferLength, *pulReturnLength) PBYTE pFieldBuffer,
__out PULONG pulReturnLength);
/// <summary><c>NmGetRequestedPropertyCount</c>Get the number of properties added to the parser.</summary>
/// <remarks>
/// None.
/// </remarks>
/// <example> This sample shows how to call the NmGetRequestedPropertyCount method.
/// <code>
/// HANDLE hFrameParser;
/// ULONG propertyCount = 0;
/// NmGetRequestedPropertyCount(hFrameParser, &propertyCount);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] Frame Parser Handle</param>
/// <param name="pulCount">[out] Count of properties added to this frame configuration.</param>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle, wrong scope or NULL pointer
/// ERROR_NOT_FOUND: not found specified frame parser
/// </returns>
extern "C" ULONG WINAPI NmGetRequestedPropertyCount(__in HANDLE hFrameParser, __out PULONG pulCount);
/// <summary><c>NmGetPropertyInfo</c>Return info structure for a specific property by ID.</summary>
/// <remarks>
/// When the property container type is multi-value storage, the value type and size may be unknown if the property name added does not contain the key.
/// Since the size is unknown, the caller may need to call the retrieval function twice with the proper buffer of required size returned by the
/// Retrieval function which first returned ERROR_INSUFFICIENT_BUFFER. The same is true for array properties when the index in not included in the property string.
///
/// If the property container type is unknown, the property is not available for retrieval.
/// </remarks>
/// <example> This sample shows how to call the NmGetParsedPropertyInfo method.
/// <code>
/// HANDLE hFrameParser;
/// ULONG PropertyId;
/// PNM_PROPERTY_INFO PropertyInfo;
///
/// PropertyInfo.Size = sizeof(NmPropertyInfo);
/// NmGetPropertyInfo(hFrameParser, PropertyId, &PropertyInfo);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] Frame Parser Configuration Handle</param>
/// <param name="ulPropertyId">[in] ID of the property returned from NmAddProperty</param>
/// <param name="pInfo">[out] Count of properties added to this frame configuration.</param>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified property
/// NM_STATUS_API_VERSION_MISMATCHED: NM_PARSED_PROPERTY_INFO version mismatch checked by struct size.
/// </returns>
extern "C" ULONG WINAPI NmGetPropertyInfo(__in HANDLE hFrameParser, __in ULONG ulPropertyId, __out PNM_PROPERTY_INFO pInfo);
/// <summary><c>NmGetPropertyValueById</c>Return property value by ID.</summary>
/// <remarks>
/// The Key for multi-value storage properties or Index for array properties must not provide both the property name and key index array.
/// The key type must match the type used in NPL parser.
/// If no key is added, set ulKeyCount to zero.
/// </remarks>
/// <example> This sample shows how to call the NmGetPropertyValueById.
/// <code>
/// 1. REGULAR PROPERTY VALUE RETRIEVAL EXAMPLE:
///
/// HANDLE hFrameParser;
/// ULONG myPropertyID = 1;
/// WCHAR retPropertyValue[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueById( myFrameParser,
/// myPropertyID,
/// MAX_PATH,
/// retPropertyValue,
/// &returnLength,
/// &propertyType);
///
/// 2. ARRAY PROPERTY VALUE RETRIEVAL EXAMPLE:
///
/// HANDLE hFrameParser;
/// ULONG myNameTableID = 2;
/// PNM_PROPERTY_STORAGE_KEY myKey;
/// myKey.Size = Sizeof(PNM_PROPERTY_STORAGE_KEY);
/// myKey.KeyType = NmMvsKeyTypeArrayIndex;
/// myKey.ArrayIndex = 5;
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueById( myFrameParser,
/// myNameTableID,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &propertyType,
/// 1,
/// myKey);
///
/// 3. MVS PROPERTY RETRIEVAL EXAMPLE:
///
/// HANDLE hFrameParser;
/// ULONG myNameTableID = 3;
/// PNM_PROPERTY_STORAGE_KEY myKey;
/// myKey.Size = Sizeof(PNM_PROPERTY_STORAGE_KEY);
/// myKey.KeyType = NmMvsKeyTypeString;
/// myKey.KeyString = L"192.168.1.1";
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueById( myFrameParser,
/// myNameTableID,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &propertyType,
/// 1,
/// myKey);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] Frame Parser Handle</param>
/// <param name="ulPropertyId">[in] ID of the property returned from NmAddProperty</param>
/// <param name="ulBufferSize">[in] Size of the buffer supplied in byte count.</param>
/// <param name="pBuffer">[out] Buffer for returned data.</param>
/// <param name="pulReturnLength">[out] Size of the data returned.</param>
/// <param name="pType">[out] Value type of the returned MVS property.</param>
/// <param name="ulKeyCount">[in] Number of keys provided</param>
/// <param name="pKeyArray">[in] key Array to look up in MVS and property group </param>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified property
/// ERROR_INSUFFICIENT_BUFFER: Not enough space in buffer, data is not copied. The required length is returned.
/// </returns>
extern "C" ULONG WINAPI NmGetPropertyValueById(__in HANDLE hFrameParser,
__in ULONG ulPropertyId,
__in ULONG ulBufferSize,
__out_ecount_part(ulBufferSize, *pulReturnLength) PBYTE pBuffer,
__out PULONG pulReturnLength,
__out PNmPropertyValueType pType,
__in ULONG ulKeyCount = 0,
__in PNM_PROPERTY_STORAGE_KEY pKeyArray = NULL);
/// <summary><c>NmGetPropertyValueByName</c>Return property value by Name.</summary>
/// <remarks>
/// The property is not necessarily added to the frame parser configuration if a non-optimized frame parser is used. In this case, the property id is not available and the
/// The property name can be used. The full qualified name must be used as to add the property to the frame parser configuration.
/// The key type for multi-value storage must match the type used in NPL parser.
/// </remarks>
/// <example> This sample shows how to call the NmGetPropertyValueByName.
/// <code>
/// 1. REGULAR PROPERTY VALUE RETRIEVAL EXAMPLE:
///
/// HANDLE hFrameParser;
/// LPWSTR myPropertyName = L"Global.IamReguler";
/// WCHAR retPropertyValue[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueByName( myFrameParser,
/// myPropertyName,
/// MAX_PATH,
/// retPropertyValue,
/// &returnLength,
/// &propertyType);
///
/// 2. GROUP PROPERTY VALUE RETRIEVAL EXAMPLE:
///
/// HANDLE hFrameParser;
/// ULONG myGroupName = L"Conversation.IamPropertyGroup";
/// PNM_PROPERTY_STORAGE_KEY myKey;
/// myKey.Size = Sizeof(PNM_PROPERTY_STORAGE_KEY);
/// myKey.KeyType = NmMvsKeyTypeArrayIndex;
/// myKey.ArrayIndex = 5;
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueByName( myFrameParser,
/// myGroupName,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &propertyType,
/// 1,
/// myKey);
///
/// 3. MVS PROPERTY RETRIEVAL EXAMPLE:
///
/// HANDLE hFrameParser;
/// ULONG myName = L"Property.IamMvs";
/// PNM_PROPERTY_STORAGE_KEY myKey;
/// myKey.Size = Sizeof(PNM_PROPERTY_STORAGE_KEY);
/// myKey.KeyType = NmMvsKeyTypeNumber;
/// myKey.KeyNumber = 2048;
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueByName( myFrameParser,
/// myName,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &propertyType,
/// 1,
/// myKey);
///
/// 4. MVS PROPERTY RETRIEVAL EXAMPLE 2 (KEY SPECIFIED IN NAME STRING):
///
/// HANDLE hFrameParser;
/// ULONG myName = L"Property.IamMvs$[1000, "\MyId\"]";
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// NmPropertyValueType propertyType;
/// NmGetPropertyValueByName( myFrameParser,
/// myName,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &propertyType);
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrameParser">[in] Frame Parser Handle</param>
/// <param name="pPropertyName">[in] full qualified name of the property </param>
/// <param name="ulBufferSize">[in] Size of the buffer supplied in byte count.</param>
/// <param name="pBuffer">[out] Buffer for returned data.</param>
/// <param name="pulReturnLength">[out] Size of the data returned.</param>
/// <param name="pType">[out] Value type of the returned MVS property.</param>
/// <param name="ulKeyCount">[in] Number of keys provided</param>
/// <param name="pKeyArray">[in] key Array to look up in MVS and property group </param>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified property
/// ERROR_INSUFFICIENT_BUFFER: Not enough space in buffer, data is not copied. The required length is returned.
/// </returns>
extern "C" ULONG WINAPI NmGetPropertyValueByName(__in HANDLE hFrameParser,
__in LPCWSTR pPropertyName,
__in ULONG ulBufferSize,
__out_ecount_part(ulBufferSize, *pulReturnLength) PBYTE pBuffer,
__out PULONG pulReturnLength,
__out PNmPropertyValueType pType,
__in ULONG ulKeyCount = 0,
__in PNM_PROPERTY_STORAGE_KEY pKeyArray = NULL);
/// <summary><c>NmGetRawFrameLength</c>Return length of the raw frame</summary>
/// <remarks>
///
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrame">[in] The handle of the target raw frame</param>
/// <param name="pulLength">[out] Frame length</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified raw frame
/// </returns>
extern "C" ULONG WINAPI NmGetRawFrameLength(__in HANDLE hFrame, __out PULONG pulLength);
/// <summary><c>NmGetRawFrame</c>Copy raw frame to the buffer</summary>
/// <remarks>
/// The frame buffer is valid until the raw frame is closed.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hRawFrame">[in] The handle of the target raw frame</param>
/// <param name="ulLength">[in] Caller Frame buffer length in byte</param>
/// <param name="pFrameBuffer">[out] caller frame data buffer</param>
/// <param name="pulReturnLength">[out] actual number of byte copied</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified raw frame
/// ERROR_INSUFFICIENT_BUFFER: Not enough space in buffer, partial data is copied.
/// </returns>
extern "C" ULONG WINAPI NmGetRawFrame(__in HANDLE hRawFrame,
__in ULONG ulLength,
__out_ecount_part(ulLength, *pulReturnLength) PBYTE pFrameBuffer,
__out PULONG pulReturnLength);
/// <summary><c>NmGetPartialRawFrame</c>Return partial frame data in caller provided buffer</summary>
/// <remarks>
/// Use caller provided offset and buffer length to copy the frame data.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrame">[in] The handle of the target raw frame</param>
/// <param name="ulFrameOffset">[in] Start offset to copy</param>
/// <param name="ulBufferLength">[in] Caller buffer length, the Number of bytes to copy</param>
/// <param name="pFrameBuffer">[out] Caller provided buffer</param>
/// <param name="pulReturnLength">[out] actual number of byte copied</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified raw frame
/// </returns>
extern "C" ULONG WINAPI NmGetPartialRawFrame(__in HANDLE hRawFrame,
__in ULONG ulFrameOffset,
__in ULONG ulBufferLength,
__out_ecount_part(ulBufferLength, *pulReturnLength) PBYTE pFrameBuffer,
__out PULONG pulReturnLength);
/// <summary><c>NmGetFrameMacType</c>Return MAC type of the frame</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrame"> [in] The handle of a parsed or a raw frame object</param>
/// <param name="pulMacType"> [out] The pointer to the MAC type of the frame</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_INVALID_PARAMETER: hFrame is not a parsed or a raw frame handle.
/// ERROR_NOT_FOUND: not found specified frame
/// </returns>
extern "C" ULONG WINAPI NmGetFrameMacType(__in HANDLE hFrame, __out PULONG pulMacType);
/// <summary><c>NmGetFrameTimeStamp</c>Return the local time stamp of the frame</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrame"> [in] The handle of a parsed or a raw frame object</param>
/// <param name="pTimeStamp"> [out] The pointer to the local time stamp of the frame.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_INVALID_PARAMETER: hFrame is not a parsed or a raw frame handle.
/// ERROR_NOT_FOUND: not found specified frame
/// </returns>
extern "C" ULONG WINAPI NmGetFrameTimeStamp(__in HANDLE hFrame, __out PUINT64 pTimeStamp);
/// <summary><c>NmGetFrameTimeStampEx</c>Return the extended time information of the capture</summary>
/// <remarks>
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrame"> [in] The handle of a parsed or a raw frame object</param>
/// <param name="pTime"> [out] The pointer to the NM_TIME of the frame</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_INVALID_PARAMETER: hFrame is not a parsed or a raw frame handle.
/// ERROR_NOT_FOUND: not found specified frame
/// </returns>
extern "C" ULONG WINAPI NmGetFrameTimeStampEx(__in HANDLE hFrame, __out PNM_TIME pTime);
/// <summary><c>NmGetFrameCommentInfo</c>Return the frame comment title and description</summary>
/// <remarks>
/// If the buffers passed in are NULL, the buffer length arguments will indicate the required lengths.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hFrame"> [in] The handle of the raw frame object></param>
/// <param name="pulTitleBufferLength"> [inout] The pointer to the actual byte length that corresponds to the title buffer</param>
/// <param name="pTitleBuffer"> [out] Caller supplied buffer to hold the comment title</param>
/// <param name="pulDescriptionBufferLength"> [inout] The pointer to the actual byte length that corresponds to the description buffer</param>
/// <param name="pDescriptionBuffer"> [out] Caller supplied buffer to hold the comment description</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: Specified parsed frame not found
/// ERROR_INSUFFICIENT_BUFFER: If either of the supplied buffers is shorter than the content to retrieve.
/// ERROR_EMPTY: Frame comment information was not found
/// </returns>
extern "C" ULONG WINAPI NmGetFrameCommentInfo(__in HANDLE hFrame,
__inout PULONG pulTitleBufferLength,
__out_ecount(*pulTitleBufferLength) PBYTE pTitleBuffer,
__inout PULONG pulDescriptionBufferLength,
__out_ecount(*pulDescriptionBufferLength) PBYTE pDescriptionBuffer);
//////////////////////////////////////////////////////
/// Capture file functions
/////////////////////////////////////////////////////
/// <summary><c>NmCreateCaptureFile</c> Create a new Network Monitor capture file for adding frames.</summary>
/// <remarks>
/// This is the capture file to write to. Close it by calling NmCloseObjHandle method.
/// The file can be opened in 2 modes specified by Flags, wrap around (default) and chain capture.
/// </remarks>
/// <example> Description
/// <code>
///
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pFileName">[in] The name of the file to create</param>
/// <param name="ulSize">[in] The maximum size of the file in byte. The hard limit is 500 MByte</param>
/// <param name="ulFlags">[in] Specify the file modes, wrap-round or chain capture</param>
/// <param name="phCaptureFile">[out] The returned handle to the capture file object if successful</param>
/// <param name="pulReturnSize">[out] The actual size of the returned file in byte.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: not enough memory to build required objects.
/// </returns>
extern "C" ULONG WINAPI NmCreateCaptureFile(__in LPCWSTR pFileName,
__in ULONG ulSize,
__in ULONG ulFlags,
__out PHANDLE phCaptureFile,
__out PULONG pulReturnSize);
/// <summary><c>NmOpenCaptureFile</c> Open a Network Monitor capture file to read</summary>
/// <remarks>
/// The file is read only. Close capture file by calling NmCloseObjHandle method.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pFileName">[in] The name of the file to open</param>
/// <param name="phCaptureFile">[out] The returned handle of the capture file object if successful</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointer
/// ERROR_NOT_FOUND: not found specified file
/// ERROR_NOT_ENOUGH_MEMORY: not enough memory to build required objects.
/// </returns>
extern "C" ULONG WINAPI NmOpenCaptureFile(__in LPCWSTR pFileName, __out PHANDLE phCaptureFile);
/// <summary><c>NmOpenCaptureFileInOrder</c> Open a Network Monitor capture file to read. The out of sequence frames are put in order </summary>
/// <remarks>
/// The file is read only. Close capture file by calling NmCloseObjHandle method.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pFileName">[in] The name of the file to open</param>
/// <param name="pOrderParser">[in] The frame parser configured with sequence parameters to handle out of order frames</param>
/// <param name="phCaptureFile">[out] The returned handle of the capture file object if successful</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointer
/// ERROR_NOT_FOUND: not found specified file
/// ERROR_INVALID_PARAMETER: frame parser does not have sequence configuration.
/// ERROR_NOT_ENOUGH_MEMORY: not enough memory to build required objects.
/// NM_STATUS_API_VERSION_MISMATCHED: PNM_ORDER_PARSER_PARAMETER version does not match.
/// </returns>
extern "C" ULONG WINAPI NmOpenCaptureFileInOrder(__in LPCWSTR pFileName, __in PNM_ORDER_PARSER_PARAMETER pOrderParser, __out PHANDLE phCaptureFile);
/// <summary><c>NmAddFrame</c> Add a frame to the specified capture file.</summary>
/// <remarks>
/// The target capture file must be opened with NmCreateCaptureFile method
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureFile">[in] The destination capture file for the frame</param>
/// <param name="hFrame">[in] The frame to add</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle
/// ERROR_NOT_FOUND: not found specified file or frame
/// </returns>
extern "C" ULONG WINAPI NmAddFrame(__in HANDLE hCaptureFile, __in HANDLE hFrame);
/// <summary><c>NmGetFrameCount</c> Get frame count in the specified capture file</summary>
/// <remarks>
///
/// </remarks>
/// <exception>None</exception>
/// <param name="hCaptureFile">[in] The target capture file under query</param>
/// <param name="pFrameCount">[out] Return frame count</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified capture file
/// </returns>
extern "C" ULONG WINAPI NmGetFrameCount(__in HANDLE hCaptureFile, __out PULONG pFrameCount);
/// <summary><c>NmGetFrame</c> Get frame by number from the specified capture file.</summary>
/// <remarks>
/// The frame number is the index number in the capture file.
/// </remarks>
/// <exception>None</exception>
/// <param name="hCaptureFile">[in] Handle to the capture file</param>
/// <param name="ulFrameNumber">[in] Frame number in the capture file to retrieve</param>
/// <param name="phFrame">[out] The returned handle to the raw frame object if successful</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: Frame handle is valid
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_FOUND: not found specified capture file or frame
/// </returns>
extern "C" ULONG WINAPI NmGetFrame(__in HANDLE hCaptureFile, __in ULONG ulFrameNumber, __out PHANDLE phFrame);
/// <summary><c>NmCloseHandle</c> Release the reference to the object by handle</summary>
/// <remarks>
/// Callers need to close all the object handles returned from API after finish using them.
/// </remarks>
/// <exception>None</exception>
/// <param name="hObjectHandle"> Handle to the object to release </param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>Void</returns>
extern "C" VOID WINAPI NmCloseHandle(__in HANDLE hObjectHandle);
//////////////////////////////////////////////
///
/// Conversation Info
///
/// <summary><c>NmGetTopConversation</c>Return the top level conversation and protocol name.</summary>
/// <remarks>
/// The frame parsed used to parse the frame must have conversation configured as TRUE.
///
/// The protocol name length is returned to caller. So if the provided buffer is not enough, caller
/// Can call again with the proper sized buffer accordingly.
/// </remarks>
/// <example> This sample shows how to call the NmGetTopConversation method.
/// <code>
/// HANDLE hParsedFrame;
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// NmGetTopConversation(hParsedFrame,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &conversationId);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] Parsed Frame</param>
/// <param name="ulBufferESize">[in] Size of the for protocol name in WCHAR.</param>
/// <param name="pProtocolName">[out] Buffer for protocol name.</param>
/// <param name="pulProtocolNameLength">[out] Not include terminator in WCHAR.</param>
/// <param name="pulConversationID">[out] ID of the TOP Level Conversation</param>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_INSUFFICIENT_BUFFER: Insufficient buffer space
/// ERROR_NOT_FOUND: not found specified parsed frame or the conversation.
/// </returns>
extern "C" ULONG WINAPI NmGetTopConversation(__in HANDLE hParsedFrame,
__in ULONG ulBufferESize,
__out_ecount_part(ulBufferESize, *pulProtocolNameLength) LPWSTR pProtocolName,
__out PULONG pulProtocolNameLength,
__out PULONG pulConversationID);
/// <summary><c>NmGetParentConversation</c>Return parent conversation information of the given conversation.</summary>
/// <remarks>
/// The frame parsed used to parse the frame must have conversation configured as TRUE.
///
/// The parent protocol name length is returned to caller. So if the provided buffer is not enough, caller
/// Can call again with the proper sized buffer.
/// </remarks>
/// <example> This sample shows how to call the NmGetParentConversation method.
/// <code>
/// HANDLE myParsedFrame;
/// ULONG protocolId = 24;
/// WCHAR retName[MAX_PATH];
/// ULONG returnLength;
/// ULONG parentConvID;
/// NmGetParentConversation(myParsedFrame,
/// protocolId,
/// MAX_PATH,
/// retName,
/// &returnLength,
/// &parentConvID);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hParsedFrame">[in] Parsed Frame</param>
/// <param name="ulConversationID">[in] ID of the Conversation you want the parent of.</param>
/// <param name="ulBufferESize">[in] Buffer size for the Parent protocol name in WCHAR count.</param>
/// <param name="pParentProtocolName">[out] Buffer for the Parent Protocol Name. </param>
/// <param name="pulParentProtocolNameLength">[out] Returned Length of Parent Protocol Name in WCHAR.</param>
/// <param name="pulParentConversationID">[out] Size of the for protocol name.</param>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_INSUFFICIENT_BUFFER: Insufficient buffer space
/// ERROR_NOT_FOUND: not found specified frame parser or the conversation.
/// </returns>
extern "C" ULONG WINAPI NmGetParentConversation(__in HANDLE hParsedFrame,
__in ULONG ulConversationId,
__in ULONG ulBufferESize,
__out_ecount_part(ulBufferESize, *pulParentProtocolNameLength) LPWSTR pParentProtocolNameBuffer,
__out PULONG pulParentProtocolNameLength,
__out PULONG pulParentConversationID);
/// <summary><c>NmNplProfileAttribute</c></summary>
/// <remarks>
/// The NmNplProfileAttribute enumeration is used to select which string the profile should return when
/// using the SetNplProfileAttribute and GetNplProfileAttribute methods.
/// </remarks>
typedef enum _NmNplProfileAttribute
{
NmNplProfileAttributeName,
NmNplProfileAttributeGuid,
NmNplProfileAttributeDescription,
NmNplProfileAttributeIncludePath,
NmNplProfileAttributeDirectory,
NmNplProfileAttributePackageName,
NmNplProfileAttributePackageVersion,
NmNplProfileAttributePackageGuid,
NmNplProfileAttributeDependencies,
NmNplProfileAttributeTypeDescription,
} NmNplProfileAttribute;
/// <summary><c>NmLoadWithNplProfile</c>Create frame parser using the provided Guid for an NPL profile</summary>
/// <remarks>
/// The ulFlags is reserved for future options.
/// </remarks>
/// <example>
/// <code>
/// /*
/// * Callback for Parser load information and errors
/// */
///void MyParserErrorCallback(PVOID pCallerContext,
/// ULONG dwStatusCode,
/// LPCWSTR lpDescription,
/// ULONG ulMsgType)
///{
/// // Determine the type of message this callback refers to
/// switch(ulMsgType)
/// {
/// case NmApiCallBackMsgTypeError:
/// fwprintf(stdout, L" Error: ");
/// break;
/// case NmApiCallBackMsgTypeWarning:
/// fwprintf(stdout, L" Warning:");
/// break;
/// case NmApiCallBackMsgTypeInformation:
/// fwprintf(stdout, L" Info: ");
/// break;
/// default:
/// fwprintf(stdout, L" Unknown:");
/// break;
/// }
/// fwprintf(stdout, L" %s - status = 0x%x\n", lpDescription, dwStatusCode);
///}
//
///void AttemptToCompile()
///{
/// HANDLE nplParser;
/// ULONG status = ERROR_SUCCESS;
/// status = NmLoadWithProfile(L"AD161723-4281-4d33-804E-5E43EE61D163", 0L, MyParserErrorCallback, NULL, &nplParser);
/// if (status != ERROR_SUCCESS)
/// {
/// fwprintf(stdout, L"Could not load parser\n");
/// return;
/// }
///}
/// </code>
/// </example>
/// <exception>None</exception>
/// <param name="pProfileGuid">[in] The GUID of the profile to use.</param>
/// <param name="ulFlags">[in] Option flags</param>
/// <param name="CallbackFunction">[in] The compiler error callback function pointer</param>
/// <param name="pCallerContext">[in] The caller context pointer that will be passed back to the callback function</param>
/// <param name="phNplParser">[Out] The returned handle to the NPL parser object</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: Successfully compiled NPL
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer
/// ERROR_NOT_ENOUGH_MEMORY: Fail to create frame parser configuration object.
/// ERROR_NOT_FOUND: The given profile GUID does not exist.
/// ERROR_NO_MATCH: the provided GUID does not exist.
/// </returns>
extern "C" ULONG WINAPI NmLoadWithNplProfile(
__in LPCWSTR pProfileGuid,
__in NmNplParserLoadingOption ulFlags,
__in NM_NPL_PARSER_CALLBACK CallbackFunction,
__in PVOID pCallerContext,
__out PHANDLE phNplParser );
/// <summary><c>NmCreateNplProfile</c>adds a profile given using given parameters.</summary>
/// <remarks>
/// This method allows developers to create profiles much like when the UI builds a profile.
/// The simplest case does not provide the optional argument TemplateID. In this case, a new profile is
/// created using the paths that have been provided. No sparser is generated, and no directories are formed.
/// The include path must be provided in this case.
///
/// The more complex case provides a TemplateID that corresponds to an existing profile. The include path for
/// the existing profile will be duplicated for the new profile (which is why the provided IncludePath is
/// ignored in this case). Profiles created in this way will have a directory created using the GUID of the
/// profile if successful. When these profiles are deleted, all files present in the created directory will
/// also be removed. Template profiles gain an additional search path to the user's local APPDATA as well
/// as an explicit include my_sparser.npl in the generated sparser.npl.
/// </remarks>
/// <example>
/// <code>
///
/// // Building a blank profile.
/// ULONG status = NmCreateNplProfile( L"ProfileTest00-1", L"This profile is created, verified, and deleted.",
/// L"c:\\somePath", L"MyGuid" );
///
/// // Building a profile from a template using the GUID of a previously existing profile.
/// ULONG status = NmCreateNplProfile( L"ProfileTest00-2", L"This profile is created from another profile.",
/// NULL, L"MyGuid2", L"AD161723-4281-4d33-804E-5E43EE61D163" );
///
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="Name">[in] The name of the profile. </param>
/// <param name="Description">[in] The description of the profile. </param>
/// <param name="IncludePath">[in] A semicolon delimited list of the paths to search in when building parsers.
/// This argument is not used when a templateID is provided.</param>
/// <param name="Guid">[in] The GUID for the profile.</param>
/// <param name="TemplateID">[in] Optional. Defaults to NULL. If provided, the newly created profile will be
/// built as a template of the given profile. </param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: Successfully added the profile.
/// ERROR_ALREADY_ASSIGNED: The provided GUID is already present.
/// ERROR_BAD_ARGUMENTS: The include path should be provided.
/// ERROR_NO_MATCH: The provided TemplateID does not exist.
/// </returns>
extern "C" ULONG WINAPI NmCreateNplProfile(
__in LPCWSTR Name,
__in LPCWSTR Description,
__in LPCWSTR IncludePath,
__in LPCWSTR Guid,
__in LPCWSTR templateID = NULL );
/// <summary><c>NmGetNplProfileAttribute</c>Retrieves the profile attribute using the index of the profile.</summary>
/// <remarks>
/// This method can be used to retrieve an attribute value as a string for a given profile. If the given buffer is too small,
/// the method will populate as much as it can, and then change the value of ulBufferLenth to the required number of bytes to
/// retrieve the entire string.
/// </remarks>
/// <example>
/// <code>
/// WCHAR myBuffer[1024];
/// ULONG myBufferSize = 1024;
/// ULONG status = NmGetNplProfileAttribute( 1, NmNplProfileAttributePackageGuid, &myBufferSize, myBuffer );
/// fwprintf( stdout, L" [%d] PackageGuid: %s\n", status, myBuffer );
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pProfileGuid">[in] the 1-based index of the profile</param>
/// <param name="attribute">[in] the attribute enum that corresponds to the string we are looking for</param>
/// <param name="ulBufferELength">[inout] The length of the buffer we would like to fill</param>
/// <param name="pAttributeBuffer">[out] The buffer to place the string in.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: Successfully retrieved the attribute.
/// ERROR_NO_MATCH: The provided GUID does not match an existing profile's GUID.
/// ERROR_INSUFFICIENT_BUFFER: The provided buffer is too short. The ulBufferELenth will be updated.
/// </returns>
extern "C" ULONG WINAPI NmGetNplProfileAttribute(
__in ULONG ulIndex,
__in NmNplProfileAttribute attribute,
__inout PULONG ulBufferELength,
__out_ecount(*ulBufferELength) LPWSTR pAttributeBuffer );
/// <summary><c>NmGetNplProfileAttributeByGuid</c>Retrieves the profile attribute using the Guid of the profile.</summary>
/// <remarks>
/// This method can be used to retrieve an attribute value as a string for a given profile. If the given buffer is too small,
/// the method will populate as much as it can, and then change the value of ulBufferLenth to the required number of bytes to
/// retrieve the entire string.
/// </remarks>
/// <example>
/// <code>
/// WCHAR myBuffer[1024];
/// ULONG myBufferSize = 1024;
/// ULONG status = NmGetNplProfileAttributeByGuid( guid, NmNplProfileAttributePackageGuid, &myBufferSize, myBuffer );
/// fwprintf( stdout, L" [%d] PackageGuid: %s\n", status, myBuffer );
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pProfileGuid">[in] the guid of the profile</param>
/// <param name="attribute">[in] the attribute enum that corresponds to the string we are looking for</param>
/// <param name="ulBufferELength">[inout] The length of the buffer we would like to fill</param>
/// <param name="pAttributeBuffer">[out] The buffer to place the string in.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: Successfully retrieved the attribute.
/// ERROR_NO_MATCH: The provided GUID does not match an existing profile's GUID.
/// ERROR_INSUFFICIENT_BUFFER: The provided buffer is too short. The ulBufferELenth will be updated.
/// </returns>
extern "C" ULONG WINAPI NmGetNplProfileAttributeByGuid(
__in LPCWSTR pProfileGuid,
__in NmNplProfileAttribute attribute,
__inout PULONG ulBufferELength,
__out_ecount(*ulBufferELength) LPWSTR pAttributeBuffer );
/// <summary><c>NmSetNplProfileAttribute</c>Sets the profile's attribute using the index of the profile.</summary>
/// <remarks>
/// This method can be used to set an attribute on a profile. There are only three attributes that can be
/// modified on an existing profile; the Name, the Description, and the Include Path. This method accepts the index of
/// profile to modify.
/// </remarks>
/// <example>
/// <code>
/// // Load the first profile.
/// ULONG status = NmSetNplProfileAttribute( 0, NmNplProfileAttributeDescription, L"TestValue" );
/// fwprintf( stdout, L"Attempted to set to 'TestValue' and received a status code of %d\n", status );
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulIndex">[in] the index of the profile to use..</param>
/// <param name="attribute">[in] the enumeration item that corresponds to the desired attribute.</param>
/// <param name="pAttributeBuffer">[in] The buffer to populate the attribute from.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: The attribute has been successfully updated.
/// ERROR_NO_MATCH: The provided index is not found in the Parser Profile Manager.
/// ERROR_INVALID_ACCESS: The profile is read only and cannot be modified.
/// ERROR_BAD_ARGUMENTS: The enumeration item was not Description, Name, or IncludePath.
/// </returns>
extern "C" ULONG WINAPI NmSetNplProfileAttribute(
__in ULONG ulIndex,
__in NmNplProfileAttribute attribute,
__in LPWSTR pAttributeBuffer );
/// <summary><c>NmSetNplProfileAttributeByGuid</c>Sets the profile's attribute using the GUID of the profile.</summary>
/// <remarks>
/// This method can be used to set an attribute on a profile. There are only three attributes that can be
/// modified on an existing profile; the Name, the Description, and the Include Path.
/// </remarks>
/// <example>
/// <code>
/// ULONG status = NmSetNplProfileAttribute( L"AD161723-4281-4d33-804E-5E43EE61D163", NmNplProfileAttributeDescription, L"TestValue" );
/// fwprintf( stdout, L"Attempted to set to 'TestValue' and received a status code of %d\n", status );
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulIndex">[in] the GUID of the profile to update.</param>
/// <param name="attribute">[in] the enumeration item that corresponds to the desired attribute.</param>
/// <param name="pAttributeBuffer">[in] The buffer to populate the attribute from.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: The attribute has been successfully updated.
/// ERROR_NO_MATCH: The provided GUID is not found in the Parser Profile Manager.
/// ERROR_INVALID_ACCESS: The profile is read only and cannot be modified.
/// ERROR_BAD_ARGUMENTS: The enumeration item was not Description, Name, or IncludePath.
/// </returns>
extern "C" ULONG WINAPI NmSetNplProfileAttributeByGuid( __in LPCWSTR pProfileGuid,
__in NmNplProfileAttribute attribute,
__in LPWSTR pAttributeBuffer );
/// <summary><c>NmGetNplProfileCount</c>retrieves the number of profiles available</summary>
/// <remarks>
/// The number of profiles includes the User Defined Profiles and the Installed Profiles.
/// This number will always be greater than zero. If no profiles are present, the parser engine
/// will construct the pure capture profile when the ParserProfileManager is initialized which
/// will be done when this method is called.
/// </remarks>
/// <example>
/// <code>
/// ULONG myProfileCount = 0;
/// ULONG status = NmGetNplProfileCount( &myProfileCount );
/// </code>
/// </example>
/// <exception>None</exception>
/// <param name="pulCount">[out] Number of profiles in the ParserProfileManager.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: Method will always return success.
/// </returns>
extern "C" ULONG WINAPI NmGetNplProfileCount( __out PULONG pulCount );
/// <summary><c>NmGetActiveNplProfileGuid</c>retrieves the GUID for the currently active profile</summary>
/// <remarks>
/// If the provided buffer is not long enough to contain the active NPL Profile's Id, the method will return
/// ERROR_INSUFFICIENT_BUFFER and the ulBufferELength will be assigned to the necessary size to read the buffer.
/// </remarks>
/// <example>
/// <code>
/// WCHAR myGuid[50] = {0};
/// ULONG myGuidLength = 50;
/// ULONG status = NmGetActiveNplProfileGuid( &myGuidLength, myGuid );
/// switch (status)
/// {
/// case ERROR_SUCCESS:
/// // We have successfully retrieved the GUID in our buffer.
/// break;
/// case ERROR_INSUFFICIENT_BUFFER:
/// // We have partially stored the GUID in our buffer.
/// // The value of myGuidLength is the larger size that we need to allocate for the buffer.
/// break;
/// case ERROR_NO_MATCH:
/// // No profile has been set as active.
/// break;
/// }
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulBufferELength">[in] The length of the provided buffer.</param>
/// <param name="pProfileGuid">[out] The buffer to place the GUID of the active profile into. </param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: The GUID has been retrieved.
/// ERROR_NO_MATCH: There is no active Npl Profile assigned.
/// ERROR_INSUFFICIENT_BUFFER: the provided buffer is not long enough to contain the GUID.
/// </returns>
extern "C" ULONG WINAPI NmGetActiveNplProfileGuid( __inout PULONG ulBufferELength,
__out_ecount(*ulBufferELength) LPWSTR pProfileGuid );
/// <summary><c>NmSetActiveNplProfile</c>Sets the active profile to the given ID</summary>
/// <remarks>
/// Method will attempt to compile the provided profile. If compilation is not successful, then ERROR_CAN_NOT_COMPLETE will be
/// returned. In this case, users should use NmLoadWithNplProfile to determine what errors were encountered. When successful,
/// the profile is set as active for all Microsoft Network Monitor clients that share the HKCU key. (netmon.exe/nmcap.exe/etc)
/// </remarks>
/// <example>
/// <code>
/// LPWSTR MicrosoftFasterNPLProfileID = L"AD161723-4281-4d33-804E-5E43EE61D163";
/// ULONG status = NmSetActiveNplProfile( MicrosoftFasterNPLProfileID );
/// if (ERROR_SUCCESS == status) // Successfully set the profile.
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pProfileGuid">[in] </param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: The profile has been set as active.
/// ERROR_NO_MATCH: The GUID is not present.
/// ERROR_CAN_NOT_COMPLETE: The provided profile cannot successfully compile.
/// </returns>
extern "C" ULONG WINAPI NmSetActiveNplProfile( __in LPCWSTR pProfileGuid );
/// <summary><c>NmDeleteNplProfile</c></summary>
/// <remarks>
/// Method will delete a profile if the profile can be deleted. Some profiles cannot be deleted.
/// Profiles that cannot be deleted include:
/// Installed Profiles from Microsoft/3rd party packages.
/// The currently active profile.
/// </remarks>
/// <example>
/// <code>
/// LPWSTR MicrosoftFasterNPLProfileID = L"AD161723-4281-4d33-804E-5E43EE61D163";
/// ULONG status = NmDeleteNplProfile( MicrosoftFasterNPLProfileID );
/// if (ERROR_INVALID_ACCESS == status) // Attempted to delete an installed profile.
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="pProfileGuid">[in] </param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS: The profile has been successfully deleted.
/// ERROR_NO_MATCH: The provided GUID is not available for deletion.
/// ERROR_ALREADY_ASSIGNED: The provided GUID could not be deleted because it is currently active.
/// ERROR_INVALID_ACCESS: The profile is read only.
/// </returns>
extern "C" ULONG WINAPI NmDeleteNplProfile(__in LPCWSTR pProfileGuid);
//////////////////////////////////////////////
///
/// Driver capture filter
///
/// OVERVIEW: You can specify a driver filter per adapter, per process. The driver filtering consists of
/// a set of filters where each filter contain a set blocks. Each block contains a set of OLP,
/// (Offset, Length, Pattern), expressions which also contain an operand. The operation, AND or OR, is fixed
/// for each block of OLP expressions. And the operation between blocks is the opposite of the operation
/// between each OLP. So if you set the block operation to AND, the OLP operation is OR. The operation
/// between filters can be AND or OR. The order of the operations for filters occurs in the order you add
/// them. The order of operations for blocks and OLP expressions depends on the index you specify when you
/// add them.
///
/// OLP expressions, blocks and filters can also be "short circuited" using the NmOlpActionFlags. This allows
/// you to optimize an expression when you know the evaluation in the driver will not be sufficient to
/// completely evaluate the intended filter operation accurately. For instance, consider a filter where you are
/// looking for a TCP port. In some cases the port offset can change when IPv4 options exist. This short circuit
/// provides a way to return the frame early rather than evaluating the rest of the expression.
///
/// You must add a driver filter before the capture engine is started. Driver filtering can affect your
/// capturing performance as a larger delay in the driver doing these evaluations may cause you to drop
/// frames. You can use NmGetLiveCaptureFrameCounts to monitor dropped frames and other statistics.
///
///
/// <summary><c>NmOlpActionFlags</c></summary>
/// <remarks>
/// These flags are used when the OLP expressions, blocks and filters are created. For filter creation, these
/// flags are combined with NmFilterOptionFlags in the options parameter. These flags override the
/// normal AND/OR operations that would occur for the conditions, blocks and filters following the current
/// entity; OLP expression, block or filter.
///
/// For example, if block type is AND and the NmOlpActionFlagsCopyOnFalse is specified at block creation,
/// the frames that fail the block are copied to user mode although they would have been dropped in the
/// normal AND operation. These flags "short circuit" the rest of the evaluation. If this evaluation is
/// true then the driver continues to evaluate the remaining blocks if they exist, or copies this frame to
/// user mode if this is the only block. This behavior is identical for all three levels: condition, block
/// and filter.
///
/// The action flags are exclusive, i.e., they cannot be set at the same time that could be done by mistake
/// In NmCreateOlpFilter where the two flags are combined.
/// </remarks>
typedef enum _NmOlpActionFlags
{
NmOlpActionFlagsNone,
NmOlpActionFlagsCopyOnFalse,
NmOlpActionFlagsDropOnFalse,
NmOlpActionFlagsLast
} NmOlpActionFlags;
///
/// <summary><c>NmFilterOptionFlags</c></summary>
/// <remarks>
/// Filter options are used for filter creation only.
///
/// NmFilterOptionFlagsBlockTypeAnd specifies the logical operation among all blocks contained in the filter
/// and the opposite logical operation is performed among all the OLP conditions in each block.
///
/// NmFilterOptionFlagsAndToNext specifies the logical operation between this filter and the next. Note that
/// multiple filters are evaluated in the order that they are added. If filter A is added first followed by
/// filter B, A is evaluated first. By default, when this flag is not set, A is OR'd with B.
///
/// A is AND'd with B if NmFilterOptionFlagsAndToNext is set in filter A during creation. The frames are dropped
/// if A fails; B will be evaluated if A passes.
///
/// If there are filters A, B and C, and A has NmFilterOptionFlagsAndToNext set, the logic is A AND B OR C, i.e., it
/// Only affect the operation between the two adjacent filters, given they are added in order of A, B and C.
///
/// NmFilterOptionFlagsBlockTypeAnd and NmFilterOptionFlagsAndToNext are not exclusive to each other. They can
/// also be combined with NmOlpActionFlags during filter creation. NmOlpActionFlags override NmFilterOptionFlags
/// when the action criteria is met. The NmOlpActionFlags are in the lower WORD of the combined flags.
///
/// </remarks>
typedef enum _NmFilterOptionFlags
{
NmFilterOptionFlagsNone,
/// If set, the blocks contained in the filter are AND together.
NmFilterOptionFlagsBlockTypeAnd = 0x00010000,
/// If set, the current filter is AND to the next filter if exist; otherwise
/// It is OR to the next filter
NmFilterOptionFlagsAndToNext = 0x00020000,
NmFilterOptionFlagsLast
} NmFilterOptionFlags;
///
/// <summary><c>NmFilterMatchMode</c>Filter match mode for TRUE</summary>
/// <remarks>
/// NmFilterMatchModeEqual: return TRUE if pattern matches the frame data.
/// NmFilterMatchModeNotEqual: return TRUE if pattern does not match the frame data.
/// NmFilterMatchModeGreater: return TRUE if pattern is greater than the frame data.
/// NmFilterMatchModeLesser: return TRUE if pattern is less than the frame data.
/// </remarks>
typedef enum _NmFilterMatchMode
{
NmFilterMatchModeNone,
NmFilterMatchModeEqual,
NmFilterMatchModeNotEqual,
NmFilterMatchModeGreater,
NmFilterMatchModeLesser,
NmFilterMatchModeLast
} NmFilterMatchMode;
/// <summary><c>NmCreateOlp</c>Create OLP for the capture filter</summary>
/// <remarks>
/// Build an OLP expression and return the OLP ID which is unique in processes scope.
///
/// The OLP pattern must be aligned with and match that of the data in the frame you are evaluating.
/// For example, if the bit offset is 34, the bit length is 17, and the pattern is 0b10101010101010101, the
/// representation in the given buffer should be 0b00101010,10101010,10100000 or 0x2AAAA0 (3 bytes). In other
/// words, the data you'd see in the frame will also match 0x2AAAA0 for the range of bits in question.
/// -------------------
/// Concerning the two leading zeros and five zeros on the back, the bits in front or rear of the pattern is not
/// required to be set to zero.
///
/// Given bit offset BO an bit length BL, the byte array length should be:
/// (((BO % 8) + BL)/8 + (((BO + BL) % 8) == 0)? 0:1)
/// The byte array length in above example:
/// (((34 % 8) + 17)/8 + (((34 + 17) % 8) == 0)? 0:1) is 3
///
/// If the byte array passed in is shorter, the behavior is unpredictable or most likely an access violation.
///
/// </remarks>
/// <example>
/// <code>
/// Here is an example of TCP syn flag OLP that allows only TCP syn packets. This assumes that the underlying
/// protocols match Frame.Ethernet.IPv4.TCP for the frame you evaluate.
///
/// ULONG BitOffset = 446;
/// ULONG BitLength = 1;
/// BYTE TcpFlagSyn = 0x02; // Syn flag bit is the 7th from the MSB (0b00000010).
/// ULONG OlpId;
/// ULONG status = NmCreateOlp(BitOffset, BitLength, &TcpFlagSyn, NmFilterMatchModeEqual, NmOlpActionFlagsNone, &OlpId);
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="BitOffset">[in] The bit offset of the OLP</param>
/// <param name="BitLength">[in] The bit length of the OLP</param>
/// <param name="pPattern">[in] The pattern of the OLP.</param>
/// <param name="OpMode">[in] The comparison operator type, e.g., EQ, NOT EQ, GREATER, LESS, etc.</param>
/// <param name="ulOptions">[in] The option configuration flags defined by NmOlpActionFlags</param>
/// <param name="pulOlpId">[out] The process unique ID for the OLP.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointers or zero BitLength.
/// ERROR_ARITHMETIC_OVERFLOW: If more than 4G OLP entities are created, the OLP id overflows.
/// ERROR_NOT_ENOUGH_MEMORY: Fail to allocate memory for the OLP entity object.
/// </returns>
extern "C" ULONG WINAPI NmCreateOlp(__in ULONG BitOffset, __in ULONG BitLength, __in PBYTE pPattern, __in NmFilterMatchMode OpMode, __in NmOlpActionFlags ulOptions, __out PULONG pulOlpId);
/// <summary><c>NmCreateOlpBlock</c>Create OLP block for the capture filter </summary>
/// <remarks>
/// Create an OLP block and return its ID which is unique in processes scope. The ulConditionCount specifies
/// the maximum number of the OLP conditions the block can hold. The ulConditionCount must be non-zero.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulConditionCount">[in] The number of conditions the block can hold</param>
/// <param name="ulOptions">[in] Optional NmOlpActionFlags flags </param>
/// <param name="pulOlpBlockId">[out] The unique ID of the OLP block</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointer or ulConditionCount is zero.
/// ERROR_ARITHMETIC_OVERFLOW: If more than 4G OLP entities are created, the OLP id overflows.
/// ERROR_NOT_ENOUGH_MEMORY: Fail to allocate memory for the OLP entity object.
/// </returns>
extern "C" ULONG WINAPI NmCreateOlpBlock(__in ULONG ulConditionCount, __in NmOlpActionFlags ulOptions, __out PULONG pulOlpBlockId);
/// <summary><c>NmAddOlpToBlock</c>Add the OLP to the OLP block </summary>
/// <remarks>
/// Add the OLP condition to the OLP block. The ulOlpBlockId must reference an OLP block entity that was
/// created by NmCreateOlpBlock. The ulOlpId must reference to an OLP condition entity created by NmCreateOlp.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulOlpBlockId">[in] The target OLP block ID created by NmCreateOlpBlock</param>
/// <param name="ulIndex">[in] The zero based index position of the OLP in the target block</param>
/// <param name="ulOlpId">[in] The ID of the OLP to add returned from NmCreateOlpl</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: The specified index is invalid; or the OLP types referenced by the IDs are wrong.
/// ERROR_NOT_FOUND: The specified block or OLP is not found.
/// </returns>
extern "C" ULONG WINAPI NmAddOlpToBlock(__in ULONG ulOlpBlockId, __in ULONG ulIndex, __in ULONG ulOlpId);
/// <summary><c>NmCreateOlpFilter</c>Create the OLP driver capture filter</summary>
/// <remarks>
/// Create an OLP filter entity and return its ID that is unique in processes scope.
/// The ulBlockCount specifies the maximum number of the OLP blocks the
/// filter created can hold. The ulBlockCount must be non-zero.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulBlockCount">[in] The number of OLP blocks the filter can hold</param>
/// <param name="ulOptions">[in] The filter configuration flags. NmFilterOptionFlags and NmOlpActionFlags can be combined</param>
/// <param name="pulOlpFilterId">[out] The unique ID of the new OLP filter</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: NULL pointer, ulBlockCount is zero or the ulOptions is invalid.
/// ERROR_ARITHMETIC_OVERFLOW: If more than 4G OLP entities are created, the OLP id overflows.
/// ERROR_NOT_ENOUGH_MEMORY: Fail to allocate memory for the OLP entity object.
/// </returns>
extern "C" ULONG WINAPI NmCreateOlpFilter(__in ULONG ulBlockCount, __in ULONG ulOptions, __out PULONG pulOlpFilterId);
/// <summary><c>NmAddOlpBlockToFilter</c>Add the OLP block to the OLP filter</summary>
/// <remarks>
/// Add the OLP block to the OLP filter. The ulOlpFilterId must reference to a OLP filter entity that is created by
/// NmCreateOlpFilter. The ulOlpBlockId must reference to a OLP block entity created by NmCreateOlpBlock.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulOlpFilterId">[in] The ID of the target OLP filter created by NmCreateOlpFilter.</param>
/// <param name="ulIndex">[in] The index position of the OLP block in the target OLP filter</param>
/// <param name="ulOlpBlockId">[in] The ID of the OLP block to add created by NmCreateOlpBlock.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BAD_ARGUMENTS: The specified index is invalid; or the OLP types referenced by the ids are wrong.
/// ERROR_NOT_FOUND: The specified filter or block is not found.
/// </returns>
extern "C" ULONG WINAPI NmAddOlpBlockToFilter(__in ULONG ulOlpFilterId, __in ULONG ulIndex, __in ULONG ulOlpBlockId);
/// <summary><c>NmDeleteOlpEntity</c>Delete an OLP entity specified by its ID</summary>
/// <remarks>
/// Delete the specified OLP entity, (filter, or block, or OLP expression), from API OLP entity pool so the deleted entity
/// can no longer used to construct new driver filters. The OLP entity here is not the actual driver capture Filter but
/// the layered logical objects that can be added to the driver using NmAddDriverCaptureFilter, or deleted from the driver
/// using NmDeleteDriverCaptureFilter.
///
/// Do not delete an OLP entity before the filter containing it has been added to the driver, otherwise
/// the filter will not be built correctly.
///
/// All OLP entities (OLP condition, block and filter) can be deleted after the filter is added to the driver.
///
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="ulEntityId">[in] The unique ID of the OLP entity: OLP expression, block or filter.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_NOT_FOUND: The specified ulEntityId is invalid.
/// </returns>
extern "C" ULONG WINAPI NmDeleteOlpEntity(__in ULONG ulEntityId);
/// <summary><c>NmAddDriverCaptureFilter</c>Add capture filter to the adapter </summary>
/// <remarks>
/// Adds the capture filter created with NmCreateOlpFilter to the driver. This function must be called when
/// the adapter is not actively capturing.
///
/// There is a limit to the number of OLP conditions that can be added to the driver. This limit is per
/// adapter for each API process. The default limit is 16. If the limit of OLP conditions are exceeded,
/// ERROR_INVALID_PARAMETER is returned. The limit can be changed by modifying the DWORD in the registry,
/// HKLM\SYSTEM\CurrentControlSet\Services\nm3\OlpFilterConditionMaxCount.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The capture engine handle returned from NmOpenCaptureEngine.</param>
/// <param name="ulAdapterIndex">[in] The adapter the filter was added to.</param>
/// <param name="ulFilterId">[in] The filter id returned from NmCreateOlpFilter and used to reference the OLP Filter.</param>
/// <param name="ulOption">[in] The option defined for filter configuration. Reserved.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_INVALID_PARAMETER: Invalid handle, or driver parameter validation failed, or filter is invalid (no OLP inside).
/// ERROR_NOT_ENOUGH_MEMORY: No memory to construct filter.
/// ERROR_NO_SYSTEM_RESOURCES: Too many OLP in driver or not enough resource for the operation.
/// ERROR_BUSY: The driver is not in the proper state for this operation.
/// ERROR_OBJECT_ALREADY_EXISTS: The specified filter already exists in driver.
/// ERROR_NOT_FOUND: not found specified capture engine, adapter or filter
/// </returns>
extern "C" ULONG WINAPI NmAddDriverCaptureFilter(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex, __in ULONG ulFilterId, __in ULONG ulOption);
/// <summary><c>NmDeleteDriverCaptureFilter</c>Remove capture filter from the driver </summary>
/// <remarks>
/// Removes the driver capture filter specified by filter ID created by NmCreateOlpFilter.
/// The filter will no longer available afterwards. All entities are also cleaned up and
/// no longer available.
///
/// This function must be called when the adapter is not actively capturing.
///
/// All driver capture filters are deleted from driver when the application terminates.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The capture engine handle returned by NmOpenCaptureEngine.</param>
/// <param name="ulAdapterIndex">[in] The adapter the filter is to be removed from</param>
/// <param name="ulFilterId">[in] The capture filter id to delete, created by NmCreateOlpFilter.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_BUSY: The driver is not in the proper state for this operation.
/// ERROR_NOT_FOUND: not found specified capture engine, adapter or filter.
/// </returns>
extern "C" ULONG WINAPI NmDeleteDriverCaptureFilter(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex, __in ULONG ulFilterId);
/// <summary><c>NmGetLiveCaptureFrameCounts</c>Return the frame counters of the adapter</summary>
/// <remarks>
/// The counters in PNM_CAPTURE_STATISTICS are reported for the specified adapter. If there are multiple capture engines capture on the
/// same adapter, they share the same counter set.
/// </remarks>
/// <example>
/// <code>
/// </code>
/// </example>
///
/// <exception>None</exception>
/// <param name="hCaptureEngine">[in] The capture engine handle returned by NmOpenCaptureEngine.</param>
/// <param name="ulAdapterIndex">[in] The adapter index.</param>
/// <param name="pCaptureStatistics">[out] The capture statistics of the specified adapter.</param>
/// <permission cref="System.Security.PermissionSet">Everyone can access this method.</permission>
/// <returns>
/// ERROR_SUCCESS:
/// ERROR_NOT_FOUND: not found specified adapter.
/// ERROR_BAD_ARGUMENTS: Invalid handle or NULL pointer.
/// </returns>
extern "C" ULONG WINAPI NmGetLiveCaptureFrameCounts(__in HANDLE hCaptureEngine, __in ULONG ulAdapterIndex, __out PNM_CAPTURE_STATISTICS pCaptureStatistics);
#endif /// __NM_API_HEADER__
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/syslog_relay.h
|
/**
* @file libimobiledevice/syslog_relay.h
* @brief Capture the syslog output from a device.
* \internal
*
* Copyright (c) 2013 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ISYSLOG_RELAY_H
#define ISYSLOG_RELAY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define SYSLOG_RELAY_SERVICE_NAME "com.apple.syslog_relay"
/** @name Error Codes */
/*@{*/
#define SYSLOG_RELAY_E_SUCCESS 0
#define SYSLOG_RELAY_E_INVALID_ARG -1
#define SYSLOG_RELAY_E_MUX_ERROR -2
#define SYSLOG_RELAY_E_SSL_ERROR -3
#define SYSLOG_RELAY_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t syslog_relay_error_t;
typedef struct syslog_relay_client_private syslog_relay_client_private;
typedef syslog_relay_client_private *syslog_relay_client_t; /**< The client handle. */
/** Receives each character received from the device. */
typedef void (*syslog_relay_receive_cb_t)(char c, void *user_data);
/* Interface */
syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client);
syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label);
syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client);
syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data);
syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client);
/* Receiving */
syslog_relay_error_t syslog_relay_receive_with_timeout(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout);
syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/tcpdump.h
|
<reponame>j420247/ARO<filename>ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/tcpdump.h
#ifndef tcpdump_h
#define tcpdump_h
int tcpDump_StartCapture(int argc, char**argv);
void getInterfaces();
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/service.h
|
/**
* @file libimobiledevice/service.h
* @brief Generic basic service implementation to inherit.
* \internal
*
* Copyright (c) 2013 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ISERVICE_H
#define ISERVICE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
/** @name Error Codes */
/*@{*/
#define SERVICE_E_SUCCESS 0
#define SERVICE_E_INVALID_ARG -1
#define SERVICE_E_MUX_ERROR -3
#define SERVICE_E_SSL_ERROR -4
#define SERVICE_E_START_SERVICE_ERROR -5
#define SERVICE_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t service_error_t;
typedef struct service_client_private service_client_private;
typedef service_client_private* service_client_t; /**< The client handle. */
#define SERVICE_CONSTRUCTOR(x) (int16_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x)
/* Interface */
service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client);
service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code);
service_error_t service_client_free(service_client_t client);
service_error_t service_send(service_client_t client, const char *data, uint32_t size, uint32_t *sent);
service_error_t service_receive_with_timeout(service_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout);
service_error_t service_receive(service_client_t client, char *data, uint32_t size, uint32_t *received);
service_error_t service_enable_ssl(service_client_t client);
service_error_t service_disable_ssl(service_client_t client);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/sbservices.h
|
<filename>5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/sbservices.h
/**
* @file libimobiledevice/sbservices.h
* @brief Manage SpringBoard icons and retrieve icon images.
* \internal
*
* Copyright (c) 2009 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ISB_SERVICES_H
#define ISB_SERVICES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define SBSERVICES_SERVICE_NAME "com.apple.springboardservices"
/** @name Error Codes */
/*@{*/
#define SBSERVICES_E_SUCCESS 0
#define SBSERVICES_E_INVALID_ARG -1
#define SBSERVICES_E_PLIST_ERROR -2
#define SBSERVICES_E_CONN_FAILED -3
#define SBSERVICES_E_UNKNOWN_ERROR -256
/*@}*/
/** @name Orientation of the user interface on the device */
/*@{*/
typedef enum {
SBSERVICES_INTERFACE_ORIENTATION_UNKNOWN = 0,
SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT = 1,
SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT_UPSIDE_DOWN = 2,
SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_RIGHT = 3,
SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_LEFT = 4
} sbservices_interface_orientation_t;
/*@}*/
/** Represents an error code. */
typedef int16_t sbservices_error_t;
typedef struct sbservices_client_private sbservices_client_private;
typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */
/* Interface */
sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client);
sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label);
sbservices_error_t sbservices_client_free(sbservices_client_t client);
sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version);
sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate);
sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize);
sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation);
sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/installation_proxy.h
|
/**
* @file libimobiledevice/installation_proxy.h
* @brief Manage applications on a device.
* \internal
*
* Copyright (c) 2009 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IINSTALLATION_PROXY_H
#define IINSTALLATION_PROXY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy"
/** @name Error Codes */
/*@{*/
#define INSTPROXY_E_SUCCESS 0
#define INSTPROXY_E_INVALID_ARG -1
#define INSTPROXY_E_PLIST_ERROR -2
#define INSTPROXY_E_CONN_FAILED -3
#define INSTPROXY_E_OP_IN_PROGRESS -4
#define INSTPROXY_E_OP_FAILED -5
#define INSTPROXY_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t instproxy_error_t;
typedef struct instproxy_client_private instproxy_client_private;
typedef instproxy_client_private *instproxy_client_t; /**< The client handle. */
/** Reports the status of the given operation */
typedef void (*instproxy_status_cb_t) (const char *operation, plist_t status, void *user_data);
/* Interface */
instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client);
instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label);
instproxy_error_t instproxy_client_free(instproxy_client_t client);
instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result);
instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result);
instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
/* Helper */
plist_t instproxy_client_options_new();
void instproxy_client_options_add(plist_t client_options, ...);
void instproxy_client_options_free(plist_t client_options);
instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/file_relay.h
|
<reponame>j420247/ARO<filename>5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/file_relay.h<gh_stars>100-1000
/**
* @file libimobiledevice/file_relay.h
* @brief Retrieve compressed CPIO archives.
* \internal
*
* Copyright (c) 2010 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IFILE_RELAY_H
#define IFILE_RELAY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define FILE_RELAY_SERVICE_NAME "com.apple.mobile.file_relay"
/** @name Error Codes */
/*@{*/
#define FILE_RELAY_E_SUCCESS 0
#define FILE_RELAY_E_INVALID_ARG -1
#define FILE_RELAY_E_PLIST_ERROR -2
#define FILE_RELAY_E_MUX_ERROR -3
#define FILE_RELAY_E_INVALID_SOURCE -4
#define FILE_RELAY_E_STAGING_EMPTY -5
#define FILE_RELAY_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t file_relay_error_t;
typedef struct file_relay_client_private file_relay_client_private;
typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */
file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client);
file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t* client, const char* label);
file_relay_error_t file_relay_client_free(file_relay_client_t client);
file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/version.c
|
const char version[] = "4.1.1";
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/AROJpcap/com_att_aro_pcap_PCapAdapter.h
|
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_att_aro_pcap_PCapAdapter */
#ifndef _Included_com_att_aro_pcap_PCapAdapter
#define _Included_com_att_aro_pcap_PCapAdapter
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_att_aro_pcap_PCapAdapter
* Method: ping
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_att_aro_pcap_PCapAdapter_ping
(JNIEnv *, jclass);
/*
* Class: com_att_aro_pcap_PCapAdapter
* Method: loopPacket
* Signature: (Ljava/lang/String;)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_com_att_aro_pcap_PCapAdapter_loopPacket
(JNIEnv *, jobject, jstring);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/libpcap-1.1.1/socket_proc.h
|
<gh_stars>100-1000
#ifndef _SOCKET_PROC_H_
#define _SOCKET_PROC_H_
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
#include <dirent.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
typedef unsigned int DWORD;
typedef unsigned short WORD;
typedef unsigned char BYTE;
#define CAP_LINUX_STANDARD 1
#define CAP_LINUX_MMAP 2
#define PACKET_UNKNOWN_APP -1
#define PACKET_UNKNOWN_DIR -2
#define PACKET_ARP -3
#define PACKET_UNKNOWN_IP_PROT -4
#define PACKET_UNKNOWN_ETHER_PROT -5
#define PACKET_EOF -127
void StartCapture(char * pcapFilename);
void TerminateCapture();
void Terminate();
//return appid
int UpdatePacket(struct timeval * pTS, const u_char *sp,const char *currentdevice,int dir, int bCooked);
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/libpcap-1.1.1/user_input.h
|
#ifndef _USER_INPUT_H_
#define _USER_INPUT_H_
void * CaptureUserInput(void * arg);
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/libpcap-1.1.1/pcap-common.c
|
<reponame>j420247/ARO
/*
* Copyright (c) 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code distributions
* retain the above copyright notice and this paragraph in its entirety, (2)
* distributions including binary code include the above copyright notice and
* this paragraph in its entirety in the documentation or other materials
* provided with the distribution, and (3) all advertising materials mentioning
* features or use of this software display the following acknowledgement:
* ``This product includes software developed by the University of California,
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
* the University nor the names of its contributors may be used to endorse
* or promote products derived from this software without specific prior
* written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* savefile.c - supports offline use of tcpdump
* Extraction/creation by <NAME>, DECWRL
* Modified by <NAME>, LBL.
*
* Used to save the received packet headers, after filtering, to
* a file, and then read them later.
* The first record in the file contains saved values for the machine
* dependent values so we can print the dump file on any architecture.
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.183 2008-12-23 20:13:29 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef WIN32
#include <pcap-stdinc.h>
#else /* WIN32 */
#if HAVE_INTTYPES_H
#include <inttypes.h>
#elif HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_SYS_BITYPES_H
#include <sys/bitypes.h>
#endif
#include <sys/types.h>
#endif /* WIN32 */
#include "pcap-int.h"
#include "pcap/usb.h"
#include "pcap-common.h"
/*
* We don't write DLT_* values to capture files, because they're not the
* same on all platforms.
*
* Unfortunately, the various flavors of BSD have not always used the same
* numerical values for the same data types, and various patches to
* libpcap for non-BSD OSes have added their own DLT_* codes for link
* layer encapsulation types seen on those OSes, and those codes have had,
* in some cases, values that were also used, on other platforms, for other
* link layer encapsulation types.
*
* This means that capture files of a type whose numerical DLT_* code
* means different things on different BSDs, or with different versions
* of libpcap, can't always be read on systems other than those like
* the one running on the machine on which the capture was made.
*
* Instead, we define here a set of LINKTYPE_* codes, and map DLT_* codes
* to LINKTYPE_* codes when writing a savefile header, and map LINKTYPE_*
* codes to DLT_* codes when reading a savefile header.
*
* For those DLT_* codes that have, as far as we know, the same values on
* all platforms (DLT_NULL through DLT_FDDI), we define LINKTYPE_xxx as
* DLT_xxx; that way, captures of those types can still be read by
* versions of libpcap that map LINKTYPE_* values to DLT_* values, and
* captures of those types written by versions of libpcap that map DLT_
* values to LINKTYPE_ values can still be read by older versions
* of libpcap.
*
* The other LINKTYPE_* codes are given values starting at 100, in the
* hopes that no DLT_* code will be given one of those values.
*
* In order to ensure that a given LINKTYPE_* code's value will refer to
* the same encapsulation type on all platforms, you should not allocate
* a new LINKTYPE_* value without consulting
* "<EMAIL>". The tcpdump developers will
* allocate a value for you, and will not subsequently allocate it to
* anybody else; that value will be added to the "pcap.h" in the
* tcpdump.org Git repository, so that a future libpcap release will
* include it.
*
* You should, if possible, also contribute patches to libpcap and tcpdump
* to handle the new encapsulation type, so that they can also be checked
* into the tcpdump.org Git repository and so that they will appear in
* future libpcap and tcpdump releases.
*
* Do *NOT* assume that any values after the largest value in this file
* are available; you might not have the most up-to-date version of this
* file, and new values after that one might have been assigned. Also,
* do *NOT* use any values below 100 - those might already have been
* taken by one (or more!) organizations.
*/
#define LINKTYPE_NULL DLT_NULL
#define LINKTYPE_ETHERNET DLT_EN10MB /* also for 100Mb and up */
#define LINKTYPE_EXP_ETHERNET DLT_EN3MB /* 3Mb experimental Ethernet */
#define LINKTYPE_AX25 DLT_AX25
#define LINKTYPE_PRONET DLT_PRONET
#define LINKTYPE_CHAOS DLT_CHAOS
#define LINKTYPE_TOKEN_RING DLT_IEEE802 /* DLT_IEEE802 is used for Token Ring */
#define LINKTYPE_ARCNET DLT_ARCNET /* BSD-style headers */
#define LINKTYPE_SLIP DLT_SLIP
#define LINKTYPE_PPP DLT_PPP
#define LINKTYPE_FDDI DLT_FDDI
/*
* LINKTYPE_PPP is for use when there might, or might not, be an RFC 1662
* PPP in HDLC-like framing header (with 0xff 0x03 before the PPP protocol
* field) at the beginning of the packet.
*
* This is for use when there is always such a header; the address field
* might be 0xff, for regular PPP, or it might be an address field for Cisco
* point-to-point with HDLC framing as per section 4.3.1 of RFC 1547 ("Cisco
* HDLC"). This is, for example, what you get with NetBSD's DLT_PPP_SERIAL.
*
* We give it the same value as NetBSD's DLT_PPP_SERIAL, in the hopes that
* nobody else will choose a DLT_ value of 50, and so that DLT_PPP_SERIAL
* captures will be written out with a link type that NetBSD's tcpdump
* can read.
*/
#define LINKTYPE_PPP_HDLC 50 /* PPP in HDLC-like framing */
#define LINKTYPE_PPP_ETHER 51 /* NetBSD PPP-over-Ethernet */
#define LINKTYPE_SYMANTEC_FIREWALL 99 /* Symantec Enterprise Firewall */
#define LINKTYPE_ATM_RFC1483 100 /* LLC/SNAP-encapsulated ATM */
#define LINKTYPE_RAW 101 /* raw IP */
#define LINKTYPE_SLIP_BSDOS 102 /* BSD/OS SLIP BPF header */
#define LINKTYPE_PPP_BSDOS 103 /* BSD/OS PPP BPF header */
#define LINKTYPE_C_HDLC 104 /* Cisco HDLC */
#define LINKTYPE_IEEE802_11 105 /* IEEE 802.11 (wireless) */
#define LINKTYPE_ATM_CLIP 106 /* Linux Classical IP over ATM */
#define LINKTYPE_FRELAY 107 /* Frame Relay */
#define LINKTYPE_LOOP 108 /* OpenBSD loopback */
#define LINKTYPE_ENC 109 /* OpenBSD IPSEC enc */
/*
* These three types are reserved for future use.
*/
#define LINKTYPE_LANE8023 110 /* ATM LANE + 802.3 */
#define LINKTYPE_HIPPI 111 /* NetBSD HIPPI */
#define LINKTYPE_HDLC 112 /* NetBSD HDLC framing */
#define LINKTYPE_LINUX_SLL 113 /* Linux cooked socket capture */
#define LINKTYPE_LTALK 114 /* Apple LocalTalk hardware */
#define LINKTYPE_ECONET 115 /* Acorn Econet */
/*
* Reserved for use with OpenBSD ipfilter.
*/
#define LINKTYPE_IPFILTER 116
#define LINKTYPE_PFLOG 117 /* OpenBSD DLT_PFLOG */
#define LINKTYPE_CISCO_IOS 118 /* For Cisco-internal use */
#define LINKTYPE_PRISM_HEADER 119 /* 802.11+Prism II monitor mode */
#define LINKTYPE_AIRONET_HEADER 120 /* FreeBSD Aironet driver stuff */
/*
* Reserved for Siemens HiPath HDLC.
*/
#define LINKTYPE_HHDLC 121
#define LINKTYPE_IP_OVER_FC 122 /* RFC 2625 IP-over-Fibre Channel */
#define LINKTYPE_SUNATM 123 /* Solaris+SunATM */
/*
* Reserved as per request from <NAME> <<EMAIL>>
* for private use.
*/
#define LINKTYPE_RIO 124 /* RapidIO */
#define LINKTYPE_PCI_EXP 125 /* PCI Express */
#define LINKTYPE_AURORA 126 /* Xilinx Aurora link layer */
#define LINKTYPE_IEEE802_11_RADIO 127 /* 802.11 plus BSD radio header */
/*
* Reserved for the TZSP encapsulation, as per request from
* <NAME> <<EMAIL>>
* TZSP is a generic encapsulation for any other link type,
* which includes a means to include meta-information
* with the packet, e.g. signal strength and channel
* for 802.11 packets.
*/
#define LINKTYPE_TZSP 128 /* Tazmen Sniffer Protocol */
#define LINKTYPE_ARCNET_LINUX 129 /* Linux-style headers */
/*
* Juniper-private data link types, as per request from
* <NAME> <<EMAIL>>. The corresponding
* DLT_s are used for passing on chassis-internal
* metainformation such as QOS profiles, etc..
*/
#define LINKTYPE_JUNIPER_MLPPP 130
#define LINKTYPE_JUNIPER_MLFR 131
#define LINKTYPE_JUNIPER_ES 132
#define LINKTYPE_JUNIPER_GGSN 133
#define LINKTYPE_JUNIPER_MFR 134
#define LINKTYPE_JUNIPER_ATM2 135
#define LINKTYPE_JUNIPER_SERVICES 136
#define LINKTYPE_JUNIPER_ATM1 137
#define LINKTYPE_APPLE_IP_OVER_IEEE1394 138 /* Apple IP-over-IEEE 1394 cooked header */
#define LINKTYPE_MTP2_WITH_PHDR 139
#define LINKTYPE_MTP2 140
#define LINKTYPE_MTP3 141
#define LINKTYPE_SCCP 142
#define LINKTYPE_DOCSIS 143 /* DOCSIS MAC frames */
#define LINKTYPE_LINUX_IRDA 144 /* Linux-IrDA */
/*
* Reserved for IBM SP switch and IBM Next Federation switch.
*/
#define LINKTYPE_IBM_SP 145
#define LINKTYPE_IBM_SN 146
/*
* Reserved for private use. If you have some link-layer header type
* that you want to use within your organization, with the capture files
* using that link-layer header type not ever be sent outside your
* organization, you can use these values.
*
* No libpcap release will use these for any purpose, nor will any
* tcpdump release use them, either.
*
* Do *NOT* use these in capture files that you expect anybody not using
* your private versions of capture-file-reading tools to read; in
* particular, do *NOT* use them in products, otherwise you may find that
* people won't be able to use tcpdump, or snort, or Ethereal, or... to
* read capture files from your firewall/intrusion detection/traffic
* monitoring/etc. appliance, or whatever product uses that LINKTYPE_ value,
* and you may also find that the developers of those applications will
* not accept patches to let them read those files.
*
* Also, do not use them if somebody might send you a capture using them
* for *their* private type and tools using them for *your* private type
* would have to read them.
*
* Instead, in those cases, ask "<EMAIL>" for a
* new DLT_ and LINKTYPE_ value, as per the comment in pcap/bpf.h, and use
* the type you're given.
*/
#define LINKTYPE_USER0 147
#define LINKTYPE_USER1 148
#define LINKTYPE_USER2 149
#define LINKTYPE_USER3 150
#define LINKTYPE_USER4 151
#define LINKTYPE_USER5 152
#define LINKTYPE_USER6 153
#define LINKTYPE_USER7 154
#define LINKTYPE_USER8 155
#define LINKTYPE_USER9 156
#define LINKTYPE_USER10 157
#define LINKTYPE_USER11 158
#define LINKTYPE_USER12 159
#define LINKTYPE_USER13 160
#define LINKTYPE_USER14 161
#define LINKTYPE_USER15 162
/*
* For future use with 802.11 captures - defined by AbsoluteValue
* Systems to store a number of bits of link-layer information
* including radio information:
*
* http://www.shaftnet.org/~pizza/software/capturefrm.txt
*
* but could and arguably should also be used by non-AVS Linux
* 802.11 drivers; that may happen in the future.
*/
#define LINKTYPE_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>. The corresponding
* DLT_s are used for passing on chassis-internal
* metainformation such as QOS profiles, etc..
*/
#define LINKTYPE_JUNIPER_MONITOR 164
/*
* Reserved for BACnet MS/TP.
*/
#define LINKTYPE_BACNET_MS_TP 165
/*
* Another PPP variant as per request from <NAME> <<EMAIL>>.
*
* This is used in some OSes to allow a kernel socket filter to distinguish
* between incoming and outgoing packets, on a socket intended to
* supply pppd with outgoing packets so it can do dial-on-demand and
* hangup-on-lack-of-demand; incoming packets are filtered out so they
* don't cause pppd to hold the connection up (you don't want random
* input packets such as port scans, packets from old lost connections,
* etc. to force the connection to stay up).
*
* The first byte of the PPP header (0xff03) is modified to accomodate
* the direction - 0x00 = IN, 0x01 = OUT.
*/
#define LINKTYPE_PPP_PPPD 166
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>. The DLT_s are used
* for passing on chassis-internal metainformation such as
* QOS profiles, cookies, etc..
*/
#define LINKTYPE_JUNIPER_PPPOE 167
#define LINKTYPE_JUNIPER_PPPOE_ATM 168
#define LINKTYPE_GPRS_LLC 169 /* GPRS LLC */
#define LINKTYPE_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */
#define LINKTYPE_GPF_F 171 /* GPF-T (ITU-T G.7041/Y.1303) */
/*
* Requested by <NAME> <<EMAIL>> for use in Gcom's T1/E1 line
* monitoring equipment.
*/
#define LINKTYPE_GCOM_T1E1 172
#define LINKTYPE_GCOM_SERIAL 173
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>. The DLT_ is used
* for internal communication to Physical Interface Cards (PIC)
*/
#define LINKTYPE_JUNIPER_PIC_PEER 174
/*
* Link types requested by <NAME> <<EMAIL>> of Endace
* Measurement Systems. They add an ERF header (see
* http://www.endace.com/support/EndaceRecordFormat.pdf) in front of
* the link-layer header.
*/
#define LINKTYPE_ERF_ETH 175 /* Ethernet */
#define LINKTYPE_ERF_POS 176 /* Packet-over-SONET */
/*
* Requested by <NAME> <<EMAIL>> for raw LAPD
* for vISDN (http://www.orlandi.com/visdn/). Its link-layer header
* includes additional information before the LAPD header, so it's
* not necessarily a generic LAPD header.
*/
#define LINKTYPE_LINUX_LAPD 177
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>.
* The Link Types are used for prepending meta-information
* like interface index, interface name
* before standard Ethernet, PPP, Frelay & C-HDLC Frames
*/
#define LINKTYPE_JUNIPER_ETHER 178
#define LINKTYPE_JUNIPER_PPP 179
#define LINKTYPE_JUNIPER_FRELAY 180
#define LINKTYPE_JUNIPER_CHDLC 181
/*
* Multi Link Frame Relay (FRF.16)
*/
#define LINKTYPE_MFR 182
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>.
* The DLT_ is used for internal communication with a
* voice Adapter Card (PIC)
*/
#define LINKTYPE_JUNIPER_VP 183
/*
* Arinc 429 frames.
* DLT_ requested by <NAME> <<EMAIL>>.
* Every frame contains a 32bit A429 label.
* More documentation on Arinc 429 can be found at
* http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
*/
#define LINKTYPE_A429 184
/*
* Arinc 653 Interpartition Communication messages.
* DLT_ requested by <NAME> <<EMAIL>>.
* Please refer to the A653-1 standard for more information.
*/
#define LINKTYPE_A653_ICM 185
/*
* USB packets, beginning with a USB setup header; requested by
* Paolo Abeni <<EMAIL>>.
*/
#define LINKTYPE_USB 186
/*
* Bluetooth HCI UART transport layer (part H:4); requested by
* Paolo Abeni.
*/
#define LINKTYPE_BLUETOOTH_HCI_H4 187
/*
* IEEE 802.16 MAC Common Part Sublayer; requested by <NAME>
* <<EMAIL>>.
*/
#define LINKTYPE_IEEE802_16_MAC_CPS 188
/*
* USB packets, beginning with a Linux USB header; requested by
* Paolo Abeni <<EMAIL>>.
*/
#define LINKTYPE_USB_LINUX 189
/*
* Controller Area Network (CAN) v. 2.0B packets.
* DLT_ requested by <NAME> <<EMAIL>>.
* Used to dump CAN packets coming from a CAN Vector board.
* More documentation on the CAN v2.0B frames can be found at
* http://www.can-cia.org/downloads/?269
*/
#define LINKTYPE_CAN20B 190
/*
* IEEE 802.15.4, with address fields padded, as is done by Linux
* drivers; requested by <NAME>.
*/
#define LINKTYPE_IEEE802_15_4_LINUX 191
/*
* Per Packet Information encapsulated packets.
* LINKTYPE_ requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_PPI 192
/*
* Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
* requested by <NAME>.
*/
#define LINKTYPE_IEEE802_16_MAC_CPS_RADIO 193
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>.
* The DLT_ is used for internal communication with a
* integrated service module (ISM).
*/
#define LINKTYPE_JUNIPER_ISM 194
/*
* IEEE 802.15.4, exactly as it appears in the spec (no padding, no
* nothing); requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_IEEE802_15_4 195
/*
* Various link-layer types, with a pseudo-header, for SITA
* (http://www.sita.aero/); requested by <NAME> (<EMAIL>).
*/
#define LINKTYPE_SITA 196
/*
* Various link-layer types, with a pseudo-header, for Endace DAG cards;
* encapsulates Endace ERF records. Requested by <NAME>
* <<EMAIL>>.
*/
#define LINKTYPE_ERF 197
/*
* Special header prepended to Ethernet packets when capturing from a
* u10 Networks board. Requested by <NAME>
* <<EMAIL>>.
*/
#define LINKTYPE_RAIF1 198
/*
* IPMB packet for IPMI, beginning with the I2C slave address, followed
* by the netFn and LUN, etc.. Requested by <NAME>
* <<EMAIL>>.
*/
#define LINKTYPE_IPMB 199
/*
* Juniper-private data link type, as per request from
* <NAME> <<EMAIL>>.
* The DLT_ is used for capturing data on a secure tunnel interface.
*/
#define LINKTYPE_JUNIPER_ST 200
/*
* Bluetooth HCI UART transport layer (part H:4), with pseudo-header
* that includes direction information; requested by Paolo Abeni.
*/
#define LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR 201
/*
* AX.25 packet with a 1-byte KISS header; see
*
* http://www.ax25.net/kiss.htm
*
* as per <NAME> <<EMAIL>>.
*/
#define LINKTYPE_AX25_KISS 202
/*
* LAPD packets from an ISDN channel, starting with the address field,
* with no pseudo-header.
* Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_LAPD 203
/*
* Variants of various link-layer headers, with a one-byte direction
* pseudo-header prepended - zero means "received by this host",
* non-zero (any non-zero value) means "sent by this host" - as per
* <NAME> <<EMAIL>>.
*/
#define LINKTYPE_PPP_WITH_DIR 204 /* PPP */
#define LINKTYPE_C_HDLC_WITH_DIR 205 /* Cisco HDLC */
#define LINKTYPE_FRELAY_WITH_DIR 206 /* Frame Relay */
#define LINKTYPE_LAPB_WITH_DIR 207 /* LAPB */
/*
* 208 is reserved for an as-yet-unspecified proprietary link-layer
* type, as requested by <NAME>.
*/
/*
* IPMB with a Linux-specific pseudo-header; as requested by <NAME>
* <<EMAIL>>.
*/
#define LINKTYPE_IPMB_LINUX 209
/*
* FlexRay automotive bus - http://www.flexray.com/ - as requested
* by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_FLEXRAY 210
/*
* Media Oriented Systems Transport (MOST) bus for multimedia
* transport - http://www.mostcooperation.com/ - as requested
* by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_MOST 211
/*
* Local Interconnect Network (LIN) bus for vehicle networks -
* http://www.lin-subbus.org/ - as requested by <NAME>
* <<EMAIL>>.
*/
#define LINKTYPE_LIN 212
/*
* X2E-private data link type used for serial line capture,
* as requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_X2E_SERIAL 213
/*
* X2E-private data link type used for the Xoraya data logger
* family, as requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_X2E_XORAYA 214
/*
* IEEE 802.15.4, exactly as it appears in the spec (no padding, no
* nothing), but with the PHY-level data for non-ASK PHYs (4 octets
* of 0 as preamble, one octet of SFD, one octet of frame length+
* reserved bit, and then the MAC-layer data, starting with the
* frame control field).
*
* Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_IEEE802_15_4_NONASK_PHY 215
/*
* <NAME> <<EMAIL>> requested this for
* captures from the Linux kernel /dev/input/eventN devices. This
* is used to communicate keystrokes and mouse movements from the
* Linux kernel to display systems, such as Xorg.
*/
#define LINKTYPE_LINUX_EVDEV 216
/*
* GSM Um and Abis interfaces, preceded by a "gsmtap" header.
*
* Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_GSMTAP_UM 217
#define LINKTYPE_GSMTAP_ABIS 218
/*
* MPLS, with an MPLS label as the link-layer header.
* Requested by <NAME> <<EMAIL>> on behalf
* of OpenBSD.
*/
#define LINKTYPE_MPLS 219
/*
* USB packets, beginning with a Linux USB header, with the USB header
* padded to 64 bytes; required for memory-mapped access.
*/
#define LINKTYPE_USB_LINUX_MMAPPED 220
/*
* DECT packets, with a pseudo-header; requested by
* <NAME> <<EMAIL>>.
*/
#define LINKTYPE_DECT 221
/*
* From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" <<EMAIL>>
* Date: Mon, 11 May 2009 11:18:30 -0500
*
* DLT_AOS. We need it for AOS Space Data Link Protocol.
* I have already written dissectors for but need an OK from
* legal before I can submit a patch.
*
*/
#define LINKTYPE_AOS 222
/*
* Wireless HART (Highway Addressable Remote Transducer)
* From the HART Communication Foundation
* IES/PAS 62591
*
* Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_WIHART 223
/*
* Fibre Channel FC-2 frames, beginning with a Frame_Header.
* Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_FC_2 224
/*
* Fibre Channel FC-2 frames, beginning with an encoding of the
* SOF, and ending with an encoding of the EOF.
*
* The encodings represent the frame delimiters as 4-byte sequences
* representing the corresponding ordered sets, with K28.5
* represented as 0xBC, and the D symbols as the corresponding
* byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2,
* is represented as 0xBC 0xB5 0x55 0x55.
*
* Requested by K<NAME> <<EMAIL>>.
*/
#define LINKTYPE_FC_2_WITH_FRAME_DELIMS 225
/*
* Solaris ipnet pseudo-header; requested by <NAME> <<EMAIL>>.
*
* The pseudo-header starts with a one-byte version number; for version 2,
* the pseudo-header is:
*
* struct dl_ipnetinfo {
* u_int8_t dli_version;
* u_int8_t dli_family;
* u_int16_t dli_htype;
* u_int32_t dli_pktlen;
* u_int32_t dli_ifindex;
* u_int32_t dli_grifindex;
* u_int32_t dli_zsrc;
* u_int32_t dli_zdst;
* };
*
* dli_version is 2 for the current version of the pseudo-header.
*
* dli_family is a Solaris address family value, so it's 2 for IPv4
* and 26 for IPv6.
*
* dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing
* packets, and 2 for packets arriving from another zone on the same
* machine.
*
* dli_pktlen is the length of the packet data following the pseudo-header
* (so the captured length minus dli_pktlen is the length of the
* pseudo-header, assuming the entire pseudo-header was captured).
*
* dli_ifindex is the interface index of the interface on which the
* packet arrived.
*
* dli_grifindex is the group interface index number (for IPMP interfaces).
*
* dli_zsrc is the zone identifier for the source of the packet.
*
* dli_zdst is the zone identifier for the destination of the packet.
*
* A zone number of 0 is the global zone; a zone number of 0xffffffff
* means that the packet arrived from another host on the network, not
* from another zone on the same machine.
*
* An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates
* which of those it is.
*/
#define LINKTYPE_IPNET 226
/*
* CAN (Controller Area Network) frames, with a pseudo-header as supplied
* by Linux SocketCAN. See Documentation/networking/can.txt in the Linux
* source.
*
* Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_CAN_SOCKETCAN 227
/*
* Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies
* whether it's v4 or v6. Requested by <NAME> <<EMAIL>>.
*/
#define LINKTYPE_IPV4 228
#define LINKTYPE_IPV6 229
static struct linktype_map {
int dlt;
int linktype;
} map[] = {
/*
* These DLT_* codes have LINKTYPE_* codes with values identical
* to the values of the corresponding DLT_* code.
*/
{ DLT_NULL, LINKTYPE_NULL },
{ DLT_EN10MB, LINKTYPE_ETHERNET },
{ DLT_EN3MB, LINKTYPE_EXP_ETHERNET },
{ DLT_AX25, LINKTYPE_AX25 },
{ DLT_PRONET, LINKTYPE_PRONET },
{ DLT_CHAOS, LINKTYPE_CHAOS },
{ DLT_IEEE802, LINKTYPE_TOKEN_RING },
{ DLT_ARCNET, LINKTYPE_ARCNET },
{ DLT_SLIP, LINKTYPE_SLIP },
{ DLT_PPP, LINKTYPE_PPP },
{ DLT_FDDI, LINKTYPE_FDDI },
/*
* These DLT_* codes have different values on different
* platforms; we map them to LINKTYPE_* codes that
* have values that should never be equal to any DLT_*
* code.
*/
#ifdef DLT_FR
/* BSD/OS Frame Relay */
{ DLT_FR, LINKTYPE_FRELAY },
#endif
{ DLT_SYMANTEC_FIREWALL, LINKTYPE_SYMANTEC_FIREWALL },
{ DLT_ATM_RFC1483, LINKTYPE_ATM_RFC1483 },
{ DLT_RAW, LINKTYPE_RAW },
{ DLT_SLIP_BSDOS, LINKTYPE_SLIP_BSDOS },
{ DLT_PPP_BSDOS, LINKTYPE_PPP_BSDOS },
/* BSD/OS Cisco HDLC */
{ DLT_C_HDLC, LINKTYPE_C_HDLC },
/*
* These DLT_* codes are not on all platforms, but, so far,
* there don't appear to be any platforms that define
* other codes with those values; we map them to
* different LINKTYPE_* values anyway, just in case.
*/
/* Linux ATM Classical IP */
{ DLT_ATM_CLIP, LINKTYPE_ATM_CLIP },
/* NetBSD sync/async serial PPP (or Cisco HDLC) */
{ DLT_PPP_SERIAL, LINKTYPE_PPP_HDLC },
/* NetBSD PPP over Ethernet */
{ DLT_PPP_ETHER, LINKTYPE_PPP_ETHER },
/* IEEE 802.11 wireless */
{ DLT_IEEE802_11, LINKTYPE_IEEE802_11 },
/* Frame Relay */
{ DLT_FRELAY, LINKTYPE_FRELAY },
/* OpenBSD loopback */
{ DLT_LOOP, LINKTYPE_LOOP },
/* OpenBSD IPSEC enc */
{ DLT_ENC, LINKTYPE_ENC },
/* Linux cooked socket capture */
{ DLT_LINUX_SLL, LINKTYPE_LINUX_SLL },
/* Apple LocalTalk hardware */
{ DLT_LTALK, LINKTYPE_LTALK },
/* Acorn Econet */
{ DLT_ECONET, LINKTYPE_ECONET },
/* OpenBSD DLT_PFLOG */
{ DLT_PFLOG, LINKTYPE_PFLOG },
/* For Cisco-internal use */
{ DLT_CISCO_IOS, LINKTYPE_CISCO_IOS },
/* Prism II monitor-mode header plus 802.11 header */
{ DLT_PRISM_HEADER, LINKTYPE_PRISM_HEADER },
/* FreeBSD Aironet driver stuff */
{ DLT_AIRONET_HEADER, LINKTYPE_AIRONET_HEADER },
/* Siemens HiPath HDLC */
{ DLT_HHDLC, LINKTYPE_HHDLC },
/* RFC 2625 IP-over-Fibre Channel */
{ DLT_IP_OVER_FC, LINKTYPE_IP_OVER_FC },
/* Solaris+SunATM */
{ DLT_SUNATM, LINKTYPE_SUNATM },
/* RapidIO */
{ DLT_RIO, LINKTYPE_RIO },
/* PCI Express */
{ DLT_PCI_EXP, LINKTYPE_PCI_EXP },
/* Xilinx Aurora link layer */
{ DLT_AURORA, LINKTYPE_AURORA },
/* 802.11 plus BSD radio header */
{ DLT_IEEE802_11_RADIO, LINKTYPE_IEEE802_11_RADIO },
/* Tazmen Sniffer Protocol */
{ DLT_TZSP, LINKTYPE_TZSP },
/* Arcnet with Linux-style link-layer headers */
{ DLT_ARCNET_LINUX, LINKTYPE_ARCNET_LINUX },
/* Juniper-internal chassis encapsulation */
{ DLT_JUNIPER_MLPPP, LINKTYPE_JUNIPER_MLPPP },
{ DLT_JUNIPER_MLFR, LINKTYPE_JUNIPER_MLFR },
{ DLT_JUNIPER_ES, LINKTYPE_JUNIPER_ES },
{ DLT_JUNIPER_GGSN, LINKTYPE_JUNIPER_GGSN },
{ DLT_JUNIPER_MFR, LINKTYPE_JUNIPER_MFR },
{ DLT_JUNIPER_ATM2, LINKTYPE_JUNIPER_ATM2 },
{ DLT_JUNIPER_SERVICES, LINKTYPE_JUNIPER_SERVICES },
{ DLT_JUNIPER_ATM1, LINKTYPE_JUNIPER_ATM1 },
/* Apple IP-over-IEEE 1394 cooked header */
{ DLT_APPLE_IP_OVER_IEEE1394, LINKTYPE_APPLE_IP_OVER_IEEE1394 },
/* SS7 */
{ DLT_MTP2_WITH_PHDR, LINKTYPE_MTP2_WITH_PHDR },
{ DLT_MTP2, LINKTYPE_MTP2 },
{ DLT_MTP3, LINKTYPE_MTP3 },
{ DLT_SCCP, LINKTYPE_SCCP },
/* DOCSIS MAC frames */
{ DLT_DOCSIS, LINKTYPE_DOCSIS },
/* IrDA IrLAP packets + Linux-cooked header */
{ DLT_LINUX_IRDA, LINKTYPE_LINUX_IRDA },
/* IBM SP and Next Federation switches */
{ DLT_IBM_SP, LINKTYPE_IBM_SP },
{ DLT_IBM_SN, LINKTYPE_IBM_SN },
/* 802.11 plus AVS radio header */
{ DLT_IEEE802_11_RADIO_AVS, LINKTYPE_IEEE802_11_RADIO_AVS },
/*
* Any platform that defines additional DLT_* codes should:
*
* request a LINKTYPE_* code and value from tcpdump.org,
* as per the above;
*
* add, in their version of libpcap, an entry to map
* those DLT_* codes to the corresponding LINKTYPE_*
* code;
*
* redefine, in their "net/bpf.h", any DLT_* values
* that collide with the values used by their additional
* DLT_* codes, to remove those collisions (but without
* making them collide with any of the LINKTYPE_*
* values equal to 50 or above; they should also avoid
* defining DLT_* values that collide with those
* LINKTYPE_* values, either).
*/
/* Juniper-internal chassis encapsulation */
{ DLT_JUNIPER_MONITOR, LINKTYPE_JUNIPER_MONITOR },
/* BACnet MS/TP */
{ DLT_BACNET_MS_TP, LINKTYPE_BACNET_MS_TP },
/* PPP for pppd, with direction flag in the PPP header */
{ DLT_PPP_PPPD, LINKTYPE_PPP_PPPD},
/* Juniper-internal chassis encapsulation */
{ DLT_JUNIPER_PPPOE, LINKTYPE_JUNIPER_PPPOE },
{ DLT_JUNIPER_PPPOE_ATM,LINKTYPE_JUNIPER_PPPOE_ATM },
/* GPRS LLC */
{ DLT_GPRS_LLC, LINKTYPE_GPRS_LLC },
/* Transparent Generic Framing Procedure (ITU-T G.7041/Y.1303) */
{ DLT_GPF_T, LINKTYPE_GPF_T },
/* Framed Generic Framing Procedure (ITU-T G.7041/Y.1303) */
{ DLT_GPF_F, LINKTYPE_GPF_F },
{ DLT_GCOM_T1E1, LINKTYPE_GCOM_T1E1 },
{ DLT_GCOM_SERIAL, LINKTYPE_GCOM_SERIAL },
/* Juniper-internal chassis encapsulation */
{ DLT_JUNIPER_PIC_PEER, LINKTYPE_JUNIPER_PIC_PEER },
/* Endace types */
{ DLT_ERF_ETH, LINKTYPE_ERF_ETH },
{ DLT_ERF_POS, LINKTYPE_ERF_POS },
/* viSDN LAPD */
{ DLT_LINUX_LAPD, LINKTYPE_LINUX_LAPD },
/* Juniper meta-information before Ether, PPP, Frame Relay, C-HDLC Frames */
{ DLT_JUNIPER_ETHER, LINKTYPE_JUNIPER_ETHER },
{ DLT_JUNIPER_PPP, LINKTYPE_JUNIPER_PPP },
{ DLT_JUNIPER_FRELAY, LINKTYPE_JUNIPER_FRELAY },
{ DLT_JUNIPER_CHDLC, LINKTYPE_JUNIPER_CHDLC },
/* Multi Link Frame Relay (FRF.16) */
{ DLT_MFR, LINKTYPE_MFR },
/* Juniper Voice PIC */
{ DLT_JUNIPER_VP, LINKTYPE_JUNIPER_VP },
/* Controller Area Network (CAN) v2.0B */
{ DLT_A429, LINKTYPE_A429 },
/* Arinc 653 Interpartition Communication messages */
{ DLT_A653_ICM, LINKTYPE_A653_ICM },
/* USB */
{ DLT_USB, LINKTYPE_USB },
/* Bluetooth HCI UART transport layer */
{ DLT_BLUETOOTH_HCI_H4, LINKTYPE_BLUETOOTH_HCI_H4 },
/* IEEE 802.16 MAC Common Part Sublayer */
{ DLT_IEEE802_16_MAC_CPS, LINKTYPE_IEEE802_16_MAC_CPS },
/* USB with Linux header */
{ DLT_USB_LINUX, LINKTYPE_USB_LINUX },
/* Controller Area Network (CAN) v2.0B */
{ DLT_CAN20B, LINKTYPE_CAN20B },
/* IEEE 802.15.4 with address fields padded */
{ DLT_IEEE802_15_4_LINUX, LINKTYPE_IEEE802_15_4_LINUX },
/* Per Packet Information encapsulated packets */
{ DLT_PPI, LINKTYPE_PPI },
/* IEEE 802.16 MAC Common Part Sublayer plus radiotap header */
{ DLT_IEEE802_16_MAC_CPS_RADIO, LINKTYPE_IEEE802_16_MAC_CPS_RADIO },
/* Juniper Voice ISM */
{ DLT_JUNIPER_ISM, LINKTYPE_JUNIPER_ISM },
/* IEEE 802.15.4 exactly as it appears in the spec */
{ DLT_IEEE802_15_4, LINKTYPE_IEEE802_15_4 },
/* Various link-layer types for SITA */
{ DLT_SITA, LINKTYPE_SITA },
/* Various link-layer types for Endace */
{ DLT_ERF, LINKTYPE_ERF },
/* Special header for u10 Networks boards */
{ DLT_RAIF1, LINKTYPE_RAIF1 },
/* IPMB */
{ DLT_IPMB, LINKTYPE_IPMB },
/* Juniper Secure Tunnel */
{ DLT_JUNIPER_ST, LINKTYPE_JUNIPER_ST },
/* Bluetooth HCI UART transport layer, with pseudo-header */
{ DLT_BLUETOOTH_HCI_H4_WITH_PHDR, LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR },
/* AX.25 with KISS header */
{ DLT_AX25_KISS, LINKTYPE_AX25_KISS },
/* Raw LAPD, with no pseudo-header */
{ DLT_LAPD, LINKTYPE_LAPD },
/* PPP with one-byte pseudo-header giving direction */
{ DLT_PPP_WITH_DIR, LINKTYPE_PPP_WITH_DIR },
/* Cisco HDLC with one-byte pseudo-header giving direction */
{ DLT_C_HDLC_WITH_DIR, LINKTYPE_C_HDLC_WITH_DIR },
/* Frame Relay with one-byte pseudo-header giving direction */
{ DLT_FRELAY_WITH_DIR, LINKTYPE_FRELAY_WITH_DIR },
/* LAPB with one-byte pseudo-header giving direction */
{ DLT_LAPB_WITH_DIR, LINKTYPE_LAPB_WITH_DIR },
/* IPMB with Linux pseudo-header */
{ DLT_IPMB_LINUX, LINKTYPE_IPMB_LINUX },
/* FlexRay */
{ DLT_FLEXRAY, LINKTYPE_FLEXRAY },
/* MOST */
{ DLT_MOST, LINKTYPE_MOST },
/* LIN */
{ DLT_LIN, LINKTYPE_LIN },
/* X2E-private serial line capture */
{ DLT_X2E_SERIAL, LINKTYPE_X2E_SERIAL },
/* X2E-private for Xoraya data logger family */
{ DLT_X2E_XORAYA, LINKTYPE_X2E_XORAYA },
/* IEEE 802.15.4 with PHY data for non-ASK PHYs */
{ DLT_IEEE802_15_4_NONASK_PHY, LINKTYPE_IEEE802_15_4_NONASK_PHY },
/* Input device events from Linux /dev/input/eventN devices */
{ DLT_LINUX_EVDEV, LINKTYPE_LINUX_EVDEV },
/* GSM types */
{ DLT_GSMTAP_UM, LINKTYPE_GSMTAP_UM },
{ DLT_GSMTAP_ABIS, LINKTYPE_GSMTAP_ABIS },
/* MPLS, with an MPLS label as the link-layer header */
{ DLT_MPLS, LINKTYPE_MPLS },
/* USB with padded Linux header */
{ DLT_USB_LINUX_MMAPPED, LINKTYPE_USB_LINUX_MMAPPED },
/* DECT packets with a pseudo-header */
{ DLT_DECT, LINKTYPE_DECT },
/* AOS Space Data Link Protocol */
{ DLT_AOS, LINKTYPE_AOS },
/* Wireless HART */
{ DLT_WIHART, LINKTYPE_WIHART },
/* Fibre Channel FC-2 frames without SOF or EOF */
{ DLT_FC_2, LINKTYPE_FC_2 },
/* Fibre Channel FC-2 frames with SOF and EOF */
{ DLT_FC_2_WITH_FRAME_DELIMS, LINKTYPE_FC_2_WITH_FRAME_DELIMS },
/* Solaris IPNET */
{ DLT_IPNET, LINKTYPE_IPNET },
/* CAN frames with SocketCAN headers */
{ DLT_CAN_SOCKETCAN, LINKTYPE_CAN_SOCKETCAN },
/* Raw IPv4/IPv6 */
{ DLT_IPV4, LINKTYPE_IPV4 },
{ DLT_IPV6, LINKTYPE_IPV6 },
{ -1, -1 }
};
int
dlt_to_linktype(int dlt)
{
int i;
for (i = 0; map[i].dlt != -1; i++) {
if (map[i].dlt == dlt)
return (map[i].linktype);
}
/*
* If we don't have a mapping for this DLT_ code, return an
* error; that means that the table above needs to have an
* entry added.
*/
return (-1);
}
int
linktype_to_dlt(int linktype)
{
int i;
for (i = 0; map[i].linktype != -1; i++) {
if (map[i].linktype == linktype)
return (map[i].dlt);
}
/*
* If we don't have an entry for this link type, return
* the link type value; it may be a DLT_ value from an
* older version of libpcap.
*/
return linktype;
}
/*
* The DLT_USB_LINUX and DLT_USB_LINUX_MMAPPED headers are in host
* byte order when capturing (it's supplied directly from a
* memory-mapped buffer shared by the kernel).
*
* When reading a DLT_USB_LINUX or DLT_USB_LINUX_MMAPPED capture file,
* we need to convert it from the capturing host's byte order to
* the reading host's byte order.
*/
void
swap_linux_usb_header(const struct pcap_pkthdr *hdr, u_char *buf,
int header_len_64_bytes)
{
pcap_usb_header_mmapped *uhdr = (pcap_usb_header_mmapped *)buf;
/*
* The URB id is a totally opaque value; do we really need to
* convert it to the reading host's byte order???
*/
if (hdr->caplen < 8)
return;
uhdr->id = SWAPLL(uhdr->id);
if (hdr->caplen < 14)
return;
uhdr->bus_id = SWAPSHORT(uhdr->bus_id);
if (hdr->caplen < 24)
return;
uhdr->ts_sec = SWAPLL(uhdr->ts_sec);
if (hdr->caplen < 28)
return;
uhdr->ts_usec = SWAPLONG(uhdr->ts_usec);
if (hdr->caplen < 32)
return;
uhdr->status = SWAPLONG(uhdr->status);
if (hdr->caplen < 36)
return;
uhdr->urb_len = SWAPLONG(uhdr->urb_len);
if (hdr->caplen < 40)
return;
uhdr->data_len = SWAPLONG(uhdr->data_len);
if (header_len_64_bytes) {
/*
* This is either the "version 1" header, with
* 16 bytes of additional fields at the end, or
* a "version 0" header from a memory-mapped
* capture, with 16 bytes of zeroed-out padding
* at the end. Byte swap them as if this were
* a "version 1" header.
*/
if (hdr->caplen < 52)
return;
uhdr->interval = SWAPLONG(uhdr->interval);
if (hdr->caplen < 56)
return;
uhdr->start_frame = SWAPLONG(uhdr->start_frame);
if (hdr->caplen < 60)
return;
uhdr->xfer_flags = SWAPLONG(uhdr->xfer_flags);
if (hdr->caplen < 64)
return;
uhdr->ndesc = SWAPLONG(uhdr->ndesc);
}
}
|
j420247/ARO
|
4.1.1/c/AROCrypto_Mac/crypto_alg.h
|
#include "crypto_common.h"
#pragma once
typedef unsigned int ALG_ID;
BEGIN_NAMESPACE(CRYPTO)
#define SHA1_MAC_LEN 20
#define MD5_MAC_LEN 16
#define md5_vector_non_fips_allow md5_vector
#define hmac_md5_non_fips_allow hmac_md5
void cryptoapi_report_error(const char * msg);
int cryptoapi_hash_vector(ALG_ID alg, size_t hash_len, size_t num_elem,
const u8 *addr[], const size_t *len, u8 *mac);
int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem,
const u8 *addr[], const size_t *len, u8 *mac);
int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
u8 *mac);
int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac);
int hmac_md5_vector_non_fips_allow(const u8 *key, size_t key_len,
size_t num_elem, const u8 *addr[],
const size_t *len, u8 *mac);
int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem,
const u8 *addr[], const size_t *len, u8 *mac);
int tls_prf(const u8 *secret, size_t secret_len, const char *label,
const u8 *seed, size_t seed_len, u8 *out, size_t outlen);
int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac);
int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
u8 *mac);
void crypto_rsa_free(struct crypto_rsa_key *key);
int crypto_rsa_exptmod(const u8 *in, size_t inlen, u8 *out, size_t *outlen,
struct crypto_rsa_key *key, int use_private);
size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key);
END_NAMESPACE
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/mobilebackup2.h
|
/**
* @file libimobiledevice/mobilebackup2.h
* @brief Backup and restore of all device data (mobilebackup2, iOS4+ only)
* \internal
*
* Copyright (c) 2010 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMOBILEBACKUP2_H
#define IMOBILEBACKUP2_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define MOBILEBACKUP2_SERVICE_NAME "com.apple.mobilebackup2"
/** @name Error Codes */
/*@{*/
#define MOBILEBACKUP2_E_SUCCESS 0
#define MOBILEBACKUP2_E_INVALID_ARG -1
#define MOBILEBACKUP2_E_PLIST_ERROR -2
#define MOBILEBACKUP2_E_MUX_ERROR -3
#define MOBILEBACKUP2_E_BAD_VERSION -4
#define MOBILEBACKUP2_E_REPLY_NOT_OK -5
#define MOBILEBACKUP2_E_NO_COMMON_VERSION -6
#define MOBILEBACKUP2_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t mobilebackup2_error_t;
typedef struct mobilebackup2_client_private mobilebackup2_client_private;
typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */
mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client);
mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t* client, const char* label);
mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client);
mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options);
mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage);
mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes);
mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes);
mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version);
mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options);
mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/ScreencaptureBridgeHelper.h
|
<reponame>j420247/ARO<filename>5.0.0/ARO.Core/src/c/libimobiledevice-jni/ScreencaptureBridgeHelper.h
#ifndef ScreencaptureBridgeHelper
#define ScreencaptureBridgeHelper
jstring outPut(JNIEnv * env, const char * str);
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/ScreencaptureBridge.c
|
<gh_stars>100-1000
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include "ScreencaptureBridge.h"
#include "ScreencaptureBridgeHelper.h"
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#include <libimobiledevice/screenshotr.h>
idevice_t device = NULL;
lockdownd_client_t lckd = NULL;
screenshotr_client_t shotr = NULL;
lockdownd_service_descriptor_t service = NULL;
int result = -1;
int i;
const char *udid = NULL;
/*
* Class: com_att_aro_libimobiledevice_Screencapture
* Method: startService
* Signature: ()V
*/
JNIEXPORT jstring JNICALL Java_com_att_aro_libimobiledevice_ScreencaptureImpl_startService
(JNIEnv * env, jobject obj){
const char * str;// = "SUCCESS";
if (IDEVICE_E_SUCCESS != idevice_new(&device, udid)) {
str = "No device found, is it plugged in?\n";
return outPut(env, str);
}
if(!device){
str = "No device mounted";
return outPut(env, str);
}
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) {
idevice_free(device);
str = "Failed to acquire lock service.";
return outPut(env, str);
}
lockdownd_start_service(lckd, "com.apple.mobile.screenshotr", &service);
lockdownd_client_free(lckd);
if (service && service->port > 0) {
if (screenshotr_client_new(device, service, &shotr) != SCREENSHOTR_E_SUCCESS) {
str = "Could not connect to screenshotr service!";
}else{
str = "SUCCESS";
}
}else{
str = "Could not start screenshotr service! Try running Instruments tool from XCode on this device and see if it work, then try this again.";
}
return outPut(env, str);
}
jstring outPut(JNIEnv * env, const char * str){
jstring jString = (*env)->NewStringUTF( env, str );
return jString;
}
/*
* Class: com_att_aro_libimobiledevice_Screencapture
* Method: captureScreen
* Signature: ()[B
*/
JNIEXPORT jbyteArray JNICALL Java_com_att_aro_libimobiledevice_ScreencaptureImpl_captureScreen
(JNIEnv * env, jobject obj){
char *imgdata = NULL;
uint64_t imgsize = 0;
if (screenshotr_take_screenshot(shotr, &imgdata, &imgsize) != SCREENSHOTR_E_SUCCESS) {
//printf("Could not get screenshot!\n");
return NULL;
}
jbyteArray dataArr = (*env)->NewByteArray(env,imgsize);
//void SetByteArrayRegion(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
(*env)->SetByteArrayRegion(env, dataArr, 0, imgsize, (jbyte*)imgdata);
free(imgdata);
return dataArr;
}
/*
* Class: com_att_aro_libimobiledevice_Screencapture
* Method: stopService
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_att_aro_libimobiledevice_ScreencaptureImpl_stopService
(JNIEnv * env, jobject obj){
if(shotr){
screenshotr_client_free(shotr);
}
if (service){
lockdownd_service_descriptor_free(service);
}
if(device){
idevice_free(device);
}
}
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/misagent.h
|
/**
* @file libimobiledevice/misagent.h
* @brief Manage provisioning profiles.
* \internal
*
* Copyright (c) 2012 <NAME>, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMISAGENT_H
#define IMISAGENT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define MISAGENT_SERVICE_NAME "com.apple.misagent"
/** @name Error Codes */
/*@{*/
#define MISAGENT_E_SUCCESS 0
#define MISAGENT_E_INVALID_ARG -1
#define MISAGENT_E_PLIST_ERROR -2
#define MISAGENT_E_CONN_FAILED -3
#define MISAGENT_E_REQUEST_FAILED -4
#define MISAGENT_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t misagent_error_t;
typedef struct misagent_client_private misagent_client_private;
typedef misagent_client_private *misagent_client_t; /**< The client handle. */
/* Interface */
misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client);
misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t* client, const char* label);
misagent_error_t misagent_client_free(misagent_client_t client);
misagent_error_t misagent_install(misagent_client_t client, plist_t profile);
misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles);
misagent_error_t misagent_remove(misagent_client_t client, const char* profileID);
int misagent_get_status_code(misagent_client_t client);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/screenshotr.h
|
<reponame>j420247/ARO<gh_stars>100-1000
/**
* @file libimobiledevice/screenshotr.h
* @brief Retrieve a screenshot from device.
* @note Requires a mounted developer image.
* \internal
*
* Copyright (c) 2010 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ISCREENSHOTR_H
#define ISCREENSHOTR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define SCREENSHOTR_SERVICE_NAME "com.apple.mobile.screenshotr"
/** @name Error Codes */
/*@{*/
#define SCREENSHOTR_E_SUCCESS 0
#define SCREENSHOTR_E_INVALID_ARG -1
#define SCREENSHOTR_E_PLIST_ERROR -2
#define SCREENSHOTR_E_MUX_ERROR -3
#define SCREENSHOTR_E_BAD_VERSION -4
#define SCREENSHOTR_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t screenshotr_error_t;
typedef struct screenshotr_client_private screenshotr_client_private;
typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */
screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, screenshotr_client_t * client);
screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t* client, const char* label);
screenshotr_error_t screenshotr_client_free(screenshotr_client_t client);
screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/test_tcpdump.c
|
#include<stdio.h>
#include<unistd.h>
#include"tcpdump.h"
int main(nt argc,char** argv) {
tcpDump_StartCapture(argc,argv);
return 0;
}
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/libpcap-1.1.1/user_input.c
|
#include "user_input.h"
//#define TEST_INPUT
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/timeb.h>
#include <fcntl.h>
#include <linux/input.h>
#include <android/log.h>
//user input events and their string names
#define EVENT_SCREEN 1
#define EVENT_VOLUP 2
#define EVENT_VOLDOWN 3
#define EVENT_BALL 4
#define EVENT_POWER 5
#define EVENT_MENU 6
#define EVENT_HOME 7
#define EVENT_BACK 8
#define EVENT_SEARCH 9
#define ACTION_PRESS 1
#define ACTION_RELEASE 2
#define DEVICE_AGNOSTIC 1
struct device_key_info {
char deviceName[40];
char searchString[40];
int deviceID;
} ;
#define MAX_DEVICES 20
struct device_key_info gDeviceKeyArray[MAX_DEVICES] ;
int giTotalDevices;
char gszDeviceLine[256];
const char * event_str[] = {
"",
"screen",
"key volup",
"key voldown",
"key ball",
"key power",
"key menu",
"key home",
"key back",
"key search"
};
const char * action_str[] = {
"",
"press",
"release"
};
#define N_EVENTS 128
struct input_event events[N_EVENTS];
fd_set rfds;
int myDevice;
double userEventTime;
extern FILE * ofsEvents;
extern double pcapTime;
extern double userTime;
extern int exitFlag;
extern int bearerChangedvalue;
extern int sleeptimeforbearerchange;
double GetTimestamp(struct timeval * pT) {
//return pT->tv_sec + pT->tv_usec / (double)1000000.0f;
struct timeb t;
ftime(&t);
userEventTime = t.time + t.millitm / (double) 1000.0f;
return userEventTime;
}
///////////////////////////////////////////////
typedef struct {
int arg1;
int arg2;
int arg3;
int event;
int action;
} KEY_ENTRY;
//QQQQQQ #define MAX_INPUT_FILE_ID 5
#define MAX_INPUT_FILE_ID 12
#define MAX_KEY_ENTRIES 15
KEY_ENTRY keyEntries[MAX_INPUT_FILE_ID+1][MAX_KEY_ENTRIES];
int nKeyEntries[MAX_INPUT_FILE_ID+1];
int inputEvents[MAX_INPUT_FILE_ID+1];
int maxEventPlusOne;
///////////////////////////////////////////////
extern char gszFileDir[256] ;
FILE * ofsEventsLog = NULL;
void WriteUserInputLog(char *pszLogInfo, char *pszLogInfo2) {
if (strlen(gszFileDir) <= 3) {
__android_log_print(ANDROID_LOG_DEBUG, "WriteEventLog:", "gszFileDir < 3");
return ;
}
if (ofsEventsLog == NULL) {
//Set up user_input_log_events log file name (used in user_input.c module)
char szLogFileName[512];
memset(szLogFileName, '\0', sizeof(szLogFileName));
sprintf(szLogFileName, "/sdcard/ARO/%s/user_input_log_events", gszFileDir);
ofsEventsLog = fopen(szLogFileName, "w");
if (ofsEventsLog == NULL) {
__android_log_print(ANDROID_LOG_DEBUG, "WriteEventLog:", "Cannot write to user_event_log file: %s", szLogFileName);
fprintf(stderr, "Cannot write to user event log file:%s\n", szLogFileName);
} else {
__android_log_print(ANDROID_LOG_DEBUG, "WriteEventLog:", "User event log file is: %s\n", szLogFileName);
}
}
if (ofsEventsLog != NULL) {
char DEBUG_TAG_CHAR = 'D';
if ((pszLogInfo != NULL) && (pszLogInfo2 != NULL)) {
fprintf(ofsEventsLog, "%c/%s %s\n", DEBUG_TAG_CHAR, pszLogInfo, pszLogInfo2);
} else if (pszLogInfo != NULL) {
fprintf(ofsEventsLog, "%c/%s\n", DEBUG_TAG_CHAR, pszLogInfo) ;
} else {
fprintf(ofsEventsLog, "%c/\n", DEBUG_TAG_CHAR);
}
}
}
void CloseUserInputLog() {
if (ofsEventsLog != NULL) {
fflush(ofsEventsLog);
fclose(ofsEventsLog);
ofsEventsLog = NULL ;
}
}
void ReadDeviceKeyDB() {
int device, input_file;
KEY_ENTRY ke;
myDevice = -1;
memset(nKeyEntries, 0, sizeof(nKeyEntries));
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: ", "ReadDeviceKeyDB() at start");
#endif
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: ReadDeviceKeyDb() ", "at start");
FILE * ifs = fopen("/data/data/com.att.android.arodatacollector/key.db", "r");
if (ifs == NULL) {
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: ReadDeviceKeyDb() ERROR ", "unable to open key db");
printf("Cannot read file: key.db\n");
exit(0);
}
#ifdef TEST_INPUT
char aLine[256];
memset(aLine, '\0', sizeof(aLine));
#endif
char szLine[256];
int iDeviceIdx = 0 ;
giTotalDevices = 0;
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: ReadDeviceKeyDb() ", "started reading key db");
while (!feof(ifs)) {
memset(szLine, '\0', sizeof(szLine));
char *pszLine = fgets(szLine, (sizeof(szLine) - 1), ifs) ;
if ((pszLine != NULL) && (strlen(szLine) > 5)) {
if (strncmp(szLine, "DEVICE", 6) == 0) {
char* pszTok = strtok(szLine, ":") ;
if (pszTok != NULL) {
pszTok = strtok(NULL, ":");
if ((pszTok != NULL) && (iDeviceIdx < MAX_DEVICES)){
memset(gDeviceKeyArray[iDeviceIdx].deviceName, '\0',
(sizeof(gDeviceKeyArray[iDeviceIdx].deviceName)));
strncpy(gDeviceKeyArray[iDeviceIdx].deviceName, pszTok,
(sizeof(gDeviceKeyArray[iDeviceIdx].deviceName) - 1));
pszTok = strtok(NULL, ":");
if (pszTok != NULL) {
memset(gDeviceKeyArray[iDeviceIdx].searchString, '\0',
(sizeof(gDeviceKeyArray[iDeviceIdx].searchString)));
strncpy(gDeviceKeyArray[iDeviceIdx].searchString, pszTok,
(sizeof(gDeviceKeyArray[iDeviceIdx].searchString) - 1));
pszTok = strtok(NULL, ":");
if (pszTok != NULL) {
gDeviceKeyArray[iDeviceIdx].deviceID = atoi(pszTok);
}
if (pszTok != NULL) {
gDeviceKeyArray[iDeviceIdx].deviceID = atoi(pszTok);
#ifdef TEST_INPUT
sprintf(aLine, "Added to gDeviceKeyArray iDeviceIdx = %d deviceId = %d for deviceName: %s",
iDeviceIdx, gDeviceKeyArray[iDeviceIdx].deviceID,
gDeviceKeyArray[iDeviceIdx].deviceName);
WriteUserInputLog("libpcap: ReadDeviceKeyDB() ", aLine);
#endif
} else {
#ifdef TEST_INPUT
sprintf(aLine, "ERROR: not all info for gDeviceKeyArry iDeviceIdx = %d for deviceName: %s",
iDeviceIdx, gDeviceKeyArray[iDeviceIdx].deviceName);
WriteUserInputLog("libpcap: ReadDeviceKeyDB() ", aLine);
#endif
}
if ((strlen(gszDeviceLine) > 0) &&
(strstr(gszDeviceLine, gDeviceKeyArray[iDeviceIdx].searchString) != NULL)) {
myDevice = gDeviceKeyArray[iDeviceIdx].deviceID ;
printf("Device Type: %s\n", gDeviceKeyArray[iDeviceIdx].deviceName);
//TODO : Need to come up with generic solution for device transition wait
if (myDevice == 9) {
sleeptimeforbearerchange = 8;
}
#ifdef TEST_INPUT
sprintf(aLine, "Device Type: %s: %d",
gDeviceKeyArray[iDeviceIdx].deviceName, myDevice);
WriteUserInputLog("libpcap: MATCH! ReadDeviceKeyDB() ", aLine);
#endif
} else {
#ifdef TEST_INPUT
sprintf(aLine, "Device Type: %s: %d does not match",
gDeviceKeyArray[iDeviceIdx].deviceName, myDevice);
WriteUserInputLog("libpcap: Does NOT match. ReadDeviceKeyDB() ", aLine);
#endif
}
} else {
#ifdef TEST_INPUT
sprintf(aLine, "ERROR: line not complete %s iDeviceIdx = %d for deviceName: %s",
szLine, iDeviceIdx, gDeviceKeyArray[iDeviceIdx].deviceName);
WriteUserInputLog("libpcap: missing info in ReadDeviceKeyDB() ", aLine);
#endif
}
iDeviceIdx++;
}
}
} else {
sscanf(szLine, "%d %d %d %d %d %d %d",
&device, &input_file, &ke.arg1, &ke.arg2, &ke.arg3, &ke.event, &ke.action);
#ifdef TEST_INPUT
sprintf(aLine, "line_values = %d %d %d %d %d %d %d",
device, input_file, ke.arg1, ke.arg2, ke.arg3, ke.event, ke.action);
WriteUserInputLog("libpcap: ReadDeviceKeyDB() ", aLine);
#endif
if (device == -1) {
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: ReadDeviceKeyDB() ", "device == -1, breaking");
#endif
break;
}
if ((device != myDevice) && (device != DEVICE_AGNOSTIC)){
#ifdef TEST_INPUT
sprintf(aLine, "myDevice = %d is not equal to device = %d ; or device_agnostic, continuing", myDevice, device);
WriteUserInputLog("libpcap: ReadDeviceKeyDB() ", aLine);
#endif
continue;
}
#ifdef TEST_INPUT
int iNKeyEntries = nKeyEntries[input_file] ;
sprintf(aLine, "myDevice = %d should be equal to device = %d or be DEVICE_AGNOSTIC", myDevice, device);
WriteUserInputLog("libpcap: ReadDeviceKeyDB()", aLine);
int iInputFile = input_file;
int inKeyEntriesForInputFile = nKeyEntries[input_file];
sprintf(aLine, "for input_file %d nKeyEntries[input_file] is now %d:",
iInputFile, inKeyEntriesForInputFile);
WriteUserInputLog("libpcap: ReadDeviceKeyDB()", aLine);
sprintf(aLine, "for keyEntries[%d][%d] now will be assigned ke values: %d %d %d %d %d",
iInputFile, inKeyEntriesForInputFile,
ke.arg1, ke.arg2, ke.arg3, ke.event, ke.action);
WriteUserInputLog("libpcap: ReadDeviceKeyDB()", aLine);
#endif
keyEntries[input_file][nKeyEntries[input_file]++] = ke;
}
}
}
fclose(ifs);
giTotalDevices = iDeviceIdx;
if (myDevice == -1) {
if (strlen(gszDeviceLine) > 0) {
char aLineInfo[256];
memset(aLineInfo, '\0', sizeof(aLineInfo));
sprintf(aLineInfo,
"Unknown device not mapped for [ro.product.device]: %s",
gszDeviceLine);
WriteUserInputLog("libpcap: ReadDeviceKeyDb() ", aLineInfo);
}
WriteUserInputLog("libpcap: ReadDeviceKeyDB() ", " -- will be using device agnostic ");
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: ReadDeviceKeyDb() ",
" no device found -- will be using device agnostic");
//exit(0);
}
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: ", "ReadDeviceKeyDB() at end");
#endif
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: ReadDeviceKeyDb() ", "completed reading key db");
}
void GetMyDeviceType() {
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: ", "GetMyDeviceType() at start");
#endif
memset(gszDeviceLine, '\0', sizeof(gszDeviceLine));
char szPropFileName[256];
memset(szPropFileName, '\0', sizeof(szPropFileName));
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: GetMyDeviceType() ", "gszFileDir = %s", gszFileDir);
sprintf(szPropFileName, "/sdcard/ARO/%s/prop", gszFileDir);
char szCmd[512];
memset(szCmd, '\0', sizeof(szCmd));
sprintf(szCmd, "/system/bin/getprop > %s", szPropFileName);
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: GetMyDeviceType() ", "szCmd = %s", szCmd);
system(szCmd);
FILE * ifs = fopen(szPropFileName, "r");
char szLine[256];
if (ifs == NULL) {
printf("Cannot determine device type\n");
memset(szLine, '\0', sizeof(szLine));
sprintf(szLine, "Could not open %s ; so could not determine device type", szPropFileName);
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: GetMyDeviceType() ", szLine);
#endif
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: GetMyDeviceType() ", "Failed: %s", szLine);
// exit(0);
return ;
} else {
char buf[1024];
while (!feof(ifs)) {
if (fgets(buf, sizeof(buf), ifs) == NULL) {
break;
}
if (strstr(buf, "[ro.product.device]") != NULL) {
strncpy(gszDeviceLine, buf, (sizeof(gszDeviceLine) - 1));
break;
}
}
if (ifs != NULL) {
fclose(ifs);
}
}
if (strlen(gszDeviceLine) <= 0) {
sprintf(szLine,
"[ro.product.device] entry not found in properties file: %s",
szPropFileName);
WriteUserInputLog("libpcap: GetMyDeviceType() ", szLine);
__android_log_print(ANDROID_LOG_DEBUG, "libpcap: GetMyDeviceType() ", "Failed: %s", szLine);
}
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: GetMyDeviceType() ", "at end");
#endif
}
int OpenInputDevice(int id) {
char deviceName[128];
sprintf(deviceName, "/dev/input/event%d", id);
printf("Opening input device %s... ", deviceName);
int fd = open(deviceName, O_RDWR);
if (fd == -1) {
WriteUserInputLog("libpcap: Error for open in OpenInputDevice() ", deviceName);
printf("Error: cannot open input device %s\n", deviceName);
//exit(0);
}
#ifdef TEST_INPUT
char aLine[256];
memset(aLine, '\0', sizeof(aLine));
sprintf(aLine, " OpenInputDevice() fd = %d", fd);
WriteUserInputLog("libpcap: ", "OpenInputDevice() actually opened");
WriteUserInputLog("libpcap: b", aLine);
#endif
printf("fd = %d\n", fd);
return fd;
}
int CloseInputDevice(int id) {
if (inputEvents[id] != -1) {
close(inputEvents[id]);
}
}
//return 0 to stop
static int HandleEvents() {
int i, j, k, m;
struct timeval timeout;
timeout.tv_sec = 10;
timeout.tv_usec = 0;
char aLine[256];
memset(aLine, '\0', sizeof(aLine));
sprintf(aLine, "at Start exitFlag = %d", exitFlag);
if (exitFlag == 4) {
WriteUserInputLog("libpcap: HandleEvent() returning 0 due to exit flag, exitFlag now 3", aLine);
exitFlag = 3;
return 0;
}
FD_ZERO(&rfds);
int iMaxInputFileId = MAX_INPUT_FILE_ID;
for (i=0; i<=MAX_INPUT_FILE_ID; i++) {
if (inputEvents[i] > 0) {
FD_SET(inputEvents[i], &rfds);
}
}
int retval;
retval = select(maxEventPlusOne, &rfds, NULL, NULL, &timeout);
if (retval == 0) {
WriteUserInputLog("libpcap: HandleEvents() retval from select is 0: ",
"returning 1 and exiting HandleEvents()");
return 1;
} else if (retval == -1) {
WriteUserInputLog("libpcap: HandleEvent() ERROR: select() fails!", "exiting app!");
if(bearerChangedvalue > 0)
{
printf("Bearer Change Should capture again");
__android_log_print(ANDROID_LOG_DEBUG, "Thread CaptureUserInput() ", "Bearer Change Should capture again=%d",bearerChangedvalue);
HandleEvents();
}
else
{
printf("Error: Select() fails");
exit(0);
}
}
int iEventMatchesCount = 0;
for (i=0; i<=MAX_INPUT_FILE_ID; i++) {
#ifdef TEST_INPUT
sprintf(aLine, "i=%d ; inputEvents[i]=%d", i, inputEvents[i]);
WriteUserInputLog("libpcap HandleEvent top of outer for", aLine);
#endif
if (inputEvents[i] == -1) {
continue;
}
if (!(FD_ISSET(inputEvents[i], &rfds))) {
continue;
}
int rd = read(inputEvents[i], events, sizeof(struct input_event) * N_EVENTS);
int nEvents = rd / sizeof(struct input_event);
m = nKeyEntries[i];
#ifdef TEST_INPUT
sprintf(aLine, "nEvents = %d ; m = %d", nEvents, m);
WriteUserInputLog("libpcap HandleEvent top of outer for", aLine);
#endif
for (j=0; j<nEvents; j++) {
int arg1 = events[j].type;
int arg2 = events[j].code;
int arg3 = events[j].value;
double tm = GetTimestamp(&events[j].time);
for (k=0; k<m; k++) {
if (exitFlag == 4) {
#ifdef TEST_INPUT
sprintf(aLine, "k=%d ; m=%d", k, m);
WriteUserInputLog("libpcap HandleEvent exitFlag is 4; setting exitFlag=3; returning 0", aLine);
#endif
exitFlag = 3;
return 0;
}
//NOTE: an "-1" entry for arg3 means anything positive
if (keyEntries[i][k].arg1 == arg1 &&
keyEntries[i][k].arg2 == arg2 &&
(keyEntries[i][k].arg3 == arg3 ||
(keyEntries[i][k].arg3 == -1 && arg3>0))) {
#ifdef TEST_INPUT
sprintf(aLine, "KEYINFO: m=%d i=%d j=%d k=%d ; event j arg1-2-3: %d %d %d ; kE[i][k].event=%d %s, kE[i][k].action=%d %s",
m, i, j, k, arg1, arg2, arg3, keyEntries[i][k].event, event_str[keyEntries[i][k].event],
keyEntries[i][k].action, action_str[keyEntries[i][k].action]);
WriteUserInputLog("libpcap HandleEvent match! for: " , aLine);
printf("%.6lf %s %s\n",
tm,
event_str[keyEntries[i][k].event],
action_str[keyEntries[i][k].action]
);
printf("\n exitFlag = %d",exitFlag);
#endif
if (exitFlag == 4) {
WriteUserInputLog("libpcap HandleEvent NO MATCH! exitFlag is 4, setting exitFlag to 3" , "returning 0");
exitFlag = 3;
return 0;
}
iEventMatchesCount++;
fprintf(ofsEvents, "%.6lf %s %s\n",
tm,
event_str[keyEntries[i][k].event],
action_str[keyEntries[i][k].action]
);
if (keyEntries[i][k].event == EVENT_VOLDOWN) {
if (keyEntries[i][k].action == ACTION_RELEASE) {
sprintf(aLine, "exitFlag = %d", exitFlag);
if (exitFlag == 3) {
return 0 ;
} else {
;
}
} else {
;
}
} else {
;
//exitFlag = 0;
}
} else {
#ifdef TEST_INPUT
sprintf(aLine, "NO_KY_INFO: m=%d i=%d j=%d k=%d ; event j arg1-2-3: %d %d %d ; NO MATCH; keep checking",
m, i, j, k, arg1, arg2, arg3);
WriteUserInputLog("libpcap HandleEvent no MATCH! ", aLine);
#endif
}
}
}
}
return 1;
}
void * CaptureUserInput(void * arg) {
int i;
__android_log_print(ANDROID_LOG_DEBUG, "Thread CaptureUserInput() ", "pre_getMyDeviceType");
GetMyDeviceType();
__android_log_print(ANDROID_LOG_DEBUG, "Thread CaptureUserInput() ", "pre_ReadDeviceKeyDB");
ReadDeviceKeyDB();
__android_log_print(ANDROID_LOG_DEBUG, "Thread CaptureUserInput() ", "post_ReadDeviceKeyDB");
printf("sizeof(struct input_event) = %d\n", sizeof(struct input_event));
maxEventPlusOne = -1;
char aLine[256];
for (i=0; i<=MAX_INPUT_FILE_ID; i++) {
sprintf(aLine, "i = %d", i);
if (nKeyEntries[i] == 0) {
inputEvents[i] = -1;
} else {
inputEvents[i] = OpenInputDevice(i);
if (inputEvents[i] > maxEventPlusOne) {
maxEventPlusOne = inputEvents[i];
sprintf(aLine, "NOT_EXPECTED: i = %d, inputEvents[i] (%d) > maxEventPlusOne = %d",
i, inputEvents[i], maxEventPlusOne);
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: b CaptureUserInput() nKeyEntries[i] != 0 ", aLine);
#endif
}
}
}
maxEventPlusOne++;
while (1) {
if (!HandleEvents()) {
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: After HandleEvents returns 0 in CaptureUserInput() ",
"setting exitFlag = 3 and breaking from loop");
#endif
exitFlag = 3;
break;
}
if (exitFlag == 4) {
#ifdef TEST_INPUT
WriteUserInputLog("libpcap: After HandleEvents exitFlag is 4 ",
"setting exitFlag = 3 and breaking from loop");
#endif
exitFlag = 3;
break;
}
}
printf("Thread CaptureUserInput() exit.\n");
__android_log_print(ANDROID_LOG_DEBUG, "Thread CaptureUserInput() exit", "EXIT");
printf("sizeof(struct input_event) = %d\n", sizeof(struct input_event));
for (i=0; i<=MAX_INPUT_FILE_ID; i++) {
CloseInputDevice(i);
}
CloseUserInputLog();
return 0;
}
/*
#Device type: nexus one=1, captivate=2, inspire=3, atrix=4, Infuse = 5, HTC Aria =6
#Event Screen=1 volume up=2 volume down=3 ball=4 power=5 menu=6 home=7 back=8 search=9
#Action press=1 release=2
#Device Input_File Arg1 Arg2 Arg3 Event Action
1 2 1 330 1 1 1
1 2 1 330 0 1 2
1 4 1 115 1 2 1
1 4 1 115 0 2 2
1 4 1 114 1 3 1
1 4 1 114 0 3 2
1 4 1 116 1 5 1
1 4 1 116 0 5 2
1 5 1 272 1 4 1
1 5 1 272 0 4 2
2 3 3 48 40 1 1
2 3 3 48 0 1 2
2 1 1 42 1 2 1
2 1 1 42 0 2 2
2 1 1 58 1 3 1
2 1 1 58 0 3 2
2 1 1 26 1 5 1
2 1 1 26 0 5 2
2 2 1 158 1 6 1
2 2 1 158 0 6 2
2 2 1 139 1 7 1
2 2 1 139 0 7 2
2 2 1 28 1 8 1
2 2 1 28 0 8 2
2 2 1 107 1 9 1
2 2 1 107 0 9 2
3 3 3 48 -1 1 1
3 3 3 48 0 1 2
3 4 1 115 1 2 1
3 4 1 115 0 2 2
3 4 1 114 1 3 1
3 4 1 114 0 3 2
3 4 1 116 1 5 1
3 4 1 116 0 5 2
4 3 3 48 1 1 1
4 3 3 48 0 1 2
4 1 1 115 1 2 1
4 1 1 115 0 2 2
4 1 1 114 1 3 1
4 1 1 114 0 3 2
4 0 1 107 1 5 1
4 0 1 107 0 5 2
-1 -1 -1 -1 -1 -1 -1
*/
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/print-isakmp.c
|
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.61 2008-02-05 19:34:25 guy Exp $ (LBL)";
#endif
#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
#include <string.h>
#include <stdio.h>
#include "isakmp.h"
#include "ipsec_doi.h"
#include "oakley.h"
#include "interface.h"
#include "addrtoname.h"
#include "extract.h" /* must come after interface.h */
#include "ip.h"
#ifdef INET6
#include "ip6.h"
#endif
#ifndef HAVE_SOCKADDR_STORAGE
#define sockaddr_storage sockaddr
#endif
#define DECLARE_PRINTER(func) static const u_char *ike##func##_print( \
netdissect_options *ndo, u_char tpay, \
const struct isakmp_gen *ext, \
u_int item_len, \
const u_char *end_pointer, \
u_int32_t phase,\
u_int32_t doi0, \
u_int32_t proto0, int depth)
DECLARE_PRINTER(v1_sa);
DECLARE_PRINTER(v1_p);
DECLARE_PRINTER(v1_t);
DECLARE_PRINTER(v1_ke);
DECLARE_PRINTER(v1_id);
DECLARE_PRINTER(v1_cert);
DECLARE_PRINTER(v1_cr);
DECLARE_PRINTER(v1_sig);
DECLARE_PRINTER(v1_hash);
DECLARE_PRINTER(v1_nonce);
DECLARE_PRINTER(v1_n);
DECLARE_PRINTER(v1_d);
DECLARE_PRINTER(v1_vid);
DECLARE_PRINTER(v2_sa);
DECLARE_PRINTER(v2_ke);
DECLARE_PRINTER(v2_ID);
DECLARE_PRINTER(v2_cert);
DECLARE_PRINTER(v2_cr);
DECLARE_PRINTER(v2_auth);
DECLARE_PRINTER(v2_nonce);
DECLARE_PRINTER(v2_n);
DECLARE_PRINTER(v2_d);
DECLARE_PRINTER(v2_vid);
DECLARE_PRINTER(v2_TS);
DECLARE_PRINTER(v2_cp);
DECLARE_PRINTER(v2_eap);
static const u_char *ikev2_e_print(netdissect_options *ndo,
struct isakmp *base,
u_char tpay,
const struct isakmp_gen *ext,
u_int item_len,
const u_char *end_pointer,
u_int32_t phase,
u_int32_t doi0,
u_int32_t proto0, int depth);
static const u_char *ike_sub0_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
static const u_char *ikev1_sub_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
static const u_char *ikev2_sub_print(netdissect_options *ndo,
struct isakmp *base,
u_char np, const struct isakmp_gen *ext,
const u_char *ep, u_int32_t phase,
u_int32_t doi, u_int32_t proto,
int depth);
static char *numstr(int);
static void safememcpy(void *, const void *, size_t);
static void
ikev1_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2, struct isakmp *base);
#define MAXINITIATORS 20
int ninitiator = 0;
struct {
cookie_t initiator;
struct sockaddr_storage iaddr;
struct sockaddr_storage raddr;
} cookiecache[MAXINITIATORS];
/* protocol id */
static const char *protoidstr[] = {
NULL, "isakmp", "ipsec-ah", "ipsec-esp", "ipcomp",
};
/* isakmp->np */
static const char *npstr[] = {
"none", "sa", "p", "t", "ke", "id", "cert", "cr", "hash", /* 0 - 8 */
"sig", "nonce", "n", "d", "vid", /* 9 - 13 */
"pay14", "pay15", "pay16", "pay17", "pay18", /* 14- 18 */
"pay19", "pay20", "pay21", "pay22", "pay23", /* 19- 23 */
"pay24", "pay25", "pay26", "pay27", "pay28", /* 24- 28 */
"pay29", "pay30", "pay31", "pay32", /* 29- 32 */
"v2sa", "v2ke", "v2IDi", "v2IDr", "v2cert",/* 33- 37 */
"v2cr", "v2auth","v2nonce", "v2n", "v2d", /* 38- 42 */
"v2vid", "v2TSi", "v2TSr", "v2e", "v2cp", /* 43- 47 */
"v2eap", /* 48 */
};
/* isakmp->np */
static const u_char *(*npfunc[])(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len,
const u_char *end_pointer,
u_int32_t phase,
u_int32_t doi0,
u_int32_t proto0, int depth) = {
NULL,
ikev1_sa_print,
ikev1_p_print,
ikev1_t_print,
ikev1_ke_print,
ikev1_id_print,
ikev1_cert_print,
ikev1_cr_print,
ikev1_hash_print,
ikev1_sig_print,
ikev1_nonce_print,
ikev1_n_print,
ikev1_d_print,
ikev1_vid_print, /* 13 */
NULL, NULL, NULL, NULL, NULL, /* 14- 18 */
NULL, NULL, NULL, NULL, NULL, /* 19- 23 */
NULL, NULL, NULL, NULL, NULL, /* 24- 28 */
NULL, NULL, NULL, NULL, /* 29- 32 */
ikev2_sa_print, /* 33 */
ikev2_ke_print, /* 34 */
ikev2_ID_print, /* 35 */
ikev2_ID_print, /* 36 */
ikev2_cert_print, /* 37 */
ikev2_cr_print, /* 38 */
ikev2_auth_print, /* 39 */
ikev2_nonce_print, /* 40 */
ikev2_n_print, /* 41 */
ikev2_d_print, /* 42 */
ikev2_vid_print, /* 43 */
ikev2_TS_print, /* 44 */
ikev2_TS_print, /* 45 */
NULL, /* ikev2_e_print,*/ /* 46 - special */
ikev2_cp_print, /* 47 */
ikev2_eap_print, /* 48 */
};
/* isakmp->etype */
static const char *etypestr[] = {
/* IKEv1 exchange types */
"none", "base", "ident", "auth", "agg", "inf", NULL, NULL, /* 0-7 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 8-15 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 16-23 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 24-31 */
"oakley-quick", "oakley-newgroup", /* 32-33 */
/* IKEv2 exchange types */
"ikev2_init", "ikev2_auth", "child_sa", "inf2" /* 34-37 */
};
#define STR_OR_ID(x, tab) \
(((x) < sizeof(tab)/sizeof(tab[0]) && tab[(x)]) ? tab[(x)] : numstr(x))
#define PROTOIDSTR(x) STR_OR_ID(x, protoidstr)
#define NPSTR(x) STR_OR_ID(x, npstr)
#define ETYPESTR(x) STR_OR_ID(x, etypestr)
#define CHECKLEN(p, np) \
if (ep < (u_char *)(p)) { \
ND_PRINT((ndo," [|%s]", NPSTR(np))); \
goto done; \
}
#define NPFUNC(x) \
(((x) < sizeof(npfunc)/sizeof(npfunc[0]) && npfunc[(x)]) \
? npfunc[(x)] : NULL)
static int
iszero(u_char *p, size_t l)
{
while (l--) {
if (*p++)
return 0;
}
return 1;
}
/* find cookie from initiator cache */
static int
cookie_find(cookie_t *in)
{
int i;
for (i = 0; i < MAXINITIATORS; i++) {
if (memcmp(in, &cookiecache[i].initiator, sizeof(*in)) == 0)
return i;
}
return -1;
}
/* record initiator */
static void
cookie_record(cookie_t *in, const u_char *bp2)
{
int i;
struct ip *ip;
struct sockaddr_in *sin;
#ifdef INET6
struct ip6_hdr *ip6;
struct sockaddr_in6 *sin6;
#endif
i = cookie_find(in);
if (0 <= i) {
ninitiator = (i + 1) % MAXINITIATORS;
return;
}
ip = (struct ip *)bp2;
switch (IP_V(ip)) {
case 4:
memset(&cookiecache[ninitiator].iaddr, 0,
sizeof(cookiecache[ninitiator].iaddr));
memset(&cookiecache[ninitiator].raddr, 0,
sizeof(cookiecache[ninitiator].raddr));
sin = (struct sockaddr_in *)&cookiecache[ninitiator].iaddr;
#ifdef HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(struct sockaddr_in);
#endif
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
sin = (struct sockaddr_in *)&cookiecache[ninitiator].raddr;
#ifdef HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(struct sockaddr_in);
#endif
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst));
break;
#ifdef INET6
case 6:
memset(&cookiecache[ninitiator].iaddr, 0,
sizeof(cookiecache[ninitiator].iaddr));
memset(&cookiecache[ninitiator].raddr, 0,
sizeof(cookiecache[ninitiator].raddr));
ip6 = (struct ip6_hdr *)bp2;
sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].iaddr;
#ifdef HAVE_SOCKADDR_SA_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
#endif
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].raddr;
#ifdef HAVE_SOCKADDR_SA_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
#endif
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
break;
#endif
default:
return;
}
memcpy(&cookiecache[ninitiator].initiator, in, sizeof(*in));
ninitiator = (ninitiator + 1) % MAXINITIATORS;
}
#define cookie_isinitiator(x, y) cookie_sidecheck((x), (y), 1)
#define cookie_isresponder(x, y) cookie_sidecheck((x), (y), 0)
static int
cookie_sidecheck(int i, const u_char *bp2, int initiator)
{
struct sockaddr_storage ss;
struct sockaddr *sa;
struct ip *ip;
struct sockaddr_in *sin;
#ifdef INET6
struct ip6_hdr *ip6;
struct sockaddr_in6 *sin6;
#endif
int salen;
memset(&ss, 0, sizeof(ss));
ip = (struct ip *)bp2;
switch (IP_V(ip)) {
case 4:
sin = (struct sockaddr_in *)&ss;
#ifdef HAVE_SOCKADDR_SA_LEN
sin->sin_len = sizeof(struct sockaddr_in);
#endif
sin->sin_family = AF_INET;
memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
break;
#ifdef INET6
case 6:
ip6 = (struct ip6_hdr *)bp2;
sin6 = (struct sockaddr_in6 *)&ss;
#ifdef HAVE_SOCKADDR_SA_LEN
sin6->sin6_len = sizeof(struct sockaddr_in6);
#endif
sin6->sin6_family = AF_INET6;
memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
break;
#endif
default:
return 0;
}
sa = (struct sockaddr *)&ss;
if (initiator) {
if (sa->sa_family != ((struct sockaddr *)&cookiecache[i].iaddr)->sa_family)
return 0;
#ifdef HAVE_SOCKADDR_SA_LEN
salen = sa->sa_len;
#else
#ifdef INET6
if (sa->sa_family == AF_INET6)
salen = sizeof(struct sockaddr_in6);
else
salen = sizeof(struct sockaddr);
#else
salen = sizeof(struct sockaddr);
#endif
#endif
if (memcmp(&ss, &cookiecache[i].iaddr, salen) == 0)
return 1;
} else {
if (sa->sa_family != ((struct sockaddr *)&cookiecache[i].raddr)->sa_family)
return 0;
#ifdef HAVE_SOCKADDR_SA_LEN
salen = sa->sa_len;
#else
#ifdef INET6
if (sa->sa_family == AF_INET6)
salen = sizeof(struct sockaddr_in6);
else
salen = sizeof(struct sockaddr);
#else
salen = sizeof(struct sockaddr);
#endif
#endif
if (memcmp(&ss, &cookiecache[i].raddr, salen) == 0)
return 1;
}
return 0;
}
static void
hexprint(netdissect_options *ndo, caddr_t loc, size_t len)
{
u_char *p;
size_t i;
p = (u_char *)loc;
for (i = 0; i < len; i++)
ND_PRINT((ndo,"%02x", p[i] & 0xff));
}
static int
rawprint(netdissect_options *ndo, caddr_t loc, size_t len)
{
ND_TCHECK2(*loc, len);
hexprint(ndo, loc, len);
return 1;
trunc:
return 0;
}
/*
* returns false if we run out of data buffer
*/
static int ike_show_somedata(struct netdissect_options *ndo,
const u_char *cp, const u_char *ep)
{
/* there is too much data, just show some of it */
const u_char *end = ep - 20;
int elen = 20;
int len = ep - cp;
if(len > 10) {
len = 10;
}
/* really shouldn't happen because of above */
if(end < cp + len) {
end = cp+len;
elen = ep - end;
}
ND_PRINT((ndo," data=("));
if(!rawprint(ndo, (caddr_t)(cp), len)) goto trunc;
ND_PRINT((ndo, "..."));
if(elen) {
if(!rawprint(ndo, (caddr_t)(end), elen)) goto trunc;
}
ND_PRINT((ndo,")"));
return 1;
trunc:
return 0;
}
struct attrmap {
const char *type;
u_int nvalue;
const char *value[30]; /*XXX*/
};
static const u_char *
ikev1_attrmap_print(netdissect_options *ndo,
const u_char *p, const u_char *ep,
const struct attrmap *map, size_t nmap)
{
u_int16_t *q;
int totlen;
u_int32_t t, v;
q = (u_int16_t *)p;
if (p[0] & 0x80)
totlen = 4;
else
totlen = 4 + EXTRACT_16BITS(&q[1]);
if (ep < p + totlen) {
ND_PRINT((ndo,"[|attr]"));
return ep + 1;
}
ND_PRINT((ndo,"("));
t = EXTRACT_16BITS(&q[0]) & 0x7fff;
if (map && t < nmap && map[t].type)
ND_PRINT((ndo,"type=%s ", map[t].type));
else
ND_PRINT((ndo,"type=#%d ", t));
if (p[0] & 0x80) {
ND_PRINT((ndo,"value="));
v = EXTRACT_16BITS(&q[1]);
if (map && t < nmap && v < map[t].nvalue && map[t].value[v])
ND_PRINT((ndo,"%s", map[t].value[v]));
else
rawprint(ndo, (caddr_t)&q[1], 2);
} else {
ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1])));
rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&q[1]));
}
ND_PRINT((ndo,")"));
return p + totlen;
}
static const u_char *
ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep)
{
u_int16_t *q;
int totlen;
u_int32_t t;
q = (u_int16_t *)p;
if (p[0] & 0x80)
totlen = 4;
else
totlen = 4 + EXTRACT_16BITS(&q[1]);
if (ep < p + totlen) {
ND_PRINT((ndo,"[|attr]"));
return ep + 1;
}
ND_PRINT((ndo,"("));
t = EXTRACT_16BITS(&q[0]) & 0x7fff;
ND_PRINT((ndo,"type=#%d ", t));
if (p[0] & 0x80) {
ND_PRINT((ndo,"value="));
t = q[1];
rawprint(ndo, (caddr_t)&q[1], 2);
} else {
ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1])));
rawprint(ndo, (caddr_t)&p[2], EXTRACT_16BITS(&q[1]));
}
ND_PRINT((ndo,")"));
return p + totlen;
}
static const u_char *
ikev1_sa_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext,
u_int item_len _U_,
const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_,
u_int32_t proto0, int depth)
{
const struct ikev1_pl_sa *p;
struct ikev1_pl_sa sa;
const u_int32_t *q;
u_int32_t doi, sit, ident;
const u_char *cp, *np;
int t;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SA)));
p = (struct ikev1_pl_sa *)ext;
ND_TCHECK(*p);
safememcpy(&sa, ext, sizeof(sa));
doi = ntohl(sa.doi);
sit = ntohl(sa.sit);
if (doi != 1) {
ND_PRINT((ndo," doi=%d", doi));
ND_PRINT((ndo," situation=%u", (u_int32_t)ntohl(sa.sit)));
return (u_char *)(p + 1);
}
ND_PRINT((ndo," doi=ipsec"));
q = (u_int32_t *)&sa.sit;
ND_PRINT((ndo," situation="));
t = 0;
if (sit & 0x01) {
ND_PRINT((ndo,"identity"));
t++;
}
if (sit & 0x02) {
ND_PRINT((ndo,"%ssecrecy", t ? "+" : ""));
t++;
}
if (sit & 0x04)
ND_PRINT((ndo,"%sintegrity", t ? "+" : ""));
np = (u_char *)ext + sizeof(sa);
if (sit != 0x01) {
ND_TCHECK2(*(ext + 1), sizeof(ident));
safememcpy(&ident, ext + 1, sizeof(ident));
ND_PRINT((ndo," ident=%u", (u_int32_t)ntohl(ident)));
np += sizeof(ident);
}
ext = (struct isakmp_gen *)np;
ND_TCHECK(*ext);
cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0,
depth);
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SA)));
return NULL;
}
static const u_char *
ikev1_p_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep, u_int32_t phase, u_int32_t doi0,
u_int32_t proto0 _U_, int depth)
{
const struct ikev1_pl_p *p;
struct ikev1_pl_p prop;
const u_char *cp;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_P)));
p = (struct ikev1_pl_p *)ext;
ND_TCHECK(*p);
safememcpy(&prop, ext, sizeof(prop));
ND_PRINT((ndo," #%d protoid=%s transform=%d",
prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t));
if (prop.spi_size) {
ND_PRINT((ndo," spi="));
if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size))
goto trunc;
}
ext = (struct isakmp_gen *)((u_char *)(p + 1) + prop.spi_size);
ND_TCHECK(*ext);
cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
prop.prot_id, depth);
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P)));
return NULL;
}
static const char *ikev1_p_map[] = {
NULL, "ike",
};
static const char *ikev2_t_type_map[]={
NULL, "encr", "prf", "integ", "dh", "esn"
};
static const char *ah_p_map[] = {
NULL, "(reserved)", "md5", "sha", "1des",
"sha2-256", "sha2-384", "sha2-512",
};
static const char *prf_p_map[] = {
NULL, "hmac-md5", "hmac-sha", "hmac-tiger",
"aes128_xcbc"
};
static const char *integ_p_map[] = {
NULL, "hmac-md5", "hmac-sha", "dec-mac",
"kpdk-md5", "aes-xcbc"
};
static const char *esn_p_map[] = {
"no-esn", "esn"
};
static const char *dh_p_map[] = {
NULL, "modp768",
"modp1024", /* group 2 */
"EC2N 2^155", /* group 3 */
"EC2N 2^185", /* group 4 */
"modp1536", /* group 5 */
"iana-grp06", "iana-grp07", /* reserved */
"iana-grp08", "iana-grp09",
"iana-grp10", "iana-grp11",
"iana-grp12", "iana-grp13",
"modp2048", /* group 14 */
"modp3072", /* group 15 */
"modp4096", /* group 16 */
"modp6144", /* group 17 */
"modp8192", /* group 18 */
};
static const char *esp_p_map[] = {
NULL, "1des-iv64", "1des", "3des", "rc5", "idea", "cast",
"blowfish", "3idea", "1des-iv32", "rc4", "null", "aes"
};
static const char *ipcomp_p_map[] = {
NULL, "oui", "deflate", "lzs",
};
const struct attrmap ipsec_t_map[] = {
{ NULL, 0, { NULL } },
{ "lifetype", 3, { NULL, "sec", "kb", }, },
{ "life", 0, { NULL } },
{ "group desc", 18, { NULL, "modp768",
"modp1024", /* group 2 */
"EC2N 2^155", /* group 3 */
"EC2N 2^185", /* group 4 */
"modp1536", /* group 5 */
"iana-grp06", "iana-grp07", /* reserved */
"iana-grp08", "iana-grp09",
"iana-grp10", "iana-grp11",
"iana-grp12", "iana-grp13",
"modp2048", /* group 14 */
"modp3072", /* group 15 */
"modp4096", /* group 16 */
"modp6144", /* group 17 */
"modp8192", /* group 18 */
}, },
{ "enc mode", 3, { NULL, "tunnel", "transport", }, },
{ "auth", 5, { NULL, "hmac-md5", "hmac-sha1", "1des-mac", "keyed", }, },
{ "keylen", 0, { NULL } },
{ "rounds", 0, { NULL } },
{ "dictsize", 0, { NULL } },
{ "privalg", 0, { NULL } },
};
const struct attrmap encr_t_map[] = {
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 0, 1 */
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 2, 3 */
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 4, 5 */
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 6, 7 */
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 8, 9 */
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 10,11*/
{ NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 12,13*/
{ "keylen", 14, { NULL }},
};
const struct attrmap oakley_t_map[] = {
{ NULL, 0, { NULL } },
{ "enc", 8, { NULL, "1des", "idea", "blowfish", "rc5",
"3des", "cast", "aes", }, },
{ "hash", 7, { NULL, "md5", "sha1", "tiger",
"sha2-256", "sha2-384", "sha2-512", }, },
{ "auth", 6, { NULL, "preshared", "dss", "rsa sig", "rsa enc",
"rsa enc revised", }, },
{ "group desc", 18, { NULL, "modp768",
"modp1024", /* group 2 */
"EC2N 2^155", /* group 3 */
"EC2N 2^185", /* group 4 */
"modp1536", /* group 5 */
"iana-grp06", "iana-grp07", /* reserved */
"iana-grp08", "iana-grp09",
"iana-grp10", "iana-grp11",
"iana-grp12", "iana-grp13",
"modp2048", /* group 14 */
"modp3072", /* group 15 */
"modp4096", /* group 16 */
"modp6144", /* group 17 */
"modp8192", /* group 18 */
}, },
{ "group type", 4, { NULL, "MODP", "ECP", "EC2N", }, },
{ "group prime", 0, { NULL } },
{ "group gen1", 0, { NULL } },
{ "group gen2", 0, { NULL } },
{ "group curve A", 0, { NULL } },
{ "group curve B", 0, { NULL } },
{ "lifetype", 3, { NULL, "sec", "kb", }, },
{ "lifeduration", 0, { NULL } },
{ "prf", 0, { NULL } },
{ "keylen", 0, { NULL } },
{ "field", 0, { NULL } },
{ "order", 0, { NULL } },
};
static const u_char *
ikev1_t_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len,
const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto, int depth _U_)
{
const struct ikev1_pl_t *p;
struct ikev1_pl_t t;
const u_char *cp;
const char *idstr;
const struct attrmap *map;
size_t nmap;
const u_char *ep2;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_T)));
p = (struct ikev1_pl_t *)ext;
ND_TCHECK(*p);
safememcpy(&t, ext, sizeof(t));
switch (proto) {
case 1:
idstr = STR_OR_ID(t.t_id, ikev1_p_map);
map = oakley_t_map;
nmap = sizeof(oakley_t_map)/sizeof(oakley_t_map[0]);
break;
case 2:
idstr = STR_OR_ID(t.t_id, ah_p_map);
map = ipsec_t_map;
nmap = sizeof(ipsec_t_map)/sizeof(ipsec_t_map[0]);
break;
case 3:
idstr = STR_OR_ID(t.t_id, esp_p_map);
map = ipsec_t_map;
nmap = sizeof(ipsec_t_map)/sizeof(ipsec_t_map[0]);
break;
case 4:
idstr = STR_OR_ID(t.t_id, ipcomp_p_map);
map = ipsec_t_map;
nmap = sizeof(ipsec_t_map)/sizeof(ipsec_t_map[0]);
break;
default:
idstr = NULL;
map = NULL;
nmap = 0;
break;
}
if (idstr)
ND_PRINT((ndo," #%d id=%s ", t.t_no, idstr));
else
ND_PRINT((ndo," #%d id=%d ", t.t_no, t.t_id));
cp = (u_char *)(p + 1);
ep2 = (u_char *)p + item_len;
while (cp < ep && cp < ep2) {
if (map && nmap) {
cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2,
map, nmap);
} else
cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2);
}
if (ep < ep2)
ND_PRINT((ndo,"..."));
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T)));
return NULL;
}
static const u_char *
ikev1_ke_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_KE)));
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_PRINT((ndo," key len=%d", ntohs(e.len) - 4));
if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_KE)));
return NULL;
}
static const u_char *
ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
#define USE_IPSECDOI_IN_PHASE1 1
const struct ikev1_pl_id *p;
struct ikev1_pl_id id;
static const char *idtypestr[] = {
"IPv4", "IPv4net", "IPv6", "IPv6net",
};
static const char *ipsecidtypestr[] = {
NULL, "IPv4", "FQDN", "user FQDN", "IPv4net", "IPv6",
"IPv6net", "IPv4range", "IPv6range", "ASN1 DN", "ASN1 GN",
"keyid",
};
int len;
const u_char *data;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_ID)));
p = (struct ikev1_pl_id *)ext;
ND_TCHECK(*p);
safememcpy(&id, ext, sizeof(id));
if (sizeof(*p) < item_len) {
data = (u_char *)(p + 1);
len = item_len - sizeof(*p);
} else {
data = NULL;
len = 0;
}
#if 0 /*debug*/
ND_PRINT((ndo," [phase=%d doi=%d proto=%d]", phase, doi, proto));
#endif
switch (phase) {
#ifndef USE_IPSECDOI_IN_PHASE1
case 1:
#endif
default:
ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.d.id_type, idtypestr)));
ND_PRINT((ndo," doi_data=%u",
(u_int32_t)(ntohl(id.d.doi_data) & 0xffffff)));
break;
#ifdef USE_IPSECDOI_IN_PHASE1
case 1:
#endif
case 2:
{
const struct ipsecdoi_id *p;
struct ipsecdoi_id id;
struct protoent *pe;
p = (struct ipsecdoi_id *)ext;
ND_TCHECK(*p);
safememcpy(&id, ext, sizeof(id));
ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.type, ipsecidtypestr)));
if (id.proto_id) {
//Anuroop#ifndef WIN32
//setprotoent(1);
//#endif /* WIN32 */
pe = getprotobynumber(id.proto_id);
if (pe)
ND_PRINT((ndo," protoid=%s", pe->p_name));
//Anuroop#ifndef WIN32
//endprotoent();
//#endif /* WIN32 */
} else {
/* it DOES NOT mean IPPROTO_IP! */
ND_PRINT((ndo," protoid=%s", "0"));
}
ND_PRINT((ndo," port=%d", ntohs(id.port)));
if (!len)
break;
if (data == NULL)
goto trunc;
ND_TCHECK2(*data, len);
switch (id.type) {
case IPSECDOI_ID_IPV4_ADDR:
if (len < 4)
ND_PRINT((ndo," len=%d [bad: < 4]", len));
else
ND_PRINT((ndo," len=%d %s", len, ipaddr_string(data)));
len = 0;
break;
case IPSECDOI_ID_FQDN:
case IPSECDOI_ID_USER_FQDN:
{
int i;
ND_PRINT((ndo," len=%d ", len));
for (i = 0; i < len; i++)
safeputchar(data[i]);
len = 0;
break;
}
case IPSECDOI_ID_IPV4_ADDR_SUBNET:
{
const u_char *mask;
if (len < 8)
ND_PRINT((ndo," len=%d [bad: < 8]", len));
else {
mask = data + sizeof(struct in_addr);
ND_PRINT((ndo," len=%d %s/%u.%u.%u.%u", len,
ipaddr_string(data),
mask[0], mask[1], mask[2], mask[3]));
}
len = 0;
break;
}
#ifdef INET6
case IPSECDOI_ID_IPV6_ADDR:
if (len < 16)
ND_PRINT((ndo," len=%d [bad: < 16]", len));
else
ND_PRINT((ndo," len=%d %s", len, ip6addr_string(data)));
len = 0;
break;
case IPSECDOI_ID_IPV6_ADDR_SUBNET:
{
const u_int32_t *mask;
if (len < 20)
ND_PRINT((ndo," len=%d [bad: < 20]", len));
else {
mask = (u_int32_t *)(data + sizeof(struct in6_addr));
/*XXX*/
ND_PRINT((ndo," len=%d %s/0x%08x%08x%08x%08x", len,
ip6addr_string(data),
mask[0], mask[1], mask[2], mask[3]));
}
len = 0;
break;
}
#endif /*INET6*/
case IPSECDOI_ID_IPV4_ADDR_RANGE:
if (len < 8)
ND_PRINT((ndo," len=%d [bad: < 8]", len));
else {
ND_PRINT((ndo," len=%d %s-%s", len,
ipaddr_string(data),
ipaddr_string(data + sizeof(struct in_addr))));
}
len = 0;
break;
#ifdef INET6
case IPSECDOI_ID_IPV6_ADDR_RANGE:
if (len < 32)
ND_PRINT((ndo," len=%d [bad: < 32]", len));
else {
ND_PRINT((ndo," len=%d %s-%s", len,
ip6addr_string(data),
ip6addr_string(data + sizeof(struct in6_addr))));
}
len = 0;
break;
#endif /*INET6*/
case IPSECDOI_ID_DER_ASN1_DN:
case IPSECDOI_ID_DER_ASN1_GN:
case IPSECDOI_ID_KEY_ID:
break;
}
break;
}
}
if (data && len) {
ND_PRINT((ndo," len=%d", len));
if (2 < ndo->ndo_vflag) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)data, len))
goto trunc;
}
}
return (u_char *)ext + item_len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_ID)));
return NULL;
}
static const u_char *
ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase _U_,
u_int32_t doi0 _U_,
u_int32_t proto0 _U_, int depth _U_)
{
const struct ikev1_pl_cert *p;
struct ikev1_pl_cert cert;
static const char *certstr[] = {
"none", "pkcs7", "pgp", "dns",
"x509sign", "x509ke", "kerberos", "crl",
"arl", "spki", "x509attr",
};
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CERT)));
p = (struct ikev1_pl_cert *)ext;
ND_TCHECK(*p);
safememcpy(&cert, ext, sizeof(cert));
ND_PRINT((ndo," len=%d", item_len - 4));
ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr)));
if (2 < ndo->ndo_vflag && 4 < item_len) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4))
goto trunc;
}
return (u_char *)ext + item_len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CERT)));
return NULL;
}
static const u_char *
ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_,
u_int32_t proto0 _U_, int depth _U_)
{
const struct ikev1_pl_cert *p;
struct ikev1_pl_cert cert;
static const char *certstr[] = {
"none", "pkcs7", "pgp", "dns",
"x509sign", "x509ke", "kerberos", "crl",
"arl", "spki", "x509attr",
};
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CR)));
p = (struct ikev1_pl_cert *)ext;
ND_TCHECK(*p);
safememcpy(&cert, ext, sizeof(cert));
ND_PRINT((ndo," len=%d", item_len - 4));
ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr)));
if (2 < ndo->ndo_vflag && 4 < item_len) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4))
goto trunc;
}
return (u_char *)ext + item_len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CR)));
return NULL;
}
static const u_char *
ikev1_hash_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_HASH)));
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_HASH)));
return NULL;
}
static const u_char *
ikev1_sig_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SIG)));
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SIG)));
return NULL;
}
static const u_char *
ikev1_nonce_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext,
u_int item_len _U_,
const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_NONCE)));
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_PRINT((ndo," n len=%d", ntohs(e.len) - 4));
if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
} else if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!ike_show_somedata(ndo, (u_char *)(caddr_t)(ext + 1), ep))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE)));
return NULL;
}
static const u_char *
ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len,
const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_,
u_int32_t proto0 _U_, int depth)
{
struct ikev1_pl_n *p, n;
const u_char *cp;
u_char *ep2;
u_int32_t doi;
u_int32_t proto;
static const char *notify_error_str[] = {
NULL, "INVALID-PAYLOAD-TYPE",
"DOI-NOT-SUPPORTED", "SITUATION-NOT-SUPPORTED",
"INVALID-COOKIE", "INVALID-MAJOR-VERSION",
"INVALID-MINOR-VERSION", "INVALID-EXCHANGE-TYPE",
"INVALID-FLAGS", "INVALID-MESSAGE-ID",
"INVALID-PROTOCOL-ID", "INVALID-SPI",
"INVALID-TRANSFORM-ID", "ATTRIBUTES-NOT-SUPPORTED",
"NO-PROPOSAL-CHOSEN", "BAD-PROPOSAL-SYNTAX",
"PAYLOAD-MALFORMED", "INVALID-KEY-INFORMATION",
"INVALID-ID-INFORMATION", "INVALID-CERT-ENCODING",
"INVALID-CERTIFICATE", "CERT-TYPE-UNSUPPORTED",
"INVALID-CERT-AUTHORITY", "INVALID-HASH-INFORMATION",
"AUTHENTICATION-FAILED", "INVALID-SIGNATURE",
"ADDRESS-NOTIFICATION", "NOTIFY-SA-LIFETIME",
"CERTIFICATE-UNAVAILABLE", "UNSUPPORTED-EXCHANGE-TYPE",
"UNEQUAL-PAYLOAD-LENGTHS",
};
static const char *ipsec_notify_error_str[] = {
"RESERVED",
};
static const char *notify_status_str[] = {
"CONNECTED",
};
static const char *ipsec_notify_status_str[] = {
"RESPONDER-LIFETIME", "REPLAY-STATUS",
"INITIAL-CONTACT",
};
/* NOTE: these macro must be called with x in proper range */
/* 0 - 8191 */
#define NOTIFY_ERROR_STR(x) \
STR_OR_ID((x), notify_error_str)
/* 8192 - 16383 */
#define IPSEC_NOTIFY_ERROR_STR(x) \
STR_OR_ID((u_int)((x) - 8192), ipsec_notify_error_str)
/* 16384 - 24575 */
#define NOTIFY_STATUS_STR(x) \
STR_OR_ID((u_int)((x) - 16384), notify_status_str)
/* 24576 - 32767 */
#define IPSEC_NOTIFY_STATUS_STR(x) \
STR_OR_ID((u_int)((x) - 24576), ipsec_notify_status_str)
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_N)));
p = (struct ikev1_pl_n *)ext;
ND_TCHECK(*p);
safememcpy(&n, ext, sizeof(n));
doi = ntohl(n.doi);
proto = n.prot_id;
if (doi != 1) {
ND_PRINT((ndo," doi=%d", doi));
ND_PRINT((ndo," proto=%d", proto));
if (ntohs(n.type) < 8192)
ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type))));
else if (ntohs(n.type) < 16384)
ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
else if (ntohs(n.type) < 24576)
ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type))));
else
ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
if (n.spi_size) {
ND_PRINT((ndo," spi="));
if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
goto trunc;
}
return (u_char *)(p + 1) + n.spi_size;
}
ND_PRINT((ndo," doi=ipsec"));
ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto)));
if (ntohs(n.type) < 8192)
ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type))));
else if (ntohs(n.type) < 16384)
ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type))));
else if (ntohs(n.type) < 24576)
ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type))));
else if (ntohs(n.type) < 32768)
ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type))));
else
ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
if (n.spi_size) {
ND_PRINT((ndo," spi="));
if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
goto trunc;
}
cp = (u_char *)(p + 1) + n.spi_size;
ep2 = (u_char *)p + item_len;
if (cp < ep) {
ND_PRINT((ndo," orig=("));
switch (ntohs(n.type)) {
case IPSECDOI_NTYPE_RESPONDER_LIFETIME:
{
const struct attrmap *map = oakley_t_map;
size_t nmap = sizeof(oakley_t_map)/sizeof(oakley_t_map[0]);
while (cp < ep && cp < ep2) {
cp = ikev1_attrmap_print(ndo, cp,
(ep < ep2) ? ep : ep2, map, nmap);
}
break;
}
case IPSECDOI_NTYPE_REPLAY_STATUS:
ND_PRINT((ndo,"replay detection %sabled",
(*(u_int32_t *)cp) ? "en" : "dis"));
break;
case ISAKMP_NTYPE_NO_PROPOSAL_CHOSEN:
if (ikev1_sub_print(ndo, ISAKMP_NPTYPE_SA,
(struct isakmp_gen *)cp, ep, phase, doi, proto,
depth) == NULL)
return NULL;
break;
default:
/* NULL is dummy */
isakmp_print(ndo, cp,
item_len - sizeof(*p) - n.spi_size,
NULL);
}
ND_PRINT((ndo,")"));
}
return (u_char *)ext + item_len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N)));
return NULL;
}
static const u_char *
ikev1_d_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_,
u_int32_t proto0 _U_, int depth _U_)
{
const struct ikev1_pl_d *p;
struct ikev1_pl_d d;
const u_int8_t *q;
u_int32_t doi;
u_int32_t proto;
int i;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_D)));
p = (struct ikev1_pl_d *)ext;
ND_TCHECK(*p);
safememcpy(&d, ext, sizeof(d));
doi = ntohl(d.doi);
proto = d.prot_id;
if (doi != 1) {
ND_PRINT((ndo," doi=%u", doi));
ND_PRINT((ndo," proto=%u", proto));
} else {
ND_PRINT((ndo," doi=ipsec"));
ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto)));
}
ND_PRINT((ndo," spilen=%u", d.spi_size));
ND_PRINT((ndo," nspi=%u", ntohs(d.num_spi)));
ND_PRINT((ndo," spi="));
q = (u_int8_t *)(p + 1);
for (i = 0; i < ntohs(d.num_spi); i++) {
if (i != 0)
ND_PRINT((ndo,","));
if (!rawprint(ndo, (caddr_t)q, d.spi_size))
goto trunc;
q += d.spi_size;
}
return q;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_D)));
return NULL;
}
static const u_char *
ikev1_vid_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_VID)));
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_VID)));
return NULL;
}
/************************************************************/
/* */
/* IKE v2 - rfc4306 - dissector */
/* */
/************************************************************/
static void
ikev2_pay_print(netdissect_options *ndo, const char *payname, int critical)
{
ND_PRINT((ndo,"%s%s:", payname, critical&0x80 ? "[C]" : ""));
}
static const u_char *
ikev2_gen_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext)
{
struct isakmp_gen e;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_t_print(netdissect_options *ndo, u_char tpay _U_, int pcount,
const struct isakmp_gen *ext, u_int item_len,
const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
const struct ikev2_t *p;
struct ikev2_t t;
u_int16_t t_id;
const u_char *cp;
const char *idstr;
const struct attrmap *map;
size_t nmap;
const u_char *ep2;
p = (struct ikev2_t *)ext;
ND_TCHECK(*p);
safememcpy(&t, ext, sizeof(t));
ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_T), t.h.critical);
t_id = ntohs(t.t_id);
map = NULL;
nmap = 0;
switch (t.t_type) {
case IV2_T_ENCR:
idstr = STR_OR_ID(t_id, esp_p_map);
map = encr_t_map;
nmap = sizeof(encr_t_map)/sizeof(encr_t_map[0]);
break;
case IV2_T_PRF:
idstr = STR_OR_ID(t_id, prf_p_map);
break;
case IV2_T_INTEG:
idstr = STR_OR_ID(t_id, integ_p_map);
break;
case IV2_T_DH:
idstr = STR_OR_ID(t_id, dh_p_map);
break;
case IV2_T_ESN:
idstr = STR_OR_ID(t_id, esn_p_map);
break;
default:
idstr = NULL;
break;
}
if (idstr)
ND_PRINT((ndo," #%u type=%s id=%s ", pcount,
STR_OR_ID(t.t_type, ikev2_t_type_map),
idstr));
else
ND_PRINT((ndo," #%u type=%s id=%u ", pcount,
STR_OR_ID(t.t_type, ikev2_t_type_map),
t.t_id));
cp = (u_char *)(p + 1);
ep2 = (u_char *)p + item_len;
while (cp < ep && cp < ep2) {
if (map && nmap) {
cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2,
map, nmap);
} else
cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2);
}
if (ep < ep2)
ND_PRINT((ndo,"..."));
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T)));
return NULL;
}
static const u_char *
ikev2_p_print(netdissect_options *ndo, u_char tpay _U_, int pcount _U_,
const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep, u_int32_t phase, u_int32_t doi0,
u_int32_t proto0 _U_, int depth)
{
const struct ikev2_p *p;
struct ikev2_p prop;
const u_char *cp;
p = (struct ikev2_p *)ext;
ND_TCHECK(*p);
safememcpy(&prop, ext, sizeof(prop));
ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_P), prop.h.critical);
ND_PRINT((ndo," #%u protoid=%s transform=%d len=%u",
prop.p_no, PROTOIDSTR(prop.prot_id),
prop.num_t, ntohs(prop.h.len)));
if (prop.spi_size) {
ND_PRINT((ndo," spi="));
if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size))
goto trunc;
}
ext = (struct isakmp_gen *)((u_char *)(p + 1) + prop.spi_size);
ND_TCHECK(*ext);
cp = ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
prop.prot_id, depth);
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P)));
return NULL;
}
static const u_char *
ikev2_sa_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext1,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
int osa_length, sa_length;
ND_TCHECK(*ext1);
safememcpy(&e, ext1, sizeof(e));
ikev2_pay_print(ndo, "sa", e.critical);
osa_length= ntohs(e.len);
sa_length = osa_length - 4;
ND_PRINT((ndo," len=%d", sa_length));
ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_P,
ext1+1, ep,
0, 0, 0, depth);
return (u_char *)ext1 + osa_length;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_ke_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct ikev2_ke ke;
struct ikev2_ke *k;
k = (struct ikev2_ke *)ext;
ND_TCHECK(*ext);
safememcpy(&ke, ext, sizeof(ke));
ikev2_pay_print(ndo, NPSTR(tpay), ke.h.critical);
ND_PRINT((ndo," len=%u group=%s", ntohs(ke.h.len) - 8,
STR_OR_ID(ntohs(ke.ke_group), dh_p_map)));
if (2 < ndo->ndo_vflag && 8 < ntohs(ke.h.len)) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(k + 1), ntohs(ke.h.len) - 8))
goto trunc;
}
return (u_char *)ext + ntohs(ke.h.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_ID_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct ikev2_id id;
int id_len, idtype_len, i;
unsigned int dumpascii, dumphex;
unsigned char *typedata;
ND_TCHECK(*ext);
safememcpy(&id, ext, sizeof(id));
ikev2_pay_print(ndo, NPSTR(tpay), id.h.critical);
id_len = ntohs(id.h.len);
ND_PRINT((ndo," len=%d", id_len - 4));
if (2 < ndo->ndo_vflag && 4 < id_len) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), id_len - 4))
goto trunc;
}
idtype_len =id_len - sizeof(struct ikev2_id);
dumpascii = 0;
dumphex = 0;
typedata = (unsigned char *)(ext)+sizeof(struct ikev2_id);
switch(id.type) {
case ID_IPV4_ADDR:
ND_PRINT((ndo, " ipv4:"));
dumphex=1;
break;
case ID_FQDN:
ND_PRINT((ndo, " fqdn:"));
dumpascii=1;
break;
case ID_RFC822_ADDR:
ND_PRINT((ndo, " rfc822:"));
dumpascii=1;
break;
case ID_IPV6_ADDR:
ND_PRINT((ndo, " ipv6:"));
dumphex=1;
break;
case ID_DER_ASN1_DN:
ND_PRINT((ndo, " dn:"));
dumphex=1;
break;
case ID_DER_ASN1_GN:
ND_PRINT((ndo, " gn:"));
dumphex=1;
break;
case ID_KEY_ID:
ND_PRINT((ndo, " keyid:"));
dumphex=1;
break;
}
if(dumpascii) {
ND_TCHECK2(*typedata, idtype_len);
for(i=0; i<idtype_len; i++) {
if(isprint(typedata[i])) {
ND_PRINT((ndo, "%c", typedata[i]));
} else {
ND_PRINT((ndo, "."));
}
}
}
if(dumphex) {
if (!rawprint(ndo, (caddr_t)typedata, idtype_len))
goto trunc;
}
return (u_char *)ext + id_len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_cert_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
return ikev2_gen_print(ndo, tpay, ext);
}
static const u_char *
ikev2_cr_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
return ikev2_gen_print(ndo, tpay, ext);
}
static const u_char *
ikev2_auth_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct ikev2_auth a;
const char *v2_auth[]={ "invalid", "<PASSWORD>",
"shared-secret", "dsssig" };
u_char *authdata = (u_char*)ext + sizeof(a);
unsigned int len;
ND_TCHECK(*ext);
safememcpy(&a, ext, sizeof(a));
ikev2_pay_print(ndo, NPSTR(tpay), a.h.critical);
len = ntohs(a.h.len);
ND_PRINT((ndo," len=%d method=%s", len-4,
STR_OR_ID(a.auth_method, v2_auth)));
if (1 < ndo->ndo_vflag && 4 < len) {
ND_PRINT((ndo," authdata=("));
if (!rawprint(ndo, (caddr_t)authdata, len - sizeof(a)))
goto trunc;
ND_PRINT((ndo,") "));
} else if(ndo->ndo_vflag && 4 < len) {
if(!ike_show_somedata(ndo, authdata, ep)) goto trunc;
}
return (u_char *)ext + len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_nonce_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ikev2_pay_print(ndo, "nonce", e.critical);
ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
ND_PRINT((ndo," nonce=("));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
ND_PRINT((ndo,") "));
} else if(ndo->ndo_vflag && 4 < ntohs(e.len)) {
if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
/* notify payloads */
static const u_char *
ikev2_n_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct ikev2_n *p, n;
const u_char *cp;
u_char *ep2;
u_char showspi, showdata, showsomedata;
const char *notify_name;
u_int32_t type;
p = (struct ikev2_n *)ext;
ND_TCHECK(*p);
safememcpy(&n, ext, sizeof(n));
ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_N), n.h.critical);
showspi = 1;
showdata = 0;
showsomedata=0;
notify_name=NULL;
ND_PRINT((ndo," prot_id=%s", PROTOIDSTR(n.prot_id)));
type = ntohs(n.type);
/* notify space is annoying sparse */
switch(type) {
case IV2_NOTIFY_UNSUPPORTED_CRITICAL_PAYLOAD:
notify_name = "unsupported_critical_payload";
showspi = 0;
break;
case IV2_NOTIFY_INVALID_IKE_SPI:
notify_name = "invalid_ike_spi";
showspi = 1;
break;
case IV2_NOTIFY_INVALID_MAJOR_VERSION:
notify_name = "invalid_major_version";
showspi = 0;
break;
case IV2_NOTIFY_INVALID_SYNTAX:
notify_name = "invalid_syntax";
showspi = 1;
break;
case IV2_NOTIFY_INVALID_MESSAGE_ID:
notify_name = "invalid_message_id";
showspi = 1;
break;
case IV2_NOTIFY_INVALID_SPI:
notify_name = "invalid_spi";
showspi = 1;
break;
case IV2_NOTIFY_NO_PROPOSAL_CHOSEN:
notify_name = "no_protocol_chosen";
showspi = 1;
break;
case IV2_NOTIFY_INVALID_KE_PAYLOAD:
notify_name = "invalid_ke_payload";
showspi = 1;
break;
case IV2_NOTIFY_AUTHENTICATION_FAILED:
notify_name = "authentication_failed";
showspi = 1;
break;
case IV2_NOTIFY_SINGLE_PAIR_REQUIRED:
notify_name = "single_pair_required";
showspi = 1;
break;
case IV2_NOTIFY_NO_ADDITIONAL_SAS:
notify_name = "no_additional_sas";
showspi = 0;
break;
case IV2_NOTIFY_INTERNAL_ADDRESS_FAILURE:
notify_name = "internal_address_failure";
showspi = 0;
break;
case IV2_NOTIFY_FAILED_CP_REQUIRED:
notify_name = "failed:cp_required";
showspi = 0;
break;
case IV2_NOTIFY_INVALID_SELECTORS:
notify_name = "invalid_selectors";
showspi = 0;
break;
case IV2_NOTIFY_INITIAL_CONTACT:
notify_name = "initial_contact";
showspi = 0;
break;
case IV2_NOTIFY_SET_WINDOW_SIZE:
notify_name = "set_window_size";
showspi = 0;
break;
case IV2_NOTIFY_ADDITIONAL_TS_POSSIBLE:
notify_name = "additional_ts_possible";
showspi = 0;
break;
case IV2_NOTIFY_IPCOMP_SUPPORTED:
notify_name = "ipcomp_supported";
showspi = 0;
break;
case IV2_NOTIFY_NAT_DETECTION_SOURCE_IP:
notify_name = "nat_detection_source_ip";
showspi = 1;
break;
case IV2_NOTIFY_NAT_DETECTION_DESTINATION_IP:
notify_name = "nat_detection_destination_ip";
showspi = 1;
break;
case IV2_NOTIFY_COOKIE:
notify_name = "cookie";
showspi = 1;
showsomedata= 1;
showdata= 0;
break;
case IV2_NOTIFY_USE_TRANSPORT_MODE:
notify_name = "use_transport_mode";
showspi = 0;
break;
case IV2_NOTIFY_HTTP_CERT_LOOKUP_SUPPORTED:
notify_name = "http_cert_lookup_supported";
showspi = 0;
break;
case IV2_NOTIFY_REKEY_SA:
notify_name = "rekey_sa";
showspi = 1;
break;
case IV2_NOTIFY_ESP_TFC_PADDING_NOT_SUPPORTED:
notify_name = "tfc_padding_not_supported";
showspi = 0;
break;
case IV2_NOTIFY_NON_FIRST_FRAGMENTS_ALSO:
notify_name = "non_first_fragment_also";
showspi = 0;
break;
default:
if (type < 8192) {
notify_name="error";
} else if(type < 16384) {
notify_name="private-error";
} else if(type < 40960) {
notify_name="status";
} else {
notify_name="private-status";
}
}
if(notify_name) {
ND_PRINT((ndo," type=%u(%s)", type, notify_name));
}
if (showspi && n.spi_size) {
ND_PRINT((ndo," spi="));
if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
goto trunc;
}
cp = (u_char *)(p + 1) + n.spi_size;
ep2 = (u_char *)p + item_len;
if(3 < ndo->ndo_vflag) {
showdata = 1;
}
if ((showdata || (showsomedata && ep-cp < 30)) && cp < ep) {
ND_PRINT((ndo," data=("));
if (!rawprint(ndo, (caddr_t)(cp), ep - cp))
goto trunc;
ND_PRINT((ndo,")"));
} else if(showsomedata && cp < ep) {
if(!ike_show_somedata(ndo, cp, ep)) goto trunc;
}
return (u_char *)ext + item_len;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N)));
return NULL;
}
static const u_char *
ikev2_d_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
return ikev2_gen_print(ndo, tpay, ext);
}
static const u_char *
ikev2_vid_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
const u_char *vid;
int i, len;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
ND_PRINT((ndo," len=%d vid=", ntohs(e.len) - 4));
vid = (const u_char *)(ext+1);
len = ntohs(e.len) - 4;
ND_TCHECK2(*vid, len);
for(i=0; i<len; i++) {
if(isprint(vid[i])) ND_PRINT((ndo, "%c", vid[i]));
else ND_PRINT((ndo, "."));
}
if (2 < ndo->ndo_vflag && 4 < len) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_TS_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
return ikev2_gen_print(ndo, tpay, ext);
}
static const u_char *
ikev2_e_print(netdissect_options *ndo,
#ifndef HAVE_LIBCRYPTO
_U_
#endif
struct isakmp *base,
u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
#ifndef HAVE_LIBCRYPTO
_U_
#endif
u_int32_t phase,
#ifndef HAVE_LIBCRYPTO
_U_
#endif
u_int32_t doi,
#ifndef HAVE_LIBCRYPTO
_U_
#endif
u_int32_t proto,
#ifndef HAVE_LIBCRYPTO
_U_
#endif
int depth)
{
struct isakmp_gen e;
u_char *dat;
volatile int dlen;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
dlen = ntohs(e.len)-4;
ND_PRINT((ndo," len=%d", dlen));
if (2 < ndo->ndo_vflag && 4 < dlen) {
ND_PRINT((ndo," "));
if (!rawprint(ndo, (caddr_t)(ext + 1), dlen))
goto trunc;
}
dat = (u_char *)(ext+1);
ND_TCHECK2(*dat, dlen);
#ifdef HAVE_LIBCRYPTO
/* try to decypt it! */
if(esp_print_decrypt_buffer_by_ikev2(ndo,
base->flags & ISAKMP_FLAG_I,
base->i_ck, base->r_ck,
dat, dat+dlen)) {
ext = (const struct isakmp_gen *)ndo->ndo_packetp;
/* got it decrypted, print stuff inside. */
ikev2_sub_print(ndo, base, e.np, ext, ndo->ndo_snapend,
phase, doi, proto, depth+1);
}
#endif
/* always return NULL, because E must be at end, and NP refers
* to what was inside.
*/
return NULL;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
return NULL;
}
static const u_char *
ikev2_cp_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
return ikev2_gen_print(ndo, tpay, ext);
}
static const u_char *
ikev2_eap_print(netdissect_options *ndo, u_char tpay,
const struct isakmp_gen *ext,
u_int item_len _U_, const u_char *ep _U_,
u_int32_t phase _U_, u_int32_t doi _U_,
u_int32_t proto _U_, int depth _U_)
{
return ikev2_gen_print(ndo, tpay, ext);
}
static const u_char *
ike_sub0_print(netdissect_options *ndo,
u_char np, const struct isakmp_gen *ext, const u_char *ep,
u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
{
const u_char *cp;
struct isakmp_gen e;
u_int item_len;
cp = (u_char *)ext;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
/*
* Since we can't have a payload length of less than 4 bytes,
* we need to bail out here if the generic header is nonsensical
* or truncated, otherwise we could loop forever processing
* zero-length items or otherwise misdissect the packet.
*/
item_len = ntohs(e.len);
if (item_len <= 4)
return NULL;
if (NPFUNC(np)) {
/*
* XXX - what if item_len is too short, or too long,
* for this payload type?
*/
cp = (*npfunc[np])(ndo, np, ext, item_len, ep, phase, doi, proto, depth);
} else {
ND_PRINT((ndo,"%s", NPSTR(np)));
cp += item_len;
}
return cp;
trunc:
ND_PRINT((ndo," [|isakmp]"));
return NULL;
}
static const u_char *
ikev1_sub_print(netdissect_options *ndo,
u_char np, const struct isakmp_gen *ext, const u_char *ep,
u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
{
const u_char *cp;
int i;
struct isakmp_gen e;
cp = (const u_char *)ext;
while (np) {
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_TCHECK2(*ext, ntohs(e.len));
depth++;
ND_PRINT((ndo,"\n"));
for (i = 0; i < depth; i++)
ND_PRINT((ndo," "));
ND_PRINT((ndo,"("));
cp = ike_sub0_print(ndo, np, ext, ep, phase, doi, proto, depth);
ND_PRINT((ndo,")"));
depth--;
if (cp == NULL) {
/* Zero-length subitem */
return NULL;
}
np = e.np;
ext = (struct isakmp_gen *)cp;
}
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(np)));
return NULL;
}
static char *
numstr(int x)
{
static char buf[20];
snprintf(buf, sizeof(buf), "#%d", x);
return buf;
}
/*
* some compiler tries to optimize memcpy(), using the alignment constraint
* on the argument pointer type. by using this function, we try to avoid the
* optimization.
*/
static void
safememcpy(void *p, const void *q, size_t l)
{
memcpy(p, q, l);
}
static void
ikev1_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2, struct isakmp *base)
{
const struct isakmp *p;
const u_char *ep;
u_char np;
int i;
int phase;
p = (const struct isakmp *)bp;
ep = ndo->ndo_snapend;
phase = (*(u_int32_t *)base->msgid == 0) ? 1 : 2;
if (phase == 1)
ND_PRINT((ndo," phase %d", phase));
else
ND_PRINT((ndo," phase %d/others", phase));
i = cookie_find(&base->i_ck);
if (i < 0) {
if (iszero((u_char *)&base->r_ck, sizeof(base->r_ck))) {
/* the first packet */
ND_PRINT((ndo," I"));
if (bp2)
cookie_record(&base->i_ck, bp2);
} else
ND_PRINT((ndo," ?"));
} else {
if (bp2 && cookie_isinitiator(i, bp2))
ND_PRINT((ndo," I"));
else if (bp2 && cookie_isresponder(i, bp2))
ND_PRINT((ndo," R"));
else
ND_PRINT((ndo," ?"));
}
ND_PRINT((ndo," %s", ETYPESTR(base->etype)));
if (base->flags) {
ND_PRINT((ndo,"[%s%s]", base->flags & ISAKMP_FLAG_E ? "E" : "",
base->flags & ISAKMP_FLAG_C ? "C" : ""));
}
if (ndo->ndo_vflag) {
const struct isakmp_gen *ext;
int nparen;
ND_PRINT((ndo,":"));
/* regardless of phase... */
if (base->flags & ISAKMP_FLAG_E) {
/*
* encrypted, nothing we can do right now.
* we hope to decrypt the packet in the future...
*/
ND_PRINT((ndo," [encrypted %s]", NPSTR(base->np)));
goto done;
}
nparen = 0;
CHECKLEN(p + 1, base->np);
np = base->np;
ext = (struct isakmp_gen *)(p + 1);
ikev1_sub_print(ndo, np, ext, ep, phase, 0, 0, 0);
}
done:
if (ndo->ndo_vflag) {
if (ntohl(base->len) != length) {
ND_PRINT((ndo," (len mismatch: isakmp %u/ip %u)",
(u_int32_t)ntohl(base->len), length));
}
}
}
static const u_char *
ikev2_sub0_print(netdissect_options *ndo, struct isakmp *base,
u_char np, int pcount,
const struct isakmp_gen *ext, const u_char *ep,
u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
{
const u_char *cp;
struct isakmp_gen e;
u_int item_len;
cp = (u_char *)ext;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
/*
* Since we can't have a payload length of less than 4 bytes,
* we need to bail out here if the generic header is nonsensical
* or truncated, otherwise we could loop forever processing
* zero-length items or otherwise misdissect the packet.
*/
item_len = ntohs(e.len);
if (item_len <= 4)
return NULL;
if(np == ISAKMP_NPTYPE_P) {
cp = ikev2_p_print(ndo, np, pcount, ext, item_len,
ep, phase, doi, proto, depth);
} else if(np == ISAKMP_NPTYPE_T) {
cp = ikev2_t_print(ndo, np, pcount, ext, item_len,
ep, phase, doi, proto, depth);
} else if(np == ISAKMP_NPTYPE_v2E) {
cp = ikev2_e_print(ndo, base, np, ext, item_len,
ep, phase, doi, proto, depth);
} else if (NPFUNC(np)) {
/*
* XXX - what if item_len is too short, or too long,
* for this payload type?
*/
cp = (*npfunc[np])(ndo, np, /*pcount,*/ ext, item_len,
ep, phase, doi, proto, depth);
} else {
ND_PRINT((ndo,"%s", NPSTR(np)));
cp += item_len;
}
return cp;
trunc:
ND_PRINT((ndo," [|isakmp]"));
return NULL;
}
static const u_char *
ikev2_sub_print(netdissect_options *ndo,
struct isakmp *base,
u_char np, const struct isakmp_gen *ext, const u_char *ep,
u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
{
const u_char *cp;
int i;
int pcount;
struct isakmp_gen e;
cp = (const u_char *)ext;
pcount = 0;
while (np) {
pcount++;
ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
ND_TCHECK2(*ext, ntohs(e.len));
depth++;
ND_PRINT((ndo,"\n"));
for (i = 0; i < depth; i++)
ND_PRINT((ndo," "));
ND_PRINT((ndo,"("));
cp = ikev2_sub0_print(ndo, base, np, pcount,
ext, ep, phase, doi, proto, depth);
ND_PRINT((ndo,")"));
depth--;
if (cp == NULL) {
/* Zero-length subitem */
return NULL;
}
np = e.np;
ext = (struct isakmp_gen *)cp;
}
return cp;
trunc:
ND_PRINT((ndo," [|%s]", NPSTR(np)));
return NULL;
}
static void
ikev2_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2 _U_, struct isakmp *base)
{
const struct isakmp *p;
const u_char *ep;
u_char np;
int phase;
p = (const struct isakmp *)bp;
ep = ndo->ndo_snapend;
phase = (*(u_int32_t *)base->msgid == 0) ? 1 : 2;
if (phase == 1)
ND_PRINT((ndo, " parent_sa"));
else
ND_PRINT((ndo, " child_sa "));
ND_PRINT((ndo, " %s", ETYPESTR(base->etype)));
if (base->flags) {
ND_PRINT((ndo, "[%s%s%s]",
base->flags & ISAKMP_FLAG_I ? "I" : "",
base->flags & ISAKMP_FLAG_V ? "V" : "",
base->flags & ISAKMP_FLAG_R ? "R" : ""));
}
if (ndo->ndo_vflag) {
const struct isakmp_gen *ext;
int nparen;
ND_PRINT((ndo, ":"));
/* regardless of phase... */
if (base->flags & ISAKMP_FLAG_E) {
/*
* encrypted, nothing we can do right now.
* we hope to decrypt the packet in the future...
*/
ND_PRINT((ndo, " [encrypted %s]", NPSTR(base->np)));
goto done;
}
nparen = 0;
CHECKLEN(p + 1, base->np)
np = base->np;
ext = (struct isakmp_gen *)(p + 1);
ikev2_sub_print(ndo, base, np, ext, ep, phase, 0, 0, 0);
}
done:
if (ndo->ndo_vflag) {
if (ntohl(base->len) != length) {
ND_PRINT((ndo, " (len mismatch: isakmp %u/ip %u)",
(u_int32_t)ntohl(base->len), length));
}
}
}
void
isakmp_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2)
{
const struct isakmp *p;
struct isakmp base;
const u_char *ep;
int major, minor;
#ifdef HAVE_LIBCRYPTO
/* initialize SAs */
if (ndo->ndo_sa_list_head == NULL) {
if (ndo->ndo_espsecret)
esp_print_decodesecret(ndo);
}
#endif
p = (const struct isakmp *)bp;
ep = ndo->ndo_snapend;
if ((struct isakmp *)ep < p + 1) {
ND_PRINT((ndo,"[|isakmp]"));
return;
}
safememcpy(&base, p, sizeof(base));
ND_PRINT((ndo,"isakmp"));
major = (base.vers & ISAKMP_VERS_MAJOR)
>> ISAKMP_VERS_MAJOR_SHIFT;
minor = (base.vers & ISAKMP_VERS_MINOR)
>> ISAKMP_VERS_MINOR_SHIFT;
if (ndo->ndo_vflag) {
ND_PRINT((ndo," %d.%d", major, minor));
}
if (ndo->ndo_vflag) {
ND_PRINT((ndo," msgid "));
hexprint(ndo, (caddr_t)&base.msgid, sizeof(base.msgid));
}
if (1 < ndo->ndo_vflag) {
ND_PRINT((ndo," cookie "));
hexprint(ndo, (caddr_t)&base.i_ck, sizeof(base.i_ck));
ND_PRINT((ndo,"->"));
hexprint(ndo, (caddr_t)&base.r_ck, sizeof(base.r_ck));
}
ND_PRINT((ndo,":"));
switch(major) {
case IKEv1_MAJOR_VERSION:
ikev1_print(ndo, bp, length, bp2, &base);
break;
case IKEv2_MAJOR_VERSION:
ikev2_print(ndo, bp, length, bp2, &base);
break;
}
}
void
isakmp_rfc3948_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2)
{
const u_char *ep;
ep = ndo->ndo_snapend;
if(length == 1 && bp[0]==0xff) {
ND_PRINT((ndo, "isakmp-nat-keep-alive"));
return;
}
if(length < 4) {
goto trunc;
}
/*
* see if this is an IKE packet
*/
if(bp[0]==0 && bp[1]==0 && bp[2]==0 && bp[3]==0) {
ND_PRINT((ndo, "NONESP-encap: "));
isakmp_print(ndo, bp+4, length-4, bp2);
return;
}
/* must be an ESP packet */
{
int nh, enh, padlen;
int advance;
ND_PRINT((ndo, "UDP-encap: "));
advance = esp_print(ndo, bp, length, bp2, &enh, &padlen);
if(advance <= 0)
return;
bp += advance;
length -= advance + padlen;
nh = enh & 0xff;
ip_print_inner(ndo, bp, length, nh, bp2);
return;
}
trunc:
ND_PRINT((ndo,"[|isakmp]"));
return;
}
/*
* Local Variables:
* c-style: whitesmith
* c-basic-offset: 8
* End:
*/
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/mobile_image_mounter.h
|
<gh_stars>100-1000
/**
* @file libimobiledevice/mobile_image_mounter.h
* @brief Mount developer/debug disk images on the device.
* \internal
*
* Copyright (c) 2010 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMOBILE_IMAGE_MOUNTER_H
#define IMOBILE_IMAGE_MOUNTER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define MOBILE_IMAGE_MOUNTER_SERVICE_NAME "com.apple.mobile.mobile_image_mounter"
/** @name Error Codes */
/*@{*/
#define MOBILE_IMAGE_MOUNTER_E_SUCCESS 0
#define MOBILE_IMAGE_MOUNTER_E_INVALID_ARG -1
#define MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR -2
#define MOBILE_IMAGE_MOUNTER_E_CONN_FAILED -3
#define MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t mobile_image_mounter_error_t;
typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private;
typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */
/* Interface */
mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client);
mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t* client, const char* label);
mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client);
mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result);
mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result);
mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/notification_proxy.h
|
/**
* @file libimobiledevice/notification_proxy.h
* @brief Observe and post notifications.
* \internal
*
* Copyright (c) 2009 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef INOTIFICATION_PROXY_H
#define INOTIFICATION_PROXY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define NP_SERVICE_NAME "com.apple.mobile.notification_proxy"
/** @name Error Codes */
/*@{*/
#define NP_E_SUCCESS 0
#define NP_E_INVALID_ARG -1
#define NP_E_PLIST_ERROR -2
#define NP_E_CONN_FAILED -3
#define NP_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t np_error_t;
/**
* @name Notifications that can be send
*
* For use with np_post_notification() (client --> device)
*/
#define NP_SYNC_WILL_START "com.apple.itunes-mobdev.syncWillStart"
#define NP_SYNC_DID_START "com.apple.itunes-mobdev.syncDidStart"
#define NP_SYNC_DID_FINISH "com.apple.itunes-mobdev.syncDidFinish"
#define NP_SYNC_LOCK_REQUEST "com.apple.itunes-mobdev.syncLockRequest"
/*@}*/
/**
* @name Notifications that can be received
*
* For use with np_observe_notification() (device --> client)
*/
/*@{*/
#define NP_SYNC_CANCEL_REQUEST "com.apple.itunes-client.syncCancelRequest"
#define NP_SYNC_SUSPEND_REQUEST "com.apple.itunes-client.syncSuspendRequest"
#define NP_SYNC_RESUME_REQUEST "com.apple.itunes-client.syncResumeRequest"
#define NP_PHONE_NUMBER_CHANGED "com.apple.mobile.lockdown.phone_number_changed"
#define NP_DEVICE_NAME_CHANGED "com.apple.mobile.lockdown.device_name_changed"
#define NP_TIMEZONE_CHANGED "com.apple.mobile.lockdown.timezone_changed"
#define NP_TRUSTED_HOST_ATTACHED "com.apple.mobile.lockdown.trusted_host_attached"
#define NP_HOST_DETACHED "com.apple.mobile.lockdown.host_detached"
#define NP_HOST_ATTACHED "com.apple.mobile.lockdown.host_attached"
#define NP_REGISTRATION_FAILED "com.apple.mobile.lockdown.registration_failed"
#define NP_ACTIVATION_STATE "com.apple.mobile.lockdown.activation_state"
#define NP_BRICK_STATE "com.apple.mobile.lockdown.brick_state"
#define NP_DISK_USAGE_CHANGED "com.apple.mobile.lockdown.disk_usage_changed" /**< iOS 4.0+ */
#define NP_DS_DOMAIN_CHANGED "com.apple.mobile.data_sync.domain_changed"
#define NP_BACKUP_DOMAIN_CHANGED "com.apple.mobile.backup.domain_changed"
#define NP_APP_INSTALLED "com.apple.mobile.application_installed"
#define NP_APP_UNINSTALLED "com.apple.mobile.application_uninstalled"
#define NP_DEV_IMAGE_MOUNTED "com.apple.mobile.developer_image_mounted"
#define NP_ATTEMPTACTIVATION "com.apple.springboard.attemptactivation"
#define NP_ITDBPREP_DID_END "com.apple.itdbprep.notification.didEnd"
#define NP_LANGUAGE_CHANGED "com.apple.language.changed"
#define NP_ADDRESS_BOOK_PREF_CHANGED "com.apple.AddressBook.PreferenceChanged"
/*@}*/
typedef struct np_client_private np_client_private;
typedef np_client_private *np_client_t; /**< The client handle. */
/** Reports which notification was received. */
typedef void (*np_notify_cb_t) (const char *notification, void *user_data);
/* Interface */
np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client);
np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label);
np_error_t np_client_free(np_client_t client);
np_error_t np_post_notification(np_client_t client, const char *notification);
np_error_t np_observe_notification(np_client_t client, const char *notification);
np_error_t np_observe_notifications(np_client_t client, const char **notification_spec);
np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb, void *userdata);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/AROJpcap/Jpcap.c
|
<reponame>j420247/ARO
#include<jni.h>
#include<pcap.h>
#include <errno.h>
#include "com_att_aro_pcap_PCapAdapter.h"
struct user_data {
JNIEnv *env;
int datalink;
jobject obj;
jmethodID handler;
};
void jpcap_handler(u_char *, const struct pcap_pkthdr *, const u_char *);
int readPcap(pcap_t *p, int cnt, pcap_handler callback, u_char *user);
/*
JNI method used to ping the pcap library by doing a device search. This will
verify that winpcap is installed on Windows.
*/
JNIEXPORT void JNICALL Java_com_att_aro_pcap_PCapAdapter_ping
(JNIEnv * env, jclass cls)
{
/* Retrieve the device list */
pcap_if_t *alldevs;
char errbuf[PCAP_ERRBUF_SIZE];
pcap_findalldevs(&alldevs, errbuf);
/* Free the device list */
pcap_freealldevs(alldevs);
}
/*
Loop Packets
*/
JNIEXPORT jstring JNICALL Java_com_att_aro_pcap_PCapAdapter_loopPacket(JNIEnv *env, jobject obj, jstring filename) {
char *file;
pcap_t *pcds;
char errbuf[PCAP_ERRBUF_SIZE];
struct user_data user;
jclass cls;
jmethodID mid;
// Open specified pcap file
file = (char *) (*env)->GetStringUTFChars(env, filename, 0);
pcds = pcap_open_offline(file, errbuf);
(*env)->ReleaseStringUTFChars(env, filename, file);
if (pcds == NULL){
return (*env)->NewStringUTF(env, errbuf);
}
cls = (*env)->GetObjectClass(env, obj);
mid = (*env)->GetMethodID(env, cls, "pcapHandler", "(IJJI[B)V");
if (mid == NULL) {
return (*env)->NewStringUTF(env, "Callback method not found");
}
// Populate user data structure passed to jpcap_handler
user.datalink = pcap_datalink(pcds);
user.env = env;
user.obj = obj;
user.handler = mid;
// Run pcap loop
// int p_loop_result = pcap_loop(pcds, -1, jpcap_handler, (u_char *) (&user));
int p_loop_result = readPcap(pcds, -1, jpcap_handler, (u_char *) (&user));
// Clean up
pcap_close(pcds);
return NULL;
}
/*
* read entire pcap file until end of file is reached
* ignores unreadable packets such as Null/Loopback
*/
int readPcap(pcap_t *pcds, int cnt, pcap_handler callback, u_char *user) {
struct pcap_pkthdr *pcap_packet_header; // The header that pcap gives us
const u_char *pkt_data;
int result = 0;
while ((cnt == -1)||(cnt-- > 0)) {
errno = 0;
result = pcap_next_ex(pcds, &pcap_packet_header, &pkt_data);
if (result != -2) { // test for end of file
if (result != -1) { // skip unreadable packets
jpcap_handler(user, pcap_packet_header, pkt_data);
}
} else {
cnt = 0;
}
}
return 1;
}
/*
* report the packet back to Java caller
*/
void jpcap_handler(u_char *args, const struct pcap_pkthdr *header, const u_char *data) {
jbyteArray dataArray;
struct user_data *user = (struct user_data *) args;
JNIEnv *env = user->env;
dataArray = (*env)->NewByteArray(env, (jsize) header->caplen);
(*env)->SetByteArrayRegion(env, dataArray, 0, (jsize) header->caplen, data);
(*env)->CallVoidMethod(env, user->obj, user->handler, (jint) user->datalink, (jlong) header->ts.tv_sec, (jlong) header->ts.tv_usec, (jint) header->len, dataArray);
(*env)->DeleteLocalRef(env, dataArray);
}
|
j420247/ARO
|
4.1.1/c/AROCrypto_Win/crypto_key.h
|
#pragma once
#include "crypto_common.h"
#include "crypto_bignum.h"
BEGIN_NAMESPACE(CRYPTO)
#define ASN1_CLASS_UNIVERSAL 0
#define ASN1_CLASS_APPLICATION 1
#define ASN1_CLASS_CONTEXT_SPECIFIC 2
#define ASN1_CLASS_PRIVATE 3
#define ASN1_TAG_SEQUENCE 0x10 /* shall be constructed */
#define ASN1_TAG_INTEGER 0x02
#define ASN1_TAG_OCTETSTRING 0x04
#define ASN1_TAG_OID 0x06
struct asn1_hdr {
const u8 *payload;
u8 identifier, _class, constructed;
unsigned int tag, length;
};
#define ASN1_MAX_OID_LEN 20
struct asn1_oid {
unsigned long oid[ASN1_MAX_OID_LEN];
size_t len;
};
const u8 * search_tag(const char *tag, const u8 *buf, size_t len);
struct crypto_private_key * tlsv1_set_key_pem(const u8 *key, size_t len);
struct crypto_private_key * crypto_private_key_import(const u8 *key,
size_t len,
const char *passwd);
struct crypto_private_key * pkcs8_key_import(const u8 *buf, size_t len);
struct crypto_rsa_key *
crypto_rsa_import_private_key(const u8 *buf, size_t len);
unsigned char * base64_decode(const unsigned char *src, size_t len,
size_t *out_len);
int asn1_parse_oid(const u8 *buf, size_t len, struct asn1_oid *oid);
int crypto_private_key_decrypt_pkcs1_v15(struct crypto_private_key *key,
const u8 *in, size_t inlen,
u8 *out, size_t *outlen);
int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key,
const u8 *in, size_t inlen,
u8 *out, size_t *outlen);
void asn1_oid_to_str(struct asn1_oid *oid, char *buf, size_t len);
int asn1_get_oid(const u8 *buf, size_t len, struct asn1_oid *oid,
const u8 **next);
const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end,
struct bignum *num);
END_NAMESPACE
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/mobilesync.h
|
<gh_stars>100-1000
/**
* @file libimobiledevice/mobilesync.h
* @brief Synchronize data classes with a device and computer.
* \internal
*
* Copyright (c) 2010 <NAME> All Rights Reserved.
* Copyright (c) 2009 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMOBILESYNC_H
#define IMOBILESYNC_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define MOBILESYNC_SERVICE_NAME "com.apple.mobilesync"
/** @name Error Codes */
/*@{*/
#define MOBILESYNC_E_SUCCESS 0
#define MOBILESYNC_E_INVALID_ARG -1
#define MOBILESYNC_E_PLIST_ERROR -2
#define MOBILESYNC_E_MUX_ERROR -3
#define MOBILESYNC_E_BAD_VERSION -4
#define MOBILESYNC_E_SYNC_REFUSED -5
#define MOBILESYNC_E_CANCELLED -6
#define MOBILESYNC_E_WRONG_DIRECTION -7
#define MOBILESYNC_E_NOT_READY -8
#define MOBILESYNC_E_UNKNOWN_ERROR -256
/*@}*/
/** The sync type of the current sync session. */
typedef enum {
MOBILESYNC_SYNC_TYPE_FAST, /**< Fast-sync requires that only the changes made since the last synchronization should be reported by the computer. */
MOBILESYNC_SYNC_TYPE_SLOW, /**< Slow-sync requires that all data from the computer needs to be synchronized/sent. */
MOBILESYNC_SYNC_TYPE_RESET /**< Reset-sync signals that the computer should send all data again. */
} mobilesync_sync_type_t;
/** Represents an error code. */
typedef int16_t mobilesync_error_t;
typedef struct mobilesync_client_private mobilesync_client_private;
typedef mobilesync_client_private *mobilesync_client_t; /**< The client handle */
typedef struct {
char *device_anchor;
char *computer_anchor;
} mobilesync_anchors;
typedef mobilesync_anchors *mobilesync_anchors_t; /**< Anchors used by the device and computer. */
/* Interface */
mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client);
mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t* client, const char* label);
mobilesync_error_t mobilesync_client_free(mobilesync_client_t client);
mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist);
mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist);
mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description);
mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason);
mobilesync_error_t mobilesync_finish(mobilesync_client_t client);
mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client);
mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client);
mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client);
mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions);
mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client);
mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client);
mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions);
mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping);
/* Helper */
mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor);
void mobilesync_anchors_free(mobilesync_anchors_t anchors);
plist_t mobilesync_actions_new();
void mobilesync_actions_add(plist_t actions, ...);
void mobilesync_actions_free(plist_t actions);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
4.1.1/c/AROCrypto_Win/crypto_bignum.h
|
#pragma once
BEGIN_NAMESPACE(CRYPTO)
struct bignum;
struct crypto_rsa_key {
int private_key; /* whether private key is set */
struct bignum *n; /* modulus (p * q) */
struct bignum *e; /* public exponent */
/* The following parameters are available only if private_key is set */
struct bignum *d; /* private exponent */
struct bignum *p; /* prime p (factor of n) */
struct bignum *q; /* prime q (factor of n) */
struct bignum *dmp1; /* d mod (p - 1); CRT exponent */
struct bignum *dmq1; /* d mod (q - 1); CRT exponent */
struct bignum *iqmp; /* 1 / q mod p; CRT coefficient */
};
struct bignum * bignum_init(void);
void bignum_deinit(struct bignum *n);
int bignum_set_unsigned_bin(struct bignum *n, const u8 *buf, size_t len);
int bignum_cmp_d(const struct bignum *a, unsigned long b);
int bignum_exptmod(const struct bignum *a, const struct bignum *b,
const struct bignum *c, struct bignum *d);
int bignum_mulmod(const struct bignum *a, const struct bignum *b,
const struct bignum *c, struct bignum *d);
int bignum_mul(const struct bignum *a, const struct bignum *b, struct bignum *c);
int bignum_sub(const struct bignum *a, const struct bignum *b, struct bignum *c);
int bignum_add(const struct bignum *a, const struct bignum *b, struct bignum *c);
int bignum_cmp(const struct bignum *a, const struct bignum *b);
size_t bignum_get_unsigned_bin_len(struct bignum *n);
int bignum_get_unsigned_bin(const struct bignum *n, u8 *buf, size_t *len);
END_NAMESPACE
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/restore.h
|
/**
* @file libimobiledevice/restore.h
* @brief Initiate restore process or reboot device.
* @note This service is only available if the device is in restore mode.
* \internal
*
* Copyright (c) 2010 <NAME>. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IRESTORE_H
#define IRESTORE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
/** @name Error Codes */
/*@{*/
#define RESTORE_E_SUCCESS 0
#define RESTORE_E_INVALID_ARG -1
#define RESTORE_E_INVALID_CONF -2
#define RESTORE_E_PLIST_ERROR -3
#define RESTORE_E_DICT_ERROR -4
#define RESTORE_E_NOT_ENOUGH_DATA -5
#define RESTORE_E_MUX_ERROR -6
#define RESTORE_E_START_RESTORE_FAILED -7
#define RESTORE_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t restored_error_t;
typedef struct restored_client_private restored_client_private;
typedef restored_client_private *restored_client_t; /**< The client handle. */
/* Interface */
restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label);
restored_error_t restored_client_free(restored_client_t client);
restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version);
restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value);
restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) ;
restored_error_t restored_send(restored_client_t client, plist_t plist);
restored_error_t restored_receive(restored_client_t client, plist_t *plist);
restored_error_t restored_goodbye(restored_client_t client);
restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version);
restored_error_t restored_reboot(restored_client_t client);
/* Helper */
void restored_client_set_label(restored_client_t client, const char *label);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/heartbeat.h
|
<reponame>j420247/ARO
/**
* @file libimobiledevice/heartbeat.h
* @brief Send "heartbeat" to device to allow service connections over network.
* \internal
*
* Copyright (c) 2013 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IHEARTBEAT_H
#define IHEARTBEAT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define HEARTBEAT_SERVICE_NAME "com.apple.mobile.heartbeat"
/** @name Error Codes */
/*@{*/
#define HEARTBEAT_E_SUCCESS 0
#define HEARTBEAT_E_INVALID_ARG -1
#define HEARTBEAT_E_PLIST_ERROR -2
#define HEARTBEAT_E_MUX_ERROR -3
#define HEARTBEAT_E_SSL_ERROR -4
#define HEARTBEAT_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t heartbeat_error_t;
typedef struct heartbeat_client_private heartbeat_client_private;
typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */
heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client);
heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label);
heartbeat_error_t heartbeat_client_free(heartbeat_client_t client);
heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist);
heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist);
heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/socket_server.h
|
<reponame>j420247/ARO
#ifndef _SOCKET_SERVER_H_
#define _SOCKET_SERVER_H_
void * start_server_socket(void * arg);
void dostuff(int); /* function prototype */
void socket_server(const char *msg);
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/diagnostics_relay.h
|
/**
* @file libimobiledevice/diagnostics_relay.h
* @brief Request iOS diagnostic information from device.
* \internal
*
* Copyright (c) 2012 <NAME>, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IDIAGNOSTICS_RELAY_H
#define IDIAGNOSTICS_RELAY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay"
/** @name Error Codes */
/*@{*/
#define DIAGNOSTICS_RELAY_E_SUCCESS 0
#define DIAGNOSTICS_RELAY_E_INVALID_ARG -1
#define DIAGNOSTICS_RELAY_E_PLIST_ERROR -2
#define DIAGNOSTICS_RELAY_E_MUX_ERROR -3
#define DIAGNOSTICS_RELAY_E_UNKNOWN_REQUEST -4
#define DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR -256
/*@}*/
#define DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT (1 << 1)
#define DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS (1 << 2)
#define DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL (1 << 3)
#define DIAGNOSTICS_RELAY_REQUEST_TYPE_ALL "All"
#define DIAGNOSTICS_RELAY_REQUEST_TYPE_WIFI "WiFi"
#define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge"
#define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND"
/** Represents an error code. */
typedef int16_t diagnostics_relay_error_t;
typedef struct diagnostics_relay_client_private diagnostics_relay_client_private;
typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */
diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client);
diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t* client, const char* label);
diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client);
diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client);
diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client);
diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, int flags);
diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, int flags);
diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics);
diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result);
diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* name, const char* class, plist_t* result);
diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/house_arrest.h
|
/**
* @file libimobiledevice/house_arrest.h
* @brief Access app folders and their contents.
* \internal
*
* Copyright (c) 2010 <NAME>, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IHOUSE_ARREST_H
#define IHOUSE_ARREST_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#include <libimobiledevice/afc.h>
#define HOUSE_ARREST_SERVICE_NAME "com.apple.mobile.house_arrest"
/** @name Error Codes */
/*@{*/
#define HOUSE_ARREST_E_SUCCESS 0
#define HOUSE_ARREST_E_INVALID_ARG -1
#define HOUSE_ARREST_E_PLIST_ERROR -2
#define HOUSE_ARREST_E_CONN_FAILED -3
#define HOUSE_ARREST_E_INVALID_MODE -4
#define HOUSE_ARREST_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t house_arrest_error_t;
typedef struct house_arrest_client_private house_arrest_client_private;
typedef house_arrest_client_private *house_arrest_client_t; /**< The client handle. */
/* Interface */
house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client);
house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t* client, const char* label);
house_arrest_error_t house_arrest_client_free(house_arrest_client_t client);
house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict);
house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid);
house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict);
afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/print-udp.c
|
<gh_stars>100-1000
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code distributions
* retain the above copyright notice and this paragraph in its entirety, (2)
* distributions including binary code include the above copyright notice and
* this paragraph in its entirety in the documentation or other materials
* provided with the distribution, and (3) all advertising materials mentioning
* features or use of this software display the following acknowledgement:
* ``This product includes software developed by the University of California,
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
* the University nor the names of its contributors may be used to endorse
* or promote products derived from this software without specific prior
* written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.142 2007-08-08 17:20:58 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
#ifdef SEGSIZE
#undef SEGSIZE
#endif
//#include <arpa/tftp.h>
#include <stdio.h>
#include <string.h>
#include "interface.h"
#include "addrtoname.h"
#include "extract.h"
#include "appletalk.h"
#include "udp.h"
#include "ip.h"
#ifdef INET6
#include "ip6.h"
#endif
#include "ipproto.h"
#include "rpc_auth.h"
#include "rpc_msg.h"
#include "nameser.h"
#include "nfs.h"
#include "bootp.h"
struct rtcphdr {
u_int16_t rh_flags; /* T:2 P:1 CNT:5 PT:8 */
u_int16_t rh_len; /* length of message (in words) */
u_int32_t rh_ssrc; /* synchronization src id */
};
typedef struct {
u_int32_t upper; /* more significant 32 bits */
u_int32_t lower; /* less significant 32 bits */
} ntp64;
/*
* Sender report.
*/
struct rtcp_sr {
ntp64 sr_ntp; /* 64-bit ntp timestamp */
u_int32_t sr_ts; /* reference media timestamp */
u_int32_t sr_np; /* no. packets sent */
u_int32_t sr_nb; /* no. bytes sent */
};
/*
* Receiver report.
* Time stamps are middle 32-bits of ntp timestamp.
*/
struct rtcp_rr {
u_int32_t rr_srcid; /* sender being reported */
u_int32_t rr_nl; /* no. packets lost */
u_int32_t rr_ls; /* extended last seq number received */
u_int32_t rr_dv; /* jitter (delay variance) */
u_int32_t rr_lsr; /* orig. ts from last rr from this src */
u_int32_t rr_dlsr; /* time from recpt of last rr to xmit time */
};
/*XXX*/
#define RTCP_PT_SR 200
#define RTCP_PT_RR 201
#define RTCP_PT_SDES 202
#define RTCP_SDES_CNAME 1
#define RTCP_SDES_NAME 2
#define RTCP_SDES_EMAIL 3
#define RTCP_SDES_PHONE 4
#define RTCP_SDES_LOC 5
#define RTCP_SDES_TOOL 6
#define RTCP_SDES_NOTE 7
#define RTCP_SDES_PRIV 8
#define RTCP_PT_BYE 203
#define RTCP_PT_APP 204
static void
vat_print(const void *hdr, register const struct udphdr *up)
{
/* vat/vt audio */
u_int ts = *(u_int16_t *)hdr;
if ((ts & 0xf060) != 0) {
/* probably vt */
(void)printf("udp/vt %u %d / %d",
(u_int32_t)(EXTRACT_16BITS(&up->uh_ulen) - sizeof(*up)),
ts & 0x3ff, ts >> 10);
} else {
/* probably vat */
u_int32_t i0 = EXTRACT_32BITS(&((u_int *)hdr)[0]);
u_int32_t i1 = EXTRACT_32BITS(&((u_int *)hdr)[1]);
printf("udp/vat %u c%d %u%s",
(u_int32_t)(EXTRACT_16BITS(&up->uh_ulen) - sizeof(*up) - 8),
i0 & 0xffff,
i1, i0 & 0x800000? "*" : "");
/* audio format */
if (i0 & 0x1f0000)
printf(" f%d", (i0 >> 16) & 0x1f);
if (i0 & 0x3f000000)
printf(" s%d", (i0 >> 24) & 0x3f);
}
}
static void
rtp_print(const void *hdr, u_int len, register const struct udphdr *up)
{
/* rtp v1 or v2 */
u_int *ip = (u_int *)hdr;
u_int hasopt, hasext, contype, hasmarker;
u_int32_t i0 = EXTRACT_32BITS(&((u_int *)hdr)[0]);
u_int32_t i1 = EXTRACT_32BITS(&((u_int *)hdr)[1]);
u_int dlen = EXTRACT_16BITS(&up->uh_ulen) - sizeof(*up) - 8;
const char * ptype;
ip += 2;
len >>= 2;
len -= 2;
hasopt = 0;
hasext = 0;
if ((i0 >> 30) == 1) {
/* rtp v1 */
hasopt = i0 & 0x800000;
contype = (i0 >> 16) & 0x3f;
hasmarker = i0 & 0x400000;
ptype = "rtpv1";
} else {
/* rtp v2 */
hasext = i0 & 0x10000000;
contype = (i0 >> 16) & 0x7f;
hasmarker = i0 & 0x800000;
dlen -= 4;
ptype = "rtp";
ip += 1;
len -= 1;
}
printf("udp/%s %d c%d %s%s %d %u",
ptype,
dlen,
contype,
(hasopt || hasext)? "+" : "",
hasmarker? "*" : "",
i0 & 0xffff,
i1);
if (vflag) {
printf(" %u", EXTRACT_32BITS(&((u_int *)hdr)[2]));
if (hasopt) {
u_int i2, optlen;
do {
i2 = ip[0];
optlen = (i2 >> 16) & 0xff;
if (optlen == 0 || optlen > len) {
printf(" !opt");
return;
}
ip += optlen;
len -= optlen;
} while ((int)i2 >= 0);
}
if (hasext) {
u_int i2, extlen;
i2 = ip[0];
extlen = (i2 & 0xffff) + 1;
if (extlen > len) {
printf(" !ext");
return;
}
ip += extlen;
}
if (contype == 0x1f) /*XXX H.261 */
printf(" 0x%04x", ip[0] >> 16);
}
}
static const u_char *
rtcp_print(const u_char *hdr, const u_char *ep)
{
/* rtp v2 control (rtcp) */
struct rtcp_rr *rr = 0;
struct rtcp_sr *sr;
struct rtcphdr *rh = (struct rtcphdr *)hdr;
u_int len;
u_int16_t flags;
int cnt;
double ts, dts;
if ((u_char *)(rh + 1) > ep) {
printf(" [|rtcp]");
return (ep);
}
len = (EXTRACT_16BITS(&rh->rh_len) + 1) * 4;
flags = EXTRACT_16BITS(&rh->rh_flags);
cnt = (flags >> 8) & 0x1f;
switch (flags & 0xff) {
case RTCP_PT_SR:
sr = (struct rtcp_sr *)(rh + 1);
printf(" sr");
if (len != cnt * sizeof(*rr) + sizeof(*sr) + sizeof(*rh))
printf(" [%d]", len);
if (vflag)
printf(" %u", EXTRACT_32BITS(&rh->rh_ssrc));
if ((u_char *)(sr + 1) > ep) {
printf(" [|rtcp]");
return (ep);
}
ts = (double)(EXTRACT_32BITS(&sr->sr_ntp.upper)) +
((double)(EXTRACT_32BITS(&sr->sr_ntp.lower)) /
4294967296.0);
printf(" @%.2f %u %up %ub", ts, EXTRACT_32BITS(&sr->sr_ts),
EXTRACT_32BITS(&sr->sr_np), EXTRACT_32BITS(&sr->sr_nb));
rr = (struct rtcp_rr *)(sr + 1);
break;
case RTCP_PT_RR:
printf(" rr");
if (len != cnt * sizeof(*rr) + sizeof(*rh))
printf(" [%d]", len);
rr = (struct rtcp_rr *)(rh + 1);
if (vflag)
printf(" %u", EXTRACT_32BITS(&rh->rh_ssrc));
break;
case RTCP_PT_SDES:
printf(" sdes %d", len);
if (vflag)
printf(" %u", EXTRACT_32BITS(&rh->rh_ssrc));
cnt = 0;
break;
case RTCP_PT_BYE:
printf(" bye %d", len);
if (vflag)
printf(" %u", EXTRACT_32BITS(&rh->rh_ssrc));
cnt = 0;
break;
default:
printf(" type-0x%x %d", flags & 0xff, len);
cnt = 0;
break;
}
if (cnt > 1)
printf(" c%d", cnt);
while (--cnt >= 0) {
if ((u_char *)(rr + 1) > ep) {
printf(" [|rtcp]");
return (ep);
}
if (vflag)
printf(" %u", EXTRACT_32BITS(&rr->rr_srcid));
ts = (double)(EXTRACT_32BITS(&rr->rr_lsr)) / 65536.;
dts = (double)(EXTRACT_32BITS(&rr->rr_dlsr)) / 65536.;
printf(" %ul %us %uj @%.2f+%.2f",
EXTRACT_32BITS(&rr->rr_nl) & 0x00ffffff,
EXTRACT_32BITS(&rr->rr_ls),
EXTRACT_32BITS(&rr->rr_dv), ts, dts);
}
return (hdr + len);
}
static int udp_cksum(register const struct ip *ip,
register const struct udphdr *up,
register u_int len)
{
union phu {
struct phdr {
u_int32_t src;
u_int32_t dst;
u_char mbz;
u_char proto;
u_int16_t len;
} ph;
u_int16_t pa[6];
} phu;
register const u_int16_t *sp;
/* pseudo-header.. */
phu.ph.len = htons((u_int16_t)len);
phu.ph.mbz = 0;
phu.ph.proto = IPPROTO_UDP;
memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
if (IP_HL(ip) == 5)
memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));
else
phu.ph.dst = ip_finddst(ip);
sp = &phu.pa[0];
return in_cksum((u_short *)up, len,
sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
}
#ifdef INET6
static int udp6_cksum(const struct ip6_hdr *ip6, const struct udphdr *up,
u_int len)
{
size_t i;
register const u_int16_t *sp;
u_int32_t sum;
union {
struct {
struct in6_addr ph_src;
struct in6_addr ph_dst;
u_int32_t ph_len;
u_int8_t ph_zero[3];
u_int8_t ph_nxt;
} ph;
u_int16_t pa[20];
} phu;
/* pseudo-header */
memset(&phu, 0, sizeof(phu));
phu.ph.ph_src = ip6->ip6_src;
phu.ph.ph_dst = ip6->ip6_dst;
phu.ph.ph_len = htonl(len);
phu.ph.ph_nxt = IPPROTO_UDP;
sum = 0;
for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++)
sum += phu.pa[i];
sp = (const u_int16_t *)up;
for (i = 0; i < (len & ~1); i += 2)
sum += *sp++;
if (len & 1)
sum += htons((*(const u_int8_t *)sp) << 8);
while (sum > 0xffff)
sum = (sum & 0xffff) + (sum >> 16);
sum = ~sum & 0xffff;
return (sum);
}
#endif
static void
udpipaddr_print(const struct ip *ip, int sport, int dport)
{
#ifdef INET6
const struct ip6_hdr *ip6;
if (IP_V(ip) == 6)
ip6 = (const struct ip6_hdr *)ip;
else
ip6 = NULL;
if (ip6) {
if (ip6->ip6_nxt == IPPROTO_UDP) {
if (sport == -1) {
(void)printf("%s > %s: ",
ip6addr_string(&ip6->ip6_src),
ip6addr_string(&ip6->ip6_dst));
} else {
(void)printf("%s.%s > %s.%s: ",
ip6addr_string(&ip6->ip6_src),
udpport_string(sport),
ip6addr_string(&ip6->ip6_dst),
udpport_string(dport));
}
} else {
if (sport != -1) {
(void)printf("%s > %s: ",
udpport_string(sport),
udpport_string(dport));
}
}
} else
#endif /*INET6*/
{
if (ip->ip_p == IPPROTO_UDP) {
if (sport == -1) {
(void)printf("%s > %s: ",
ipaddr_string(&ip->ip_src),
ipaddr_string(&ip->ip_dst));
} else {
(void)printf("%s.%s > %s.%s: ",
ipaddr_string(&ip->ip_src),
udpport_string(sport),
ipaddr_string(&ip->ip_dst),
udpport_string(dport));
}
} else {
if (sport != -1) {
(void)printf("%s > %s: ",
udpport_string(sport),
udpport_string(dport));
}
}
}
}
void
udp_print(register const u_char *bp, u_int length,
register const u_char *bp2, int fragmented)
{
register const struct udphdr *up;
register const struct ip *ip;
register const u_char *cp;
register const u_char *ep = bp + length;
u_int16_t sport, dport, ulen;
#ifdef INET6
register const struct ip6_hdr *ip6;
#endif
if (ep > snapend)
ep = snapend;
up = (struct udphdr *)bp;
ip = (struct ip *)bp2;
#ifdef INET6
if (IP_V(ip) == 6)
ip6 = (struct ip6_hdr *)bp2;
else
ip6 = NULL;
#endif /*INET6*/
cp = (u_char *)(up + 1);
if (!TTEST(up->uh_dport)) {
udpipaddr_print(ip, -1, -1);
(void)printf("[|udp]");
return;
}
sport = EXTRACT_16BITS(&up->uh_sport);
dport = EXTRACT_16BITS(&up->uh_dport);
if (length < sizeof(struct udphdr)) {
udpipaddr_print(ip, sport, dport);
(void)printf("truncated-udp %d", length);
return;
}
length -= sizeof(struct udphdr);
if (cp > snapend) {
udpipaddr_print(ip, sport, dport);
(void)printf("[|udp]");
return;
}
ulen = EXTRACT_16BITS(&up->uh_ulen);
if (ulen < 8) {
udpipaddr_print(ip, sport, dport);
(void)printf("truncated-udplength %d", ulen);
return;
}
if (packettype) {
register struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
switch (packettype) {
case PT_VAT:
udpipaddr_print(ip, sport, dport);
vat_print((void *)(up + 1), up);
break;
case PT_WB:
udpipaddr_print(ip, sport, dport);
wb_print((void *)(up + 1), length);
break;
case PT_RPC:
rp = (struct sunrpc_msg *)(up + 1);
direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction);
if (direction == SUNRPC_CALL)
sunrpcrequest_print((u_char *)rp, length,
(u_char *)ip);
else
nfsreply_print((u_char *)rp, length,
(u_char *)ip); /*XXX*/
break;
case PT_RTP:
udpipaddr_print(ip, sport, dport);
rtp_print((void *)(up + 1), length, up);
break;
case PT_RTCP:
udpipaddr_print(ip, sport, dport);
while (cp < ep)
cp = rtcp_print(cp, ep);
break;
case PT_SNMP:
udpipaddr_print(ip, sport, dport);
snmp_print((const u_char *)(up + 1), length);
break;
case PT_CNFP:
udpipaddr_print(ip, sport, dport);
cnfp_print(cp, (const u_char *)ip);
break;
case PT_TFTP:
udpipaddr_print(ip, sport, dport);
tftp_print(cp, length);
break;
case PT_AODV:
udpipaddr_print(ip, sport, dport);
aodv_print((const u_char *)(up + 1), length,
#ifdef INET6
ip6 != NULL);
#else
0);
#endif
break;
}
return;
}
if (!qflag) {
register struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
rp = (struct sunrpc_msg *)(up + 1);
if (TTEST(rp->rm_direction)) {
direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction);
if (dport == NFS_PORT && direction == SUNRPC_CALL) {
nfsreq_print((u_char *)rp, length,
(u_char *)ip);
return;
}
if (sport == NFS_PORT && direction == SUNRPC_REPLY) {
nfsreply_print((u_char *)rp, length,
(u_char *)ip);
return;
}
#ifdef notdef
if (dport == SUNRPC_PORT && direction == SUNRPC_CALL) {
sunrpcrequest_print((u_char *)rp, length, (u_char *)ip);
return;
}
#endif
}
if (TTEST(((struct LAP *)cp)->type) &&
((struct LAP *)cp)->type == lapDDP &&
(atalk_port(sport) || atalk_port(dport))) {
if (vflag)
fputs("kip ", stdout);
llap_print(cp, length);
return;
}
}
udpipaddr_print(ip, sport, dport);
if (IP_V(ip) == 4 && (vflag > 1) && !Kflag && !fragmented) {
int sum = up->uh_sum;
if (sum == 0) {
(void)printf("[no cksum] ");
} else if (TTEST2(cp[0], length)) {
sum = udp_cksum(ip, up, length + sizeof(struct udphdr));
if (sum != 0)
(void)printf("[bad udp cksum %x!] ", sum);
else
(void)printf("[udp sum ok] ");
}
}
#ifdef INET6
if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !Kflag && !fragmented) {
int sum = up->uh_sum;
/* for IPv6, UDP checksum is mandatory */
if (TTEST2(cp[0], length)) {
sum = udp6_cksum(ip6, up, length + sizeof(struct udphdr));
if (sum != 0)
(void)printf("[bad udp cksum %x!] ", sum);
else
(void)printf("[udp sum ok] ");
}
}
#endif
if (!qflag) {
#define ISPORT(p) (dport == (p) || sport == (p))
if (ISPORT(NAMESERVER_PORT))
ns_print((const u_char *)(up + 1), length, 0);
else if (ISPORT(MULTICASTDNS_PORT))
ns_print((const u_char *)(up + 1), length, 1);
else if (ISPORT(TIMED_PORT))
timed_print((const u_char *)(up + 1));
else if (ISPORT(TFTP_PORT))
tftp_print((const u_char *)(up + 1), length);
else if (ISPORT(IPPORT_BOOTPC) || ISPORT(IPPORT_BOOTPS))
bootp_print((const u_char *)(up + 1), length);
else if (ISPORT(RIP_PORT))
rip_print((const u_char *)(up + 1), length);
else if (ISPORT(AODV_PORT))
aodv_print((const u_char *)(up + 1), length,
#ifdef INET6
ip6 != NULL);
#else
0);
#endif
else if (ISPORT(ISAKMP_PORT))
isakmp_print(gndo, (const u_char *)(up + 1), length, bp2);
else if (ISPORT(ISAKMP_PORT_NATT))
isakmp_rfc3948_print(gndo, (const u_char *)(up + 1), length, bp2);
#if 1 /*???*/
else if (ISPORT(ISAKMP_PORT_USER1) || ISPORT(ISAKMP_PORT_USER2))
isakmp_print(gndo, (const u_char *)(up + 1), length, bp2);
#endif
else if (ISPORT(SNMP_PORT) || ISPORT(SNMPTRAP_PORT))
snmp_print((const u_char *)(up + 1), length);
else if (ISPORT(NTP_PORT))
ntp_print((const u_char *)(up + 1), length);
else if (ISPORT(KERBEROS_PORT) || ISPORT(KERBEROS_SEC_PORT))
krb_print((const void *)(up + 1));
else if (ISPORT(L2TP_PORT))
l2tp_print((const u_char *)(up + 1), length);
#ifdef TCPDUMP_DO_SMB
else if (ISPORT(NETBIOS_NS_PORT))
nbt_udp137_print((const u_char *)(up + 1), length);
else if (ISPORT(NETBIOS_DGRAM_PORT))
nbt_udp138_print((const u_char *)(up + 1), length);
#endif
else if (dport == 3456)
vat_print((const void *)(up + 1), up);
else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT))
zephyr_print((const void *)(up + 1), length);
/*
* Since there are 10 possible ports to check, I think
* a <> test would be more efficient
*/
else if ((sport >= RX_PORT_LOW && sport <= RX_PORT_HIGH) ||
(dport >= RX_PORT_LOW && dport <= RX_PORT_HIGH))
rx_print((const void *)(up + 1), length, sport, dport,
(u_char *) ip);
#ifdef INET6
else if (ISPORT(RIPNG_PORT))
ripng_print((const u_char *)(up + 1), length);
else if (ISPORT(DHCP6_SERV_PORT) || ISPORT(DHCP6_CLI_PORT)) {
dhcp6_print((const u_char *)(up + 1), length);
}
#endif /*INET6*/
/*
* Kludge in test for whiteboard packets.
*/
else if (dport == 4567)
wb_print((const void *)(up + 1), length);
else if (ISPORT(CISCO_AUTORP_PORT))
cisco_autorp_print((const void *)(up + 1), length);
else if (ISPORT(RADIUS_PORT) ||
ISPORT(RADIUS_NEW_PORT) ||
ISPORT(RADIUS_ACCOUNTING_PORT) ||
ISPORT(RADIUS_NEW_ACCOUNTING_PORT) )
radius_print((const u_char *)(up+1), length);
else if (dport == HSRP_PORT)
hsrp_print((const u_char *)(up + 1), length);
else if (ISPORT(LWRES_PORT))
lwres_print((const u_char *)(up + 1), length);
else if (ISPORT(LDP_PORT))
ldp_print((const u_char *)(up + 1), length);
else if (ISPORT(OLSR_PORT))
olsr_print((const u_char *)(up + 1), length,
#if INET6
(IP_V(ip) == 6) ? 1 : 0);
#else
0);
#endif
else if (ISPORT(MPLS_LSP_PING_PORT))
lspping_print((const u_char *)(up + 1), length);
else if (dport == BFD_CONTROL_PORT ||
dport == BFD_ECHO_PORT )
bfd_print((const u_char *)(up+1), length, dport);
else if (ISPORT(LMP_PORT))
lmp_print((const u_char *)(up + 1), length);
else if (ISPORT(VQP_PORT))
vqp_print((const u_char *)(up + 1), length);
else if (ISPORT(SFLOW_PORT))
sflow_print((const u_char *)(up + 1), length);
else if (dport == LWAPP_CONTROL_PORT)
lwapp_control_print((const u_char *)(up + 1), length, 1);
else if (sport == LWAPP_CONTROL_PORT)
lwapp_control_print((const u_char *)(up + 1), length, 0);
else if (ISPORT(LWAPP_DATA_PORT))
lwapp_data_print((const u_char *)(up + 1), length);
else if (ISPORT(SIP_PORT))
sip_print((const u_char *)(up + 1), length);
else if (ISPORT(SYSLOG_PORT))
syslog_print((const u_char *)(up + 1), length);
else
(void)printf("UDP, length %u",
(u_int32_t)(ulen - sizeof(*up)));
#undef ISPORT
} else
(void)printf("UDP, length %u", (u_int32_t)(ulen - sizeof(*up)));
}
/*
* Local Variables:
* c-style: whitesmith
* c-basic-offset: 8
* End:
*/
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/tcpdump-4.1.1/socket_server.c
|
/* Tcpdump server socket connection on specified pot number to start and stop the tcpdump */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <android/log.h>
#include "socket_server.h"
extern int exitFlag;
extern int bearerChangedvalue;
void socket_error(const char *msg) {
perror(msg);
exit(1);
}
void* start_server_socket(void *arg) {
//TCPDUMP server port no
int server_port = 50999;
int sockfd, newsockfd, portno, pid;
socklen_t clilen;
struct sockaddr_in serv_addr, cli_addr;
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0) {
socket_error("Error in opening tcpdump socket");
__android_log_print(ANDROID_LOG_INFO, "TcpdumpSocket","error in opening tcpdump socket");
}
bzero((char *) &serv_addr, sizeof(serv_addr));
portno = server_port;
__android_log_print(ANDROID_LOG_INFO, "TcpdumpSocket","portno = %d", portno);
serv_addr.sin_family = PF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(portno);
if (bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
socket_error("Error in binding to tcdump socket");
__android_log_print(ANDROID_LOG_INFO, "TcpdumpSocket","Error in binding to tcpdump socket");
}
__android_log_print(ANDROID_LOG_DEBUG, "TcpdumpSocket","socket listening");
listen(sockfd, 5);
clilen = sizeof(cli_addr);
while (1) {
printf(" inside tcpdump server socket \n");
newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
if (-1 == newsockfd) {
if (bearerChangedvalue > 0) {
/* Restart accept to try bearer change on socket */
continue;
}
else {
__android_log_print(ANDROID_LOG_INFO, "TcpdumpSocket","Error in accept");
socket_error("Error in accept Socket_server");
}
} else {
__android_log_print(ANDROID_LOG_INFO, "TcpdumpSocket","dostuff");
dostuff(newsockfd);
}
break;
}
close(sockfd);
return 0;
}
/* Separate instance of dostuff function for each connection. It handles all communication once connnection has been established */
void dostuff(int sock) {
int n;
char buffer[256];
bzero(buffer, 256);
exitFlag = 3;
n = read(sock, buffer, 255);
if (n < 0) {
socket_error("ERROR reading from socket");
__android_log_print(ANDROID_LOG_INFO, "ERROR: reading from socket","TCPDUMP STOP MESSAGE");
}
__android_log_print(ANDROID_LOG_DEBUG, "TcpdumpSocket","TCPDUMP STOP MESSAGE");
n = write(sock, "Message Received", 18);
if (n < 0) {
socket_error("Error writing message to socket");
__android_log_print(ANDROID_LOG_INFO, "ERROR: writing message to socket","TCPDUMP STOP MESSAGE");
}
exitFlag = 4;
__android_log_print(ANDROID_LOG_INFO, "TcpdumpSocket", "Stop Recieved: exitFlag Value = %d", exitFlag);
}
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/libpcap-1.1.1/cpu_usage.h
|
<filename>ClientCollectors/ARODataCollector/external/libpcap-1.1.1/cpu_usage.h
#ifndef _CPU_USAGE_H_
#define _CPU_USAGE_H_
void * CaptureCPUUsage(void * arg);
#define FINISH_BY_USER 1
#define FINISH_BY_PCAP 2
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/webinspector.h
|
<reponame>j420247/ARO<gh_stars>100-1000
/**
* @file libimobiledevice/webinspector.h
* @brief WebKit Remote Debugging.
* \internal
*
* Copyright (c) 2013 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IWEBINSPECTOR_H
#define IWEBINSPECTOR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define WEBINSPECTOR_SERVICE_NAME "com.apple.webinspector"
/** @name Error Codes */
/*@{*/
#define WEBINSPECTOR_E_SUCCESS 0
#define WEBINSPECTOR_E_INVALID_ARG -1
#define WEBINSPECTOR_E_PLIST_ERROR -2
#define WEBINSPECTOR_E_MUX_ERROR -3
#define WEBINSPECTOR_E_SSL_ERROR -4
#define WEBINSPECTOR_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t webinspector_error_t;
typedef struct webinspector_client_private webinspector_client_private;
typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */
webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client);
webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label);
webinspector_error_t webinspector_client_free(webinspector_client_t client);
webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist);
webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist);
webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
ClientCollectors/ARODataCollector/external/libpcap-1.1.1/cpu_usage.c
|
#include "cpu_usage.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <sys/stat.h>
extern int exitFlag;
extern FILE * ofsCPU;
typedef struct {
unsigned int cpu_total;
unsigned int cpu_usage;
} CPU_USAGE;
void TerminateCapture(int status);
double GetCPUInfo(CPU_USAGE * pCU) {
static char buf[32];
unsigned int cpu_user, cpu_nice, cpu_kernel, cpu_idle, cpu_iowait, cpu_irq, cpu_softirq;
unsigned int cpu_usage, cpu_total;
FILE * ifs = fopen("/proc/stat", "r");
if (ifs == NULL) {
printf("Error: cannot open /proc/stat\n");
exit(0);
}
fscanf(ifs, "%s %u %u %u %u %u %u %u",
buf,
&cpu_user, &cpu_nice, &cpu_kernel, &cpu_idle, &cpu_iowait, &cpu_irq, &cpu_softirq
);
fclose(ifs);
cpu_total = cpu_user + cpu_nice + cpu_kernel + cpu_idle + cpu_iowait + cpu_irq + cpu_softirq;
cpu_usage = cpu_total - cpu_idle;
if (pCU->cpu_total == 0) {
pCU->cpu_total = cpu_total;
pCU->cpu_usage = cpu_usage;
return -1.0f;
} else {
double u = (double)(cpu_usage - pCU->cpu_usage) / (cpu_total - pCU->cpu_total);
pCU->cpu_total = cpu_total;
pCU->cpu_usage = cpu_usage;
return u;
}
}
void * CaptureCPUUsage(void * arg) {
CPU_USAGE cu;
double u;
cu.cpu_total = 0;
cu.cpu_usage = 0;
GetCPUInfo(&cu);
usleep(500000);
struct timeb ts;
unsigned int clk = 0;
while (1) {
u = GetCPUInfo(&cu);
ftime(&ts);
fprintf(ofsCPU, "%.3lf %.2lf\n", ts.time + ts.millitm / (double) 1000.0f, u);
if (++clk % 4 == 0) {
int finishStatus = 0;
if (exitFlag == 1)
finishStatus = FINISH_BY_PCAP;
else {
FILE * ifs = fopen("/sdcard/mpp/dc_stop_flag", "r");
if (ifs != NULL) {
fclose(ifs);
finishStatus = FINISH_BY_USER;
}
}
if (finishStatus != 0) {
exitFlag = 1;
//TODO: we are waiting for the packet capture routine to stop.
//But it might not be (e.g., waiting infinitly for the packet).
//If my guess is correct, then terminate it in tcpdump.c Line 1384
//May never end the program as long as there's no packet
//Find a smart way to more elegantly
//terminate it. At least, force pcap_close to flush
usleep(300000);
TerminateCapture(finishStatus);
}
}
usleep(250000);
}
printf("Thread CaptureCPUUsage() exit.\n");
return 0;
}
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/mobilebackup.h
|
<filename>5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/mobilebackup.h
/**
* @file libimobiledevice/mobilebackup.h
* @brief Backup and restore of all device data.
* \internal
*
* Copyright (c) 2009 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMOBILEBACKUP_H
#define IMOBILEBACKUP_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup"
/** @name Error Codes */
/*@{*/
#define MOBILEBACKUP_E_SUCCESS 0
#define MOBILEBACKUP_E_INVALID_ARG -1
#define MOBILEBACKUP_E_PLIST_ERROR -2
#define MOBILEBACKUP_E_MUX_ERROR -3
#define MOBILEBACKUP_E_BAD_VERSION -4
#define MOBILEBACKUP_E_REPLY_NOT_OK -5
#define MOBILEBACKUP_E_UNKNOWN_ERROR -256
/*@}*/
/** Represents an error code. */
typedef int16_t mobilebackup_error_t;
typedef struct mobilebackup_client_private mobilebackup_client_private;
typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */
typedef enum {
MB_RESTORE_NOTIFY_SPRINGBOARD = 1 << 0,
MB_RESTORE_PRESERVE_SETTINGS = 1 << 1,
MB_RESTORE_PRESERVE_CAMERA_ROLL = 1 << 2
} mobilebackup_flags_t;
mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client);
mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t* client, const char* label);
mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client);
mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist);
mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist);
mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version);
mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client);
mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version);
mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result);
mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result);
mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client);
mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
4.1.1/c/AROCrypto_Win/com_att_aro_pcap_AROCryptoAdapter.h
|
<reponame>j420247/ARO
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_att_aro_pcap_AROCryptoAdapter */
#ifndef _Included_com_att_aro_pcap_AROCryptoAdapter
#define _Included_com_att_aro_pcap_AROCryptoAdapter
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: com_att_aro_pcap_AROCryptoAdapter
* Method: parseTrace
* Signature: (Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_ReadSSLKeys
(JNIEnv *, jobject, jstring);
JNIEXPORT jint JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_tlsprf
(JNIEnv *env, jobject obj, jbyteArray preMaster, jint preMasterLen, jstring label, jbyteArray random, jint randomLen, jbyteArray master, jint masterSecretLen);
JNIEXPORT jint JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_cryptocipherinit
(JNIEnv *env, jobject obj, jint alg, jbyteArray temp1, jbyteArray temp2, jint key_material, jint bClient);
JNIEXPORT void JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_cryptocipherdeinit
(JNIEnv *env, jobject obj, jint objectType);
JNIEXPORT void JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_setcryptociphernull
(JNIEnv *env, jobject obj, jint objectType, jint bClient);
JNIEXPORT jint JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_cryptocipherdecrypt
(JNIEnv *env, jobject obj, jint pCipher, jbyteArray enc, jbyteArray _plain, jint enclength, jint objectType);
JNIEXPORT void JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_copycryptocipher
(JNIEnv *env, jobject obj, jint from, jint to);
JNIEXPORT jint JNICALL Java_com_att_aro_pcap_AROCryptoAdapter_cryptohashInitUpdateFinish(
JNIEnv *env, jobject obj, jint dir, jint hash_alg, jbyteArray keyBlock, jint hash_size, jint recType, jint payloadLen, jbyteArray plain, jbyteArray seqNum);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
4.1.1/c/AROCrypto_Win/crypto_common.h
|
#include "stdio.h"
#pragma once
#define BEGIN_NAMESPACE(X) namespace X {
#define END_NAMESPACE }
BEGIN_NAMESPACE(CRYPTO)
#define OPT_CAST(x)
#define XMALLOC os_malloc
#define XFREE os_free
#define XREALLOC os_realloc
#define os_strlen strlen
#define os_memset memset
#define os_memcpy memcpy
#define os_memmove memmove
#define os_memcmp memcmp
#define os_malloc malloc
#define os_free free
#define os_realloc realloc
#define os_snprintf _snprintf
void * os_zalloc(size_t size);
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#ifndef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
#define MSG_DEBUG 1
#define MSG_MSGDUMP 2
void wpa_printf(int level, const char *fmt, ...);
void * os_zalloc(size_t size);
void inc_byte_array(u8 *counter, size_t len);
END_NAMESPACE
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/libimobiledevice.h
|
<filename>5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/libimobiledevice.h
/**
* @file libimobiledevice/libimobiledevice.h
* @brief Device/Connection handling and communication
* \internal
*
* Copyright (c) 2008 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IMOBILEDEVICE_H
#define IMOBILEDEVICE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <plist/plist.h>
/** @name Error Codes */
/*@{*/
#define IDEVICE_E_SUCCESS 0
#define IDEVICE_E_INVALID_ARG -1
#define IDEVICE_E_UNKNOWN_ERROR -2
#define IDEVICE_E_NO_DEVICE -3
#define IDEVICE_E_NOT_ENOUGH_DATA -4
#define IDEVICE_E_BAD_HEADER -5
#define IDEVICE_E_SSL_ERROR -6
/*@}*/
/** Represents an error code. */
typedef int16_t idevice_error_t;
typedef struct idevice_private idevice_private;
typedef idevice_private *idevice_t; /**< The device handle. */
typedef struct idevice_connection_private idevice_connection_private;
typedef idevice_connection_private *idevice_connection_t; /**< The connection handle. */
/* generic */
void idevice_set_debug_level(int level);
/* discovery (events/asynchronous) */
/** The event type for device add or removal */
enum idevice_event_type {
IDEVICE_DEVICE_ADD = 1,
IDEVICE_DEVICE_REMOVE
};
/* event data structure */
/** Provides information about the occured event. */
typedef struct {
enum idevice_event_type event; /**< The event type. */
const char *udid; /**< The device unique id. */
int conn_type; /**< The connection type. Currently only 1 for usbmuxd. */
} idevice_event_t;
/* event callback function prototype */
/** Callback to notifiy if a device was added or removed. */
typedef void (*idevice_event_cb_t) (const idevice_event_t *event, void *user_data);
/* functions */
idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data);
idevice_error_t idevice_event_unsubscribe();
/* discovery (synchronous) */
idevice_error_t idevice_get_device_list(char ***devices, int *count);
idevice_error_t idevice_device_list_free(char **devices);
/* device structure creation and destruction */
idevice_error_t idevice_new(idevice_t *device, const char *udid);
idevice_error_t idevice_free(idevice_t device);
/* connection/disconnection */
idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection);
idevice_error_t idevice_disconnect(idevice_connection_t connection);
/* communication */
idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes);
idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout);
idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes);
idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection);
idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection);
/* misc */
idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle);
idevice_error_t idevice_get_udid(idevice_t device, char **udid);
#ifdef __cplusplus
}
#endif
#endif
|
j420247/ARO
|
5.0.0/ARO.Core/src/c/ARONetmoncap/com_att_aro_pcap_NetmonAdapter.h
|
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_att_aro_pcap_NetmonAdapter */
#ifndef _Included_com_att_aro_pcap_NetmonAdapter
#define _Included_com_att_aro_pcap_NetmonAdapter
#ifdef __cplusplus
extern "C" {
#endif
#undef com_att_aro_pcap_NetmonAdapter_NETMON_ERROR
#define com_att_aro_pcap_NetmonAdapter_NETMON_ERROR -100L
#undef com_att_aro_pcap_NetmonAdapter_NETMON_TRACE_FILE_LOAD_ERROR
#define com_att_aro_pcap_NetmonAdapter_NETMON_TRACE_FILE_LOAD_ERROR -101L
#undef com_att_aro_pcap_NetmonAdapter_NETMON_PARSING_SUCCESS
#define com_att_aro_pcap_NetmonAdapter_NETMON_PARSING_SUCCESS 0L
/*
* Class: com_att_aro_pcap_NetmonAdapter
* Method: parseTrace
* Signature: (Ljava/lang/String;)I
*/
JNIEXPORT jint JNICALL Java_com_att_aro_pcap_NetmonAdapter_parseTrace
(JNIEnv *, jobject, jstring);
#ifdef __cplusplus
}
#endif
#endif
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartAxesPlane.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartAxesPlane.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartAxesPlane.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartObject.h"
/**
* The NChartAxesPlane class provides methods to display the axes plane for the cartesian system.
*/
NCHART3D_EXPORT @interface NChartAxesPlane : NChartObject
/**
* Color of axes plane.
*/
@property (nonatomic, retain) NSColor *color;
/**
* Width of the axes plane in 3D scene units. Actually, one 3D scene unit is equal to half a screen size by the initial
* zoom (therefore the space of 3D scene is actually nonlinear respectively to the screen). Of course you can try to
* calculate out the value you need, but you would find it out easier experimentally. The default value is 0.05.
*/
@property (nonatomic, assign) float width;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartSeries.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartSeries.h<gh_stars>0
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartObject.h"
#import "NChartDataSmoother.h"
#import "NChartBrushScale.h"
@class NChartSeries;
/**
* The NChartSeriesDataSource protocol provides methods to obtain data for the series.
*/
@protocol NChartSeriesDataSource <NSObject>
@required
/**
* Get array of points for the series.
*
* @param series - series to obtain the points for.
* @return an array of <NChartPoint> instances where the data is stored.
* @see NChartSeries.
*/
- (NSArray *)seriesDataSourcePointsForSeries:(NChartSeries *)series;
/**
* Get name for the series.
*
* @param series - series to obtain the name for.
* @return the name for the series.
* @see NChartSeries.
*/
- (NSString *)seriesDataSourceNameForSeries:(NChartSeries *)series;
@optional
/**
* Get image for the series that is displayed in the legend. If nil is returned or method is not implemented, the default
* image is used.
*
* @param series - series to get image for.
* @return the image for the series.
* @see NChartSeries.
*/
- (NSImage *)seriesDataSourceImageForSeries:(NChartSeries *)series;
/**
* Extend array of points in series.
* <br> Use this method to provide additional data for series. This method is called after you call
* <code>extendData</code> of <code>NChart</code>.
* @note The points from the array returned are _added_ to the series' array of points, so series will have more data.
* The maximal length of data array is determined by <code>pointsHistoryLength</code> property of <code>NChart</code>.
* @see NChart.
*
* @param series - series to obtain the extra points for.
* @return array of extra points.
*/
- (NSArray *)seriesDataSourceExtraPointsForSeries:(NChartSeries *)series;
@end
/**
* The NChartSeries class provides common methods for the series of the chart.
*/
NCHART3D_EXPORT @interface NChartSeries : NChartObject
/**
* Create instance of series.
*
* @return an autoreleased instance of the series.
*/
+ (id)series;
/**
* Array of points.
*/
@property (nonatomic, readonly) NSArray *points;
/**
* Name of the series.
*/
@property (nonatomic, readonly) NSString *name;
/**
* Image that is displayed in the legend. This property returns the image only if it was provided by the data source.
* If the default image is used, nil is returned.
*/
@property (nonatomic, readonly) NSImage *image;
/**
* Size of default series' marker in legend in pixels. The default value is 20.
*/
@property (nonatomic, assign) float legendMarkerSize;
/**
* Brush scale of the series used to color the map.
*/
@property (nonatomic, retain) NChartBrushScale *scale;
/**
* Tag of the series. You may use it as you want.
*/
@property (nonatomic, assign) NSInteger tag;
/**
* Flag that determines if the series is hosted on the secondary X-axis. If YES, it will be drawn according to the
* secondary X-axis, if NO according to the normal X-axis. The secondary axis appears opposite the normal axis and is
* managed separately: it can have its own min and max; its own color settings and so on.
*/
@property (nonatomic, assign) BOOL hostsOnSX;
/**
* Flag that determines if the series is hosted on the secondary Y-axis. If YES, it will be drawn according to the
* secondary Y-axis, if NO according to the normal Y-axis. The secondary axis appears opposite the normal axis and is
* managed separately: it can have its own min and max; its own color settings and so on.
*/
@property (nonatomic, assign) BOOL hostsOnSY;
/**
* Flag that determines if the series is hosted on the secondary Z-axis. If YES, it will be drawn according to the
* secondary Z-axis, if NO according to the normal Z-axis. The secondary axis appears opposite the normal axis and is
* managed separately: can have its own min and max; its own color settings and so on.
*/
@property (nonatomic, assign) BOOL hostsOnSZ;
/**
* Data source for the series.
* @see NChartSeriesDataSource.
*/
@property (nonatomic, assign) id<NChartSeriesDataSource> dataSource;
/**
* Data smoother used. The default value is nil (no data smoother used).
* @see NChartDataSmoother.
*/
@property (nonatomic, retain) NChartDataSmoother *dataSmoother;
@end
/**
* The NChartSeriesSettings class provides basic container for settings that are to be applied for all the series of
* particular type that are added to the chart. For different types of series there are different classes of containers
* that are inherited from NChartSeriesSettings. You can add the settings to the chart via <code>addSeriesSettings:</code> method
* of <NChart>. The settings are applied to the series while <updateData> call of <NChart>.
*/
NCHART3D_EXPORT @interface NChartSeriesSettings : NSObject
/**
* Create instance of settings.
*
* @return an autoreleased instance of the series.
*/
+ (id)seriesSettings;
/**
* Flag determining if rudiment is allowed. The default value is YES.
* <br> Rudiment is a part of series that remains unused from the previous displayed data set and disappears
* by the animated transition.
*
* @return YES if rudiment is enabled, NO if not.
*/
@property (nonatomic, assign) BOOL isRudimentEnabled;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmootherSpline.h
|
<reponame>trevlevieux/AudioCompare_macOS<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmootherSpline.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartDataSmootherSpline.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartDataSmoother.h"
/**
* The NChartDataSmootherSpline class provides data smoother based on cubic defect 1 splines used to create smooth lines
* on the charts by only a few points. Typically this smoother is used for line and area series.
* @note This smoother ensures the best smoothing in comparison with <NChartDataSmootherTBezier> and
* <NChartDataSmootherSBezier>, but has large deviation from the linear data interpolation and can produce large fake
* extremums.
*/
NCHART3D_EXPORT @interface NChartDataSmootherSpline : NChartDataSmoother
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartTextureBrush.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartTextureBrush.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartBrush.h"
/**
* The NChartTextureBrush class provides the brush that fills the area with a texture (aka image).
*/
NCHART3D_EXPORT @interface NChartTextureBrush : NChartBrush
/**
* Create brush with image.
*
* @param image - image for the brush.
* @return a new instance of the texture brush.
*/
+ (NChartTextureBrush *)textureBrushWithImage:(NSImage *)image;
/**
* Create brush with image, background color and position of texture.
*
* @param image - image for the brush.
* @param color - background color for the brush.
* @param position - position for the texture.
* @return a new instance of the texture brush.
*/
+ (NChartTextureBrush *)textureBrushWithImage:(NSImage *)image backgroundColor:(NSColor *)color position:(NChartTexturePosition)position;
/**
* Init brush with image.
*
* @param image - image for the brush.
* @return the initialized instance of a brush.
*/
- (id)initWithImage:(NSImage *)image;
/**
* Init brush with image, background color and position of texture.
*
* @param image - image for the brush.
* @param color - background color for the brush.
* @param position - position for the texture.
* @return the initialized instance of a brush.
*/
- (id)initWithImage:(NSImage *)image backgroundColor:(NSColor *)color position:(NChartTexturePosition)position;
/**
* Image of the brush.
*/
@property (nonatomic, retain) NSImage *image;
/**
* Color that fills the area around the texture (if any). If nil, the area is filled with black color.
*/
@property (nonatomic, retain) NSColor *backgroundColor;
/**
* Position of the texture.
*
* @see NChartTexturePosition
*/
@property (nonatomic, assign) NChartTexturePosition position;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartCaption.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartCaption.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartCaption.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartLabel.h"
/**
* The NChartCaption class provides methods to display caption of the chart.
*/
NCHART3D_EXPORT @interface NChartCaption : NChartLabel
/**
* Create caption instance.
*
* @return new caption instance.
*/
+ (NChartCaption *)caption;
/**
* Alignment of the caption. The default value is <code>NChartCaptionBlockAlignmentTopCenter</code>.
* @see NChartCaptionBlockAlignment.
*/
@property (nonatomic, assign) NChartCaptionBlockAlignment blockAlignment;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartScaleLegend.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartScaleLegend.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartScaleLegend.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartLegend.h"
@class NChartScaleLegend;
/**
* The NChartScaleLegendDelegate protocol provides methods to manage the contents of the scale legend.
*/
@protocol NChartScaleLegendDelegate <NSObject>
@optional
/**
* Get the string representation of the scale legend entry by given values.
*
* @param scaleLegend - scale legend to get the entry's string representation for.
* @param from - value staring the range represented by this entry. For example, if the range is [10; 20], 10 is passed.
* If the left boundary of the range is open, e.g. (-inf; 20], nil is passed.
* @param to - value ending the range covered by this entry. For example, if the range is [10; 20], 20 is passed.
* If the right boundary of the range is open, e.g. [10; +inf), nil is passed.
* @return string representation of the entry. For example, it may be "10 .. 20", or "10 < x < 20". If nil is returned
* (or no delegate is attached to the legend, or method is not implemented), the default conversion is used.
* Assuming the values in the scale are 10, 20, 30, the default conversion looks like this:
* "> 30", "20 - 30", "10 - 20", "< 10".
*/
- (NSString *)scaleLegendDelegateStringRepresentationOfRangeFrom:(NSNumber *)from to:(NSNumber *)to forScaleLegend:(NChartScaleLegend *)scaleLegend;
@end
/**
* The NChartScaleLegend class provides methods to display the legend associated with the NChartBrushScale instance.
*/
NCHART3D_EXPORT @interface NChartScaleLegend : NChartLegend
/**
* Initialize scale legend with given brush scale.
*
* @param scale - brush scale for the scale legend.
* @return initialized instance of scale legend.
*/
- (id)initWithScale:(NChartBrushScale *)scale;
/**
* Create scale legend with given brush scale.
*
* @param scale - brush scale for the scale legend.
* @return new instance of scale legend.
*/
+ (NChartScaleLegend *)scaleLegendWithScale:(NChartBrushScale *)scale;
/**
* Brush scale associated with the scale legend. The default value is nil.
* @see NChartBrushScale.
*/
@property (nonatomic, retain) NChartBrushScale *scale;
/**
* Flag determining if the lower boundary of the scale should be shown in the scale legend (YES) or not (NO).
* The default value is YES.
*/
@property (nonatomic, assign) BOOL showLowerBoundary;
/**
* Flag determining if the upper boundary of the scale should be shown in the scale legend (YES) or not (NO).
* The default value is YES.
*/
@property (nonatomic, assign) BOOL showUpperBoundary;
/**
* Flag determining if the middle values of the scale should be shown in the scale legend (YES) or not (NO).
* The default value is YES.
*/
@property (nonatomic, assign) BOOL showMiddleValues;
/**
* Flag determining if the values in the scale legend are sorted descending (the largest is on the top, YES) or not
* (the largest is on the bottom, NO). The default value is YES.
*/
@property (nonatomic, assign) BOOL isDescending;
/**
* Delegate of the scale legend.
*/
@property (nonatomic, assign) id<NChartScaleLegendDelegate> scaleDelegate;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartPolarSystem.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartPolarSystem.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartPolarSystem.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartCoordSystem.h"
#import "NChartValueAxis.h"
#import "NChartAxisGrid.h"
/**
* The NChartPolarSystem class provides methods for managing the chart's polar coordinate system.
*/
NCHART3D_EXPORT @interface NChartPolarSystem : NChartCoordSystem
/**
* Azimuth-Axis of the polar coordinate system.
*/
@property (nonatomic, readonly) NChartValueAxis *azimuthAxis;
/**
* Radius-Axis of the polar coordinate system.
*/
@property (nonatomic, readonly) NChartValueAxis *radiusAxis;
/**
* Grid of the polar coordinate system.
*/
@property (nonatomic, readonly) NChartAxisGrid *grid;
/**
* Flag that determines if the border around the polar coordinate system is visible (YES) or not (NO).
*/
@property (nonatomic, assign) BOOL borderVisible;
/**
* Color of the border around the polar coordinate system.
*/
@property (nonatomic, retain) NSColor *borderColor;
/**
* Thickness of the border around the polar coordinate system.
*/
@property (nonatomic, assign) float borderThickness;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartBandSeries.h
|
<reponame>trevlevieux/AudioCompare_macOS
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartBandSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartOHLCSeries.h"
/**
* The NChartBandSeries class provides methods to display band series. This series type is for 2D only.
*/
NCHART3D_EXPORT @interface NChartBandSeries : NChartOHLCSeries
/**
* Color for the low border.
*/
@property (nonatomic, retain) NSColor *lowBorderColor;
/**
* Color for the high border.
*/
@property (nonatomic, retain) NSColor *highBorderColor;
@end
/**
* The NChartBandSeriesSettings class provides global settings for <NChartBandSeries>.
*/
NCHART3D_EXPORT @interface NChartBandSeriesSettings : NChartOHLCSeriesSettings
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartPeakDetector.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartPeakDetector.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartPeakDetector.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartPointAnalyzer.h"
/**
* The NChartPeakDetector class provides methods to detect peak values inside the given point array. The detection is
* based on the deviation from moving average.
*/
NCHART3D_EXPORT @interface NChartPeakDetector : NChartPointAnalyzer
/**
* Flag determining if peak detector should find down-peaks (YES), or not (NO). The default value is YES. The down-peaks
* are defined as peaks laying beneath the moving average inside the search window.
*/
@property (nonatomic, assign) BOOL findMin;
/**
* Flag determining if peak detector should find up-peaks (YES), or not (NO). The default value is YES. The up-peaks
* are defined as peaks laying below the moving average inside the search window.
*/
@property (nonatomic, assign) BOOL findMax;
/**
* Flag determining if <threshold> is absolute (YES) or relative (NO). The default value is NO.
* Absolute threshold means that it is given in the same units as the values in the analyzed points.
* Relative threshold represents a fraction of |max - min|, where max is the maximal value in the given points array and
* min is the minimal one.
* So if, for example, min = 0, max = 10, threshold is set to 0.3 and this flag is YES, then the actual threshold the
* peaks will be search according to will be 0.3.
* But if this flag is NO, the actual threshold will be 0.3 * (10 - 0) = 3.
* Normally it's reasonable to use relative threshold if you don't know the bounds of your values. However, this will
* mean an additional scan through the points to determine min and max values, so the processing will take a bit more
* time.
*/
@property (nonatomic, assign) BOOL absoluteThreshold;
/**
* Threshold to search the peaks according to. The default value is 0.3. See <absoluteThreshold> for details about how
* this value is interpreted.
*/
@property (nonatomic, assign) double threshold;
/**
* Width (in number of points) of the search window needed to calculate moving average. The default value is 5.
*/
@property (nonatomic, assign) NSUInteger windowWidth;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartBrush.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartBrush.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import <Foundation/Foundation.h>
#import "NChartTypes.h"
/**
* The NChartBrush class provides common methods of the brush that can be used to fill some areas.
*/
NCHART3D_EXPORT @interface NChartBrush : NSObject <NSCopying>
/**
* Scale components of brush's colors (if any) by given values. Each component of each color is multiplied by a
* corresponding scale factor.
*
* @param rScale - scale for the red component.
* @param gScale - scale for the green component.
* @param bScale - scale for the blue component.
*/
- (void)scaleColorWithRScale:(float)rScale gScale:(float)gScale bScale:(float)bScale;
/**
* Scale components of brush's colors (if any) according to HSV color model. HSV-representation of each component of
* each color is multiplied by corresponding scale factor.
*
* @param hScale - scale for hue.
* @param sScale - scale for saturation.
* @param vScale - scale for value.
*/
- (void)scaleColorWithHScale:(float)hScale sScale:(float)sScale vScale:(float)vScale;
/**
* Opacity of the brush in interval 0..1, 0 -- full transparency, 1 -- full opacity. The default value is 1.
*/
@property (nonatomic, assign) float opacity;
/**
* Shading model that should be applied to an object if it's painted with this brush. You should understand
* that different shading models are not always supported. For example, if you paint some background with the brush,
* only plain shading (read -- no shading) is possible. But if you paint some 3d-object, different models can be
* chosen (it is possible to draw this object as if it was lightened by some light source).
* @see NChartShadingModel.
*/
@property (nonatomic, assign) NChartShadingModel shadingModel;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartPointAnalyzer.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartPointAnalyzer.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartPoint.h"
/**
* The NChartPointAnalyzer provides basic methods to scan the given array of chart points and perform some analytics.
*/
NCHART3D_EXPORT @interface NChartPointAnalyzer : NSObject
/**
* Create instance of point analyzer.
*
* @return an authoreleased instance of point analyzer.
*/
+ (id)pointAnalyzer;
/**
* Perform the analytics on an array of points. This method is implemented in subclasses. It takes into account all the
* states inside the points given.
*
* @param points - array of points to analyze.
* @return array of result points. Note, that these points can be obtained from the array given, but also generated anew,
* or both according to the logic of particular point analyzer.
*/
- (NSArray *)analyzePoints:(NSArray *)points;
/**
* Perform the analytics on an array of points. This method is implemented in subclasses. It takes into account the
* point states with given index only.
*
* @param points - array of points to analyze.
* @param stateIndex - index of point state to take into account.
* @return array of result points. Note, that these points can be obtained from the array given, but also generated anew,
* or both according to the logic of particular point analyzer.
*/
- (NSArray *)analyzePoints:(NSArray *)points withStateIndex:(NSUInteger)stateIndex;
/**
* Key of the value that should be interpreted as step dimension. Typically it is NChartValueX (which is the default
* value), however for bar series it should be NChartValueY.
*/
@property (nonatomic, assign) NChartValue stepDimension;
/**
* Key of the value that should be interpreted as height dimension. Typically it is NChartValueY (which is the default
* value), however for bar series it should be NChartValueX.
*/
@property (nonatomic, assign) NChartValue valueDimension;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartAutoScrollLabel.h
|
<gh_stars>0
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartAutoScrollLabel.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartLabel.h"
/**
* The NChartAutoScrollLabel provides methods to control the label that is shown whenever auto scroll mode of chart is
* toggled.
*/
NCHART3D_EXPORT @interface NChartAutoScrollLabel : NChartLabel
/**
* Create auto scroll label instance.
*
* @return new auto scroll label instance.
*/
+ (NChartAutoScrollLabel *)autoScrollLabel;
/**
* Text that should appear on the label whenever auto scroll is ON. The default value is nil.
*/
@property (nonatomic, retain) NSString *onText;
/**
* Text that should appear on the label whenever auto scroll is OFF. The default value is nil.
*/
@property (nonatomic, retain) NSString *offText;
/**
* Fade time of the label (in seconds). The default value is 0.25.
*/
@property (nonatomic, assign) float fadeTime;
/**
* Time the label is visible (in seconds). The default value is 1.
*/
@property (nonatomic, assign) float visibleTime;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartLineSeries.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartLineSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartSolidSeries.h"
#import "NChartMarker.h"
#import "NChartLineDash.h"
/**
* The NChartLineSeries class provides methods to display line series.
*/
NCHART3D_EXPORT @interface NChartLineSeries : NChartSolidSeries
/**
* Color of the line in the points with no data.
*/
@property (nonatomic, retain) NSColor *noDataColor;
/**
* Thickness of the line in pixels. The default value is 2.
*/
@property (nonatomic, assign) float lineThickness;
/**
* Dash of the line.
* @see NChartLineDash.
*/
@property (nonatomic, retain) NChartLineDash *lineDash;
/**
* Marker that is shown on the points. This is nil by default (no marker is displayed).
* @see NChartMarker.
*/
@property (nonatomic, retain) NChartMarker *marker;
@end
/**
* The NChartLineSeriesSettings class provides global settings for <NChartLineSeries>.
*/
NCHART3D_EXPORT @interface NChartLineSeriesSettings : NChartSeriesSettings
/**
* Animation type of the transition. The default value is <code>Chart3DLineAnimationTypeGrowUp</code>.
*/
@property (nonatomic, assign) NChartLineAnimationType animationType;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartCallout.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartCallout.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartTooltip.h"
/**
* The NChartCallout class provides methods to display tooltips as callouts.
*/
NCHART3D_EXPORT @interface NChartCallout : NChartTooltip
/**
* Create new callout instance.
*
* @return new callout instance.
*/
+ (NChartCallout *)callout;
/**
* Thickness of the callout line. The default value is 1.
*/
@property (nonatomic, assign) float lineThickness;
/**
* Color of the callout line. The default value is [UIColor blackColor].
*/
@property (nonatomic, retain) NSColor *lineColor;
/**
* Position where the line connects to the label. The default value is NChartCalloutLineToLabelConnectionPosAutodetect.
*/
@property (nonatomic, assign) NChartCalloutLineToLabelConnectionPos lineToLabelConnectionPos;
/**
* Distance from the chart's point to the callout's tooltip in the autodetected direction (in pixels). If this property
* is 0, <code>margin</code> is used to control this distance (and therefore you control the direction yourself).
* Otherwise, the direction is detected automatically. In case of pie it's median of the corresponding sector. In case
* of all other charts it's north-east direction. The default value is 0.
*/
@property (nonatomic, assign) float distance;
/**
* Type of callout line. The default value is NChartCalloutLineTypeStraight.
*/
@property (nonatomic, assign) NChartCalloutLineType lineType;
/**
* Flag determining if callout should be located in the position specified by the <origin> property (YES),
* or according to <distance> and <code>margin</code> properties (NO). The default value is NO.
* @note If this property is set to YES, <origin> has effect, but <code>margin</code> and <distance> has no effect,
* and vice versa.
*/
@property (nonatomic, assign) BOOL locateByOrigin;
/**
* Position of the top left corner of callout in pixels based on view's coordinate system, but with zero point shifted
* to the top left corner of chart plot area. The default value is {0; 0}.
* @note This property has effect if <locateByOrigin> is set to YES only.
*/
@property (nonatomic, assign) CGPoint origin;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartValueAxisMark.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartValueAxisMark.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartLabel.h"
#import "NChartAxisTick.h"
/**
* The NChartValueAxisMark class provides methods to handle marks on the value axes.
*/
NCHART3D_EXPORT @interface NChartValueAxisMark : NChartLabel
/**
* Create new mark instance.
*
* @return new mark instance.
*/
+ (NChartValueAxisMark *)mark;
/**
* Value of the mark.
*/
@property (nonatomic, assign) double value;
/**
* Tick of the mark. It is invisible by default.
*/
@property (nonatomic, readonly) NChartAxisTick *tick;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartBezierInterpolator.h
|
<reponame>trevlevieux/AudioCompare_macOS
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartBezierInterpolator.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartInterpolator.h"
/**
* The NChartBezierInterpolator class provides bezier interpolator. If it is used, the animated values will changed in
* time as follows: v(t) = (1 - t)^2 * v_from + 2 * t * (1 - t) * v_c + t^2 * v_from, where v_from, v_to are
* respectively the start and end values, v_c is control point and t is the time.
*/
NCHART3D_EXPORT @interface NChartBezierInterpolator : NChartInterpolator
/**
* Create the bezier interpolator with given control point.
*
* @param controlPoint - control point. Very often it makes sense when the control point is equal to the end value of
* animated property.
* @return new instance of bezier interpolator.
*/
+ (id)bezierInterpolatorWithControlPoint:(float)controlPoint;
/**
* Initialize the bezier interpolator with given control point.
*
* @param controlPoint - control point. Very often it makes sense when the control point is equal to the end value of
* animated property.
* @return initialized instance of bezier interpolator.
*/
- (id)initWithControlPoint:(float)controlPoint;
/**
* Control point of bezier interpolator.
*/
@property (nonatomic, assign) float controlPoint;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartInterpolator.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartInterpolator.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import <Foundation/Foundation.h>
#import "NChartTypes.h"
/**
* The NChartInterpolator class provides base class for different interpolators that can be used to control animations.
*/
NCHART3D_EXPORT @interface NChartInterpolator : NSObject
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartTimeAxis.h
|
<reponame>trevlevieux/AudioCompare_macOS<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartTimeAxis.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartTimeAxis.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartAxis.h"
#import "NChartTimeAxisTooltip.h"
@class NChartTimeAxis;
/**
* The NChartTimeAxisDataSource protocol provides methods to control data displayed on the time axis.
*/
@protocol NChartTimeAxisDataSource <NSObject>
/**
* Get array timestamps available. They are strings representing ticks (for example, years, or some names).
*
* @param timeAxis - time axis to get timestamps for.
* @return an array of timestamps.
* @see NChartTimeAxis.
*/
- (NSArray *)timeAxisDataSourceTimestampsForAxis:(NChartTimeAxis *)timeAxis;
@end
/**
* The NChartTimeAxis class provides methods to display the time axis of the chart.
*/
NCHART3D_EXPORT @interface NChartTimeAxis : NChartAxis
/**
* Set images for button "go to the beginning".
*
* @param normal - image for the button's normal state.
* @param pushed - image for the button's pushed state.
*/
- (void)setBeginButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed;
/**
* Set images for button "go to the ending".
*
* @param normal - image for the button's normal state.
* @param pushed - image for the button's pushed state.
*/
- (void)setEndButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed;
/**
* Set images for button "play".
*
* @param normal - image for the button's normal state.
* @param pushed - image for the button's pushed state.
*/
- (void)setPlayButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed;
/**
* Set images for button "pause".
*
* @param normal - image for the button's normal state.
* @param pushed - image for the button's pushed state.
*/
- (void)setPauseButtonStateImagesNormal:(NSImage *)normal andPushed:(NSImage *)pushed;
/**
* Set image for the handler of the slider.
*
* @param handler - image for the slider's handler.
*/
- (void)setHandlerImage:(NSImage *)handler;
/**
* Specify the image for the slider and the cap insets to stretch it. The cap insets works as the insets in a method
* <code>[NSImage resizableImageWithCapInsets:]</code>. This means, they specify the stretchable caps of the image.
*
* @param slider - image for the slider.
* @param capInsets - cap insets for the image.
*/
- (void)setSliderImage:(NSImage *)slider capInsets:(NSEdgeInsets)capInsets;
/**
* Set all images used for time axis at once. This method automatically adjusts <tickSize> and <tickOffset> according to
* images provided.
*
* @param beginNormal - image for the begin button's normal state.
* @param beginPushed - image for the begin button's pushed state.
* @param endNormal - image for the end button's normal state.
* @param endPushed - image for the end button's pushed state.
* @param playNormal - image for the play button's normal state.
* @param playPushed - image for the play button's pushed state.
* @param pauseNormal - image for the pause button's normal state.
* @param pausePushed - image for the pause button's pushed state.
* @param slider - image for the slider.
* @param handler - image for the slider's handler.
* @param contentScale - current content scale.
*/
- (void)setImagesForBeginNormal:(NSImage *)beginNormal beginPushed:(NSImage *)beginPushed
endNormal:(NSImage *)endNormal endPushed:(NSImage *)endPushed
playNormal:(NSImage *)playNormal playPushed:(NSImage *)playPushed
pauseNormal:(NSImage *)pauseNormal pausePushed:(NSImage *)pausePushed
slider:(NSImage *)slider handler:(NSImage *)handler
contentScale:(double)contentScale;
/**
* Go to the next timestamp (without any user interactions).
*/
- (void)goToNextTick;
/**
* Go to the previous timestamp (without any user interactions).
*/
- (void)goToPreviousTick;
/**
* Go to the beginning of the timeline (without any user interactions).
*/
- (void)goToFirstTick;
/**
* Go to the ending of the timeline (without any user interactions).
*/
- (void)goToLastTick;
/**
* Start playing the timeline (without any user interactions).
*/
- (void)play;
/**
* Stop playing the timeline (without any user interactions).
*/
- (void)stop;
/**
* Current timestamp index (index of the timestamp tick where the handler stays).
*/
@property (nonatomic, assign) NSInteger currentIndex;
/**
* Tooltip that appears over the handler. This is nil by default.
* @see NChartTimeAxisTooltip.
*/
@property (nonatomic, retain) NChartTimeAxisTooltip *tooltip;
/**
* Font used to display timestamp titles.
*/
@property (nonatomic, retain) NSFont *tickTitlesFont;
/**
* Color used to display timestamp titles.
*/
@property (nonatomic, retain) NSColor *tickTitlesColor;
/**
* Color used to display timestamp ticks.
*/
@property (nonatomic, retain) NSColor *tickColor;
/**
* Size of ticks in pixels.
*/
@property (nonatomic, assign) CGSize tickSize;
/**
* Offset of timestamp ticks (spacing between slider and ticks) in pixels. If positive, ticks are outside of slider,
* if negative, ticks may overlap the slider; so the outer border of the slider (including the slider's handler) is
* assumed as zero offset.
*/
@property (nonatomic, assign) float tickOffset;
/**
* Offset of timestamp titles (spacing between the slider and titles) in pixels.
*/
@property (nonatomic, assign) float tickTitlesOffset;
/**
* Shape of timestamp ticks.
* @see NChartTimeAxisTickShape.
*/
@property (nonatomic, assign) NChartTimeAxisTickShape tickShape;
/**
* Layout of timestamp titles.
* @see NChartTimeAxisLabelsLayout.
*/
@property (nonatomic, assign) NChartTimeAxisLabelsLayout tickTitlesLayout;
/**
* Position of timestamp titles.
* @see NChartTimeAxisLabelsPosition.
*/
@property (nonatomic, assign) NChartTimeAxisLabelsPosition tickTitlesPosition;
/**
* Minimal spacing between neighbor ticks in pixels (the tick is the center place of the timestamp title, a kind of
* milestone on the axis). According to this value some timestamps can be hidden, if there are too many of them.
*/
@property (nonatomic, assign) float minTickSpacing;
/**
* Margin of the time axis.
*/
@property (nonatomic, assign) NChartMargin margin;
/**
* Flag indicating whether the tooltip should be hidden automatically when the user interactions end (YES) or not (NO).
*/
@property (nonatomic, assign) BOOL autohideTooltip;
/**
* Time that takes to play the whole time axis in seconds.
*/
@property (nonatomic, assign) float animationTime;
/**
* Padding of the time axis.
*/
@property (nonatomic, assign) NChartMargin padding;
/**
* Frame of the time axis in the view's coordinate system.
* @note The frame is a rect fully enclosing the entire time axis with its ticks, labels and control buttons, but not
* its tooltip. This rect is calculated during <code>updateData</code> call when the chat lays out its elements.
*/
@property (nonatomic, readonly) CGRect frame;
/**
* Time axis data source.
* @see NChartTimeAxisDataSource.
*/
@property (nonatomic, assign) id<NChartTimeAxisDataSource> dataSource;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartObject.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartObject.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import "NChartTypes.h"
@class NChart;
/**
* The NChartObject class provides common methods for all the objects on the chart.
*/
NCHART3D_EXPORT @interface NChartObject : NSObject
/**
* Flag that determines if the object is visible (YES) or not (NO). The default value is YES.
*/
@property (nonatomic, assign) BOOL visible;
/**
* Chart the object belongs to.
* <br> This property is assigned automatically whenever the object is assigned to the chart.
*/
@property (nonatomic, readonly) NChart *chart;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmoother.h
|
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmoother.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartDataSmoother.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartTypes.h"
/**
* The NChartDataSmoother class provides basic data smoother used to create smooth charts by only a few points.
*/
NCHART3D_EXPORT @interface NChartDataSmoother : NSObject
/**
* Create new instance of data smoother.
*/
+ (id)dataSmoother;
/**
* Resolution of the spline. Resolution is the number of subdivisions by the step dimension for each segment.
* The default value is 32. The allowed value are [2 .. 1024].
*/
@property (nonatomic, assign) NSInteger resolution;
/**
* Key of the value that should be interpreted as step dimension. Typically it is NChartValueX (which is the default
* value), however for bar series it should be NChartValueY.
*/
@property (nonatomic, assign) NChartValue stepDimension;
/**
* Key of the value that should be interpreted as height dimension. Typically it is NChartValueY (which is the default
* value), however for bar series it should be NChartValueX.
*/
@property (nonatomic, assign) NChartValue valueDimension;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartBarSeries.h
|
<reponame>trevlevieux/AudioCompare_macOS
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartBarSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartColumnSeries.h"
/**
* The NChartBarSeries class provides methods to display bar series.
*/
NCHART3D_EXPORT @interface NChartBarSeries : NChartColumnSeries
@end
/**
* The NChartBarSeriesSettings class provides global settings for <NChartBarSeries>.
*/
NCHART3D_EXPORT @interface NChartBarSeriesSettings : NChartColumnSeriesSettings
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartHeatmapSeries.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartHeatmapSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartSolidSeries.h"
/**
* The NChartHeatmapSeries class provides methods to display heatmap series.
*/
NCHART3D_EXPORT @interface NChartHeatmapSeries : NChartSolidSeries
@end
/**
* The NChartHeatmapSeriesSettings class provides global settings for <NChartHitmapSeries>.
*/
NCHART3D_EXPORT @interface NChartHeatmapSeriesSettings : NChartSeriesSettings
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartAxisTick.h
|
<reponame>trevlevieux/AudioCompare_macOS
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartAxisTick.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartObject.h"
/**
* The NChartAxisTick class provides methods to manage ticks on the axes.
*/
NCHART3D_EXPORT @interface NChartAxisTick : NChartObject
/**
* Color of the ticks.
*/
@property (nonatomic, retain) NSColor *color;
/**
* Length of ticks in pixels. The default value is 10.
*/
@property (nonatomic, assign) float length;
/**
* Thickness of ticks in pixels. The default value is 1.
*/
@property (nonatomic, assign) float thickness;
/**
* Type of ticks.
* @see NChartAxisTickType.
*/
@property (nonatomic, assign) NChartAxisTickType type;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmootherLagrange.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartDataSmootherLagrange.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartDataSmoother.h"
/**
* The NChartDataSmootherLagrange class provides data smoother based on Lagrange polynoms used to create smooth lines
* on the charts by only a few points. Typically this smoother is used for line and area series.
* @note This smoother ensures the best smoothing in comparison with <NChartDataSmootherTBezier> and
* <NChartDataSmootherSBezier>, but has large deviation from the linear data interpolation (even larger than
* <NChartDataSmooterSpline>) and can produce large fake extremums. It may be good for some, but generally it's
* recommended to use <NChartDataSmootherTBezier> instead.
*/
NCHART3D_EXPORT @interface NChartDataSmootherLagrange : NChartDataSmoother
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmootherSBezier.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartDataSmootherSBezier.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartDataSmoother.h"
/**
* The NChartDataSmootherSBezier class provides data smoother based on bezier interpolation
* (with control points calculated to ensure defect 1 spline) used to create smooth lines on the charts by only a few points.
* Typically this smoother is used for line and area series.
* @note This smoother ensures better smoothing in comparison with <NChartDataSmootherTBezier>, but has larger deviation
* from the linear data interpolation and can produce fake extremums. However, the deviation of the fake extremums is
* smaller in comparison with <NChartDataSmootherSpline> and <NChartDataSmootherLagrange>.
*/
NCHART3D_EXPORT @interface NChartDataSmootherSBezier : NChartDataSmoother
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartMarker.h
|
<reponame>trevlevieux/AudioCompare_macOS
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartMarker.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartModel.h"
#import "NChartBrush.h"
/**
* The NChartMarker class provides methods to display markers in the points of the chart.
* <br>
* Each series, that can display markers, has the property default marker. If you set it to series, this will be a
* default for all the points. However you can set the marker for the point and those values, that you set to this
* marker, will override the corresponding values from the default marker. For example, if you set the marker for series
* and change its size, shape and resolution, and after that set another marker to some point and change its size, all
* points will have the markers with shape and resolution from the default marker. The size of all points except the one
* you modified will also be the same (obtained from default marker too). And the modified point will differ in size.
*/
NCHART3D_EXPORT @interface NChartMarker : NSObject
/**
* Shape of the marker. There are predefined shapes and <code>NChartMarkerShapeModel</code> that requires the model to
* be set.
* @see NChartMarkerShape.
*/
@property (nonatomic, assign) NChartMarkerShape shape;
/**
* Model of the marker. This property is nil by default. By setting this property, shape is automatically set to
* <code>NChartMarkerShapeModel</code>. If the shape is not <code>NChartMarkerShapeModel</code>, this property has no
* effect, even if it is not nil. If the shape is <code>NChartMarkerShapeModel</code> and model is nil, it is equivalent
* to the shape set to <code>NChartMarkerShapeNone</code>, so no marker is displayed.
* @see NChartModel.
*/
@property (nonatomic, retain) NChartModel *model;
/**
* Brush that fills the marker.
* @see NChartBrush.
*/
@property (nonatomic, retain) NChartBrush *brush;
/**
* Brush of the marker's border. Please note, that only markers with predefined shapes have borders. If you use model,
* border's properties are ignored.
* @see NChartBrush.
*/
@property (nonatomic, retain) NChartBrush *borderBrush;
/**
* Thickness of the marker's border in pixels. Please note, that only markers with predefined shapes have borders.
* If you use a model, the border's properties are ignored.
*/
@property (nonatomic, assign) float borderThickness;
/**
* Rotation of the marker around the X-axis in radians. This property is used for "volumetric" markers only,
* this means for those that are not plain.
*/
@property (nonatomic, assign) float angleX;
/**
* Rotation of the marker around the Y-axis in radians. This property is used for "volumetric" markers only,
* this means for those that are not plain.
*/
@property (nonatomic, assign) float angleY;
/**
* Rotation of the marker around the Z-axis in radians. This property is used for "volumetric" markers only,
* this means for those that are not plain.
*/
@property (nonatomic, assign) float angleZ;
/**
* Size of the marker.
* <br>. The size can be in any unit you want. It is rescaled to pixels with the help of
* <code>NChartSizeAxis</code>. If no data source is set for size axis, units are interpreted as pixels.
* @see NChartSizeAxis.
*/
@property (nonatomic, assign) float size;
/**
* Size of the marker's touch area (the area you can click to select the corresponding chart point).
* If this size is zero, touch area has the size of marker (that is set with <size> property).
* The default value is 0.0f.
* <br>. Use this property if you want to make click area more or less then the marker size.
* The size can be in any unit you want. It is rescaled to pixels with the help of
* <code>NChartSizeAxis</code>. If no data source is set for size axis, units are interpreted as pixels.
* @see NChartSizeAxis.
*/
@property (nonatomic, assign) float selectionSize;
/**
* Resolution of the marker. Resolution is the amount of vertices that build the circle (sphere). It is used if marker's
* shape is <code>NChartMarkerShapeCircle</code> or <code>NChartMarkerShapeSphere</code>.
* @note This value cannot be less than 3 and greater than 32.
* @see shape.
*/
@property (nonatomic, assign) uint resolution;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartPieSeries.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartPieSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartSolidSeries.h"
#import "NChartTooltip.h"
/**
* The NChartPieSeries class provides methods to display pie series.
*/
NCHART3D_EXPORT @interface NChartPieSeries : NChartSolidSeries
/**
* Color of the bevel effect. This property is supported in 2D mode only. The default value is nil (that means no bevel).
* <br> Use this property to add a bevel effect to the series. You can achieve different effects with different
* colors. For example, to add a shadow inside the pie circle, set the color like
* <code>[NSColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.25f]</code>.
* You also have to set <code>bevelRatio</code> for <NChartPieSeriesSettings> to get the bevel effect.
*/
@property (nonatomic, retain) NSColor *bevelColor;
@end
/**
* The NChartPieSeriesSettings class provides global settings for <NChartPieSeries>.
*/
NCHART3D_EXPORT @interface NChartPieSeriesSettings : NChartSolidSeriesSettings
/**
* Hole radius ratio that determines size of the hole for pie series relatively to the whole pie radius. The default
* value 0.1.
* @note This value cannot be less than 0 and greater than 1.0.
*/
@property (nonatomic, assign) float holeRatio;
/**
* Bevel effect ratio that determines size of the bevel for pie series relatively to the whole pie radius.
* This property is supported in 2D mode only. The default value is 0.0 (that means no bevel).
* @note This value cannot be less than 0.0 and greater than 1.0.
* <br> You also have to set <code>bevelColor</code> for <NChartPieSeries> to get the bevel effect.
*/
@property (nonatomic, assign) float bevelRatio;
/**
* Caption that appears in the center of pie.
* @see NChartTooltip.
*/
@property (nonatomic, retain) NChartTooltip *centerCaption;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartSizeAxis.h
|
<gh_stars>0
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartSizeAxis.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartAxis.h"
@class NChartSizeAxis;
/**
* The NChartSizeAxisDataSource protocol provides methods to control data on the size axis.
*/
@protocol NChartSizeAxisDataSource <NSObject>
@required
/**
* Get minimal size of markers on the screen in pixels.
*
* @param sizeAxis - the size axis to obtain the minimal size for.
* @return the minimal size of the markers on the screen in pixels.
* @see NChartSizeAxis.
*/
- (float)sizeAxisDataSourceMinSizeForSizeAxis:(NChartSizeAxis *)sizeAxis;
/**
* Get maximal size of markers on the screen in pixels.
*
* @param sizeAxis - the size axis to obtain the maximal size for.
* @return the maximal size of the markers on the screen in pixels.
* @see NChartSizeAxis.
*/
- (float)sizeAxisDataSourceMaxSizeForSizeAxis:(NChartSizeAxis *)sizeAxis;
@optional
/**
* Get minimal value of markers' sizes. If no implementation is provided, the minimal size is calculated according to
* the data.
*
* @param sizeAxis - the size axis to obtain the minimal value for.
* @return the minimal value of markers' sizes. It may be nil that is equivalent to the absence of implementation.
* @see NChartSizeAxis.
*/
- (NSNumber *)sizeAxisDataSourceMinForSizeAxis:(NChartSizeAxis *)sizeAxis;
/**
* Get maximal value of markers' sizes. If no implementation is provided, the maximal size is calculated according to
* the data.
*
* @param sizeAxis - the size axis to obtain the maximal value for.
* @return the maximal value of the markers' sizes. It may be nil that is equivalent to the absence of implementation.
* @see NChartSizeAxis.
*/
- (NSNumber *)sizeAxisDataSourceMaxForSizeAxis:(NChartSizeAxis *)sizeAxis;
@end
/**
* The NChartSizeAxis class provides methods to scale the sizes of <NChartMarker> objects. The idea is to map the value
* of marker's size that is assumed to be in (<minValue>, <maxValue>) to the (<minSize>, <maxSize>). For example if a
* particular marker has size 0.3555, <minValue> = 0, <maxValue> = 1, <minSize> = 10 (pixels) and <maxSize> = 100
* (pixels), the actual size of the marker on the screen will be 42 pixels.
*/
NCHART3D_EXPORT @interface NChartSizeAxis : NChartAxis
/**
* Minimal value of the markers' sizes.
*/
@property (nonatomic, readonly) double minValue;
/**
* Maximal value of the markers' sizes.
*/
@property (nonatomic, readonly) double maxValue;
/**
* Minimal size of the markers on the screen in pixels.
*/
@property (nonatomic, readonly) float minSize;
/**
* Maximal size of the markers on the screen in pixels.
*/
@property (nonatomic, readonly) float maxSize;
/**
* Flag determining if markers should ignore chart's zoom (YES) or not (NO). The default value is NO.
* <br> If this flag is set to YES, markers are not zoomed with the chart and remain in their size
* (value of their <code>size</code> property).
* Otherwise, size of markers corresponds to their <code>size</code> property when zoom is 1.0 only.
*/
@property (nonatomic, assign) BOOL shouldIgnoreZoom;
/**
* Data source of the axis
* @see NChartSizeAxisDataSource.
*/
@property (nonatomic, assign) id<NChartSizeAxisDataSource> dataSource;
@end
|
trevlevieux/AudioCompare_macOS
|
Pods/AudioKit/macOS/AudioKit.framework/Versions/A/Headers/AudioKit-Swift.h
|
<reponame>trevlevieux/AudioCompare_macOS<filename>Pods/AudioKit/macOS/AudioKit.framework/Versions/A/Headers/AudioKit-Swift.h
// Generated by Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
#pragma clang diagnostic push
#if defined(__has_include) && __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <objc/NSObject.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if defined(__has_include) && __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus) || __cplusplus < 201103L
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if defined(__has_attribute) && __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if defined(__has_attribute) && __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if defined(__has_attribute) && __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if defined(__has_attribute) && __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if defined(__has_attribute) && __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if defined(__has_attribute) && __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type
# if defined(__has_feature) && __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) SWIFT_ENUM(_type, _name)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if defined(__has_feature) && __has_feature(modules)
@import ObjectiveC;
@import AppKit;
@import CoreGraphics;
@import Foundation;
@import AudioToolbox;
@import AVFoundation;
@import CoreMIDI;
@import CoreAudio;
@import Accelerate;
#endif
#import <AudioKit/AudioKit.h>
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
@class AVAudioNode;
/// Parent class for all nodes in AudioKit
SWIFT_CLASS("_TtC8AudioKit6AKNode")
@interface AKNode : NSObject
/// The internal AVAudioEngine AVAudioNode
@property (nonatomic, strong) AVAudioNode * _Nonnull avAudioNode;
/// Create the node
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Initialize the node
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach OBJC_DESIGNATED_INITIALIZER;
/// Connect this node to another
- (void)addConnectionPoint:(AKNode * _Nonnull)node bus:(NSInteger)bus;
/// Disconnect the node
- (void)disconnect;
/// Disconnect an array of nodes
- (void)disconnectWithNodes:(NSArray<AVAudioNode *> * _Nonnull)nodes;
@end
/// 3-D Spatialization of the input
SWIFT_CLASS("_TtC8AudioKit10AK3DPanner")
@interface AK3DPanner : AKNode
/// Position of sound source along x-axis
@property (nonatomic) double x;
/// Position of sound source along y-axis
@property (nonatomic) double y;
/// Position of sound source along z-axis
@property (nonatomic) double z;
/// Initialize the panner node
/// \param input Node to pan in 3D Space
///
/// \param x x-axis location in meters
///
/// \param y y-axis location in meters
///
/// \param z z-axis location in meters
///
- (nonnull instancetype)init:(AKNode * _Nullable)input x:(double)x y:(double)y z:(double)z OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@class NSEvent;
@class NSCoder;
SWIFT_CLASS("_TtC8AudioKit10AKADSRView")
@interface AKADSRView : NSView
@property (nonatomic) double attackDuration;
@property (nonatomic) double decayDuration;
@property (nonatomic) double sustainLevel;
@property (nonatomic) double releaseDuration;
@property (nonatomic, readonly, getter=isFlipped) BOOL flipped;
@property (nonatomic, readonly) BOOL wantsDefaultClipping;
- (void)mouseDown:(NSEvent * _Nonnull)theEvent;
- (void)mouseDragged:(NSEvent * _Nonnull)theEvent;
- (nonnull instancetype)initWithFrame:(CGRect)frame callback:(void (^ _Nonnull)(double, double, double, double))callback OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)drawRect:(CGRect)rect;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
/// Triggerable classic ADSR envelope
SWIFT_CLASS("_TtC8AudioKit19AKAmplitudeEnvelope")
@interface AKAmplitudeEnvelope : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Attack time
@property (nonatomic) double attackDuration;
/// Decay time
@property (nonatomic) double decayDuration;
/// Sustain Level
@property (nonatomic) double sustainLevel;
/// Release time
@property (nonatomic) double releaseDuration;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this envelope node
/// \param input Input node to process
///
/// \param attackDuration Attack time
///
/// \param decayDuration Decay time
///
/// \param sustainLevel Sustain Level
///
/// \param releaseDuration Release time
///
- (nonnull instancetype)init:(AKNode * _Nullable)input attackDuration:(double)attackDuration decayDuration:(double)decayDuration sustainLevel:(double)sustainLevel releaseDuration:(double)releaseDuration OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Performs a “root-mean-square” on a signal to get overall amplitude of a
/// signal. The output signal looks similar to that of a classic VU meter.
SWIFT_CLASS("_TtC8AudioKit18AKAmplitudeTracker")
@interface AKAmplitudeTracker : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Detected amplitude
@property (nonatomic, readonly) double amplitude;
/// Threshold amplitude
@property (nonatomic) double threshold;
/// Initialize this amplitude tracker node
/// \param input Input node to process
///
/// \param halfPowerPoint Half-power point (in Hz) of internal lowpass filter.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input halfPowerPoint:(double)halfPowerPoint threshold:(double)threshold thresholdCallback:(void (^ _Nonnull)(BOOL))thresholdCallback OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@class AVURLAsset;
@class AVAudioPCMBuffer;
/// Audio file, inherits from AVAudioFile and adds functionality
SWIFT_CLASS("_TtC8AudioKit11AKAudioFile")
@interface AKAudioFile : AVAudioFile
/// Returns an AVAsset from the AKAudioFile
@property (nonatomic, readonly, strong) AVURLAsset * _Nonnull avAsset;
/// Returns audio data as an <code>Array</code> of <code>Float</code> Arrays.
/// If stereo:
/// <ul>
/// <li>
/// <code>floatChannelData?[0]</code> will contain an Array of left channel samples as <code>Float</code>
/// </li>
/// <li>
/// <code>floatChannelData?[1]</code> will contains an Array of right channel samples as <code>Float</code>
/// </li>
/// </ul>
@property (nonatomic, copy) NSArray<NSArray<NSNumber *> *> * _Nullable floatChannelData;
/// returns audio data as an AVAudioPCMBuffer
@property (nonatomic, strong) AVAudioPCMBuffer * _Nonnull pcmBuffer;
/// returns the peak level expressed in dB ( -> Float).
@property (nonatomic) float maxLevel;
/// Initialize the audio file
/// \param fileURL URL of the file
///
///
/// returns:
/// An initialized AKAudioFile object for reading, or nil if init failed.
- (nullable instancetype)initForReading:(NSURL * _Nonnull)fileURL error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
/// Initialize the audio file
/// \param fileURL URL of the file
///
/// \param format The processing commonFormat to use when reading from the file.
///
/// \param interleaved Whether to use an interleaved processing format.
///
///
/// returns:
/// An initialized AKAudioFile object for reading, or nil if init failed.
- (nullable instancetype)initForReading:(NSURL * _Nonnull)fileURL commonFormat:(AVAudioCommonFormat)format interleaved:(BOOL)interleaved error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
/// Initialize the audio file
/// From Apple doc: The file type to create is inferred from the file extension of fileURL.
/// This method will overwrite a file at the specified URL if a file already exists.
/// The file is opened for writing using the standard format, AVAudioPCMFormatFloat32.
/// Note: It seems that Apple’s AVAudioFile class has a bug with .wav files. They cannot be set
/// with a floating Point encoding. As a consequence, such files will fail to record properly.
/// So it’s better to use .caf (or .aif) files for recording purpose.
/// \param fileURL URL of the file.
///
/// \param settings The format of the file to create.
///
/// \param format The processing commonFormat to use when writing.
///
/// \param interleaved Whether to use an interleaved processing format.
///
///
/// throws:
/// NSError if init failed
///
/// returns:
/// An initialized AKAudioFile for writing, or nil if init failed.
- (nullable instancetype)initForWriting:(NSURL * _Nonnull)fileURL settings:(NSDictionary<NSString *, id> * _Nonnull)settings commonFormat:(AVAudioCommonFormat)format interleaved:(BOOL)interleaved error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
/// Super.init inherited from AVAudioFile superclass
/// From Apple doc: The file type to create is inferred from the file extension of fileURL.
/// This method will overwrite a file at the specified URL if a file already exists.
/// The file is opened for writing using the standard format, AVAudioPCMFormatFloat32.
/// Note: It seems that Apple’s AVAudioFile class has a bug with .wav files. They cannot be set
/// with a floating Point encoding. As a consequence, such files will fail to record properly.
/// So it’s better to use .caf (or .aif) files for recording purpose.
/// \param fileURL URL of the file.
///
/// \param settings The settings of the file to create.
///
///
/// returns:
/// An initialized AKAudioFile for writing, or nil if init failed.
- (nullable instancetype)initForWriting:(NSURL * _Nonnull)fileURL settings:(NSDictionary<NSString *, id> * _Nonnull)settings error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
@interface AKAudioFile (SWIFT_EXTENSION(AudioKit))
@end
@interface AKAudioFile (SWIFT_EXTENSION(AudioKit))
@end
@interface AKAudioFile (SWIFT_EXTENSION(AudioKit))
@end
@class AKSampler;
@class AKMIDISampler;
@class AKAudioPlayer;
@interface AKAudioFile (SWIFT_EXTENSION(AudioKit))
/// Create an AKSampler loaded with the current AKAudioFile
@property (nonatomic, readonly, strong) AKSampler * _Nullable sampler;
/// Create an AKMIDISampler loaded with the current AKAudioFile
@property (nonatomic, readonly, strong) AKMIDISampler * _Nullable midiSampler;
/// Create an AKAudioPlayer to play the current AKAudioFile
@property (nonatomic, readonly, strong) AKAudioPlayer * _Nullable player;
@end
@interface AKAudioFile (SWIFT_EXTENSION(AudioKit))
/// Returns the remaining not completed queued Async processes (Int)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger queuedAsyncProcessCount;)
+ (NSInteger)queuedAsyncProcessCount SWIFT_WARN_UNUSED_RESULT;
/// Returns the total scheduled Async processes count (Int)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger scheduledAsyncProcessesCount;)
+ (NSInteger)scheduledAsyncProcessesCount SWIFT_WARN_UNUSED_RESULT;
/// Returns the completed Async processes count (Int)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger completedAsyncProcessesCount;)
+ (NSInteger)completedAsyncProcessesCount SWIFT_WARN_UNUSED_RESULT;
@end
@class AVAudioTime;
/// Not so simple audio playback class
SWIFT_CLASS("_TtC8AudioKit13AKAudioPlayer")
@interface AKAudioPlayer : AKNode
/// Buffer to be palyed
@property (nonatomic, strong) AVAudioPCMBuffer * _Nullable audioFileBuffer;
/// Will be triggered when AKAudioPlayer has finished to play.
/// (will not as long as loop is on)
@property (nonatomic, copy) void (^ _Nullable completionHandler)(void);
/// Boolean indicating whether or not to loop the playback (Default false)
@property (nonatomic) BOOL looping;
/// Boolean indicating to play the buffer in reverse
@property (nonatomic) BOOL reversed;
/// Fade in duration
@property (nonatomic) double fadeInTime;
/// Fade out duration
@property (nonatomic) double fadeOutTime;
/// The current played AKAudioFile
@property (nonatomic, readonly, strong) AKAudioFile * _Nonnull audioFile;
/// Path to the currently loaded AKAudioFile
@property (nonatomic, readonly, copy) NSString * _Nonnull path;
/// Total duration of one loop through of the file
@property (nonatomic, readonly) double duration;
/// Output Volume (Default 1)
@property (nonatomic) double volume;
/// Whether or not the audio player is currently started
@property (nonatomic, readonly) BOOL isStarted;
/// Current playback time (in seconds)
@property (nonatomic, readonly) double currentTime;
/// Time within the audio file at the current time
@property (nonatomic, readonly) double playhead;
/// Pan (Default Center = 0)
@property (nonatomic) double pan;
/// sets the start time, If it is playing, player will
/// restart playing from the start time each time end time is set
@property (nonatomic) double startTime;
/// sets the end time, If it is playing, player will
/// restart playing from the start time each time end time is set
@property (nonatomic) double endTime;
/// Sets the time in the future when playback will commence. Recommend using play(from:to:avTime) instead.
/// this will be deprecated
@property (nonatomic) double scheduledTime;
/// Sheduled time
@property (nonatomic, strong) AVAudioTime * _Nullable scheduledAVTime;
/// Initialize the audio player
/// Notice that completionCallBack will be triggered from a
/// background thread. Any UI update should be made using:
/// \code
/// Dispatch.main.async {
/// // UI updates...
/// }
///
/// \endcode\param file the AKAudioFile to play
///
/// \param looping will loop play if set to true, or stop when play ends, so it can trig the
/// completionHandler callback. Default is false (non looping)
///
/// \param completionHandler AKCallback that will be triggered when the player end playing (useful for refreshing
/// UI so we’re not playing anymore, we stopped playing…)
///
///
/// returns:
/// an AKAudioPlayer if init succeeds, or nil if init fails. If fails, errors may be caught.
- (nullable instancetype)initWithFile:(AKAudioFile * _Nonnull)file looping:(BOOL)looping error:(NSError * _Nullable * _Nullable)error completionHandler:(void (^ _Nullable)(void))completionHandler OBJC_DESIGNATED_INITIALIZER;
/// Start playback
- (void)start;
/// Stop playback
- (void)stop;
/// Pause playback
- (void)pause;
/// Restart playback from current position
- (void)resume;
/// resets in and out times for playing
- (BOOL)reloadFileAndReturnError:(NSError * _Nullable * _Nullable)error;
/// Replace player’s file with a new AKAudioFile file
- (BOOL)replaceWithFile:(AKAudioFile * _Nonnull)file error:(NSError * _Nullable * _Nullable)error;
/// Default play that will use the previously set startTime and endTime properties or the full file if both are 0
- (void)play;
/// Play from startTime to endTime
- (void)playFrom:(double)startTime to:(double)endTime;
/// Play the file back from a certain time, to an end time (if set).
/// You can optionally set a scheduled time to play (in seconds).
/// \param from startTime Time into the file at which to start playing back
///
/// \param to endTime Time into the file at which to playing back will stop / Loop
///
/// \param when scheduledTime use this when scheduled playback doesn’t need to be in sync with other players
/// otherwise use the avTime signature.
///
- (void)playFrom:(double)startTime to:(double)endTime when:(double)scheduledTime;
/// Play the file back from a certain time, to an end time (if set). You can optionally set a scheduled time
/// to play (in seconds).
/// \param from startTime Time into the file at which to start playing back
///
/// \param to endTime Time into the file at which to playing back will stop / Loop
///
/// \param avTime an AVAudioTime object specifying when to schedule the playback. You can create this using the
/// helper function AKAudioPlayer.secondToAVAudioTime(hostTime:time). hostTime is a call to
/// mach_absolute_time(). When you have a group of players which you want to sync together it’s
/// important that this value be the same for all of them as a reference point.
///
- (void)playFrom:(double)time to:(double)endTime avTime:(AVAudioTime * _Nullable)avTime;
/// Convert to AVAudioTime
+ (AVAudioTime * _Nonnull)secondsToAVAudioTimeWithHostTime:(uint64_t)hostTime time:(double)time SWIFT_WARN_UNUSED_RESULT;
/// Stop playback after next loop completes
- (void)stopAtNextLoopEnd;
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// An automatic wah effect, ported from Guitarix via Faust.
SWIFT_CLASS("_TtC8AudioKit9AKAutoWah")
@interface AKAutoWah : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Wah Amount
@property (nonatomic) double wah;
/// Dry/Wet Mix
@property (nonatomic) double mix;
/// Overall level
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this autoWah node
/// \param input Input node to process
///
/// \param wah Wah Amount
///
/// \param mix Dry/Wet Mix
///
/// \param amplitude Overall level
///
- (nonnull instancetype)init:(AKNode * _Nullable)input wah:(double)wah mix:(double)mix amplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This node outputs a version of the audio source, amplitude-modified so
/// that its rms power is equal to that of the comparator audio source. Thus a
/// signal that has suffered loss of power (eg., in passing through a filter
/// bank) can be restored by matching it with, for instance, its own source. It
/// should be noted that this modifies amplitude only; output signal is not
/// altered in any other respect.
SWIFT_CLASS("_TtC8AudioKit10AKBalancer")
@interface AKBalancer : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this balance node
/// \param input Input node to process
///
/// \param comparator Audio to match power with
///
- (nonnull instancetype)init:(AKNode * _Nullable)input comparator:(AKNode * _Nonnull)comparator OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// These filters are Butterworth second-order IIR filters. They offer an almost
/// flat passband and very good precision and stopband attenuation.
SWIFT_CLASS("_TtC8AudioKit27AKBandPassButterworthFilter")
@interface AKBandPassButterworthFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Center frequency. (in Hertz)
@property (nonatomic) double centerFrequency;
/// Bandwidth. (in Hertz)
@property (nonatomic) double bandwidth;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param centerFrequency Center frequency. (in Hertz)
///
/// \param bandwidth Bandwidth. (in Hertz)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input centerFrequency:(double)centerFrequency bandwidth:(double)bandwidth OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// These filters are Butterworth second-order IIR filters. They offer an almost
/// flat passband and very good precision and stopband attenuation.
SWIFT_CLASS("_TtC8AudioKit29AKBandRejectButterworthFilter")
@interface AKBandRejectButterworthFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Center frequency. (in Hertz)
@property (nonatomic) double centerFrequency;
/// Bandwidth. (in Hertz)
@property (nonatomic) double bandwidth;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param centerFrequency Center frequency. (in Hertz)
///
/// \param bandwidth Bandwidth. (in Hertz)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input centerFrequency:(double)centerFrequency bandwidth:(double)bandwidth OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This will digitally degrade a signal.
SWIFT_CLASS("_TtC8AudioKit12AKBitCrusher")
@interface AKBitCrusher : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// The bit depth of signal output. Typically in range (1-24). Non-integer values are OK.
@property (nonatomic) double bitDepth;
/// The sample rate of signal output.
@property (nonatomic) double sampleRate;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this bitcrusher node
/// \param input Input node to process
///
/// \param bitDepth The bit depth of signal output. Typically in range (1-24). Non-integer values are OK.
///
/// \param sampleRate The sample rate of signal output.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input bitDepth:(double)bitDepth sampleRate:(double)sampleRate OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Stereo Booster
SWIFT_CLASS("_TtC8AudioKit9AKBooster")
@interface AKBooster : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Amplification Factor
@property (nonatomic) double gain;
/// Left Channel Amplification Factor
@property (nonatomic) double leftGain;
/// Right Channel Amplification Factor
@property (nonatomic) double rightGain;
/// Amplification Factor in db
@property (nonatomic) double dB;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this booster node
/// \param input AKNode whose output will be amplified
///
/// \param gain Amplification factor (Default: 1, Minimum: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input gain:(double)gain OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Faust-based pink noise generator
SWIFT_CLASS("_TtC8AudioKit15AKBrownianNoise")
@interface AKBrownianNoise : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Amplitude. (Value between 0-1).
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this noise node
/// \param amplitude Amplitude. (Value between 0-1).
///
- (nonnull instancetype)initWithAmplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@class NSColor;
SWIFT_CLASS("_TtC8AudioKit8AKButton")
@interface AKButton : NSView
@property (nonatomic, copy) NSString * _Nonnull title;
@property (nonatomic, strong) NSColor * _Nonnull color;
- (void)mouseDown:(NSEvent * _Nonnull)theEvent;
- (nonnull instancetype)initWithTitle:(NSString * _Nonnull)title color:(NSColor * _Nonnull)color frame:(CGRect)frame callback:(NSString * _Nonnull (^ _Nonnull)(void))callback OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)drawRect:(CGRect)rect;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit14AKBypassButton")
@interface AKBypassButton : NSView
- (void)mouseDown:(NSEvent * _Nonnull)theEvent;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)drawRect:(CGRect)rect;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
@class AKTuningTable;
/// Bare bones implementation of AKPolyphonic protocol
SWIFT_CLASS("_TtC8AudioKit16AKPolyphonicNode")
@interface AKPolyphonicNode : AKNode
/// Global tuning table used by AKPolyphonicNode (AKNode classes adopting AKPolyphonic protocol)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AKTuningTable * _Nonnull tuningTable;)
+ (AKTuningTable * _Nonnull)tuningTable SWIFT_WARN_UNUSED_RESULT;
+ (void)setTuningTable:(AKTuningTable * _Nonnull)value;
/// Play a sound corresponding to a MIDI note with frequency
/// \param noteNumber MIDI Note Number
///
/// \param velocity MIDI Velocity
///
/// \param frequency Play this frequency
///
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity frequency:(double)frequency;
/// Play a sound corresponding to a MIDI note
/// \param noteNumber MIDI Note Number
///
/// \param velocity MIDI Velocity
///
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity;
/// Stop a sound corresponding to a MIDI note
/// \param noteNumber MIDI Note Number
///
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach OBJC_DESIGNATED_INITIALIZER;
@end
/// A version of AKInstrument specifically targeted to instruments that
/// should be triggerable via MIDI or sequenced with the sequencer.
SWIFT_CLASS("_TtC8AudioKit16AKMIDIInstrument")
@interface AKMIDIInstrument : AKPolyphonicNode
/// MIDI Input
@property (nonatomic) MIDIEndpointRef midiIn;
/// Name of the instrument
@property (nonatomic, copy) NSString * _Nonnull name;
/// Enable MIDI input from a given MIDI client
/// This is not in the init function because it must be called AFTER you start audiokit
/// \param midiClient A refernce to the midi client
///
/// \param name Name to connect with
///
- (void)enableMIDI:(MIDIClientRef)midiClient name:(NSString * _Nonnull)name;
/// Handle MIDI commands that come in externally
/// \param noteNumber MIDI Note number
///
/// \param velocity MIDI velocity
///
/// \param channel MIDI channel
///
- (void)receivedMIDINoteOn:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Handle MIDI commands that come in externally
/// \param noteNumber MIDI Note number
///
/// \param velocity MIDI velocity
///
/// \param channel MIDI channel
///
- (void)receivedMIDINoteOffWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Start a note
/// \param noteNumber Note number to play
///
/// \param velocity Velocity at which to play the note (0 - 127)
///
/// \param channel Channel on which to play the note
///
- (void)startWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Stop a note
/// \param noteNumber Note number to stop
///
/// \param channel Channel on which to stop the note
///
- (void)stopWithNoteNumber:(uint8_t)noteNumber channel:(uint8_t)channel;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach OBJC_DESIGNATED_INITIALIZER;
@end
/// MIDI Instrument that triggers functions on MIDI note on/off commands
SWIFT_CLASS("_TtC8AudioKit20AKCallbackInstrument")
@interface AKCallbackInstrument : AKMIDIInstrument
/// Will trigger in response to any noteOn Message
/// \param noteNumber MIDI Note Number being started
///
/// \param velocity MIDI Velocity (0-127)
///
/// \param channel MIDI Channel
///
- (void)startWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Will trigger in response to any noteOff Message
/// \param noteNumber MIDI Note Number being stopped
///
/// \param velocity MIDI Velocity (0-127)
///
/// \param channel MIDI Channel
///
- (void)stopWithNoteNumber:(uint8_t)noteNumber channel:(uint8_t)channel;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is was built using the JC reverb implentation found in FAUST. According
/// to the source code, the specifications for this implementation were found on
/// an old SAIL DART backup tape.
/// This class is derived from the CLM JCRev function, which is based on the use
/// of networks of simple allpass and comb delay filters. This class implements
/// three series allpass units, followed by four parallel comb filters, and two
/// decorrelation delay lines in parallel at the output.
SWIFT_CLASS("_TtC8AudioKit16AKChowningReverb")
@interface AKChowningReverb : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this reverb node
/// \param input Input node to process
///
- (nonnull instancetype)init:(AKNode * _Nullable)input OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// STK Clarinet
SWIFT_CLASS("_TtC8AudioKit10AKClarinet")
@interface AKClarinet : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.
@property (nonatomic) double frequency;
/// Amplitude
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the mandolin with defaults
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Initialize the STK Clarinet model
/// \param frequency Variable frequency. Values less than the initial frequency will be doubled until it is
/// greater than that.
///
/// \param amplitude Amplitude
///
- (nonnull instancetype)initWithFrequency:(double)frequency amplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
/// <ul>
/// <li>
/// frequency: Frequency in Hz
/// </li>
/// <li>
/// amplitude amplitude: Volume
/// </li>
/// </ul>
- (void)triggerWithFrequency:(double)frequency amplitude:(double)amplitude;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Clips a signal to a predefined limit, in a “soft” manner, using one of three
/// methods.
SWIFT_CLASS("_TtC8AudioKit9AKClipper")
@interface AKClipper : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Threshold / limiting value.
@property (nonatomic) double limit;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this clipper node
/// \param input Input node to process
///
/// \param limit Threshold / limiting value.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input limit:(double)limit OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This filter reiterates input with an echo density determined by
/// loopDuration. The attenuation rate is independent and is determined by
/// reverbDuration, the reverberation duration (defined as the time in seconds
/// for a signal to decay to 1/1000, or 60dB down from its original amplitude).
/// Output from a comb filter will appear only after loopDuration seconds.
SWIFT_CLASS("_TtC8AudioKit18AKCombFilterReverb")
@interface AKCombFilterReverb : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// The time in seconds for a signal to decay to 1/1000, or 60dB from its original amplitude. (aka RT-60).
@property (nonatomic) double reverbDuration;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param reverbDuration The time in seconds for a signal to decay to 1/1000, or 60dB from its
/// original amplitude. (aka RT-60).
///
/// \param loopDuration The loop time of the filter, in seconds. This can also be thought of as the delay time.
/// Determines frequency response curve, loopDuration * sr/2 peaks spaced evenly between 0 and sr/2.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input reverbDuration:(double)reverbDuration loopDuration:(double)loopDuration OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit Compressor based on Apple’s DynamicsProcessor Audio Unit
SWIFT_CLASS("_TtC8AudioKit12AKCompressor")
@interface AKCompressor : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Threshold (dB) ranges from -40 to 20 (Default: -20)
@property (nonatomic) double threshold;
/// Head Room (dB) ranges from 0.1 to 40.0 (Default: 5)
@property (nonatomic) double headRoom;
/// Attack Time (secs) ranges from 0.0001 to 0.2 (Default: 0.001)
@property (nonatomic) double attackTime;
/// Release Time (secs) ranges from 0.01 to 3 (Default: 0.05)
@property (nonatomic) double releaseTime;
/// Compression Amount (dB) read only
@property (nonatomic, readonly) double compressionAmount;
/// Input Amplitude (dB) read only
@property (nonatomic, readonly) double inputAmplitude;
/// Output Amplitude (dB) read only
@property (nonatomic, readonly) double outputAmplitude;
/// Master Gain (dB) ranges from -40 to 40 (Default: 0)
@property (nonatomic) double masterGain;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the dynamics processor node
/// \param input Input node to process
///
/// \param threshold Threshold (dB) ranges from -40 to 20 (Default: -20)
///
/// \param headRoom Head Room (dB) ranges from 0.1 to 40.0 (Default: 5)
///
/// \param attackTime Attack Time (secs) ranges from 0.0001 to 0.2 (Default: 0.001)
///
/// \param releaseTime Release Time (secs) ranges from 0.01 to 3 (Default: 0.05)
///
/// \param masterGain Master Gain (dB) ranges from -40 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input threshold:(double)threshold headRoom:(double)headRoom attackTime:(double)attackTime releaseTime:(double)releaseTime masterGain:(double)masterGain OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This module will perform partitioned convolution on an input signal using an
/// audio file as an impulse response.
SWIFT_CLASS("_TtC8AudioKit13AKConvolution")
@interface AKConvolution : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this convolution node
/// \param input Input node to process
///
/// \param impulseResponseFileURL Location of the imulseResponse audio File
///
/// \param partitionLength Partition length (in samples). Must be a power of 2. Lower values will add less latency,
/// at the cost of requiring more CPU power.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input impulseResponseFileURL:(NSURL * _Nonnull)impulseResponseFileURL partitionLength:(NSInteger)partitionLength OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// 8 delay line stereo FDN reverb, with feedback matrix based upon physical
/// modeling scattering junction of 8 lossless waveguides of equal
/// characteristic impedance.
SWIFT_CLASS("_TtC8AudioKit16AKCostelloReverb")
@interface AKCostelloReverb : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Feedback level in the range 0 to 1. 0.6 gives a good small ‘live’ room sound, 0.8 a small hall, and 0.9 a
/// large hall. A setting of exactly 1 means infinite length, while higher values will make the opcode unstable.
@property (nonatomic) double feedback;
/// Low-pass cutoff frequency.
@property (nonatomic) double cutoffFrequency;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this reverb node
/// \param input Input node to process
///
/// \param feedback Feedback level in the range 0 to 1. 0.6 gives a good small ‘live’ room sound, 0.8 a small hall,
/// and 0.9 a large hall. A setting of exactly 1 means infinite length, while higher values will
/// make the opcode unstable.
///
/// \param cutoffFrequency Low-pass cutoff frequency.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input feedback:(double)feedback cutoffFrequency:(double)cutoffFrequency OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKCostelloReverb (SWIFT_EXTENSION(AudioKit))
/// Short Tail Reverb
- (void)presetShortTailCostelloReverb;
/// Low Ringing Long Tail Reverb
- (void)presetLowRingingLongTailCostelloReverb;
/// Print out current values in case you want to save it as a preset
- (void)printCurrentValuesAsPreset;
@end
@class AKSporthStack;
/// Custom Sporth Unit Generator (Ugen)
SWIFT_CLASS("_TtC8AudioKit12AKCustomUgen")
@interface AKCustomUgen : NSObject
/// Name of the Ugen
@property (nonatomic, readonly, copy) NSString * _Nonnull name;
/// String describing the arugments: f for float / s for string, e.g. “fsf”
@property (nonatomic, readonly, copy) NSString * _Nonnull argTypes;
/// Custom object that may be passed in
@property (nonatomic) id _Nullable userData;
/// The sporth stack
@property (nonatomic, strong) AKSporthStack * _Nonnull stack;
/// Duplicate the Ugen
- (AKCustomUgen * _Nonnull)duplicate SWIFT_WARN_UNUSED_RESULT;
/// Executre the compute function
@property (nonatomic, readonly) void (* _Nonnull callComputeFunction)(AKCustomUgen * _Nonnull);
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
/// Implements the DC blocking filter Y[i] = X[i] - X[i-1] + (igain * Y[i-1])
/// Based on work by <NAME>.
SWIFT_CLASS("_TtC8AudioKit9AKDCBlock")
@interface AKDCBlock : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
- (nonnull instancetype)init:(AKNode * _Nullable)input OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s Decimator from the Distortion Audio Unit
SWIFT_CLASS("_TtC8AudioKit11AKDecimator")
@interface AKDecimator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Decimation (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double decimation;
/// Rounding (Normalized Value) ranges from 0 to 1 (Default: 0)
@property (nonatomic) double rounding;
/// Mix (Normalized Value) ranges from 0 to 1 (Default: 1)
@property (nonatomic) double mix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the decimator node
/// \param input Input node to process
///
/// \param decimation Decimation (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param rounding Rounding (Normalized Value) ranges from 0 to 1 (Default: 0)
///
/// \param mix Mix (Normalized Value) ranges from 0 to 1 (Default: 1)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input decimation:(double)decimation rounding:(double)rounding mix:(double)mix OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s Delay Audio Unit
SWIFT_CLASS("_TtC8AudioKit7AKDelay")
@interface AKDelay : AKNode
/// Delay time in seconds (Default: 1)
@property (nonatomic) NSTimeInterval time;
/// Feedback (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double feedback;
/// Low pass cut-off frequency in Hertz (Default: 15000)
@property (nonatomic) double lowPassCutoff;
/// Dry/Wet Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the delay node
/// \param input Input audio AKNode to process
///
/// \param time Delay time in seconds (Default: 1)
///
/// \param feedback Amount of feedback, ranges from 0 to 1 (Default: 0.5)
///
/// \param lowPassCutoff Low-pass cutoff frequency in Hz (Default 15000)
///
/// \param dryWetMix Amount of unprocessed (dry) to delayed (wet) audio, ranges from 0 to 1 (Default: 0.5)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input time:(double)time feedback:(double)feedback lowPassCutoff:(double)lowPassCutoff dryWetMix:(double)dryWetMix OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKDelay (SWIFT_EXTENSION(AudioKit))
/// Short Delay
- (void)presetShortDelay;
/// Long, dense delay
- (void)presetDenseLongDelay;
/// Electrical Circuits, Robotic Delay Effect
- (void)presetElectricCircuitsDelay;
/// Print out current values in case you want to save it as a preset
- (void)printCurrentValuesAsPreset;
@end
/// Wrapper for audio device selection
SWIFT_CLASS("_TtC8AudioKit8AKDevice")
@interface AKDevice : NSObject
/// The human-readable name for the device.
@property (nonatomic, copy) NSString * _Nonnull name;
/// The device identifier.
@property (nonatomic, readonly) AudioDeviceID deviceID;
/// Initialize the device
/// \param name The human-readable name for the device.
///
/// \param deviceID The device identifier.
///
- (nonnull instancetype)initWithName:(NSString * _Nonnull)name deviceID:(AudioDeviceID)deviceID dataSource:(NSString * _Nonnull)dataSource OBJC_DESIGNATED_INITIALIZER;
/// Printable device description
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s Distortion Audio Unit
SWIFT_CLASS("_TtC8AudioKit12AKDistortion")
@interface AKDistortion : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Delay (Milliseconds) ranges from 0.1 to 500 (Default: 0.1)
@property (nonatomic) double delay;
/// Decay (Rate) ranges from 0.1 to 50 (Default: 1.0)
@property (nonatomic) double decay;
/// Delay Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double delayMix;
/// Decimation (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double decimation;
/// Rounding (Normalized Value) ranges from 0 to 1 (Default: 0.0)
@property (nonatomic) double rounding;
/// Decimation Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double decimationMix;
/// Linear Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double linearTerm;
/// Squared Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double squaredTerm;
/// Cubic Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double cubicTerm;
/// Polynomial Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double polynomialMix;
/// Ring Mod Freq1 (Hertz) ranges from 0.5 to 8000 (Default: 100)
@property (nonatomic) double ringModFreq1;
/// Ring Mod Freq2 (Hertz) ranges from 0.5 to 8000 (Default: 100)
@property (nonatomic) double ringModFreq2;
/// Ring Mod Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double ringModBalance;
/// Ring Mod Mix (Normalized Value) ranges from 0 to 1 (Default: 0.0)
@property (nonatomic) double ringModMix;
/// Soft Clip Gain (dB) ranges from -80 to 20 (Default: -6)
@property (nonatomic) double softClipGain;
/// Final Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double finalMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the distortion node
/// \param input Input node to process
///
/// \param delay Delay (Milliseconds) ranges from 0.1 to 500 (Default: 0.1)
///
/// \param decay Decay (Rate) ranges from 0.1 to 50 (Default: 1.0)
///
/// \param delayMix Delay Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param decimation Decimation (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param rounding Rounding (Normalized Value) ranges from 0 to 1 (Default: 0.0)
///
/// \param decimationMix Decimation Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param linearTerm Linear Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param squaredTerm Squared Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param cubicTerm Cubic Term (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param polynomialMix Polynomial Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param ringModFreq1 Ring Mod Freq1 (Hertz) ranges from 0.5 to 8000 (Default: 100)
///
/// \param ringModFreq2 Ring Mod Freq2 (Hertz) ranges from 0.5 to 8000 (Default: 100)
///
/// \param ringModBalance Ring Mod Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param ringModMix Ring Mod Mix (Normalized Value) ranges from 0 to 1 (Default: 0.0)
///
/// \param softClipGain Soft Clip Gain (dB) ranges from -80 to 20 (Default: -6)
///
/// \param finalMix Final Mix (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input delay:(double)delay decay:(double)decay delayMix:(double)delayMix decimation:(double)decimation rounding:(double)rounding decimationMix:(double)decimationMix linearTerm:(double)linearTerm squaredTerm:(double)squaredTerm cubicTerm:(double)cubicTerm polynomialMix:(double)polynomialMix ringModFreq1:(double)ringModFreq1 ringModFreq2:(double)ringModFreq2 ringModBalance:(double)ringModBalance ringModMix:(double)ringModMix softClipGain:(double)softClipGain finalMix:(double)finalMix OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKDistortion (SWIFT_EXTENSION(AudioKit))
/// Massive Distortion
- (void)presetInfiniteDistortionWall;
/// Print out current values in case you want to save it as a preset
- (void)printCurrentValuesAsPreset;
@end
/// Physical model of the sound of dripping water. When triggered, it will
/// produce a droplet of water.
SWIFT_CLASS("_TtC8AudioKit6AKDrip")
@interface AKDrip : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// The intensity of the dripping sound.
@property (nonatomic) double intensity;
/// The damping factor. Maximum value is 2.0.
@property (nonatomic) double dampingFactor;
/// The amount of energy to add back into the system.
@property (nonatomic) double energyReturn;
/// Main resonant frequency.
@property (nonatomic) double mainResonantFrequency;
/// The first resonant frequency.
@property (nonatomic) double firstResonantFrequency;
/// The second resonant frequency.
@property (nonatomic) double secondResonantFrequency;
/// Amplitude.
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the drip with defaults
- (nonnull instancetype)init;
/// Initialize this drip node
/// \param intensity The intensity of the dripping sound.
///
/// \param dampingFactor The damping factor. Maximum value is 2.0.
///
/// \param energyReturn The amount of energy to add back into the system.
///
/// \param mainResonantFrequency Main resonant frequency.
///
/// \param firstResonantFrequency The first resonant frequency.
///
/// \param secondResonantFrequency The second resonant frequency.
///
/// \param amplitude Amplitude.
///
- (nonnull instancetype)initWithIntensity:(double)intensity dampingFactor:(double)dampingFactor energyReturn:(double)energyReturn mainResonantFrequency:(double)mainResonantFrequency firstResonantFrequency:(double)firstResonantFrequency secondResonantFrequency:(double)secondResonantFrequency amplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
- (void)trigger;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Balanceable Mix between two signals, usually used for a dry signal and wet signal
SWIFT_CLASS("_TtC8AudioKit13AKDryWetMixer")
@interface AKDryWetMixer : AKNode
/// Balance (Default 0.5)
@property (nonatomic) double balance;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize this dry wet mixer node
/// \param dry Dry Input (or just input 1)
///
/// \param wet Wet Input (or just input 2)
///
/// \param balance Balance Point (0 = all dry, 1 = all wet)
///
- (nonnull instancetype)init:(AKNode * _Nullable)dry :(AKNode * _Nullable)wet balance:(double)balance OBJC_DESIGNATED_INITIALIZER;
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Dynamic range compressor from Faust
SWIFT_CLASS("_TtC8AudioKit24AKDynamicRangeCompressor")
@interface AKDynamicRangeCompressor : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Ratio to compress with, a value > 1 will compress
@property (nonatomic) double ratio;
/// Threshold (in dB) 0 = max
@property (nonatomic) double threshold;
/// Attack time
@property (nonatomic) double attackTime;
/// Release time
@property (nonatomic) double releaseTime;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this compressor node
/// \param input Input node to process
///
/// \param ratio Ratio to compress with, a value > 1 will compress
///
/// \param threshold Threshold (in dB) 0 = max
///
/// \param attackTime Attack time
///
/// \param releaseTime Release time
///
- (nonnull instancetype)init:(AKNode * _Nullable)input ratio:(double)ratio threshold:(double)threshold attackTime:(double)attackTime releaseTime:(double)releaseTime OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s DynamicsProcessor Audio Unit
SWIFT_CLASS("_TtC8AudioKit19AKDynamicsProcessor")
@interface AKDynamicsProcessor : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Threshold (dB) ranges from -40 to 20 (Default: -20)
@property (nonatomic) double threshold;
/// Head Room (dB) ranges from 0.1 to 40.0 (Default: 5)
@property (nonatomic) double headRoom;
/// Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)
@property (nonatomic) double expansionRatio;
/// Expansion Threshold (rate) ranges from 1 to 50.0 (Default: 2)
@property (nonatomic) double expansionThreshold;
/// Attack Time (secs) ranges from 0.0001 to 0.2 (Default: 0.001)
@property (nonatomic) double attackTime;
/// Release Time (secs) ranges from 0.01 to 3 (Default: 0.05)
@property (nonatomic) double releaseTime;
/// Master Gain (dB) ranges from -40 to 40 (Default: 0)
@property (nonatomic) double masterGain;
/// Compression Amount (dB) read only
@property (nonatomic, readonly) double compressionAmount;
/// Input Amplitude (dB) read only
@property (nonatomic, readonly) double inputAmplitude;
/// Output Amplitude (dB) read only
@property (nonatomic, readonly) double outputAmplitude;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the dynamics processor node
/// \param input Input node to process
///
/// \param threshold Threshold (dB) ranges from -40 to 20 (Default: -20)
///
/// \param headRoom Head Room (dB) ranges from 0.1 to 40.0 (Default: 5)
///
/// \param expansionRatio Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)
///
/// \param expansionThreshold Expansion Threshold (rate) ranges from 1 to 50.0 (Default: 2)
///
/// \param attackTime Attack Time (secs) ranges from 0.0001 to 0.2 (Default: 0.001)
///
/// \param releaseTime Release Time (secs) ranges from 0.01 to 3 (Default: 0.05)
///
/// \param masterGain Master Gain (dB) ranges from -40 to 40 (Default: 0)
///
/// \param compressionAmount Compression Amount (dB) ranges from -40 to 40 (Default: 0)
///
/// \param inputAmplitude Input Amplitude (dB) ranges from -40 to 40 (Default: 0)
///
/// \param outputAmplitude Output Amplitude (dB) ranges from -40 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input threshold:(double)threshold headRoom:(double)headRoom expansionRatio:(double)expansionRatio expansionThreshold:(double)expansionThreshold attackTime:(double)attackTime releaseTime:(double)releaseTime masterGain:(double)masterGain compressionAmount:(double)compressionAmount inputAmplitude:(double)inputAmplitude outputAmplitude:(double)outputAmplitude OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A 2nd order tunable equalization filter that provides a peak/notch filter
/// for building parametric/graphic equalizers. With gain above 1, there will be
/// a peak at the center frequency with a width dependent on bandwidth. If gain
/// is less than 1, a notch is formed around the center frequency.
SWIFT_CLASS("_TtC8AudioKit17AKEqualizerFilter")
@interface AKEqualizerFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Center frequency. (in Hertz)
@property (nonatomic) double centerFrequency;
/// The peak/notch bandwidth in Hertz
@property (nonatomic) double bandwidth;
/// The peak/notch gain
@property (nonatomic) double gain;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param centerFrequency Center frequency in Hertz
///
/// \param bandwidth The peak/notch bandwidth in Hertz
///
/// \param gain The peak/notch gain
///
- (nonnull instancetype)init:(AKNode * _Nullable)input centerFrequency:(double)centerFrequency bandwidth:(double)bandwidth gain:(double)gain OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit Expander based on Apple’s DynamicsProcessor Audio Unit
SWIFT_CLASS("_TtC8AudioKit10AKExpander")
@interface AKExpander : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)
@property (nonatomic) double expansionRatio;
/// Expansion Threshold (rate) ranges from 1 to 50.0 (Default: 2)
@property (nonatomic) double expansionThreshold;
/// Attack Time (secs) ranges from 0.0001 to 0.2 (Default: 0.001)
@property (nonatomic) double attackTime;
/// Release Time (secs) ranges from 0.01 to 3 (Default: 0.05)
@property (nonatomic) double releaseTime;
/// Master Gain (dB) ranges from -40 to 40 (Default: 0)
@property (nonatomic) double masterGain;
/// Compression Amount (dB) read only
@property (nonatomic, readonly) double compressionAmount;
/// Input Amplitude (dB) read only
@property (nonatomic, readonly) double inputAmplitude;
/// Output Amplitude (dB) read only
@property (nonatomic, readonly) double outputAmplitude;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the dynamics processor node
/// \param input Input node to process
///
/// \param expansionRatio Expansion Ratio (rate) ranges from 1 to 50.0 (Default: 2)
///
/// \param expansionThreshold Expansion Threshold (rate) ranges from 1 to 50.0 (Default: 2)
///
/// \param attackTime Attack Time (secs) ranges from 0.0001 to 0.2 (Default: 0.001)
///
/// \param releaseTime Release Time (secs) ranges from 0.01 to 3 (Default: 0.05)
///
/// \param masterGain Master Gain (dB) ranges from -40 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input threshold:(double)threshold headRoom:(double)headRoom expansionRatio:(double)expansionRatio expansionThreshold:(double)expansionThreshold attackTime:(double)attackTime releaseTime:(double)releaseTime masterGain:(double)masterGain compressionAmount:(double)compressionAmount inputAmplitude:(double)inputAmplitude outputAmplitude:(double)outputAmplitude OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@class EZAudioFFT;
/// FFT Calculation for any node
SWIFT_CLASS("_TtC8AudioKit8AKFFTTap")
@interface AKFFTTap : NSObject <EZAudioFFTDelegate>
/// Array of FFT data
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull fftData;
/// Initialze the FFT calculation on a given node
/// \param input Node on whose output the FFT will be computed
///
- (nonnull instancetype)init:(AKNode * _Nonnull)input OBJC_DESIGNATED_INITIALIZER;
/// Callback function for FFT computation
- (void)fft:(EZAudioFFT * _Null_unspecified)fft updatedWithFFTData:(float * _Nonnull)fftData bufferSize:(vDSP_Length)bufferSize;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
/// Classic FM Synthesis audio generation.
SWIFT_CLASS("_TtC8AudioKit14AKFMOscillator")
@interface AKFMOscillator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// In cycles per second, or Hz, this is the common denominator for the carrier and modulating frequencies.
@property (nonatomic) double baseFrequency;
/// This multiplied by the baseFrequency gives the carrier frequency.
@property (nonatomic) double carrierMultiplier;
/// This multiplied by the baseFrequency gives the modulating frequency.
@property (nonatomic) double modulatingMultiplier;
/// This multiplied by the modulating frequency gives the modulation amplitude.
@property (nonatomic) double modulationIndex;
/// Output Amplitude.
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKFMOscillator (SWIFT_EXTENSION(AudioKit))
/// Stun Ray Preset
- (void)presetStunRay;
/// Fog Horn Preset
- (void)presetFogHorn;
/// Buzzer Preset
- (void)presetBuzzer;
/// Spiral Preset
- (void)presetSpiral;
/// Wobble Preset
- (void)presetWobble;
@end
/// Frequency Modulation Polyphonic Oscillator
SWIFT_CLASS("_TtC8AudioKit18AKFMOscillatorBank")
@interface AKFMOscillatorBank : AKPolyphonicNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// This multiplied by the baseFrequency gives the carrier frequency.
@property (nonatomic) double carrierMultiplier;
/// This multiplied by the baseFrequency gives the modulating frequency.
@property (nonatomic) double modulatingMultiplier;
/// This multiplied by the modulating frequency gives the modulation amplitude.
@property (nonatomic) double modulationIndex;
/// Attack time
@property (nonatomic) double attackDuration;
/// Decay time
@property (nonatomic) double decayDuration;
/// Sustain Level
@property (nonatomic) double sustainLevel;
/// Release time
@property (nonatomic) double releaseDuration;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity frequency:(double)frequency;
/// Function to stop or bypass the node, both are equivalent
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This filter reiterates the input with an echo density determined by loop
/// time. The attenuation rate is independent and is determined by the
/// reverberation time (defined as the time in seconds for a signal to decay to
/// 1/1000, or 60dB down from its original amplitude). Output will begin to
/// appear immediately.
SWIFT_CLASS("_TtC8AudioKit29AKFlatFrequencyResponseReverb")
@interface AKFlatFrequencyResponseReverb : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// The duration in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude.
@property (nonatomic) double reverbDuration;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this reverb node
/// \param input Input node to process
///
/// \param reverbDuration The duration in seconds for a signal to decay to 1/1000,
/// or 60dB down from its original amplitude.
///
/// \param loopDuration The loop duration of the filter, in seconds. This can also be thought of as the
/// delay time or “echo density” of the reverberation.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input reverbDuration:(double)reverbDuration loopDuration:(double)loopDuration OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// STK Flutee
SWIFT_CLASS("_TtC8AudioKit7AKFlute")
@interface AKFlute : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.
@property (nonatomic) double frequency;
/// Amplitude
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the mandolin with defaults
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Initialize the STK Flute model
/// \param frequency Variable frequency. Values less than the initial frequency will be doubled until it is
/// greater than that.
///
/// \param amplitude Amplitude
///
- (nonnull instancetype)initWithFrequency:(double)frequency amplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
/// <ul>
/// <li>
/// frequency: Frequency in Hz
/// </li>
/// <li>
/// amplitude amplitude: Volume
/// </li>
/// </ul>
- (void)triggerWithFrequency:(double)frequency amplitude:(double)amplitude;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// When fed with a pulse train, it will generate a series of overlapping
/// grains. Overlapping will occur when 1/freq < dec, but there is no upper
/// limit on the number of overlaps.
SWIFT_CLASS("_TtC8AudioKit15AKFormantFilter")
@interface AKFormantFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Center frequency.
@property (nonatomic) double x;
/// Impulse response attack time (in seconds).
@property (nonatomic) double y;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param centerFrequency Center frequency.
///
/// \param attackDuration Impulse response attack time (in seconds).
///
/// \param decayDuration Impulse reponse decay time (in seconds)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input x:(double)x y:(double)y OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is based on an algorithm originally created by <NAME>.
SWIFT_CLASS("_TtC8AudioKit18AKFrequencyTracker")
@interface AKFrequencyTracker : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Detected Amplitude (Use AKAmplitude tracker if you don’t need frequency)
@property (nonatomic, readonly) double amplitude;
/// Detected frequency
@property (nonatomic, readonly) double frequency;
/// Initialize this Pitch-tracker node
/// \param input Input node to process
///
/// \param hopSize Hop size.
///
/// \param peakCount Number of peaks.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input hopSize:(double)hopSize peakCount:(double)peakCount OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// These filters are Butterworth second-order IIR filters. They offer an almost
/// flat passband and very good precision and stopband attenuation.
SWIFT_CLASS("_TtC8AudioKit27AKHighPassButterworthFilter")
@interface AKHighPassButterworthFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Cutoff frequency. (in Hertz)
@property (nonatomic) double cutoffFrequency;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Cutoff frequency. (in Hertz)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s HighPassFilter Audio Unit
SWIFT_CLASS("_TtC8AudioKit16AKHighPassFilter")
@interface AKHighPassFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Cutoff Frequency (Hz) ranges from 10 to 22050 (Default: 6900)
@property (nonatomic) double cutoffFrequency;
/// Resonance (dB) ranges from -20 to 40 (Default: 0)
@property (nonatomic) double resonance;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the high pass filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Cutoff Frequency (Hz) ranges from 10 to 22050 (Default: 6900)
///
/// \param resonance Resonance (dB) ranges from -20 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency resonance:(double)resonance OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s HighShelfFilter Audio Unit
SWIFT_CLASS("_TtC8AudioKit17AKHighShelfFilter")
@interface AKHighShelfFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Cut Off Frequency (Hz) ranges from 10000 to 22050 (Default: 10000)
@property (nonatomic) double cutoffFrequency;
/// Gain (dB) ranges from -40 to 40 (Default: 0)
@property (nonatomic) double gain;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the high shelf filter node
/// \param input Input node to process
///
/// \param cutOffFrequency Cut Off Frequency (Hz) ranges from 10000 to 22050 (Default: 10000)
///
/// \param gain Gain (dB) ranges from -40 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutOffFrequency:(double)cutOffFrequency gain:(double)gain OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is an implementation of Zoelzer’s parametric equalizer filter.
SWIFT_CLASS("_TtC8AudioKit36AKHighShelfParametricEqualizerFilter")
@interface AKHighShelfParametricEqualizerFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Corner frequency.
@property (nonatomic) double centerFrequency;
/// Amount at which the corner frequency value shall be increased or decreased. A value of 1 is a flat response.
@property (nonatomic) double gain;
/// Q of the filter. sqrt(0.5) is no resonance.
@property (nonatomic) double q;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this equalizer node
/// \param input Input node to process
///
/// \param centerFrequency Corner frequency.
///
/// \param gain Amount the corner frequency value shall be increased or decreased. A value of 1 is a flat response.
///
/// \param q Q of the filter. sqrt(0.5) is no resonance.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input centerFrequency:(double)centerFrequency gain:(double)gain q:(double)q OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit14AKKeyboardView")
@interface AKKeyboardView : NSView
@property (nonatomic, readonly, getter=isFlipped) BOOL flipped;
@property (nonatomic) NSInteger octaveCount;
@property (nonatomic) NSInteger firstOctave;
@property (nonatomic) CGFloat topKeyHeightRatio;
@property (nonatomic, strong) NSColor * _Nonnull polyphonicButton;
@property (nonatomic, strong) NSColor * _Nonnull whiteKeyOff;
@property (nonatomic, strong) NSColor * _Nonnull blackKeyOff;
@property (nonatomic, strong) NSColor * _Nonnull keyOnColor;
@property (nonatomic, strong) NSColor * _Nonnull topWhiteKeyOff;
@property (nonatomic) BOOL polyphonicMode;
- (void)drawRect:(NSRect)dirtyRect;
- (nonnull instancetype)initWithWidth:(NSInteger)width height:(NSInteger)height firstOctave:(NSInteger)firstOctave octaveCount:(NSInteger)octaveCount polyphonic:(BOOL)polyphonic OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)prepareForInterfaceBuilder;
@property (nonatomic, readonly) CGSize intrinsicContentSize;
- (NSString * _Nonnull)getNoteNameWithNote:(NSInteger)note SWIFT_WARN_UNUSED_RESULT;
- (void)mouseDown:(NSEvent * _Nonnull)event;
- (void)mouseUp:(NSEvent * _Nonnull)event;
- (void)mouseDragged:(NSEvent * _Nonnull)event;
- (void)receivedMIDINoteOnNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
- (void)receivedMIDINoteOffWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
- (void)receivedMIDIController:(uint8_t)controller value:(uint8_t)value channel:(uint8_t)channel;
- (void)receivedMIDIProgramChange:(uint8_t)program channel:(uint8_t)channel;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
/// Analog model of the Korg 35 Lowpass Filter
SWIFT_CLASS("_TtC8AudioKit19AKKorgLowPassFilter")
@interface AKKorgLowPassFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Filter cutoff
@property (nonatomic) double cutoffFrequency;
/// Filter resonance (should be between 0-2)
@property (nonatomic) double resonance;
/// Filter saturation.
@property (nonatomic) double saturation;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Filter cutoff
///
/// \param resonance Filter resonance (should be between 0-2)
///
/// \param saturation Filter saturation.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency resonance:(double)resonance saturation:(double)saturation OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit7AKLabel")
@interface AKLabel : NSTextField
- (nonnull instancetype)initWithFrame:(NSRect)frameRect OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@property (nonatomic, copy) NSString * _Nonnull text;
@end
/// These filters are Butterworth second-order IIR filters. They offer an almost
/// flat passband and very good precision and stopband attenuation.
SWIFT_CLASS("_TtC8AudioKit26AKLowPassButterworthFilter")
@interface AKLowPassButterworthFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Cutoff frequency. (in Hertz)
@property (nonatomic) double cutoffFrequency;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Cutoff frequency. (in Hertz)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s LowPassFilter Audio Unit
SWIFT_CLASS("_TtC8AudioKit15AKLowPassFilter")
@interface AKLowPassFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Cutoff Frequency (Hz) ranges from 10 to 22050 (Default: 6900)
@property (nonatomic) double cutoffFrequency;
/// Resonance (dB) ranges from -20 to 40 (Default: 0)
@property (nonatomic) double resonance;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the low pass filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Cutoff Frequency (Hz) ranges from 10 to 22050 (Default: 6900)
///
/// \param resonance Resonance (dB) ranges from -20 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency resonance:(double)resonance OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s LowShelfFilter Audio Unit
SWIFT_CLASS("_TtC8AudioKit16AKLowShelfFilter")
@interface AKLowShelfFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Cutoff Frequency (Hz) ranges from 10 to 200 (Default: 80)
@property (nonatomic) double cutoffFrequency;
/// Gain (dB) ranges from -40 to 40 (Default: 0)
@property (nonatomic) double gain;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the low shelf filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Cutoff Frequency (Hz) ranges from 10 to 200 (Default: 80)
///
/// \param gain Gain (dB) ranges from -40 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency gain:(double)gain OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is an implementation of Zoelzer’s parametric equalizer filter.
SWIFT_CLASS("_TtC8AudioKit35AKLowShelfParametricEqualizerFilter")
@interface AKLowShelfParametricEqualizerFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Corner frequency.
@property (nonatomic) double cornerFrequency;
/// Amount at which the corner frequency value shall be increased or decreased. A value of 1 is a flat response.
@property (nonatomic) double gain;
/// Q of the filter. sqrt(0.5) is no resonance.
@property (nonatomic) double q;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this equalizer node
/// \param input Input node to process
///
/// \param cornerFrequency Corner frequency.
///
/// \param gain Amount at which the corner frequency value shall be increased or decreased.
/// A value of 1 is a flat response.
///
/// \param q Q of the filter. sqrt(0.5) is no resonance.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cornerFrequency:(double)cornerFrequency gain:(double)gain q:(double)q OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A version of AKInstrument specifically targeted to instruments that
/// should be triggerable via MIDI or sequenced with the sequencer.
SWIFT_CLASS("_TtC8AudioKit10AKMIDINode")
@interface AKMIDINode : AKNode
/// MIDI Input
@property (nonatomic) MIDIEndpointRef midiIn;
/// Name of the instrument
@property (nonatomic, copy) NSString * _Nonnull name;
/// Initialize the MIDI node
/// \param node A polyphonic node that will be triggered via MIDI
///
- (nonnull instancetype)initWithNode:(AKPolyphonicNode * _Nonnull)node OBJC_DESIGNATED_INITIALIZER;
/// Enable MIDI input from a given MIDI client
/// This is not in the init function because it must be called AFTER you start audiokit
/// \param midiClient A refernce to the midi client
///
/// \param name Name to connect with
///
- (void)enableMIDI:(MIDIClientRef)midiClient name:(NSString * _Nonnull)name;
/// Handle MIDI commands that come in externally
/// \param noteNumber MIDI Note number
///
/// \param velocity MIDI velocity
///
/// \param channel MIDI channel
///
- (void)receivedMIDINoteOn:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@class AVAudioUnitSampler;
/// Sampler audio generation.
/// <ol>
/// <li>
/// init the audio unit like this: var sampler = AKSampler()
/// </li>
/// <li>
/// load a sound a file: sampler.loadWav(“path/to/your/sound/file/in/app/bundle”) (without wav extension)
/// </li>
/// <li>
/// connect to the engine: AudioKit.output = sampler
/// </li>
/// <li>
/// start the engine AudioKit.start()
/// </li>
/// </ol>
SWIFT_CLASS("_TtC8AudioKit9AKSampler")
@interface AKSampler : AKNode
/// Sampler AV Audio Unit
@property (nonatomic, strong) AVAudioUnitSampler * _Nonnull samplerUnit;
/// Transposition amount in semitones, from -24 to 24, Default: 0
@property (nonatomic) double tuning;
/// Initialize the sampler node
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Load a wav file
/// \param file Name of the file without an extension (assumed to be accessible from the bundle)
///
- (BOOL)loadWav:(NSString * _Nonnull)file error:(NSError * _Nullable * _Nullable)error;
/// Load an EXS24 sample data file
/// \param file Name of the EXS24 file without the .exs extension
///
- (BOOL)loadEXS24:(NSString * _Nonnull)file error:(NSError * _Nullable * _Nullable)error;
/// Load an AKAudioFile
/// \param file an AKAudioFile
///
- (BOOL)loadAudioFile:(AKAudioFile * _Nonnull)file error:(NSError * _Nullable * _Nullable)error;
/// Load an array of AKAudioFiles
/// If a file name ends with a note name (ex: “violinC3.wav”)
/// The file will be set to this note
/// Handy to set multi-sampled instruments or a drum kit…
/// \param file an array of AKAudioFile
///
- (BOOL)loadAudioFiles:(NSArray<AKAudioFile *> * _Nonnull)files error:(NSError * _Nullable * _Nullable)error;
/// Load a file path
/// \param filePath Name of the file with the extension
///
- (void)loadPath:(NSString * _Nonnull)filePath;
/// Output Amplitude. Range: -90.0 -> +12 db, Default: 0 db
@property (nonatomic) double amplitude;
/// Normalized Output Volume. Range: 0 -> 1, Default: 1
@property (nonatomic) double volume;
/// Pan. Range: -1 -> 1, Default: 0
@property (nonatomic) double pan;
/// Play a MIDI Note
/// \param noteNumber MIDI Note Number to play
///
/// \param velocity MIDI Velocity
///
/// \param channel MIDI Channnel
///
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Stop a MIDI Note
/// \param noteNumber MIDI Note Number to stop
///
/// \param channel MIDI Channnel
///
- (void)stopWithNoteNumber:(uint8_t)noteNumber channel:(uint8_t)channel;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// MIDI receiving Sampler
/// Be sure to enableMIDI if you want to receive messages
SWIFT_CLASS("_TtC8AudioKit13AKMIDISampler")
@interface AKMIDISampler : AKSampler
/// MIDI Input
@property (nonatomic) MIDIEndpointRef midiIn;
/// Name of the instrument
@property (nonatomic, copy) NSString * _Nonnull name;
/// Enable MIDI input from a given MIDI client
/// This is not in the init function because it must be called AFTER you start AudioKit
/// \param midiClient A refernce to the MIDI client
///
/// \param name Name to connect with
///
- (void)enableMIDI:(MIDIClientRef)midiClient name:(NSString * _Nonnull)name;
/// Handle MIDI commands that come in externally
/// \param noteNumber MIDI Note number
///
/// \param velocity MIDI velocity
///
/// \param channel MIDI channel
///
- (void)receivedMIDINoteOnNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Handle MIDI CC that come in externally
/// \param controller MIDI CC number
///
/// \param value MIDI CC value
///
/// \param channel MIDI CC channel
///
- (void)midiCC:(uint8_t)controller value:(uint8_t)value channel:(uint8_t)channel;
/// Start a note
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity channel:(uint8_t)channel;
/// Stop a note
- (void)stopWithNoteNumber:(uint8_t)noteNumber channel:(uint8_t)channel;
/// Discard all virtual ports
- (void)destroyEndpoint;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
/// Physical model of a 4 course mandolin
SWIFT_CLASS("_TtC8AudioKit10AKMandolin")
@interface AKMandolin : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Detuning of second string in the course (1=Unison (deault), 2=Octave)
@property (nonatomic) double detune;
/// Relative size of the mandoline (Default: 1, ranges ~ 0.5 - 2)
@property (nonatomic) double bodySize;
/// Initialize the 4 course (string-pair) Mandolin
/// \param detune Detuning of second string in the course (1=Unison (deault), 2=Octave)
///
/// \param bodySize Relative size of the mandoline (Default: 1, ranges ~ 0.5 - 2)
///
- (nonnull instancetype)initWithDetune:(double)detune bodySize:(double)bodySize OBJC_DESIGNATED_INITIALIZER;
/// Virutally pressing fingers on all the strings of the mandolin
/// \param course1Note MIDI note number for course 1
///
/// \param course2Note MIDI note number for course 2
///
/// \param course3Note MIDI note number for course 3
///
/// \param course4Note MIDI note number for course 4
///
- (void)prepareChord:(uint8_t)course1Note :(uint8_t)course2Note :(uint8_t)course3Note :(uint8_t)course4Note;
/// Pressing a finger on a course of the mandolin
/// \param noteNumber MIDI note number of fretted note
///
/// \param course Which set of strings to press
///
- (void)fretWithNoteNumber:(uint8_t)noteNumber course:(NSInteger)course;
/// Pluck an individual course
/// \param course Which set of string parirs to pluck
///
/// \param position Position lengthwise along the string to pluck (0 - 1)
///
/// \param velocity MIDI Velocity as an amplitude of the pluck (0 - 127)
///
- (void)pluckWithCourse:(NSInteger)course position:(double)position velocity:(uint8_t)velocity;
/// Strum all strings of the mandolin
/// \param position Position lengthwise along the string to pluck (0 - 1)
///
/// \param velocity MIDI Velocity as an amplitude of the pluck (0 - 127)
///
- (void)strum:(double)position velocity:(uint8_t)velocity;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKMandolin (SWIFT_EXTENSION(AudioKit))
/// Large Resonant Mandolin
- (void)presetLargeResonantMandolin;
/// Preset with Strings pairs separated by an octave
- (void)presetOctaveUpMandolin;
/// A mandolin that sounds a bit like an electric guitar
- (void)presetElectricGuitarMandolin;
/// Small, distorted mandolin
- (void)presetSmallBodiedDistortedMandolin;
/// A strangly tuned, psychedelic mandolin
- (void)presetAcidMandolin;
/// Print out current values in case you want to save it as a preset
- (void)printCurrentValuesAsPreset;
@end
/// Metal Bar Physical Model
SWIFT_CLASS("_TtC8AudioKit10AKMetalBar")
@interface AKMetalBar : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Boundary condition at left end of bar. 1 = clamped, 2 = pivoting, 3 = free
@property (nonatomic) double leftBoundaryCondition;
/// Boundary condition at right end of bar. 1 = clamped, 2 = pivoting, 3 = free
@property (nonatomic) double rightBoundaryCondition;
/// 30db decay time (in seconds).
@property (nonatomic) double decayDuration;
/// Speed of scanning the output location.
@property (nonatomic) double scanSpeed;
/// Position along bar that strike occurs.
@property (nonatomic) double position;
/// Normalized strike velocity
@property (nonatomic) double strikeVelocity;
/// Spatial width of strike.
@property (nonatomic) double strikeWidth;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this Bar node
/// \param leftBoundaryCondition Boundary condition at left end of bar. 1 = clamped, 2 = pivoting, 3 = free
///
/// \param rightBoundaryCondition Boundary condition at right end of bar. 1 = clamped, 2 = pivoting, 3 = free
///
/// \param decayDuration 30db decay time (in seconds).
///
/// \param scanSpeed Speed of scanning the output location.
///
/// \param position Position along bar that strike occurs.
///
/// \param strikeVelocity Normalized strike velocity
///
/// \param strikeWidth Spatial width of strike.
///
/// \param stiffness Dimensionless stiffness parameter
///
/// \param highFrequencyDamping High-frequency loss parameter. Keep this small
///
- (nonnull instancetype)initWithLeftBoundaryCondition:(double)leftBoundaryCondition rightBoundaryCondition:(double)rightBoundaryCondition decayDuration:(double)decayDuration scanSpeed:(double)scanSpeed position:(double)position strikeVelocity:(double)strikeVelocity strikeWidth:(double)strikeWidth stiffness:(double)stiffness highFrequencyDamping:(double)highFrequencyDamping OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
- (void)trigger;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Operation-based generator
SWIFT_CLASS("_TtC8AudioKit20AKOperationGenerator")
@interface AKOperationGenerator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Sporth language snippet
@property (nonatomic, copy) NSString * _Nonnull sporth;
/// Parameters for changing internal operations
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull parameters;
/// Initialize this generator node with a generic sporth stack and a triggering flag
/// \param sporth String of valid Sporth code
///
- (nonnull instancetype)initWithSporth:(NSString * _Nonnull)sporth customUgens:(NSArray<AKCustomUgen *> * _Nonnull)customUgens OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with current parameters
- (void)trigger:(NSInteger)triggerNumber;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Restart from scratch
- (void)restart;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Useful metronome class that you can utilize for your own projects
SWIFT_CLASS("_TtC8AudioKit11AKMetronome")
@interface AKMetronome : AKOperationGenerator
/// BPM
@property (nonatomic) double tempo;
/// Number of clicks in one measure
@property (nonatomic) NSInteger subdivision;
/// First click sound frequency
@property (nonatomic) double frequency1;
/// Non-first click sound frequency
@property (nonatomic) double frequency2;
/// The value of the current beat
@property (nonatomic) NSInteger currentBeat;
/// Function to perform on every tick
@property (nonatomic, copy) void (^ _Nonnull callback)(void);
/// Initialize the metronome
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Reset the metronome
- (void)reset;
- (nonnull instancetype)initWithSporth:(NSString * _Nonnull)sporth customUgens:(NSArray<AKCustomUgen *> * _Nonnull)customUgens SWIFT_UNAVAILABLE;
@end
/// Audio from the standard input
SWIFT_CLASS("_TtC8AudioKit12AKMicrophone")
@interface AKMicrophone : AKNode
/// Output Volume (Default 1)
@property (nonatomic) double volume;
/// Set the actual microphone device
- (BOOL)setDevice:(AKDevice * _Nonnull)device error:(NSError * _Nullable * _Nullable)error;
/// Determine if the microphone is currently on.
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the microphone
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s Mixer Node
SWIFT_CLASS("_TtC8AudioKit7AKMixer")
@interface AKMixer : AKNode
/// Output Volume (Default 1)
@property (nonatomic) double volume;
/// Determine if the mixer is serving any output or if it is stopped.
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the mixer node with no inputs, to be connected later
/// \param inputs A varaiadic list of AKNodes
///
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Initialize the mixer node with multiple inputs
/// \param inputs An array of AKNodes
///
- (nonnull instancetype)init:(NSArray<AKNode *> * _Nonnull)inputs OBJC_DESIGNATED_INITIALIZER;
/// Connnect another input after initialization
/// \param input AKNode to connect
///
- (void)connect:(AKNode * _Nullable)input;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A modal resonance filter used for modal synthesis. Plucked and bell sounds
/// can be created using passing an impulse through a combination of modal
/// filters.
SWIFT_CLASS("_TtC8AudioKit22AKModalResonanceFilter")
@interface AKModalResonanceFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Resonant frequency of the filter.
@property (nonatomic) double frequency;
/// Quality factor of the filter. Roughly equal to Q/frequency.
@property (nonatomic) double qualityFactor;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param frequency Resonant frequency of the filter.
///
/// \param qualityFactor Quality factor of the filter. Roughly equal to Q/frequency.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input frequency:(double)frequency qualityFactor:(double)qualityFactor OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Moog Ladder is an new digital implementation of the Moog ladder filter based
/// on the work of <NAME>, described in the paper “Non-Linear Digital
/// Implementation of the Moog Ladder Filter” (Proceedings of DaFX04, Univ of
/// Napoli). This implementation is probably a more accurate digital
/// representation of the original analogue filter.
SWIFT_CLASS("_TtC8AudioKit12AKMoogLadder")
@interface AKMoogLadder : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Filter cutoff frequency.
@property (nonatomic) double cutoffFrequency;
/// Resonance, generally < 1, but not limited to it. Higher than 1 resonance values might cause aliasing,
/// analogue synths generally allow resonances to be above 1.
@property (nonatomic) double resonance;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Filter cutoff frequency.
///
/// \param resonance Resonance, generally < 1, but not limited to it.
/// Higher than 1 resonance values might cause aliasing,
/// analogue synths generally allow resonances to be above 1.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency resonance:(double)resonance OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKMoogLadder (SWIFT_EXTENSION(AudioKit))
/// Blurry, foggy filter
- (void)presetFogMoogLadder;
/// Dull noise filter
- (void)presetDullNoiseMoogLadder;
/// Print out current values in case you want to save it as a preset
- (void)printCurrentValuesAsPreset;
@end
/// This is an oscillator with linear interpolation that is capable of morphing
/// between an arbitrary number of wavetables.
SWIFT_CLASS("_TtC8AudioKit20AKMorphingOscillator")
@interface AKMorphingOscillator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// In cycles per second, or Hz.
@property (nonatomic) double frequency;
/// Output Amplitude.
@property (nonatomic) double amplitude;
/// Index of the wavetable to use (fractional are okay).
@property (nonatomic) double index;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is an oscillator with linear interpolation that is capable of morphing
/// between an arbitrary number of wavetables.
SWIFT_CLASS("_TtC8AudioKit24AKMorphingOscillatorBank")
@interface AKMorphingOscillatorBank : AKPolyphonicNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Index of the wavetable to use (fractional are okay).
@property (nonatomic) double index;
/// Attack time
@property (nonatomic) double attackDuration;
/// Decay time
@property (nonatomic) double decayDuration;
/// Sustain Level
@property (nonatomic) double sustainLevel;
/// Release time
@property (nonatomic) double releaseDuration;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
/// stops all notes
- (void)reset;
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity frequency:(double)frequency;
/// Function to stop or bypass the node, both are equivalent
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Plot the FFT output from any node in an signal processing graph
SWIFT_CLASS("_TtC8AudioKit13AKNodeFFTPlot")
@interface AKNodeFFTPlot : EZAudioPlot <EZAudioFFTDelegate>
/// The node whose output to graph
@property (nonatomic, strong) AKNode * _Nullable node;
/// Required coder-based initialization (for use with Interface Builder)
/// \param coder NSCoder
///
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// Initialize the plot with the output from a given node and optional plot size
/// \param input AKNode from which to get the plot data
///
/// \param width Width of the view
///
/// \param height Height of the view
///
- (nonnull instancetype)init:(AKNode * _Nullable)input frame:(CGRect)frame bufferSize:(NSInteger)bufferSize OBJC_DESIGNATED_INITIALIZER;
/// Callback function for FFT data:
/// \param fft EZAudioFFT Reference
///
/// \param updatedWithFFTData A pointer to a c-style array of floats
///
/// \param bufferSize Number of elements in the FFT Data array
///
- (void)fft:(EZAudioFFT * _Null_unspecified)fft updatedWithFFTData:(float * _Nonnull)fftData bufferSize:(vDSP_Length)bufferSize;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
/// Plot the output from any node in an signal processing graph
SWIFT_CLASS("_TtC8AudioKit16AKNodeOutputPlot")
@interface AKNodeOutputPlot : EZAudioPlot
/// The node whose output to graph
@property (nonatomic, strong) AKNode * _Nullable node;
/// Required coder-based initialization (for use with Interface Builder)
/// \param coder NSCoder
///
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// Initialize the plot with the output from a given node and optional plot size
/// \param input AKNode from which to get the plot data
///
/// \param width Width of the view
///
/// \param height Height of the view
///
- (nonnull instancetype)init:(AKNode * _Nullable)input frame:(CGRect)frame bufferSize:(NSInteger)bufferSize OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
/// Simple audio recorder class
SWIFT_CLASS("_TtC8AudioKit14AKNodeRecorder")
@interface AKNodeRecorder : NSObject
/// True if we are recording.
@property (nonatomic, readonly) BOOL isRecording;
/// An optional duration for the recording to auto-stop when reached
@property (nonatomic) double durationToRecord;
/// Duration of recording
@property (nonatomic, readonly) double recordedDuration;
/// return the AKAudioFile for reading
@property (nonatomic, readonly, strong) AKAudioFile * _Nullable audioFile;
/// Initialize the node recorder
/// Recording buffer size is defaulted to be AKSettings.bufferLength
/// You can set a different value by setting an AKSettings.recordingBufferLength
/// \param node Node to record from
///
/// \param file Audio file to record to
///
- (nullable instancetype)initWithNode:(AKNode * _Nullable)node file:(AKAudioFile * _Nullable)file error:(NSError * _Nullable * _Nullable)error OBJC_DESIGNATED_INITIALIZER;
/// Start recording
- (BOOL)recordAndReturnError:(NSError * _Nullable * _Nullable)error;
/// Stop recording
- (void)stop;
/// Reset the AKAudioFile to clear previous recordings
- (BOOL)resetAndReturnError:(NSError * _Nullable * _Nullable)error;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
/// Operation-based effect
SWIFT_CLASS("_TtC8AudioKit17AKOperationEffect")
@interface AKOperationEffect : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Parameters for changing internal operations
@property (nonatomic, copy) NSArray<NSNumber *> * _Nonnull parameters;
/// Initialize the effect with an input and a valid Sporth string
/// \param input AKNode to use for processing
///
/// \param sporth String of valid Sporth code
///
- (nonnull instancetype)init:(AKNode * _Nullable)input sporth:(NSString * _Nonnull)sporth customUgens:(NSArray<AKCustomUgen *> * _Nonnull)customUgens OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Reads from the table sequentially and repeatedly at given frequency. Linear
/// interpolation is applied for table look up from internal phase values.
SWIFT_CLASS("_TtC8AudioKit12AKOscillator")
@interface AKOscillator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// In cycles per second, or Hz.
@property (nonatomic) double frequency;
/// Output Amplitude.
@property (nonatomic) double amplitude;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Reads from the table sequentially and repeatedly at given frequency. Linear
/// interpolation is applied for table look up from internal phase values.
SWIFT_CLASS("_TtC8AudioKit16AKOscillatorBank")
@interface AKOscillatorBank : AKPolyphonicNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Attack time
@property (nonatomic) double attackDuration;
/// Decay time
@property (nonatomic) double decayDuration;
/// Sustain Level
@property (nonatomic) double sustainLevel;
/// Release time
@property (nonatomic) double releaseDuration;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity frequency:(double)frequency;
/// Function to stop or bypass the node, both are equivalent
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Wrapper class for plotting audio from the final mix in a waveform plot
SWIFT_CLASS("_TtC8AudioKit20AKOutputWaveformPlot")
@interface AKOutputWaveformPlot : EZAudioPlot
/// Initialize the plot in a frame
/// \param frame CGRect in which to draw the plot
///
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// Initialize the plot in a frame with a different buffer size
/// \param frame CGRect in which to draw the plot
///
/// \param bufferSize size of the buffer - raise this number if the device struggles with generating the waveform
///
- (nonnull instancetype)initWithFrame:(CGRect)frame bufferSize:(NSInteger)bufferSize OBJC_DESIGNATED_INITIALIZER;
/// Required coder-based initialization (for use with Interface Builder)
/// \param coder NSCoder
///
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// Create a View with the plot (usually for playgrounds)
/// \param width Width of the view
///
/// \param height Height of the view
///
+ (NSView * _Nonnull)createViewWithWidth:(CGFloat)width height:(CGFloat)height SWIFT_WARN_UNUSED_RESULT;
@end
/// Pulse-Width Modulating Oscillator
SWIFT_CLASS("_TtC8AudioKit15AKPWMOscillator")
@interface AKPWMOscillator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// In cycles per second, or Hz.
@property (nonatomic) double frequency;
/// Output amplitude
@property (nonatomic) double amplitude;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Duty cycle width (range 0-1).
@property (nonatomic) double pulseWidth;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the oscillator with defaults
/// \param frequency In cycles per second, or Hz.
///
- (nonnull instancetype)init;
/// Initialize this oscillator node
/// \param frequency In cycles per second, or Hz.
///
/// \param amplitude Output amplitude
///
/// \param pulseWidth Duty cycle width (range 0-1).
///
/// \param detuningOffset Frequency offset in Hz.
///
/// \param detuningMultiplier Frequency detuning multiplier
///
- (nonnull instancetype)initWithFrequency:(double)frequency amplitude:(double)amplitude pulseWidth:(double)pulseWidth detuningOffset:(double)detuningOffset detuningMultiplier:(double)detuningMultiplier OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Pulse-Width Modulating Oscillator Bank
SWIFT_CLASS("_TtC8AudioKit19AKPWMOscillatorBank")
@interface AKPWMOscillatorBank : AKPolyphonicNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Duty cycle width (range 0-1).
@property (nonatomic) double pulseWidth;
/// Attack time
@property (nonatomic) double attackDuration;
/// Decay time
@property (nonatomic) double decayDuration;
/// Sustain Level
@property (nonatomic) double sustainLevel;
/// Release time
@property (nonatomic) double releaseDuration;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Initialize the oscillator with defaults
/// \param frequency In cycles per second, or Hz.
///
- (nonnull instancetype)init;
/// Initialize this oscillator node
/// \param pulseWidth Duty cycle width (range 0-1).
///
/// \param attackDuration Attack time
///
/// \param decayDuration Decay time
///
/// \param sustainLevel Sustain Level
///
/// \param releaseDuration Release time
///
/// \param detuningOffset Frequency offset in Hz.
///
/// \param detuningMultiplier Frequency detuning multiplier
///
- (nonnull instancetype)initWithPulseWidth:(double)pulseWidth attackDuration:(double)attackDuration decayDuration:(double)decayDuration sustainLevel:(double)sustainLevel releaseDuration:(double)releaseDuration detuningOffset:(double)detuningOffset detuningMultiplier:(double)detuningMultiplier OBJC_DESIGNATED_INITIALIZER;
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity frequency:(double)frequency;
/// Function to stop or bypass the node, both are equivalent
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Stereo Panner
SWIFT_CLASS("_TtC8AudioKit8AKPanner")
@interface AKPanner : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Panning. A value of -1 is hard left, and a value of 1 is hard right, and 0 is center.
@property (nonatomic) double pan;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this panner node
/// \param input Input node to process
///
/// \param pan Panning. A value of -1 is hard left, and a value of 1 is hard right, and 0 is center.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input pan:(double)pan OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s PeakLimiter Audio Unit
SWIFT_CLASS("_TtC8AudioKit13AKPeakLimiter")
@interface AKPeakLimiter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Attack Time (Secs) ranges from 0.001 to 0.03 (Default: 0.012)
@property (nonatomic) double attackTime;
/// Decay Time (Secs) ranges from 0.001 to 0.06 (Default: 0.024)
@property (nonatomic) double decayTime;
/// Pre Gain (dB) ranges from -40 to 40 (Default: 0)
@property (nonatomic) double preGain;
/// Dry/Wet Mix (Default 100)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the peak limiter node
/// \param input Input node to process
///
/// \param attackTime Attack Time (Secs) ranges from 0.001 to 0.03 (Default: 0.012)
///
/// \param decayTime Decay Time (Secs) ranges from 0.001 to 0.06 (Default: 0.024)
///
/// \param preGain Pre Gain (dB) ranges from -40 to 40 (Default: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input attackTime:(double)attackTime decayTime:(double)decayTime preGain:(double)preGain OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is an implementation of Zoelzer’s parametric equalizer filter.
SWIFT_CLASS("_TtC8AudioKit34AKPeakingParametricEqualizerFilter")
@interface AKPeakingParametricEqualizerFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Center frequency.
@property (nonatomic) double centerFrequency;
/// Amount at which the center frequency value shall be increased or decreased. A value of 1 is a flat response.
@property (nonatomic) double gain;
/// Q of the filter. sqrt(0.5) is no resonance.
@property (nonatomic) double q;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this equalizer node
/// \param input Input node to process
///
/// \param centerFrequency Center frequency.
///
/// \param gain Amount the center frequency value shall be increased or decreased. A value of 1 is a flat response.
///
/// \param q Q of the filter. sqrt(0.5) is no resonance.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input centerFrequency:(double)centerFrequency gain:(double)gain q:(double)q OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A class to periodically perform a callback
SWIFT_CLASS("_TtC8AudioKit18AKPeriodicFunction")
@interface AKPeriodicFunction : AKOperationGenerator
/// Repeat this loop at a given period with a code block
/// \param every Period, or interval between block executions
///
/// \param handler Code block to execute
///
- (nonnull instancetype)initWithEvery:(double)dur handler:(void (^ _Nonnull)(void))handler OBJC_DESIGNATED_INITIALIZER;
/// Repeat this loop at a given frequency with a code block
/// \param frequency Period, or interval between block executions
///
/// \param handler Code block to execute
///
- (nonnull instancetype)initWithFrequency:(double)frequency handler:(void (^ _Nonnull)(void))handler;
- (nonnull instancetype)initWithSporth:(NSString * _Nonnull)sporth customUgens:(NSArray<AKCustomUgen *> * _Nonnull)customUgens SWIFT_UNAVAILABLE;
@end
/// Phase Distortion Oscillator
SWIFT_CLASS("_TtC8AudioKit27AKPhaseDistortionOscillator")
@interface AKPhaseDistortionOscillator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// In cycles per second, or Hz.
@property (nonatomic) double frequency;
/// Output amplitude
@property (nonatomic) double amplitude;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Duty cycle width (range -1 - 1).
@property (nonatomic) double phaseDistortion;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Phase Distortion Oscillator Bank
SWIFT_CLASS("_TtC8AudioKit31AKPhaseDistortionOscillatorBank")
@interface AKPhaseDistortionOscillatorBank : AKPolyphonicNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Duty cycle width (range -1 - 1).
@property (nonatomic) double phaseDistortion;
/// Attack time
@property (nonatomic) double attackDuration;
/// Decay time
@property (nonatomic) double decayDuration;
/// Sustain Level
@property (nonatomic) double sustainLevel;
/// Release time
@property (nonatomic) double releaseDuration;
/// Frequency offset in Hz.
@property (nonatomic) double detuningOffset;
/// Frequency detuning multiplier
@property (nonatomic) double detuningMultiplier;
/// Initialize the oscillator with defaults
- (nonnull instancetype)init;
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity frequency:(double)frequency;
/// Function to stop or bypass the node, both are equivalent
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// This is a phase locked vocoder. It has the ability to play back an audio
/// file loaded into an ftable like a sampler would. Unlike a typical sampler,
/// mincer allows time and pitch to be controlled separately.
SWIFT_CLASS("_TtC8AudioKit20AKPhaseLockedVocoder")
@interface AKPhaseLockedVocoder : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Position in time. When non-changing it will do a spectral freeze of a the current point in time.
@property (nonatomic) double position;
/// Amplitude.
@property (nonatomic) double amplitude;
/// Pitch ratio. A value of 1 is normal, 2 is double speed, 0.5 is halfspeed, etc.
@property (nonatomic) double pitchRatio;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this Phase-Locked Vocoder node
/// \param audioFileURL Location of the audio file to use.
///
/// \param position Position in time. When non-changing it will do a spectral freeze of a the current point in time.
///
/// \param amplitude Amplitude.
///
/// \param pitchRatio Pitch ratio. A value of 1 is normal, 2 is double speed, 0.5 is halfspeed, etc.
///
- (nonnull instancetype)initWithFile:(AVAudioFile * _Nonnull)file position:(double)position amplitude:(double)amplitude pitchRatio:(double)pitchRatio OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A stereo phaser This is a stereo phaser, generated from Faust code taken
/// from the Guitarix project.
SWIFT_CLASS("_TtC8AudioKit8AKPhaser")
@interface AKPhaser : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Notch Minimum Frequency
@property (nonatomic) double notchMinimumFrequency;
/// Notch Maximum Frequency
@property (nonatomic) double notchMaximumFrequency;
/// Between 10 and 5000
@property (nonatomic) double notchWidth;
/// Between 1.1 and 4
@property (nonatomic) double notchFrequency;
/// 1 or 0
@property (nonatomic) double vibratoMode;
/// Between 0 and 1
@property (nonatomic) double depth;
/// Between 0 and 1
@property (nonatomic) double feedback;
/// 1 or 0
@property (nonatomic) double inverted;
/// Between 24 and 360
@property (nonatomic) double lfoBPM;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this phaser node
/// \param input Input node to process
///
/// \param notchMinimumFrequency Notch Minimum Frequency
///
/// \param notchMaximumFrequency Notch Maximum Frequency
///
/// \param notchWidth Between 10 and 5000
///
/// \param notchFrequency Between 1.1 and 4
///
/// \param vibratoMode 1 or 0
///
/// \param depth Between 0 and 1
///
/// \param feedback Between 0 and 1
///
/// \param inverted 1 or 0
///
/// \param lfoBPM Between 24 and 360
///
- (nonnull instancetype)init:(AKNode * _Nullable)input notchMinimumFrequency:(double)notchMinimumFrequency notchMaximumFrequency:(double)notchMaximumFrequency notchWidth:(double)notchWidth notchFrequency:(double)notchFrequency vibratoMode:(double)vibratoMode depth:(double)depth feedback:(double)feedback inverted:(double)inverted lfoBPM:(double)lfoBPM OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Faust-based pink noise generator
SWIFT_CLASS("_TtC8AudioKit11AKPinkNoise")
@interface AKPinkNoise : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Amplitude. (Value between 0-1).
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this noise node
/// \param amplitude Amplitude. (Value between 0-1).
///
- (nonnull instancetype)initWithAmplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Faust-based pitch shfiter
SWIFT_CLASS("_TtC8AudioKit14AKPitchShifter")
@interface AKPitchShifter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Pitch shift (in semitones)
@property (nonatomic) double shift;
/// Window size (in samples)
@property (nonatomic) double windowSize;
/// Crossfade (in samples)
@property (nonatomic) double crossfade;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this pitchshifter node
/// \param input Input node to process
///
/// \param shift Pitch shift (in semitones)
///
/// \param windowSize Window size (in samples)
///
/// \param crossfade Crossfade (in samples)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input shift:(double)shift windowSize:(double)windowSize crossfade:(double)crossfade OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Class to handle updating via CADisplayLink
SWIFT_CLASS("_TtC8AudioKit16AKPlaygroundLoop")
@interface AKPlaygroundLoop : NSObject
/// Repeat this loop at a given period with a code block
/// \param every Period, or interval between block executions
///
/// \param handler Code block to execute
///
- (nonnull instancetype)initWithEvery:(double)dur handler:(void (^ _Nonnull)(void))handler OBJC_DESIGNATED_INITIALIZER;
/// Repeat this loop at a given frequency with a code block
/// \param frequency Frequency of block executions in Hz
///
/// \param handler Code block to execute
///
- (nonnull instancetype)initWithFrequency:(double)frequency handler:(void (^ _Nonnull)(void))handler OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit16AKPlaygroundView")
@interface AKPlaygroundView : NSView
@property (nonatomic) CGFloat elementHeight;
@property (nonatomic) NSInteger spacing;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)init;
- (void)setup;
- (void)drawRect:(NSRect)dirtyRect;
- (NSTextField * _Nonnull)addTitle:(NSString * _Nonnull)text SWIFT_WARN_UNUSED_RESULT;
- (AKLabel * _Nonnull)addLabel:(NSString * _Nonnull)text SWIFT_WARN_UNUSED_RESULT;
- (void)addSubview:(NSView * _Nullable)subview;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@end
/// Karplus-Strong plucked string instrument.
SWIFT_CLASS("_TtC8AudioKit15AKPluckedString")
@interface AKPluckedString : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.
@property (nonatomic) double frequency;
/// Amplitude
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the pluck with defaults
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Initialize this pluck node
/// \param frequency Variable frequency. Values less than the initial frequency will be
/// doubled until it is greater than that.
///
/// \param amplitude Amplitude
///
/// \param lowestFrequency This frequency is used to allocate all the buffers needed for the delay.
/// This should be the lowest frequency you plan on using.
///
- (nonnull instancetype)initWithFrequency:(double)frequency amplitude:(double)amplitude lowestFrequency:(double)lowestFrequency OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
/// <ul>
/// <li>
/// frequency: Frequency in Hz
/// </li>
/// <li>
/// amplitude amplitude: Volume
/// </li>
/// </ul>
- (void)triggerWithFrequency:(double)frequency amplitude:(double)amplitude;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit18AKPresetLoaderView")
@interface AKPresetLoaderView : NSView
- (void)mouseDown:(NSEvent * _Nonnull)theEvent;
- (nonnull instancetype)initWithPresets:(NSArray<NSString *> * _Nonnull)presets frame:(CGRect)frame callback:(void (^ _Nonnull)(NSString * _Nonnull))callback OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)drawRect:(CGRect)rect;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit16AKPropertySlider")
@interface AKPropertySlider : NSView
- (BOOL)acceptsFirstMouse:(NSEvent * _Nullable)theEvent SWIFT_WARN_UNUSED_RESULT;
@property (nonatomic) double value;
@property (nonatomic) double minimum;
@property (nonatomic) double maximum;
@property (nonatomic, copy) NSString * _Nonnull property;
- (nonnull instancetype)initWithProperty:(NSString * _Nonnull)property format:(NSString * _Nonnull)format value:(double)value minimum:(double)minimum maximum:(double)maximum color:(NSColor * _Nonnull)color frame:(CGRect)frame callback:(void (^ _Nonnull)(double))callback OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
- (void)mouseDown:(NSEvent * _Nonnull)theEvent;
- (void)mouseDragged:(NSEvent * _Nonnull)theEvent;
- (double)randomize SWIFT_WARN_UNUSED_RESULT;
- (void)drawRect:(NSRect)dirtyRect;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect SWIFT_UNAVAILABLE;
@end
/// The output for reson appears to be very hot, so take caution when using this
/// module.
SWIFT_CLASS("_TtC8AudioKit16AKResonantFilter")
@interface AKResonantFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Center frequency of the filter, or frequency position of the peak response.
@property (nonatomic) double frequency;
/// Bandwidth of the filter.
@property (nonatomic) double bandwidth;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param frequency Center frequency of the filter, or frequency position of the peak response.
///
/// \param bandwidth Bandwidth of the filter.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input frequency:(double)frequency bandwidth:(double)bandwidth OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
SWIFT_CLASS("_TtC8AudioKit30AKResourcesAudioFileLoaderView")
@interface AKResourcesAudioFileLoaderView : NSView
/// Handle click
- (void)mouseDown:(NSEvent * _Nonnull)theEvent;
/// Initialize the resource loader
- (nonnull instancetype)initWithPlayer:(AKAudioPlayer * _Nonnull)player filenames:(NSArray<NSString *> * _Nonnull)filenames frame:(CGRect)frame;
/// Draw the resource loader
- (void)drawRect:(CGRect)rect;
- (nonnull instancetype)initWithFrame:(NSRect)frameRect OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@end
/// AudioKit version of Apple’s Reverb Audio Unit
SWIFT_CLASS("_TtC8AudioKit8AKReverb")
@interface AKReverb : AKNode
/// Dry/Wet Mix (Default 0.5)
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the reverb node
/// \param input AKNode to reverberate
///
/// \param dryWetMix Amount of processed signal (Default: 0.5, Minimum: 0, Maximum: 1)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input dryWetMix:(double)dryWetMix OBJC_DESIGNATED_INITIALIZER;
/// Load an Apple Factory Preset
- (void)loadFactoryPreset:(AVAudioUnitReverbPreset)preset;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// STK RhodesPiano
SWIFT_CLASS("_TtC8AudioKit13AKRhodesPiano")
@interface AKRhodesPiano : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.
@property (nonatomic) double frequency;
/// Amplitude
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the mandolin with defaults
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Initialize the STK RhodesPiano model
/// \param frequency Variable frequency. Values less than the initial frequency will be doubled until it is
/// greater than that.
///
/// \param amplitude Amplitude
///
- (nonnull instancetype)initWithFrequency:(double)frequency amplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
/// \param frequency Frequency in Hz
///
/// \param amplitude amplitude Volume
///
- (void)triggerWithFrequency:(double)frequency amplitude:(double)amplitude;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s Ring Modulator from the Distortion Audio Unit
SWIFT_CLASS("_TtC8AudioKit15AKRingModulator")
@interface AKRingModulator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Frequency1 (Hertz) ranges from 0.5 to 8000 (Default: 100)
@property (nonatomic) double frequency1;
/// Frequency2 (Hertz) ranges from 0.5 to 8000 (Default: 100)
@property (nonatomic) double frequency2;
/// Ring Mod Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)
@property (nonatomic) double balance;
/// Mix (Normalized Value) ranges from 0 to 1 (Default: 1)
@property (nonatomic) double mix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic) BOOL isStarted;
/// Initialize the ring modulator node
/// \param input Input node to process
///
/// \param frequency1 Frequency1 (Hertz) ranges from 0.5 to 8000 (Default: 100)
///
/// \param frequency2 Frequency2 (Hertz) ranges from 0.5 to 8000 (Default: 100)
///
/// \param balance Balance (Normalized Value) ranges from 0 to 1 (Default: 0.5)
///
/// \param mix Mix (Normalized Value) ranges from 0 to 1 (Default: 1)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input frequency1:(double)frequency1 frequency2:(double)frequency2 balance:(double)balance mix:(double)mix OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Disconnect the node
- (void)disconnect;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Emulation of the Roland TB-303 filter
SWIFT_CLASS("_TtC8AudioKit19AKRolandTB303Filter")
@interface AKRolandTB303Filter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Cutoff frequency. (in Hertz)
@property (nonatomic) double cutoffFrequency;
/// Resonance, generally < 1, but not limited to it. Higher than 1 resonance values might cause aliasing,
/// analogue synths generally allow resonances to be above 1.
@property (nonatomic) double resonance;
/// Distortion. Value is typically 2.0; deviation from this can cause stability issues.
@property (nonatomic) double distortion;
/// Asymmetry of resonance. Value is between 0-1
@property (nonatomic) double resonanceAsymmetry;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param cutoffFrequency Cutoff frequency. (in Hertz)
///
/// \param resonance Resonance, generally < 1, but not limited to it.
/// Higher than 1 resonance values might cause aliasing,
/// analogue synths generally allow resonances to be above 1.
///
/// \param distortion Distortion. Value is typically 2.0; deviation from this can cause stability issues.
///
/// \param resonanceAsymmetry Asymmetry of resonance. Value is between 0-1
///
- (nonnull instancetype)init:(AKNode * _Nullable)input cutoffFrequency:(double)cutoffFrequency resonance:(double)resonance distortion:(double)distortion resonanceAsymmetry:(double)resonanceAsymmetry OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Wrapper class for plotting audio from the final mix in a rolling plot
SWIFT_CLASS("_TtC8AudioKit19AKRollingOutputPlot")
@interface AKRollingOutputPlot : EZAudioPlot
/// Useful to reconnect after connecting to Audiobus or IAA
- (void)reconnect;
/// Initialize the plot in a frame
/// \param frame CGRect in which to draw the plot
///
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
/// Initialize the plot in a frame with a different buffer size
/// \param frame CGRect in which to draw the plot
///
/// \param bufferSize size of the buffer - raise this number if the device struggles with generating the waveform
///
- (nonnull instancetype)initWithFrame:(CGRect)frame bufferSize:(NSInteger)bufferSize OBJC_DESIGNATED_INITIALIZER;
/// Required coder-based initialization (for use with Interface Builder)
/// \param coder NSCoder
///
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
/// Create a View with the plot (usually for playgrounds)
/// \param width Width of the view
///
/// \param height Height of the view
///
+ (NSView * _Nonnull)createViewWithWidth:(CGFloat)width height:(CGFloat)height SWIFT_WARN_UNUSED_RESULT;
@end
/// Audio player that loads a sample into memory
SWIFT_CLASS("_TtC8AudioKit14AKSamplePlayer")
@interface AKSamplePlayer : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// startPoint in samples - where to start playing the sample from
@property (nonatomic) uint32_t startPoint;
/// endPoint - this is where the sample will play to before stopping.
/// A value less than the start point will play the sample backwards.
@property (nonatomic) uint32_t endPoint;
/// playback rate - A value of 1 is normal, 2 is double speed, 0.5 is halfspeed, etc.
@property (nonatomic) double rate;
/// Volume - amplitude adjustment
@property (nonatomic) double volume;
/// Loop Enabled - if enabled, the sample will loop back to the startpoint when the endpoint is reached.
/// When disabled, the sample will play through once from startPoint to endPoint
@property (nonatomic) BOOL loopEnabled;
/// Number of sample in the audio stored in memory
@property (nonatomic, readonly) uint32_t size;
/// Position in the audio file from 0 - 1
@property (nonatomic, readonly) double normalizedPosition;
/// Position in the audio in samples, but represented as a double since
/// you could conceivably be at a non-integer sample
@property (nonatomic, readonly) double position;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this SamplePlayer node
- (nonnull instancetype)initWithFile:(AVAudioFile * _Nonnull)file startPoint:(uint32_t)startPoint endPoint:(uint32_t)endPoint rate:(double)rate volume:(double)volume completionHandler:(void (^ _Nonnull)(void))completionHandler OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
/// Play from a certain sample
- (void)playFrom:(uint32_t)from;
/// Play from a certain sample for a certain number of samples
- (void)playFrom:(uint32_t)from length:(uint32_t)length;
/// Play from a certain sample to an end sample
- (void)playFrom:(uint32_t)from to:(uint32_t)to;
/// Load a new audio file into memory
- (void)loadSoundWithFile:(AVAudioFile * _Nonnull)file;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AKSampler (SWIFT_EXTENSION(AudioKit))
@end
@interface AKSampler (SWIFT_EXTENSION(AudioKit))
/// Load a Bank from a SoundFont SF2 sample data file
/// \param file Name of the SoundFont SF2 file without the .sf2 extension
///
/// \param preset Number of the program to use
///
/// \param bank Number of the bank to use
///
- (BOOL)loadSoundFont:(NSString * _Nonnull)file preset:(NSInteger)preset bank:(NSInteger)bank error:(NSError * _Nullable * _Nullable)error;
/// Load a Melodic SoundFont SF2 sample data file
/// \param file Name of the SoundFont SF2 file without the .sf2 extension
///
/// \param preset Number of the program to use
///
- (BOOL)loadMelodicSoundFont:(NSString * _Nonnull)file preset:(NSInteger)preset error:(NSError * _Nullable * _Nullable)error;
/// Load a Percussive SoundFont SF2 sample data file
/// \param file Name of the SoundFont SF2 file without the .sf2 extension
///
/// \param preset Number of the program to use
///
- (BOOL)loadPercussiveSoundFont:(NSString * _Nonnull)file preset:(NSInteger)preset error:(NSError * _Nullable * _Nullable)error;
@end
@class AVAudioFormat;
enum BufferLength : NSInteger;
/// Global settings for AudioKit
SWIFT_CLASS("_TtC8AudioKit10AKSettings")
@interface AKSettings : NSObject
/// The sample rate in Hertz
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) double sampleRate;)
+ (double)sampleRate SWIFT_WARN_UNUSED_RESULT;
+ (void)setSampleRate:(double)value;
/// Number of audio channels: 2 for stereo, 1 for mono
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) uint32_t numberOfChannels;)
+ (uint32_t)numberOfChannels SWIFT_WARN_UNUSED_RESULT;
+ (void)setNumberOfChannels:(uint32_t)value;
/// Whether we should be listening to audio input (microphone)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL audioInputEnabled;)
+ (BOOL)audioInputEnabled SWIFT_WARN_UNUSED_RESULT;
+ (void)setAudioInputEnabled:(BOOL)value;
/// Whether to allow audio playback to override the mute setting
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL playbackWhileMuted;)
+ (BOOL)playbackWhileMuted SWIFT_WARN_UNUSED_RESULT;
+ (void)setPlaybackWhileMuted:(BOOL)value;
/// Global audio format AudioKit will default to
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AVAudioFormat * _Nonnull audioFormat;)
+ (AVAudioFormat * _Nonnull)audioFormat SWIFT_WARN_UNUSED_RESULT;
/// Whether to DefaultToSpeaker when audio input is enabled
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL defaultToSpeaker;)
+ (BOOL)defaultToSpeaker SWIFT_WARN_UNUSED_RESULT;
+ (void)setDefaultToSpeaker:(BOOL)value;
/// Whether to use bluetooth when audio input is enabled
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL useBluetooth;)
+ (BOOL)useBluetooth SWIFT_WARN_UNUSED_RESULT;
+ (void)setUseBluetooth:(BOOL)value;
/// Global default rampTime value
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) double rampTime;)
+ (double)rampTime SWIFT_WARN_UNUSED_RESULT;
+ (void)setRampTime:(double)value;
/// Allows AudioKit to send Notifications
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL notificationsEnabled;)
+ (BOOL)notificationsEnabled SWIFT_WARN_UNUSED_RESULT;
+ (void)setNotificationsEnabled:(BOOL)value;
/// AudioKit buffer length is set using AKSettings.BufferLength
/// default is .VeryLong for a buffer set to 2 power 10 = 1024 samples (232 ms)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) enum BufferLength bufferLength;)
+ (enum BufferLength)bufferLength SWIFT_WARN_UNUSED_RESULT;
+ (void)setBufferLength:(enum BufferLength)value;
/// AudioKit recording buffer length is set using AKSettings.BufferLength
/// default is .VeryLong for a buffer set to 2 power 10 = 1024 samples (232 ms)
/// in Apple’s doc : “The requested size of the incoming buffers. The implementation may choose another size.”
/// So setting this value may have no effect (depending on the hardware device ?)
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) enum BufferLength recordingBufferLength;)
+ (enum BufferLength)recordingBufferLength SWIFT_WARN_UNUSED_RESULT;
+ (void)setRecordingBufferLength:(enum BufferLength)value;
/// If set to true, Recording will stop after some delay to compensate
/// latency between time recording is stopped and time it is written to file
/// If set to false (the default value) , stopping record will be immediate,
/// even if the last audio frames haven’t been recorded to file yet.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL fixTruncatedRecordings;)
+ (BOOL)fixTruncatedRecordings SWIFT_WARN_UNUSED_RESULT;
+ (void)setFixTruncatedRecordings:(BOOL)value;
/// Enable AudioKit AVAudioSession Category Management
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL disableAVAudioSessionCategoryManagement;)
+ (BOOL)disableAVAudioSessionCategoryManagement SWIFT_WARN_UNUSED_RESULT;
+ (void)setDisableAVAudioSessionCategoryManagement:(BOOL)value;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL enableRouteChangeHandling;)
+ (BOOL)enableRouteChangeHandling SWIFT_WARN_UNUSED_RESULT;
+ (void)setEnableRouteChangeHandling:(BOOL)value;
/// Turn off AudioKit logging
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL enableLogging;)
+ (BOOL)enableLogging SWIFT_WARN_UNUSED_RESULT;
+ (void)setEnableLogging:(BOOL)value;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
/// Enum of available buffer lengths
/// from Shortest: 2 power 5 samples (32 samples = 0.7 ms @ 44100 kz)
/// to Longest: 2 power 12 samples (4096 samples = 92.9 ms @ 44100 Hz)
typedef SWIFT_ENUM(NSInteger, BufferLength) {
/// Shortest
BufferLengthShortest = 5,
/// Very Short
BufferLengthVeryShort = 6,
/// Short
BufferLengthShort = 7,
/// Medium
BufferLengthMedium = 8,
/// Long
BufferLengthLong = 9,
/// Very Long
BufferLengthVeryLong = 10,
/// Huge
BufferLengthHuge = 11,
/// Longest
BufferLengthLongest = 12,
};
/// STK Shaker
SWIFT_CLASS("_TtC8AudioKit8AKShaker")
@interface AKShaker : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Amplitude
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the mandolin with defaults
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Trigger the sound with an optional set of parameters
/// <ul>
/// <li>
/// amplitude amplitude: Volume
/// </li>
/// </ul>
- (void)triggerWithAmplitude:(double)amplitude;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Stereo Field Limiter
SWIFT_CLASS("_TtC8AudioKit20AKStereoFieldLimiter")
@interface AKStereoFieldLimiter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Limiting Factor
@property (nonatomic) double amount;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this stereo field limiter node
/// \param input AKNode whose output will be limited
///
/// \param amount limit factor (Default: 1, Minimum: 0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input amount:(double)amount OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AKStringResonator passes the input through a network composed of comb,
/// low-pass and all-pass filters, similar to the one used in some versions of
/// the Karplus-Strong algorithm, creating a string resonator effect. The
/// fundamental frequency of the “string” is controlled by the
/// fundamentalFrequency. This operation can be used to simulate sympathetic
/// resonances to an input signal.
SWIFT_CLASS("_TtC8AudioKit17AKStringResonator")
@interface AKStringResonator : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Fundamental frequency of string.
@property (nonatomic) double fundamentalFrequency;
/// Feedback amount (value between 0-1). A value close to 1 creates a slower decay and a more pronounced resonance.
/// Small values may leave the input signal unaffected. Depending on the filter frequency, typical values are > .9.
@property (nonatomic) double feedback;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param fundamentalFrequency Fundamental frequency of string.
///
/// \param feedback Feedback amount (value between 0-1). A value close to 1 creates a slower decay and a more
/// pronounced resonance. Small values may leave the input signal unaffected. Depending on the
/// filter frequency, typical values are > .9.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input fundamentalFrequency:(double)fundamentalFrequency feedback:(double)feedback OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Kick Drum Synthesizer Instrument
SWIFT_CLASS("_TtC8AudioKit11AKSynthKick")
@interface AKSynthKick : AKMIDIInstrument
/// Create the synth kick voice
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity;
/// Unneeded stop function since the sounds all decay quickly
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Snare Drum Synthesizer Instrument
SWIFT_CLASS("_TtC8AudioKit12AKSynthSnare")
@interface AKSynthSnare : AKMIDIInstrument
/// Create the synth snare voice
- (nonnull instancetype)initWithDuration:(double)duration resonance:(double)resonance OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)playWithNoteNumber:(uint8_t)noteNumber velocity:(uint8_t)velocity;
/// Unneeded stop function since the sounds all decay quickly
- (void)stopWithNoteNumber:(uint8_t)noteNumber;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Distortion using a modified hyperbolic tangent function.
SWIFT_CLASS("_TtC8AudioKit16AKTanhDistortion")
@interface AKTanhDistortion : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Determines the amount of gain applied to the signal before waveshaping. A value of 1 gives slight distortion.
@property (nonatomic) double pregain;
/// Gain applied after waveshaping
@property (nonatomic) double postgain;
/// Shape of the positive part of the signal. A value of 0 gets a flat clip.
@property (nonatomic) double postiveShapeParameter;
/// Like the positive shape parameter, only for the negative part.
@property (nonatomic) double negativeShapeParameter;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this distortion node
/// \param input Input node to process
///
/// \param pregain The amount of gain applied to the signal before waveshaping. A value of 1 gives slight distortion.
///
/// \param postgain Gain applied after waveshaping
///
/// \param postiveShapeParameter Shape of the positive part of the signal. A value of 0 gets a flat clip.
///
/// \param negativeShapeParameter Like the positive shape parameter, only for the negative part.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input pregain:(double)pregain postgain:(double)postgain postiveShapeParameter:(double)postiveShapeParameter negativeShapeParameter:(double)negativeShapeParameter OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Testing node
SWIFT_CLASS("_TtC8AudioKit8AKTester")
@interface AKTester : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Calculate the MD5
@property (nonatomic, readonly, copy) NSString * _Nonnull MD5;
/// Flag on whether or not the test is still in progress
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this test node
/// \param input AKNode to test
///
/// \param sample Number of sample to product
///
- (nonnull instancetype)init:(AKNode * _Nullable)input samples:(NSInteger)samples OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// 3-pole (18 db/oct slope) Low-Pass filter with resonance and tanh distortion.
SWIFT_CLASS("_TtC8AudioKit24AKThreePoleLowpassFilter")
@interface AKThreePoleLowpassFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Distortion amount. Zero gives a clean output. Greater than zero adds tanh distortion controlled by the
/// filter parameters, in such a way that both low cutoff and high resonance increase the distortion amount.
@property (nonatomic) double distortion;
/// Filter cutoff frequency in Hertz.
@property (nonatomic) double cutoffFrequency;
/// Resonance. Usually a value in the range 0-1. A value of 1.0 will self oscillate at the cutoff frequency.
/// Values slightly greater than 1 are possible for more sustained oscillation and an “overdrive” effect.
@property (nonatomic) double resonance;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param distortion Distortion amount. Zero gives a clean output. Greater than zero adds tanh distortion
/// controlled by the filter parameters, in such a way that both low cutoff and high resonance
/// increase the distortion amount.
///
/// \param cutoffFrequency Filter cutoff frequency in Hertz.
///
/// \param resonance Usually a value in the range 0-1. A value of 1.0 will self oscillate at the cutoff frequency.
/// Values slightly greater than 1 are possible for more sustained oscillation and an “overdrive”
/// effect.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input distortion:(double)distortion cutoffFrequency:(double)cutoffFrequency resonance:(double)resonance OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// AudioKit version of Apple’s TimePitch Audio Unit
SWIFT_CLASS("_TtC8AudioKit11AKTimePitch")
@interface AKTimePitch : AKNode
/// Rate (rate) ranges from 0.03125 to 32.0 (Default: 1.0)
@property (nonatomic) double rate;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Pitch (Cents) ranges from -2400 to 2400 (Default: 0.0)
@property (nonatomic) double pitch;
/// Overlap (generic) ranges from 3.0 to 32.0 (Default: 8.0)
@property (nonatomic) double overlap;
/// Initialize the time pitch node
/// \param input Input node to process
///
/// \param rate Rate (rate) ranges from 0.03125 to 32.0 (Default: 1.0)
///
/// \param pitch Pitch (Cents) ranges from -2400 to 2400 (Default: 1.0)
///
/// \param overlap Overlap (generic) ranges from 3.0 to 32.0 (Default: 8.0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input rate:(double)rate pitch:(double)pitch overlap:(double)overlap OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A complement to the AKLowPassFilter.
SWIFT_CLASS("_TtC8AudioKit22AKToneComplementFilter")
@interface AKToneComplementFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Half-Power Point in Hertz. Half power is defined as peak power / square root of 2.
@property (nonatomic) double halfPowerPoint;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param halfPowerPoint Half-Power Point in Hertz. Half power is defined as peak power / square root of 2.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input halfPowerPoint:(double)halfPowerPoint OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A first-order recursive low-pass filter with variable frequency response.
SWIFT_CLASS("_TtC8AudioKit12AKToneFilter")
@interface AKToneFilter : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// The response curve’s half-power point, in Hertz. Half power is defined as peak power / root 2.
@property (nonatomic) double halfPowerPoint;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this filter node
/// \param input Input node to process
///
/// \param halfPowerPoint The response curve’s half-power point, in Hz. Half power is defined as peak power / root 2.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input halfPowerPoint:(double)halfPowerPoint OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Table-lookup tremolo with linear interpolation
SWIFT_CLASS("_TtC8AudioKit9AKTremolo")
@interface AKTremolo : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Frequency (Hz)
@property (nonatomic) double frequency;
/// Depth
@property (nonatomic) double depth;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// STK TubularBells
SWIFT_CLASS("_TtC8AudioKit14AKTubularBells")
@interface AKTubularBells : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Variable frequency. Values less than the initial frequency will be doubled until it is greater than that.
@property (nonatomic) double frequency;
/// Amplitude
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the mandolin with defaults
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
/// Initialize the STK TubularBells model
/// \param frequency Variable frequency. Values less than the initial frequency will be doubled until it is
/// greater than that.
///
/// \param amplitude Amplitude
///
- (nonnull instancetype)initWithFrequency:(double)frequency amplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Trigger the sound with an optional set of parameters
/// <ul>
/// <li>
/// frequency: Frequency in Hz
/// </li>
/// <li>
/// amplitude amplitude: Volume
/// </li>
/// </ul>
- (void)triggerWithFrequency:(double)frequency amplitude:(double)amplitude;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Tuning table stores frequencies at which to play MIDI notes
SWIFT_CLASS("_TtC8AudioKit13AKTuningTable")
@interface AKTuningTable : NSObject
/// Total number of MIDI Notes available to play
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger midiNoteCount;)
+ (NSInteger)midiNoteCount SWIFT_WARN_UNUSED_RESULT;
/// Note number for standard reference note
@property (nonatomic) uint8_t middleCNoteNumber;
/// Frequency of standard reference note
/// equivalent to noteToHz: return 440. * exp2((60 - 69)/12.)
@property (nonatomic) double middleCFrequency;
/// Octave number for standard reference note. Can be negative
/// …, -2, -1, 0, 1, 2, …
@property (nonatomic) NSInteger middleCOctave;
/// Initialization for standard default 12 tone equal temperament
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
/// Pull out frequency information for a given note number
- (double)frequencyForNoteNumber:(uint8_t)noteNumber SWIFT_WARN_UNUSED_RESULT;
/// Set frequency of a given note number
- (void)setFrequency:(double)frequency at:(uint8_t)noteNumber;
/// Create the tuning using the input frequencies
/// \param fromFrequencies An array of frequencies
///
- (void)tuningTableFromFrequencies:(NSArray<NSNumber *> * _Nonnull)inputFrequencies;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (void)presetRecurrenceRelation01;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetHighlandBagPipes SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetDiaphonicTetrachord SWIFT_WARN_UNUSED_RESULT;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// Creates a “Nested 2-interval pattern”, or “Moment of Symmetry”
/// \param generator A Double on [0, 1]
///
/// \param level An Int on [0, 7]
///
/// \param murchana The mode of the scale…degrees are normalized by the frequency at this index
///
///
/// returns:
/// Number of notes per octave
/// From <NAME>. See http://anaphoria.com/wilsonintroMOS.html
- (NSInteger)momentOfSymmetryWithGenerator:(double)gInput level:(NSInteger)lInput murchana:(NSInteger)mInput SWIFT_WARN_UNUSED_RESULT;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// Create a hexany from 4 frequencies (4 choose 2)
/// \param A, B, C, D Master set of frequencies
/// From <NAME>. See http://anaphoria.com/dal.pdf and http://anaphoria.com/hexany.pdf
///
- (NSInteger)hexany:(double)A :(double)B :(double)C :(double)D SWIFT_WARN_UNUSED_RESULT;
/// Create a major tetrany from 4 frequencies (4 choose 1)
/// \param A, B, C, D Master set of frequencies
///
- (NSInteger)majorTetrany:(double)A :(double)B :(double)C :(double)D SWIFT_WARN_UNUSED_RESULT;
/// Create a hexany from 4 frequencies (4 choose 3)
/// \param A, B, C, D Master set of frequencies
///
- (NSInteger)minorTetrany:(double)A :(double)B :(double)C :(double)D SWIFT_WARN_UNUSED_RESULT;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// Use a Scala file to write the tuning table
- (void)scalaFile:(NSString * _Nonnull)filePath;
/// Get frequencies from a Scala string
- (NSArray<NSNumber *> * _Nullable)frequenciesFromScalaString:(NSString * _Nullable)rawStr SWIFT_WARN_UNUSED_RESULT;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// Default tuning table is 12ET.
- (void)defaultTuning;
/// Create 12-tone equal temperament
- (void)twelveToneEqualTemperament;
/// Create 31-tone equal temperament
- (void)thirtyOneEqualTemperament;
/// Create an equal temperament with notesPerOctave
/// \param notesPerOctave divides the octave equally by this many steps
/// From <NAME>. See http://anaphoria.com/MOSedo.pdf
///
- (void)equalTemperamentWithNotesPerOctave:(NSInteger)npo;
@end
@interface AKTuningTable (SWIFT_EXTENSION(AudioKit))
/// Set tuning to 22 Indian Scale.
/// From <NAME>. See http://anaphoria.com/Khiasmos.pdf
- (NSInteger)khiasmos22Indian SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian00_17 SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian01Kalyan SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian02Bilawal SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian03Khamaj SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian04KafiOld SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian05Kafi SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian06Asawari SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian07Bhairavi SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian08Marwa SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian09Purvi SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian10Lalit2 SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian11Todi SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian12Lalit SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian13NoName;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian14AnandBhairav SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian15Bhairav SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian16JogiyaTodi SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian17Madhubanti SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian18NatBhairav SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian19AhirBhairav SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian20ChandraKanada SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian21BasantMukhari SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian22Champakali SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian23Patdeep SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian24MohanKauns SWIFT_WARN_UNUSED_RESULT;
/// From <NAME>. See http://anaphoria.com/genus.pdf
- (NSInteger)presetPersian17NorthIndian25Parameswari SWIFT_WARN_UNUSED_RESULT;
@end
/// AudioKit version of Apple’s VariSpeed Audio Unit
SWIFT_CLASS("_TtC8AudioKit11AKVariSpeed")
@interface AKVariSpeed : AKNode
/// Rate (rate) ranges form 0.25 to 4.0 (Default: 1.0)
@property (nonatomic) double rate;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize the varispeed node
/// \param input Input node to process
///
/// \param rate Rate (rate) ranges from 0.25 to 4.0 (Default: 1.0)
///
- (nonnull instancetype)init:(AKNode * _Nullable)input rate:(double)rate OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// A delay line with cubic interpolation.
SWIFT_CLASS("_TtC8AudioKit15AKVariableDelay")
@interface AKVariableDelay : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Delay time (in seconds) that can be changed at any point. This value must not exceed the maximum delay time.
@property (nonatomic) double time;
/// Feedback amount. Should be a value between 0-1.
@property (nonatomic) double feedback;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this delay node
/// \param input Input node to process
///
/// \param time Delay time (in seconds). This value must not exceed the maximum delay time.
///
/// \param feedback Feedback amount. Should be a value between 0-1.
///
/// \param maximumDelayTime The maximum delay time, in seconds.
///
- (nonnull instancetype)init:(AKNode * _Nullable)input time:(double)time feedback:(double)feedback maximumDelayTime:(double)maximumDelayTime OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// Based on the Pink Trombone algorithm by <NAME>, this implements a
/// physical model of the vocal tract glottal pulse wave. The tract model is
/// based on the classic Kelly-Lochbaum segmented cylindrical 1d waveguide
/// model, and the glottal pulse wave is a LF glottal pulse model.
/// \param frequency Glottal frequency.
///
/// \param tonguePosition Tongue position (0-1)
///
/// \param tongueDiameter Tongue diameter (0-1)
///
/// \param tenseness Vocal tenseness. 0 = all breath. 1=fully saturated.
///
/// \param nasality Sets the velum size. Larger values of this creates more nasally sounds.
///
SWIFT_CLASS("_TtC8AudioKit12AKVocalTract")
@interface AKVocalTract : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Glottal frequency.
@property (nonatomic) double frequency;
/// Tongue position (0-1)
@property (nonatomic) double tonguePosition;
/// Tongue diameter (0-1)
@property (nonatomic) double tongueDiameter;
/// Vocal tenseness. 0 = all breath. 1=fully saturated.
@property (nonatomic) double tenseness;
/// Sets the velum size. Larger values of this creates more nasally sounds.
@property (nonatomic) double nasality;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this vocal tract node
/// \param frequency Glottal frequency.
///
/// \param tonguePosition Tongue position (0-1)
///
/// \param tongueDiameter Tongue diameter (0-1)
///
/// \param tenseness Vocal tenseness. 0 = all breath. 1=fully saturated.
///
/// \param nasality Sets the velum size. Larger values of this creates more nasally sounds.
///
- (nonnull instancetype)initWithFrequency:(double)frequency tonguePosition:(double)tonguePosition tongueDiameter:(double)tongueDiameter tenseness:(double)tenseness nasality:(double)nasality OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// White noise generator
SWIFT_CLASS("_TtC8AudioKit12AKWhiteNoise")
@interface AKWhiteNoise : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Amplitude. (Value between 0-1).
@property (nonatomic) double amplitude;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this noise node
/// \param amplitude Amplitude. (Value between 0-1).
///
- (nonnull instancetype)initWithAmplitude:(double)amplitude OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
/// 8 FDN stereo zitareverb algorithm, imported from Faust.
SWIFT_CLASS("_TtC8AudioKit12AKZitaReverb")
@interface AKZitaReverb : AKNode
/// Four letter unique description of the node
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) AudioComponentDescription ComponentDescription;)
+ (AudioComponentDescription)ComponentDescription SWIFT_WARN_UNUSED_RESULT;
/// Ramp Time represents the speed at which parameters are allowed to change
@property (nonatomic) double rampTime;
/// Delay in ms before reverberation begins.
@property (nonatomic) double delay;
/// Crossover frequency separating low and middle frequencies (Hz).
@property (nonatomic) double crossoverFrequency;
/// Time (in seconds) to decay 60db in low-frequency band.
@property (nonatomic) double lowReleaseTime;
/// Time (in seconds) to decay 60db in mid-frequency band.
@property (nonatomic) double midReleaseTime;
/// Frequency (Hz) at which the high-frequency T60 is half the middle-band’s T60.
@property (nonatomic) double dampingFrequency;
/// Center frequency of second-order Regalia Mitra peaking equalizer section 1.
@property (nonatomic) double equalizerFrequency1;
/// Peak level in dB of second-order Regalia-Mitra peaking equalizer section 1
@property (nonatomic) double equalizerLevel1;
/// Center frequency of second-order Regalia Mitra peaking equalizer section 2.
@property (nonatomic) double equalizerFrequency2;
/// Peak level in dB of second-order Regalia-Mitra peaking equalizer section 2
@property (nonatomic) double equalizerLevel2;
/// 0 = all dry, 1 = all wet
@property (nonatomic) double dryWetMix;
/// Tells whether the node is processing (ie. started, playing, or active)
@property (nonatomic, readonly) BOOL isStarted;
/// Initialize this reverb node
/// \param input Input node to process
///
/// \param delay Delay in ms before reverberation begins.
///
/// \param crossoverFrequency Crossover frequency separating low and middle frequencies (Hz).
///
/// \param lowReleaseTime Time (in seconds) to decay 60db in low-frequency band.
///
/// \param midReleaseTime Time (in seconds) to decay 60db in mid-frequency band.
///
/// \param dampingFrequency Frequency (Hz) at which the high-frequency T60 is half the middle-band’s T60.
///
/// \param equalizerFrequency1 Center frequency of second-order Regalia Mitra peaking equalizer section 1.
///
/// \param equalizerLevel1 Peak level in dB of second-order Regalia-Mitra peaking equalizer section 1
///
/// \param equalizerFrequency2 Center frequency of second-order Regalia Mitra peaking equalizer section 2.
///
/// \param equalizerLevel2 Peak level in dB of second-order Regalia-Mitra peaking equalizer section 2
///
/// \param dryWetMix 0 = all dry, 1 = all wet
///
- (nonnull instancetype)init:(AKNode * _Nullable)input delay:(double)delay crossoverFrequency:(double)crossoverFrequency lowReleaseTime:(double)lowReleaseTime midReleaseTime:(double)midReleaseTime dampingFrequency:(double)dampingFrequency equalizerFrequency1:(double)equalizerFrequency1 equalizerLevel1:(double)equalizerLevel1 equalizerFrequency2:(double)equalizerFrequency2 equalizerLevel2:(double)equalizerLevel2 dryWetMix:(double)dryWetMix OBJC_DESIGNATED_INITIALIZER;
/// Function to start, play, or activate the node, all do the same thing
- (void)start;
/// Function to stop or bypass the node, both are equivalent
- (void)stop;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
- (nonnull instancetype)initWithAvAudioNode:(AVAudioNode * _Nonnull)avAudioNode attach:(BOOL)attach SWIFT_UNAVAILABLE;
@end
@interface AUParameter (SWIFT_EXTENSION(AudioKit))
@end
@interface AUParameterTree (SWIFT_EXTENSION(AudioKit))
- (AUParameter * _Nullable)objectForKeyedSubscript:(NSString * _Nonnull)key SWIFT_WARN_UNUSED_RESULT;
@end
@interface AVAudioConnectionPoint (SWIFT_EXTENSION(AudioKit))
@end
@interface AVAudioEngine (SWIFT_EXTENSION(AudioKit))
- (void)connect:(AVAudioNode * _Nonnull)node1 to:(AVAudioNode * _Nonnull)node2;
@end
@interface AVAudioFile (SWIFT_EXTENSION(AudioKit))
/// The number of samples can be accessed by .length property,
/// but samplesCount has a less ambiguous meaning
@property (nonatomic, readonly) int64_t samplesCount;
/// strange that sampleRate is a Double and not an Integer
@property (nonatomic, readonly) double sampleRate;
/// Number of channels, 1 for mono, 2 for stereo
@property (nonatomic, readonly) uint32_t channelCount;
/// Duration in seconds
@property (nonatomic, readonly) double duration;
/// true if Audio Samples are interleaved
@property (nonatomic, readonly) BOOL interleaved;
/// true only if file format is “deinterleaved native-endian float (AVAudioPCMFormatFloat32)”
@property (nonatomic, readonly) BOOL standard;
/// Human-readable version of common format
@property (nonatomic, readonly, copy) NSString * _Nonnull commonFormatString;
/// the directory path as a URL object
@property (nonatomic, readonly, copy) NSURL * _Nonnull directoryPath;
/// the file name with extension as a String
@property (nonatomic, readonly, copy) NSString * _Nonnull fileNamePlusExtension;
/// the file name without extension as a String
@property (nonatomic, readonly, copy) NSString * _Nonnull fileName;
/// the file extension as a String (without “.”)
@property (nonatomic, readonly, copy) NSString * _Nonnull fileExt;
@property (nonatomic, readonly, copy) NSString * _Nonnull description;
/// returns file Mime Type if exists
/// Otherwise, returns nil
/// (useful when sending an AKAudioFile by email)
@property (nonatomic, readonly, copy) NSString * _Nullable mimeType;
/// Static function to delete all audiofiles from Temp directory
/// AKAudioFile.cleanTempDirectory()
+ (void)cleanTempDirectory;
@end
@interface AVAudioUnit (SWIFT_EXTENSION(AudioKit))
@end
@interface AVAudioUnit (SWIFT_EXTENSION(AudioKit))
@end
/// Top level AudioKit managing class
SWIFT_CLASS("_TtC8AudioKit8AudioKit")
@interface AudioKit : NSObject
/// Format of AudioKit Nodes
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AVAudioFormat * _Nonnull format;)
+ (AVAudioFormat * _Nonnull)format SWIFT_WARN_UNUSED_RESULT;
+ (void)setFormat:(AVAudioFormat * _Nonnull)value;
/// Reference to the AV Audio Engine
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AVAudioEngine * _Nonnull engine;)
+ (AVAudioEngine * _Nonnull)engine SWIFT_WARN_UNUSED_RESULT;
/// An audio output operation that most applications will need to use last
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AKNode * _Nullable output;)
+ (AKNode * _Nullable)output SWIFT_WARN_UNUSED_RESULT;
+ (void)setOutput:(AKNode * _Nullable)newValue;
/// Enumerate the list of available input devices.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<AKDevice *> * _Nullable inputDevices;)
+ (NSArray<AKDevice *> * _Nullable)inputDevices SWIFT_WARN_UNUSED_RESULT;
/// Enumerate the list of available output devices.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSArray<AKDevice *> * _Nullable outputDevices;)
+ (NSArray<AKDevice *> * _Nullable)outputDevices SWIFT_WARN_UNUSED_RESULT;
/// The name of the current input device, if available.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AKDevice * _Nullable inputDevice;)
+ (AKDevice * _Nullable)inputDevice SWIFT_WARN_UNUSED_RESULT;
/// The name of the current output device, if available.
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) AKDevice * _Nullable outputDevice;)
+ (AKDevice * _Nullable)outputDevice SWIFT_WARN_UNUSED_RESULT;
/// Change the preferred input device, giving it one of the names from the list of available inputs.
+ (BOOL)setInputDevice:(AKDevice * _Nonnull)input error:(NSError * _Nullable * _Nullable)error;
/// Change the preferred output device, giving it one of the names from the list of available output.
+ (BOOL)setOutputDevice:(AKDevice * _Nonnull)output error:(NSError * _Nullable * _Nullable)error;
/// Start up the audio engine
+ (void)start;
/// Stop the audio engine
+ (void)stop;
/// Testing AKNode
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, strong) AKTester * _Nullable tester;)
+ (AKTester * _Nullable)tester SWIFT_WARN_UNUSED_RESULT;
+ (void)setTester:(AKTester * _Nullable)value;
/// Test the output of a given node
/// \param node AKNode to test
///
/// \param duration Number of seconds to test (accurate to the sample)
///
+ (void)testWithNode:(AKNode * _Nonnull)node duration:(double)duration;
/// Audition the test to hear what it sounds like
/// \param node AKNode to test
///
/// \param duration Number of seconds to test (accurate to the sample)
///
+ (void)auditionTestWithNode:(AKNode * _Nonnull)node duration:(double)duration;
/// Disconnect all inputs
+ (void)disconnectAllInputs;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
@interface NSError (SWIFT_EXTENSION(AudioKit))
@end
#pragma clang diagnostic pop
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartView.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartView.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import <Foundation/Foundation.h>
#import "NChart.h"
/**
* The NChartView class provides a view to display the chart. This view can be added anywhere to view the hierarchy of
* the app.
*/
NCHART3D_EXPORT @interface NChartView : NSView
/**
* Get chart instance. It is created with the view's creation and destroyed with its destruction.
* @see NChart.
*/
@property (nonatomic, readonly) NChart *chart;
/**
* Flag determining if view is allowed to recreate internal rendering data structures (YES) or not (NO). The default
* value is YES.
* <br> Use this flag to temporary lock the updating of the view. You may need to lock it (by setting NO to this
* property) when view disappears from screen and unlock it (by setting YES) in it appears back. This kind of
* locking helps to avoid troubles related to the updating of invisible OpenGL-based views.
*/
@property (nonatomic, assign) BOOL isUpdatingEnabled;
/**
* Capture screenshot of the chart to image.
*
* @return new image with the screenshot.
*/
- (NSImage *)captureScreenshot;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartRadarSeries.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartRadarSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartAreaSeries.h"
/**
* The NChartRadarSeries class provides methods to display radar series.
*/
NCHART3D_EXPORT @interface NChartRadarSeries : NChartAreaSeries
@end
/**
* The NChartRadarSeriesSettings class provides global settings for <NChartRadarSeries>.
*/
NCHART3D_EXPORT @interface NChartRadarSeriesSettings : NChartSeriesSettings
/**
* Flag determining if axes grid should be smoothed, so it should appear as a circle, not as polygon (YES) or not (NO).
*/
@property (nonatomic, assign) BOOL shouldSmoothAxesGrid;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartTouchAreaSeries.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartTouchAreaSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartSeries.h"
#import "NChartPoint.h"
#import "NChartBrush.h"
/**
* The NChartTouchAreaSeries class provides methods to display fullscreen billboard with touch areas.
*/
NCHART3D_EXPORT @interface NChartTouchAreaSeries : NChartSeries
@end
/**
* The NChartTouchAreaSeriesSettings class provides global settings for <NChartTouchAreaSeries>.
*/
NCHART3D_EXPORT @interface NChartTouchAreaSeriesSettings : NChartSeriesSettings
/**
* Background image to display on the screen.
*/
@property (nonatomic, retain) NChartBrush *background;
/**
* Flag allowing you to highlight touch ares with red for debug reasons (if YES). The default value is NO.
*/
@property (nonatomic, assign) BOOL areasDebugMode;
@end
/**
* The NChartTouchArea class provides methods to define touch area for <NChartTouchAreaSeries>.
* Area is defined in relative coordinates that should be in [0, 1]x[0, 1] and relates to the size of background set
* through <NChartTouchAreaSeriesSettings>. (0, 0) corresponds to the top-left corner of the background image, (1, 1) -
* to the bottom-right.
*/
NCHART3D_EXPORT @interface NChartTouchArea : NChartPoint
/**
* Create touch area with given area.
*
* @param area - area for touch area.
* @param series - series for touch area.
* @return new instance of touch area.
*/
+ (NChartTouchArea *)touchAreaWithArea:(CGRect)area forSeries:(NChartSeries *)series;
/**
* Initialize touch area with given area.
*
* @param area - area for touch area.
* @param series - series for touch area.
* @return initialized instance of touch area.
*/
- (id)initWithArea:(CGRect)area forSeries:(NChartSeries *)series;
/**
* Touch area rect.
*/
@property (nonatomic, assign) CGRect area;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartSolidSeries.h
|
<gh_stars>0
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartSolidSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartSeries.h"
#import "NChartBrush.h"
/**
* The NChartSolidSeries class provides common methods to display series that are filled with some brush and have a border.
*/
NCHART3D_EXPORT @interface NChartSolidSeries : NChartSeries
/**
* Brush that fills the series.
* @see NChartBrush.
*/
@property (nonatomic, retain) NChartBrush *brush;
/**
* Brush of the border that surrounds the series.
* @see NChartBrush.
*/
@property (nonatomic, retain) NChartBrush *borderBrush;
/**
* Thickness (in pixels) of the border that surrounds the series.
*/
@property (nonatomic, assign) float borderThickness;
@end
/**
* The NChartSolidSeriesSettings class provides common settings for <NChartSolidSeries>.
*/
NCHART3D_EXPORT @interface NChartSolidSeriesSettings : NChartSeriesSettings
/**
* Fill ratio for series that determines the amount of place for one series. For example, if the fill ratio is 1.0 and
* the column series is displayed, one column (or one group of columns, if there are many series on one chart
* at the same time) fills the whole area of one tick on the X and Z axes (for bar series -- on the Y and Z
* respectively, for area -- it's Z-width and so on). If the fill ratio is 0.5, the column fills half the area of one
* tick and so on. The default value is 0.7.
*/
@property (nonatomic, assign) float fillRatio;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartGradientBrush.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartGradientBrush.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartBrush.h"
/**
* The NChartGradientStop class provides a control point of the gradient defining some color and it's position on the
* area being filled with a gradient. The gradient is constructed from multiple gradient-stops.
*/
NCHART3D_EXPORT @interface NChartGradientStop : NSObject <NSCopying>
/**
* Create gradient stop with color and offset.
*
* @param color - the color of gradient stop.
* @param offset - the offset of gradient stop.
* @return a new instance of the gradient stop.
*/
+ (NChartGradientStop *)gradientStopWithColor:(NSColor *)color andOffset:(float)offset;
/**
* Init gradient stop with color and offset
*
* @param color - the color of gradient stop.
* @param offset - the offset of gradient stop.
* @return inited instance of the gradient stop.
*/
- (id)initWithColor:(NSColor *)color andOffset:(float)offset;
/**
* Color of the gradient-stop.
*/
@property (nonatomic, retain) NSColor *color;
/**
* Offset of gradient-stop in the whole gradient. Offset is in interval 0..1. 0 means the start of the area filled
* with a gradient, 1 means the end of it. For example if you want to create a gradient of two colors, it's common to
* use 0.0 as the offset for the first color and 1.0 for the second.
*/
@property (nonatomic, assign) float offset;
@end
/**
* The NChartGradientBrush class provides common methods for the brush that fills an area with some gradient.
*/
NCHART3D_EXPORT @interface NChartGradientBrush : NChartBrush
/**
* Array of gradient-stops that construct the gradient for this brush.
* @see NChartGradientStop.
*/
@property (nonatomic, retain) NSArray *gradientStops;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartCandlestickSeries.h
|
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartCandlestickSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartOHLCSeries.h"
/**
* The NChartCandlestickSeries class provides methods to display candlestick series.
*/
NCHART3D_EXPORT @interface NChartCandlestickSeries : NChartOHLCSeries
/**
* Color for the border of positive candles.
*/
@property (nonatomic, retain) NSColor *positiveBorderColor;
/**
* Color for the border of negative candles.
*/
@property (nonatomic, retain) NSColor *negativeBorderColor;
@end
/**
* The NChartCandlestickSeriesSettings class provides global settings for <NChartCandlestickSeries>.
*/
NCHART3D_EXPORT @interface NChartCandlestickSeriesSettings : NChartOHLCSeriesSettings
/**
* The resolution of cylinders. Resolution is the amount of vertices that build the circle.
* For example if you want to get a square candlestick, you should set resolution to 4. If you want to get a cylindrical
* candlestick, you may set a larger value. But the larger is the resolution, the more memory is used and the slower the
* rendering will be, so you should find out the minimal acceptable value. A good value for cylinder is 16 or 20.
* The default value is 20.
* @note This value cannot be less than 3 and greater than 32.
*/
@property (nonatomic, assign) NSUInteger cylindersResolution;
/**
* Flag determining whether horizontal lines on the ending of lower and upper candlestick shadows are shown (YES) or
* hidden (NO). The default value is YES.
*/
@property (nonatomic, assign) BOOL showShadowEndingLines;
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartBubbleSeries.h
|
<gh_stars>0
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartBubbleSeries.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartSeries.h"
#import "NChartMarker.h"
/**
* The NChartBubbleSeries class provides methods to display bubble series.
*/
NCHART3D_EXPORT @interface NChartBubbleSeries : NChartSeries
/**
* Default marker of the series that is displayed as a bubble. It is nil by default.
* @see NChartMarker.
*/
@property (nonatomic, retain) NChartMarker *marker;
@end
/**
* The NChartBubbleSeriesSettings class provides global settings for <NChartBubbleSeries>.
*/
NCHART3D_EXPORT @interface NChartBubbleSeriesSettings : NChartSeriesSettings
@end
|
trevlevieux/AudioCompare_macOS
|
NChart3D_OSX.framework/Versions/A/Headers/NChartCrosshair.h
|
<gh_stars>0
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartCrosshair.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartPoint.h"
#import "NChartLineDash.h"
@class NChartCrosshair;
/**
* The NChartCrosshairDelegate protocol provides methods to handle crosshair movements.
*/
@protocol NChartCrosshairDelegate <NSObject>
@optional
/**
* Report beginning of crosshair movements.
*
* @param crosshair - pointer to the crosshair object that did begin moving.
*/
- (void)crosshairDelegateCrosshairDidBeginMoving:(NChartCrosshair *)crosshair;
/**
* Report crosshair movement.
*
* @param crosshair - pointer to the crosshair object that did move.
*/
- (void)crosshairDelegateCrosshairDidMove:(NChartCrosshair *)crosshair;
/**
* Report ending of crosshair movements.
*
* @param crosshair - pointer to the crosshair object that did end moving.
*/
- (void)crosshairDelegateCrosshairDidEndMoving:(NChartCrosshair *)crosshair;
@end
/**
* The NChartHair class provides methods to control the single line within crosshair.
* @see NChartCrosshair.
*/
NCHART3D_EXPORT @interface NChartHair : NSObject
/**
* Flag determining if hair is visible (YES) or not (NO). The default value is YES.
*/
@property (nonatomic, assign) BOOL visible;
/**
* Flag determining if hair is hosted on secondary axis (YES) or not (NO). The default value is NO.
*/
@property (nonatomic, assign) BOOL hostsOnSAxis;
/**
* Value the hair intersects its axis in. The default value is 0.
*/
@property (nonatomic, assign) double value;
/**
* The color of the first half of hair. If <code>nil</code>, not displayed. The default value is <code>nil</code>.
* <br> The color of the hairs part from the axis to the point it marks.
*/
@property (nonatomic, retain) NSColor *firstHalfColor;
/**
* The color of the second half of hair. If <code>nil</code>, not displayed. The default value is <code>nil</code>.
* <br> The color of the hairs part from the the point it marks to the end of chart plot area.
*/
@property (nonatomic, retain) NSColor *secondHalfColor;
/**
* Set color for both halves of hair.
* @see firstHalfColor, secondHalfColor.
*
* @param color - color to set.
*/
- (void)setColor:(NSColor *)color;
/**
* Flag determining if hair can be dragged (YES) or not (NO). The default value is YES.
*/
@property (nonatomic, assign) BOOL isDraggable;
/**
* Flag determining if hair should snap to major ticks while moving. The default value is NO.
*/
@property (nonatomic, assign) BOOL snapToMajorTicks;
/**
* Flag determining if hair should snap to minor ticks while moving. The default value is NO.
*/
@property (nonatomic, assign) BOOL snapToMinorTicks;
/**
* Tooltip of the hair. The default value is nil.
* <br> To display tooltip you should set it before your <code>updateData</code> call.
*/
@property (nonatomic, retain) NChartTooltip *tooltip;
/**
* Position of the hair's tooltip. The default value is <code>NChartCrosshairTooltipPositionByMax</code>.
* @see NChartCrosshairTooltipPosition.
*/
@property (nonatomic, assign) NChartCrosshairTooltipPosition tooltipPosition;
@end
/**
* The NChartCrosshair class provides methods to control crosshairs - lines that are perpendicular to the axes and are
* to mark some position on the chart. Single chart can have multiple crosshairs either connected to the chart points or
* free (with user defined coordinates).
*/
NCHART3D_EXPORT @interface NChartCrosshair : NChartObject
/**
* Create crosshair.
*
* @return new instance of crosshair.
*/
+ (NChartCrosshair *)crosshair;
/**
* Create crosshair with color, thickness and target point.
*
* @param color - color of the crosshair.
* @param thickness - thickness of the crosshair.
* @param targetPoint - tracking point of the crosshair.
* @return new instance of crosshair.
*/
+ (NChartCrosshair *)crosshairWithColor:(NSColor *)color thickness:(float)thickness andTargetPoint:(NChartPoint *)targetPoint;
/**
* Init crosshair with color, thickness and target point.
*
* @param color - color of the crosshair.
* @param thickness - thickness of the crosshair.
* @param targetPoint - target point of the crosshair.
* @return initialized instance of crosshair.
*/
- (id)initWithColor:(NSColor *)color thickness:(float)thickness andTargetPoint:(NChartPoint *)targetPoint;
/**
* Hair for X-Axis.
*/
@property (nonatomic, readonly) NChartHair *xHair;
/**
* Hair for Y-Axis.
*/
@property (nonatomic, readonly) NChartHair *yHair;
/**
* Hair for Z-Axis.
*/
@property (nonatomic, readonly) NChartHair *zHair;
/**
* Target point for the crosshair.
* <br> Use this property to set crosshair to track chart point. The point is _not_ retained by the crosshair.
*/
@property (nonatomic, assign) NChartPoint *targetPoint;
/**
* Thickness of the crosshair in pixels. The default value is 1.
*/
@property (nonatomic, assign) float thickness;
/**
* Dash of the crosshair.
* @see NChartLineDash.
*/
@property (nonatomic, retain) NChartLineDash *lineDash;
/**
* Flag determining if the crosshair should move to the click wherever the click location is. The default value is NO.
* <br> If this flag is YES, all the clicks are catched by the topmost crosshair (the one that was last added to
* the cartesian system of the chart). So no other user interactions like pan and point selection are possible in the
* chart.
*/
@property (nonatomic, assign) BOOL shouldJumpToClick;
/**
* Image that is displaying in the crosshair. The default value is nil.
*/
@property (nonatomic, retain) NSImage *image;
/**
* Offset in pixels of the image from the crosshair's center. The default value is (0,0).
*/
@property (nonatomic, assign) CGPoint imageOffset;
/**
* Crosshair delegate.
*/
@property (nonatomic, assign) id<NChartCrosshairDelegate> delegate;
@end
|
BBBys/6-Thermometer-Neopixel
|
include/TempStatus.h
|
/**
* @file TempStatus.h
* @brief Temperaturen im ganzen Haus anzeigen
* @version 1.3
* @date 26 20 Feb 29 Jan 2022
* @author Dr. <NAME>, Zeller Ring 15, 34246 Vellmar, Deutschland
* @copyright Copyright (c) 2022 <NAME>
*/
#ifndef TEMPSTATUS_H
#define TEMPSTATUS_H
#include <Arduino.h>
#include "EspMQTTClient.h"
#include <Adafruit_NeoPixel.h>
#include <Ticker.h> /// Load library "ticker" for blinking status led
#define NEOPIXELPIN 2
#define iNUMPIXELS 10 /// 10 Pixel je Temperaturanzeige
#define WARTEZEIT 660 /// Update soll alle 10 Minuten sein, nach 11 Minuten Warnanzeige
/**
* @brief Farben als RGB-Werte
*/
enum RGBFarben
{
NEOROT = 0xff0000,
NEOGELB = 0xff5F00,
NEOGRUEN = 0x00ff00,
NEOBLAU = 0x0000ff,
NEOWEISS = 0xffffff
};
// #define HUEGRUEN 21845
// #define HUEBLAU 43690
// #define HUEROT 0
enum HueFarben_t
{
HUEROT = 0,
HUEGELB = 10923U, // 65336 * 1/6
HUEGELBLICHGRUEN = 18204U, // grün + 1/3 gelb
HUEGRUEN = 21845U, // 65336 * 2/6
HUECYAN = 32768U, // 65336 * 3/6
HUEBLAU = 43691U, // 65336 * 4/6
HUEMAGENTA = 54613U, // 65336 * 5/6
HUEROT2 = 65335U // 65336 * 6/6
};
enum Temps
{
tWz,
tJo,
tCl,
tDG,
tBad,
tHzV,
tHzR,
nTemps
};
void Bild(Adafruit_NeoPixel *pixels, uint8_t spalten, uint8_t zeilen, String bitmap[]);
void Anzeigen();
void cbWartezeit();
void cbBlink(HueFarben_t pFarbton);
void flip();
double dmap(double x, double in_min, double in_max, double out_min, double out_max);
void AnzeigenI(uint8_t pNummer, float pTemp);
void Anzeigen2H(uint8_t pNummer, float pTempV, float pTempR);
#endif
|
usbong/tugon
|
Ipis.h
|
<gh_stars>1-10
/*
* Copyright 2021 SYSON, <NAME>.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @company: USBONG
* @author: SYSON, <NAME>.
* @date created: 20211111
* @date updated: 20211122
* @website address: http://www.usbong.ph
*
*/
#include "MyDynamicObject.h"
class Ipis: public MyDynamicObject
{
private:
int iMyScoreValue;
int iMyStartXPos;
int iMyStartYPos;
//added by Mike, 20211120
int iIpisLevel;
int iIpisLevelMax;
//added by Mike, 20211122
bool bIsHit;
bool bIsHitAgain;
int iDeathAnimationCounter;
void setup();
void drawIpis();
void drawExplosion();
public:
Ipis(SDL_Renderer* mySDLRenderer, int xPos, int yPos, int zPos,int windowWidth,int windowHeight);
~Ipis();
virtual void draw();
void update();
void changeState(int s); //moving or dead
int getState();
void reset(int iXPosInput, int iYPosInput);
void move(int key);
int executeRegenerate(); //added by Mike, 20211120; edited by Mike, 20211121
virtual void hitBy(MyDynamicObject* mdo);
virtual void destroy();
};
|
usbong/tugon
|
Text.h
|
/*
* Copyright 2020~2021 SYSON, <NAME>.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @company: USBONG
* @author: SYSON, <NAME>.
* @date created: 20210613
* @date updated: 20211230
* @website address: http://www.usbong.ph
*
* Acknowledgments:
* 1) "Bulalakaw Wars" Team (2007):
* <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., et al.
*
*/
#include "MyDynamicObject.h"
#include <string>
//added by Mike, 20201226
#define TRUE 1
#define FALSE 0
//added by Mike, 20210614; edited by Mike, 20210616
//#define MAX_TEXT_CHAR_ROW 2idrawPressNextSymbolCount
//edited by Mike, 20210618
//#define MAX_TEXT_CHAR_ROW 3
//edited by Mike, 20210618
//per textbox
//edited by Mike, 20211229
//#define MAX_TEXT_CHAR_ROW 4 //TO-DO: -auto-identify if over MAX; execute pause write action
#define MAX_TEXT_CHAR_ROW 3
//note: MAX rows in Random Access Memory (RAM) storage
//reminder: "Random" need not be so, due to existing pattern; albeit "RAM" is still used
#define MAX_TEXT_CHAR_ROW_RAM 100 //TO-DO: -auto-identify if over MAX; execute pause write action
//edited by Mike, 20210615
//#define MAX_TEXT_CHAR_COLUMN 8 //note: 8 with comma to be end of line
//#define MAX_TEXT_CHAR_COLUMN 16 //note: 8 with comma to be end of line
#define MAX_TEXT_CHAR_COLUMN 42 //note: 8 with comma to be end of line
#define MAX_WAIT_COUNT 5
//class UsbongUtils;
class Font;
//TO-DO: -update: this
class Text: public MyDynamicObject
{
private:
int iInputTileWidth;
int iInputTileHeight;
char cCurrentTextContainer[MAX_TEXT_CHAR_ROW_RAM][MAX_TEXT_CHAR_COLUMN];
int iTextAnimationCountDelay;
int iTextCurrentMaxRowCount;
int iCurrentMaxColumnCountPerRowContainer[MAX_TEXT_CHAR_ROW];
int iRowCountPageNumber; //start at zero
bool isAtMaxTextCharRow;
int idrawPressNextSymbolCount;
//added by Mike, 20211223
int iTextBackgroundWidthOffset;
//added by Mike, 20210723
bool bHasReachedEndOfTextMessage,
bHasPressedKeyToCloseEndOfTextMessage;
//edited by Mike, 20211222
void drawPressNextSymbolPrev();
void drawPressNextSymbol();
public:
Text(SDL_Renderer* mySDLRenderer, int xPos, int yPos, int zPos,int windowWidth,int windowHeight);
~Text();
// UsbongUtils *myUsbongUtils;
Font *myFont;
int myKeysDown[10]; //note: includes KEY_J, KEY_L, KEY_I, KEY_K,
void readInputText(char *inputFilename);
virtual void draw() {
drawText();
}
//added by Mike, 20211218
void setFont();
void drawText();
void drawTextBackgroundWithTexture();
//added by Mike, 20211217
void drawTextBackgroundWithTextureTile(int iType, int x, int y);
void drawTextBackgroundWithTexturePrev();
void drawTextBackgroundWithTextureBuggy(); //added by Mike, 20211230
void drawTextBackgroundWithTextureTopLeftCorner();
void drawTextBackgroundWithTextureBottomLeftCorner();
void drawTextBackgroundWithTextureTopRightCorner();
void drawTextBackgroundWithTextureBottomRightCorner();
void drawTextBackgroundWithTextureTopSide();
void drawTextWithFontTexture(int x, int y);
void update(float dt);
//added by Mike, 20201226
void keyDown(int keyCode);
void keyUp(int keyCode);
virtual void destroy();
};
|
usbong/tugon
|
Sdlwav.h
|
<filename>Sdlwav.h
/*
* Copyright 2021 SYSON, <NAME>.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @company: USBONG
* @author: SYSON, <NAME>.
* @date created: 20211107
* @date updated: 20211120
* @website address: http://www.usbong.ph
*
* Reference:
* 1) https://www.libsdl.org/projects/SDL_mixer/
* --> https://www.libsdl.org/projects/SDL_mixer/docs/index.html
* --> https://www.libsdl.org/projects/SDL_mixer/docs/demos/
* --> all last accessed: 20211107
*
* Acknowledgments:
* 1) "Bulalakaw Wars" Team (2007):
* <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., et al.
*
*/
/*
class Sdlwav {
public:
void sound_start();
void sound_stop();
void play_sound_clip(SoundClip *sound_clip_ptr);
void stop_sound_clip(SoundClip *sound_clip_ptr);
SoundClip *load_sound_clip(char *filename);
void unload_sound_clip(SoundClip *sound_clip_ptr);
};
*/
//Mix_Music* sound_1;
void errorv(char *str, va_list ap);
void cleanExit(char *str,...);
static void postmix(void *udata, Uint8 *_stream, int _len);
void refresh();
void print_init_flags(int flags);
int executeSDLWaveSound(int argc, char **argv);
void freeAndCloseSDLWaveSound(); //added by Mike, 20211110
|
gillchristian/cmark-gfm-hs
|
cbits/tasklist.c
|
#include "tasklist.h"
#include <parser.h>
#include <render.h>
#include <html.h>
#include "ext_scanners.h"
typedef enum {
CMARK_TASKLIST_NOCHECKED,
CMARK_TASKLIST_CHECKED,
} cmark_tasklist_type;
static const char *get_type_string(cmark_syntax_extension *extension, cmark_node *node) {
return "tasklist";
}
char *cmark_gfm_extensions_get_tasklist_state(cmark_node *node) {
if (!node || ((int)node->as.opaque != CMARK_TASKLIST_CHECKED && (int)node->as.opaque != CMARK_TASKLIST_NOCHECKED))
return 0;
if ((int)node->as.opaque != CMARK_TASKLIST_CHECKED) {
return "checked";
}
else {
return "unchecked";
}
}
static bool parse_node_item_prefix(cmark_parser *parser, const char *input,
cmark_node *container) {
bool res = false;
if (parser->indent >=
container->as.list.marker_offset + container->as.list.padding) {
cmark_parser_advance_offset(parser, input, container->as.list.marker_offset +
container->as.list.padding,
true);
res = true;
} else if (parser->blank && container->first_child != NULL) {
// if container->first_child is NULL, then the opening line
// of the list item was blank after the list marker; in this
// case, we are done with the list item.
cmark_parser_advance_offset(parser, input, parser->first_nonspace - parser->offset,
false);
res = true;
}
return res;
}
static int matches(cmark_syntax_extension *self, cmark_parser *parser,
unsigned char *input, int len,
cmark_node *parent_container) {
return parse_node_item_prefix(parser, (const char*)input, parent_container);
}
static int can_contain(cmark_syntax_extension *extension, cmark_node *node,
cmark_node_type child_type) {
return (node->type == CMARK_NODE_ITEM) ? 1 : 0;
}
static cmark_node *open_tasklist_item(cmark_syntax_extension *self,
int indented, cmark_parser *parser,
cmark_node *parent_container,
unsigned char *input, int len) {
cmark_node_type node_type = cmark_node_get_type(parent_container);
if (node_type != CMARK_NODE_ITEM) {
return NULL;
}
bufsize_t matched = scan_tasklist(input, len, 0);
if (!matched) {
return NULL;
}
cmark_node_set_syntax_extension(parent_container, self);
cmark_parser_advance_offset(parser, (char *)input, 3, false);
if (strstr((char*)input, "[x]")) {
parent_container->as.opaque = (void *)CMARK_TASKLIST_CHECKED;
} else {
parent_container->as.opaque = (void *)CMARK_TASKLIST_NOCHECKED;
}
return NULL;
}
static void commonmark_render(cmark_syntax_extension *extension,
cmark_renderer *renderer, cmark_node *node,
cmark_event_type ev_type, int options) {
bool entering = (ev_type == CMARK_EVENT_ENTER);
if (entering) {
renderer->cr(renderer);
if ((int)node->as.opaque == CMARK_TASKLIST_CHECKED) {
renderer->out(renderer, node, "- [x] ", false, LITERAL);
} else {
renderer->out(renderer, node, "- [ ] ", false, LITERAL);
}
cmark_strbuf_puts(renderer->prefix, " ");
} else {
cmark_strbuf_truncate(renderer->prefix, renderer->prefix->size - 2);
renderer->cr(renderer);
}
}
static void html_render(cmark_syntax_extension *extension,
cmark_html_renderer *renderer, cmark_node *node,
cmark_event_type ev_type, int options) {
bool entering = (ev_type == CMARK_EVENT_ENTER);
if (entering) {
cmark_html_render_cr(renderer->html);
cmark_strbuf_puts(renderer->html, "<li");
cmark_html_render_sourcepos(node, renderer->html, options);
cmark_strbuf_putc(renderer->html, '>');
if ((int)node->as.opaque == CMARK_TASKLIST_CHECKED) {
cmark_strbuf_puts(renderer->html, "<input type=\"checkbox\" checked=\"\" disabled=\"\" /> ");
} else {
cmark_strbuf_puts(renderer->html, "<input type=\"checkbox\" disabled=\"\" /> ");
}
} else {
cmark_strbuf_puts(renderer->html, "</li>\n");
}
}
cmark_syntax_extension *create_tasklist_extension(void) {
cmark_syntax_extension *ext = cmark_syntax_extension_new("tasklist");
cmark_syntax_extension_set_match_block_func(ext, matches);
cmark_syntax_extension_set_get_type_string_func(ext, get_type_string);
cmark_syntax_extension_set_open_block_func(ext, open_tasklist_item);
cmark_syntax_extension_set_can_contain_func(ext, can_contain);
cmark_syntax_extension_set_commonmark_render_func(ext, commonmark_render);
cmark_syntax_extension_set_plaintext_render_func(ext, commonmark_render);
cmark_syntax_extension_set_html_render_func(ext, html_render);
return ext;
}
|
Joursoir/umt
|
UefiMonitorTest/UefiMonitorTest.c
|
<reponame>Joursoir/umt<gh_stars>0
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/HiiLib.h>
#include <Library/UefiHiiServicesLib.h>
#include "UefiMonitorTest.h"
#include "MainMenu.h"
#include "SettingsMenu.h"
#include "tests/SolidColors.h"
#include <tests/Grayscale.h>
#include "tests/Gradients.h"
#include "tests/ChessBoard.h"
STATIC CONST UMT_STATE_ACTIONS mStateActions[UMT_STATE_END] = {
{ MainMenuInit, MainMenuDoit, MainMenuTip, MainMenuChangeParam, MainMenuChangeValue },
{ SettingsMenuInit, SettingsMenuDoit, SettingsMenuTip, SettingsChangeParam, SettingsMenuChangeValue },
{ SolidColorsTestInit, SolidColorsTestDoit, SolidColorsTestTip, SolidColorsTestChangeParam, SolidColorsTestChangeValue },
{ GrayscaleTestInit, GrayscaleTestDoit, GrayscaleTestTip, GrayscaleTestChangeParam, GrayscaleTestChangeValue },
{ GradientsTestInit, GradientsTestDoit, GradientsTestTip, GradientsTestChangeParam, GradientsTestChangeValue },
{ ChessBoardTestInit, ChessBoardTestDoit, ChessBoardTestTip, ChessBoardTestChangeParam, ChessBoardTestChangeValue }
};
EFI_HII_HANDLE gUmtHiiHandle = NULL;
STATIC
EFI_STATUS
RegisterHiiPackage (
IN EFI_HANDLE ImageHandle,
OUT EFI_HII_HANDLE *HiiHandle
)
{
EFI_STATUS Status;
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
// Retrieve HII package list from ImageHandle
Status = gBS->OpenProtocol (
ImageHandle,
&gEfiHiiPackageListProtocolGuid,
(VOID **)&PackageList,
ImageHandle,
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Failed to open EFI_HII_PACKAGE_LIST_PROTOCOL\n"));
return Status;
}
Status = gHiiDatabase->NewPackageList(gHiiDatabase, PackageList, NULL, HiiHandle);
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_ERROR, "Failed to add HII Package list to HII database: %r\n", Status));
return Status;
}
return Status;
}
STATIC
EFI_STATUS
UnregisterHiiPackage (
IN EFI_HII_HANDLE HiiHandle
)
{
EFI_STATUS Status;
Status = gHiiDatabase->RemovePackageList(gHiiDatabase, HiiHandle);
if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_WARN, "Failed to remove HII Package list from HII database: %r\n", Status));
}
return Status;
}
STATIC
EFI_GRAPHICS_OUTPUT_PROTOCOL *
GetGraphicsOutputProtocol (
VOID
)
{
EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *ModeInfo;
UINTN SizeOfInfo;
Status = gBS->LocateProtocol (
&gEfiGraphicsOutputProtocolGuid,
NULL,
(VOID **)&Gop
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Unable to locate GOP\n"));
return NULL;
}
Status = Gop->QueryMode (
Gop,
(Gop->Mode == NULL) ? 0 : Gop->Mode->Mode,
&SizeOfInfo,
&ModeInfo
);
if (Status == EFI_NOT_STARTED) {
Status = Gop->SetMode (Gop, 0);
}
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Unable to get native mode\n"));
return NULL;
}
// TODO: free ModeInfo
return Gop;
}
STATIC
VOID
ChangeCtxState (
IN UMT_CONTEXT *Ctx,
IN enum UMT_STATE State
)
{
if (State >= UMT_STATE_END)
return;
Ctx->State = State;
Ctx->ShowTip = FALSE;
Ctx->Actions = &mStateActions[State];
Ctx->Actions->Init (Ctx);
}
/**
Handle user key input. Will route it to other components handle function
@retval VOID
**/
STATIC
VOID
HandleInput (
IN UMT_CONTEXT *Ctx
)
{
EFI_KEY_DATA KeyData;
EFI_STATUS Status;
// TODO: check mouse activity
// Check keyboard activity
Status = gBS->CheckEvent (Ctx->Graphics->TextInputEx->WaitForKeyEx);
if (EFI_ERROR (Status))
return;
Status = Ctx->Graphics->TextInputEx->ReadKeyStrokeEx (Ctx->Graphics->TextInputEx, &KeyData);
if (EFI_ERROR (Status))
return;
switch (KeyData.Key.ScanCode) {
case SCAN_UP:
Ctx->Actions->ChangeParam (Ctx, -1);
break;
case SCAN_DOWN:
Ctx->Actions->ChangeParam (Ctx, +1);
break;
case SCAN_RIGHT:
Ctx->Actions->ChangeValue (Ctx, +1);
break;
case SCAN_LEFT:
Ctx->Actions->ChangeValue (Ctx, -1);
break;
case SCAN_F1...SCAN_F11:
ChangeCtxState (Ctx, KeyData.Key.ScanCode - SCAN_F1 + UMT_STATE_SOLID_COLORS_TEST);
break;
case SCAN_F12:
ChangeCtxState (Ctx, UMT_STATE_SETTINGS);
break;
case SCAN_ESC:
if (Ctx->State != UMT_STATE_MAIN_MENU) {
ChangeCtxState (Ctx, UMT_STATE_MAIN_MENU);
break;
}
Ctx->Running = FALSE;
break;
default:
break;
}
if (KeyData.Key.ScanCode == SCAN_NULL && KeyData.Key.UnicodeChar == L' ') {
Ctx->ShowTip = !Ctx->ShowTip;
Ctx->Actions->Tip (Ctx);
}
}
STATIC
EFI_STATUS
Run (
IN GRAPHICS_CONTEXT *Graphics
)
{
UMT_CONTEXT Ctx;
Ctx.Running = TRUE;
Ctx.Graphics = Graphics;
ChangeCtxState (&Ctx, UMT_STATE_MAIN_MENU);
while (Ctx.Running == TRUE)
{
HandleInput (&Ctx);
Ctx.Actions->Doit (&Ctx);
// Buffer swap:
CopyMem (Graphics->FrontBuffer, Graphics->BackBuffer, Graphics->BufferSize);
}
return EFI_SUCCESS;
}
EFI_STATUS
EFIAPI
UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
GRAPHICS_CONTEXT Graphics;
EFI_STATUS Status;
Status = EFI_SUCCESS;
Status = RegisterHiiPackage (ImageHandle, &gUmtHiiHandle);
if (EFI_ERROR(Status)) {
Print (L"Error: Failed to register HII Package list\n");
return Status;
}
Gop = GetGraphicsOutputProtocol ();
if (Gop == NULL) {
Print (L"Error: Getting a Graphical Output Protocol is failed\n");
return EFI_NOT_FOUND;
}
Status = PrepareGraphicsInfo (&Graphics, Gop);
if (EFI_ERROR(Status)) {
Print (L"Error: Preparing graphics information is failed. %r\n", Status);
return EFI_NOT_FOUND;
}
Status = Run (&Graphics);
ForgetGraphicsInfo (&Graphics);
gST->ConOut->ClearScreen(gST->ConOut);
UnregisterHiiPackage (gUmtHiiHandle);
return Status;
}
|
Joursoir/umt
|
UefiMonitorTest/fonts/System-8x16.h
|
<gh_stars>0
#ifndef UMT_FONT_SYSTEM8X16_H
#define UMT_FONT_SYSTEM8X16_H
#define SYSTEM8X16_FONT_WIDTH 8
#define SYSTEM8X16_FONT_HEIGHT 16
#define SYSTEM8X16_FONT_SIZE (SYSTEM8X16_FONT_WIDTH * SYSTEM8X16_FONT_HEIGHT * 255)
UINT8 gFontSystem8x16[SYSTEM8X16_FONT_SIZE] = {
// Start of Heading (1)
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,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0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0
,
//
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0
,
// (255)
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0
};
#endif /* UMT_FONT_SYSTEM8X16_H */
|
Joursoir/umt
|
UefiMonitorTest/Graphics.c
|
<gh_stars>0
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include "Graphics.h"
#include "fonts/System-8x16.h"
#define UMT_MAXPRINT_BUFFER_SIZE 6400 // TODO: Use Pcd
#define SWAP(A, B, C) \
C = A; \
A = B; \
B = C
CONST EFI_PIXEL_BITMASK mRgbPixelMasks = {
0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000
};
CONST EFI_PIXEL_BITMASK mBgrPixelMasks = {
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
};
CONST UMT_COLORS gUmtColors[UMT_COLOR_END] = {
{ STRING_TOKEN (STR_COLOR_BLACK), { 0x00, 0x00, 0x00, 0x00 } },
{ STRING_TOKEN (STR_COLOR_WHITE), { 0xFF, 0xFF, 0xFF, 0x00 } },
{ STRING_TOKEN (STR_COLOR_RED), { 0x00, 0x00, 0xFF, 0x00 } },
{ STRING_TOKEN (STR_COLOR_LIME), { 0x00, 0xFF, 0x00, 0x00 } },
{ STRING_TOKEN (STR_COLOR_BLUE), { 0xFF, 0x00, 0x00, 0x00 } },
{ STRING_TOKEN (STR_COLOR_YELLOW), { 0x00, 0xFF, 0xFF, 0x00 } },
{ STRING_TOKEN (STR_COLOR_AQUA), { 0xFF, 0xFF, 0x00, 0x00 } },
{ STRING_TOKEN (STR_COLOR_MAGENTA), { 0xFF, 0x00, 0xFF, 0x00 } },
{ STRING_TOKEN (STR_COLOR_SILVER), { 0xC0, 0xC0, 0xC0, 0x00 } },
{ STRING_TOKEN (STR_COLOR_GRAY), { 0x80, 0x80, 0x80, 0x00 } },
{ STRING_TOKEN (STR_COLOR_MAROON), { 0x00, 0x00, 0x80, 0x00 } },
{ STRING_TOKEN (STR_COLOR_OLIVE), { 0x00, 0x80, 0x80, 0x00 } },
{ STRING_TOKEN (STR_COLOR_GREEN), { 0x00, 0x80, 0x00, 0x00 } },
{ STRING_TOKEN (STR_COLOR_PURPLE), { 0x80, 0x00, 0x80, 0x00 } },
{ STRING_TOKEN (STR_COLOR_TEAL), { 0x80, 0x80, 0x00, 0x00 } },
{ STRING_TOKEN (STR_COLOR_NAVY), { 0x80, 0x00, 0x00, 0x00 } }
};
STATIC
VOID
ParseGraphicsPixelFormat (
IN CONST EFI_PIXEL_BITMASK *BitMask,
OUT UINT32 *PixelWidth,
OUT INT8 *PixelShl,
OUT INT8 *PixelShr
)
{
UINT8 Index;
UINT32 *Masks;
UINT32 MergedMasks;
MergedMasks = 0;
Masks = (UINT32 *)BitMask;
for (Index = 0; Index < 3; Index++) {
ASSERT ((MergedMasks & Masks[Index]) == 0);
PixelShl[Index] = (INT8)HighBitSet32 (Masks[Index]) - 23 + (Index * 8);
if (PixelShl[Index] < 0) {
PixelShr[Index] = -PixelShl[Index];
PixelShl[Index] = 0;
} else {
PixelShr[Index] = 0;
}
DEBUG ((
DEBUG_INFO,
"Index %d: shl:%d shr:%d mask:%08x\n",
Index,
PixelShl[Index],
PixelShr[Index],
Masks[Index]
));
MergedMasks = (UINT32)(MergedMasks | Masks[Index]);
}
MergedMasks = (UINT32)(MergedMasks | Masks[3]);
ASSERT (MergedMasks != 0);
*PixelWidth = (UINT32)((HighBitSet32 (MergedMasks) + 7) / 8);
DEBUG ((DEBUG_INFO, "Bytes per pixel: %d\n", *PixelWidth));
}
EFI_STATUS
PrepareGraphicsInfo (
IN GRAPHICS_CONTEXT *Graphics,
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop
)
{
EFI_STATUS Status;
CONST EFI_PIXEL_BITMASK *BitMask;
UINT32 PixelWidth;
INT8 PixelShl[4];
INT8 PixelShr[4];
EFI_HANDLE *HandleBuffer;
UINTN HandleCount;
UINTN Index;
ASSERT (Graphics != NULL);
ASSERT (Gop != NULL);
switch (Gop->Mode->Info->PixelFormat) {
case PixelRedGreenBlueReserved8BitPerColor:
BitMask = &mRgbPixelMasks;
break;
case PixelBlueGreenRedReserved8BitPerColor:
BitMask = &mBgrPixelMasks;
break;
case PixelBitMask:
BitMask = &Gop->Mode->Info->PixelInformation;
break;
case PixelBltOnly:
ASSERT (FALSE);
return RETURN_UNSUPPORTED;
default:
ASSERT (FALSE);
return RETURN_INVALID_PARAMETER;
}
DEBUG ((
DEBUG_INFO,
"GOP information:\n"
"Mode: %d/%d\n"
"Framebuffer address, size: %x, %d\n"
"Screen width x height: %d x %d\n",
Gop->Mode->Mode, Gop->Mode->MaxMode,
Gop->Mode->FrameBufferBase, Gop->Mode->FrameBufferSize,
Gop->Mode->Info->HorizontalResolution, Gop->Mode->Info->VerticalResolution
));
ParseGraphicsPixelFormat (BitMask, &PixelWidth, PixelShl, PixelShr);
ASSERT (PixelWidth == 4);
Graphics->Gop = Gop;
Graphics->FrontBuffer = (UINT32 *)Gop->Mode->FrameBufferBase;
Graphics->BufferSize = Gop->Mode->FrameBufferSize;
Graphics->BackBuffer = AllocateCopyPool (Graphics->BufferSize, Graphics->FrontBuffer);
if (Graphics->BackBuffer == NULL)
return EFI_OUT_OF_RESOURCES;
Graphics->Width = Gop->Mode->Info->HorizontalResolution;
Graphics->Height = Gop->Mode->Info->VerticalResolution;
CopyMem (&Graphics->PixelMasks, BitMask, sizeof (*BitMask));
CopyMem (Graphics->PixelShl, PixelShl, sizeof (PixelShl));
CopyMem (Graphics->PixelShr, PixelShr, sizeof (PixelShr));
Graphics->PixelWidth = PixelWidth;
Graphics->Pitch = Gop->Mode->Info->PixelsPerScanLine;
// Find TextInEx in System Table ConsoleInHandle
Status = gBS->HandleProtocol (
gST->ConsoleInHandle,
&gEfiSimpleTextInputExProtocolGuid,
(VOID **)&Graphics->TextInputEx
);
if (EFI_ERROR (Status)) {
FreePool (Graphics->BackBuffer);
return Status;
}
// Find mouse in System Table ConsoleInHandle
Status = gBS->HandleProtocol (
gST->ConsoleInHandle,
&gEfiSimplePointerProtocolGuid,
(VOID **)&Graphics->MouseInterface
);
if (EFI_ERROR (Status))
{
HandleBuffer = NULL;
Graphics->MouseInterface = NULL;
Status = gBS->LocateHandleBuffer (
ByProtocol,
&gEfiSimplePointerProtocolGuid,
NULL,
&HandleCount,
&HandleBuffer
);
if (!EFI_ERROR (Status)) {
for (Index = 0; Index < HandleCount; Index++) {
Status = gBS->HandleProtocol (
HandleBuffer[Index],
&gEfiSimplePointerProtocolGuid,
(VOID **)&Graphics->MouseInterface
);
if (!EFI_ERROR (Status)) {
break;
}
}
}
if (HandleBuffer != NULL) {
FreePool (HandleBuffer);
}
}
if (!EFI_ERROR (Status) && (Graphics->MouseInterface != NULL)) {
Graphics->MouseSupported = TRUE;
}
DEBUG ((DEBUG_INFO, "Mouse support: %s\n\n", Graphics->MouseSupported ? L"Yes" : L"No"));
return EFI_SUCCESS;
}
VOID
ForgetGraphicsInfo (
IN GRAPHICS_CONTEXT *Graphics
)
{
ASSERT (Graphics != NULL);
// Should we zero all the data structure?
FreePool (Graphics->BackBuffer);
}
/**
Get a color that doesn't depend on pixel format, i.e.
independent color.
@param[in] Graphics A graphics context.
@param[in] Ucolor A GRAPHICS_PIXEL_COLOR, which is
represented as unsigned 32-bit.
@retval UINT32 A color in independent format.
**/
UINT32
GetIcolor (
IN GRAPHICS_CONTEXT *Graphics,
IN UINT32 Ucolor
)
{
return (UINT32)(
(((Ucolor << Graphics->PixelShl[0]) >> Graphics->PixelShr[0]) &
Graphics->PixelMasks.RedMask) |
(((Ucolor << Graphics->PixelShl[1]) >> Graphics->PixelShr[1]) &
Graphics->PixelMasks.GreenMask) |
(((Ucolor << Graphics->PixelShl[2]) >> Graphics->PixelShr[2]) &
Graphics->PixelMasks.BlueMask)
);
}
/**
Draw a line using Bresenham's algorithm
@retval VOID
**/
VOID
DrawLine (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN CONST GRAPHICS_PIXEL_COLOR *Color
)
{
INTN DeltaX;
INTN DeltaY;
INTN AbsDeltaX;
INTN AbsDeltaY;
INTN Correction;
INT8 Direction;
UINTN X, Y, Z;
BOOLEAN Reverse;
UINT32 Icolor;
ASSERT (X0 >= 0 && X0 < Graphics->Width);
ASSERT (Y0 >= 0 && Y0 < Graphics->Height);
ASSERT (X1 >= 0 && X1 < Graphics->Width);
ASSERT (Y1 >= 0 && Y1 < Graphics->Height);
DeltaX = X1 - X0;
DeltaY = Y1 - Y0;
AbsDeltaX = ABS (DeltaX);
AbsDeltaY = ABS (DeltaY);
Reverse = FALSE;
if (AbsDeltaX < AbsDeltaY) {
SWAP (X0, Y0, Z);
SWAP (X1, Y1, Z);
Reverse = TRUE;
}
if (X0 > X1) {
SWAP (X0, X1, Z);
SWAP (Y0, Y1, Z);
}
DeltaX = X1 - X0;
DeltaY = Y1 - Y0;
AbsDeltaY = ABS (DeltaY) * 2;
Correction = 0;
Direction = (Y1 > Y0) ? 1 : -1;
Icolor = GetIcolor (Graphics, GET_UCOLOR (Color));
Y = Y0;
for (X = X0; X <= X1; X++) {
if (Reverse) {
PUT_PUXEL (Graphics, Y, X, Icolor);
} else {
PUT_PUXEL (Graphics, X, Y, Icolor);
}
Correction += AbsDeltaY;
if (Correction > DeltaX) {
Y += Direction;
Correction -= DeltaX * 2;
}
}
}
VOID
PutRect (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN CONST GRAPHICS_PIXEL_COLOR *Color
)
{
UINT32 *Buffer;
UINT32 Icolor;
UINT32 I, J;
ASSERT (X0 >= 0 && X0 <= Graphics->Width);
ASSERT (Y0 >= 0 && Y0 <= Graphics->Height);
ASSERT (X1 >= 0 && X1 <= Graphics->Width && X1 >= X0);
ASSERT (Y1 >= 0 && Y1 <= Graphics->Height && Y1 >= Y0);
Buffer = Graphics->BackBuffer + Y0 * Graphics->Pitch;
Icolor = GetIcolor (Graphics, GET_UCOLOR (Color));
for (J = Y0; J < Y1; J++) {
for (I = X0; I < X1; I++) {
Buffer[I] = Icolor;
}
Buffer += Graphics->Pitch;
}
}
VOID
DrawRectWithBorder (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN UINTN BorderSize,
IN CONST GRAPHICS_PIXEL_COLOR *MainColor,
IN CONST GRAPHICS_PIXEL_COLOR *BorderColor
)
{
UINT8 Index;
for (Index = 0; Index < BorderSize; Index++) {
DrawLine (Graphics, X0 , Y0 + Index , X1 - 1 , Y0 + Index , BorderColor);
DrawLine (Graphics, X0 + Index , Y0 , X0 + Index , Y1 - 1 , BorderColor);
DrawLine (Graphics, X1 - 1 - Index, Y0 , X1 - 1 - Index, Y1 - 1 , BorderColor);
DrawLine (Graphics, X0 , Y1 - 1 - Index, X1 - 1 , Y1 - 1 - Index, BorderColor);
}
PutRect (Graphics, X0 + BorderSize, Y0 + BorderSize, X1 - BorderSize, Y1 - BorderSize, MainColor);
}
VOID
DrawRoundedRect (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN UINTN CornerRadius,
IN CONST GRAPHICS_PIXEL_COLOR *Color
)
{
UINT8 Index;
DrawCircle (Graphics, X0 + CornerRadius, Y0 + CornerRadius, CornerRadius, Color);
DrawCircle (Graphics, X1 - CornerRadius, Y0 + CornerRadius, CornerRadius, Color);
DrawCircle (Graphics, X0 + CornerRadius, Y1 - CornerRadius, CornerRadius, Color);
DrawCircle (Graphics, X1 - CornerRadius, Y1 - CornerRadius, CornerRadius, Color);
for (Index = 0; Index < CornerRadius; Index++) {
DrawLine (Graphics, X0 + CornerRadius, Y0 + Index , X1 - 1 - CornerRadius, Y0 + Index, Color);
DrawLine (Graphics, X0 + Index , Y0 + CornerRadius, X0 + Index , Y1 - 1 - CornerRadius, Color);
DrawLine (Graphics, X1 - 1 - Index , Y0 + CornerRadius, X1 - 1 - Index , Y1 - 1 - CornerRadius, Color);
DrawLine (Graphics, X0 + CornerRadius, Y1 - 1 - Index , X1 - 1 - CornerRadius, Y1 - 1 - Index, Color);
}
PutRect (Graphics, X0 + CornerRadius, Y0 + CornerRadius, X1 - CornerRadius, Y1 - CornerRadius, Color);
}
VOID
DrawCircle (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN R,
IN CONST GRAPHICS_PIXEL_COLOR *Color
)
{
UINT32 *Buffer;
UINT32 Icolor;
UINT32 I, J;
ASSERT (X0 >= 0 && X0 < Graphics->Width);
ASSERT (Y0 >= 0 && Y0 < Graphics->Height);
ASSERT (R > 0);
ASSERT ((X0 + R) < Graphics->Width && X0 >= R);
ASSERT ((Y0 + R) < Graphics->Height && Y0 >= R);
Icolor = GetIcolor (Graphics, GET_UCOLOR (Color));
Buffer = Graphics->BackBuffer + (Y0 - R) * Graphics->Pitch;
for (J = (Y0 - R); J <= (Y0 + R); J++) {
for (I = (X0 - R); I <= (X0 + R); I++) {
if ((J - Y0) * (J - Y0) + (I - X0) * (I - X0) <= (R * R)) {
Buffer[I] = Icolor;
}
}
Buffer += Graphics->Pitch;
}
}
/**
Draws a character to the screen
@retval VOID
**/
VOID
DrawChar (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN UINT32 Icolor,
IN CHAR16 Char
)
{
UINTN Index;
UINTN l, c;
Index = Char * (SYSTEM8X16_FONT_WIDTH * SYSTEM8X16_FONT_HEIGHT) - (SYSTEM8X16_FONT_WIDTH * SYSTEM8X16_FONT_HEIGHT);
for (l = 0; l < SYSTEM8X16_FONT_HEIGHT; l++) {
for (c = 0; c < SYSTEM8X16_FONT_WIDTH; c++) {
if (gFontSystem8x16[Index] == 1) {
PUT_PUXEL (Graphics, (X + c), (Y + l), Icolor);
}
Index++;
}
}
}
EFI_STATUS
GetFontParameters (
IN GRAPHICS_CONTEXT *Graphics,
OUT UINTN *FontWidth,
OUT UINTN *FontHeight
)
{
ASSERT (FontWidth != NULL);
ASSERT (FontHeight != NULL);
*FontWidth = SYSTEM8X16_FONT_WIDTH;
*FontHeight = SYSTEM8X16_FONT_HEIGHT;
return EFI_SUCCESS;
}
/**
Draws output based on a null-terminated Unicode format string
and a arguments list to the screen
@retval The number of Unicode characters drawn
**/
UINTN
EFIAPI
DrawStringVF (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN CONST GRAPHICS_PIXEL_COLOR *Color,
IN CONST CHAR16 *FormatString,
IN VA_LIST Marker
)
{
UINTN WalkerSize;
CHAR16 *FormatWalker;
UINTN Length;
UINTN Index;
UINTN OldX;
UINT32 Icolor;
ASSERT(FormatString != NULL);
WalkerSize = (UMT_MAXPRINT_BUFFER_SIZE + 1) * sizeof(CHAR16);
FormatWalker = AllocateZeroPool(WalkerSize);
if (FormatWalker == NULL)
return 0;
Length = UnicodeVSPrint(FormatWalker, WalkerSize, FormatString, Marker);
Index = 0;
OldX = X;
Icolor = GetIcolor (Graphics, GET_UCOLOR (Color));
while (FormatWalker[Index] != '\0' && Index < Length) {
switch (FormatWalker[Index]) {
case L'\n':
X = OldX;
Y += SYSTEM8X16_FONT_HEIGHT;
break;
case L'\t':
X += SYSTEM8X16_FONT_WIDTH * 4;
break;
default:
DrawChar (Graphics, X, Y, Icolor, FormatWalker[Index]);
X += SYSTEM8X16_FONT_WIDTH;
if (X > Graphics->Width)
break;
}
Index++;
}
FreePool(FormatWalker);
return Index;
}
/**
Draws a null-terminated formatted Unicode string to the screen
@retval The number of Unicode characters drawn
**/
UINTN
EFIAPI
DrawStringF (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN CONST GRAPHICS_PIXEL_COLOR *Color,
IN CONST CHAR16 *FormatString,
...
)
{
VA_LIST Marker;
UINTN NumberOfPrinted;
VA_START (Marker, FormatString);
NumberOfPrinted = DrawStringVF(Graphics, X, Y, Color, FormatString, Marker);
VA_END (Marker);
return NumberOfPrinted;
}
UINTN
EFIAPI
DrawHiiStringF (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN CONST GRAPHICS_PIXEL_COLOR *Color,
IN CONST EFI_STRING_ID HiiFormatStringId,
IN CONST EFI_HII_HANDLE HiiFormatHandle,
...
)
{
VA_LIST Marker;
CHAR16 *HiiFormatString;
UINTN NumberOfPrinted;
NumberOfPrinted = 0;
VA_START (Marker, HiiFormatHandle);
HiiFormatString = HiiGetString (HiiFormatHandle, HiiFormatStringId, NULL);
if (HiiFormatString != NULL) {
NumberOfPrinted = DrawStringVF(Graphics, X, Y, Color, HiiFormatString, Marker);
FreePool (HiiFormatString);
}
VA_END (Marker);
return NumberOfPrinted;
}
|
Joursoir/umt
|
UefiMonitorTest/tests/Gradients.c
|
<reponame>Joursoir/umt<gh_stars>0
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include "Gradients.h"
enum UMT_GRADIENTS_PARAM {
UMT_GRADIENTS_PARAM_COLOR = 0,
UMT_GRADIENTS_PARAM_STEP
};
enum UMT_GRADIENTS_STEPS {
UMT_GRADIENTS_STEP_8 = 0,
UMT_GRADIENTS_STEP_16,
UMT_GRADIENTS_STEP_32,
UMT_GRADIENTS_STEP_64,
UMT_GRADIENTS_STEP_128,
UMT_GRADIENTS_STEP_256,
UMT_GRADIENTS_STEP_END
};
STATIC enum UMT_COLORS CurrentColor = 1;
STATIC enum UMT_GRADIENTS_STEPS CurrentStep = UMT_GRADIENTS_STEP_8;
STATIC enum UMT_GRADIENTS_PARAM CurrentParam = UMT_GRADIENTS_PARAM_COLOR;
CONST UINT32 mGradientsSteps[UMT_GRADIENTS_STEP_END] = {
8, 16, 32, 64, 128, 256
};
VOID
GradientsTestInit (
IN UMT_CONTEXT *Ctx
)
{
UINT32 Index;
GRAPHICS_PIXEL_COLOR ColorOutput = { 0x00 };
GRAPHICS_PIXEL_COLOR ColorInc = { 0x00 };
GRAPHICS_CONTEXT *Graphics = Ctx->Graphics;
ColorInc.Red = ((gUmtColors[CurrentColor].Color.Red) / (mGradientsSteps[CurrentStep]-1));
ColorInc.Green = ((gUmtColors[CurrentColor].Color.Green) / (mGradientsSteps[CurrentStep]-1));
ColorInc.Blue = ((gUmtColors[CurrentColor].Color.Blue) / (mGradientsSteps[CurrentStep]-1));
for (Index = 0; Index < mGradientsSteps[CurrentStep]; Index++)
{
PutRect (Graphics, (Graphics->Width * Index) / mGradientsSteps[CurrentStep],
0,
(Graphics->Width * (Index + 1)) / mGradientsSteps[CurrentStep],
Graphics->Height,
&ColorOutput);
ColorOutput.Red += ColorInc.Red;
ColorOutput.Green += ColorInc.Green;
ColorOutput.Blue += ColorInc.Blue;
}
if (Ctx->ShowTip) {
GradientsTestTip (Ctx);
}
}
VOID
GradientsTestDoit (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
GradientsTestTip (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics;
CHAR16 *ColorMsg;
Graphics = Ctx->Graphics;
if (Ctx->ShowTip == FALSE) {
// Restore
GradientsTestInit (Ctx);
return;
}
ColorMsg = HiiGetString (gUmtHiiHandle, gUmtColors[CurrentColor].StringId, NULL);
DrawRectWithBorder (Graphics,
15,
Graphics->Height - 15 - 174,
510, Graphics->Height - 15,
3,
&gUmtColors[UMT_COLOR_WHITE].Color,
&gUmtColors[UMT_COLOR_NAVY].Color);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 164,
&gUmtColors[UMT_COLOR_NAVY].Color,
STRING_TOKEN (STR_GRADIENTS_TITLE), gUmtHiiHandle);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 144,
&gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_GRADIENTS_MSG), gUmtHiiHandle,
(CurrentParam == UMT_GRADIENTS_PARAM_COLOR) ? L'*' : L' ',
ColorMsg,
(CurrentParam == UMT_GRADIENTS_PARAM_STEP) ? L'*' : L' ',
mGradientsSteps[CurrentStep]);
FreePool (ColorMsg);
}
VOID
GradientsTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
)
{
switch (CurrentParam) {
case UMT_GRADIENTS_PARAM_COLOR:
if (CurrentColor == UMT_COLOR_WHITE && ValueStep < 0) {
CurrentColor = UMT_COLOR_MAGENTA;
} else {
CurrentColor += ValueStep;
if (CurrentColor > UMT_COLOR_MAGENTA) {
CurrentColor = UMT_COLOR_WHITE;
}
}
break;
case UMT_GRADIENTS_PARAM_STEP:
if (CurrentStep == 0 && ValueStep < 0) {
return;
} else {
CurrentStep += ValueStep;
if (CurrentStep > UMT_GRADIENTS_STEP_256)
{
CurrentStep = UMT_GRADIENTS_STEP_256;
return;
}
}
break;
default:
ASSERT(FALSE);
return;
}
GradientsTestInit (Ctx);
}
VOID
GradientsTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
)
{
if (CurrentParam == 0 && ParamStep < 0) {
CurrentParam = UMT_GRADIENTS_PARAM_STEP;
} else {
CurrentParam += ParamStep;
if (CurrentParam > UMT_GRADIENTS_PARAM_STEP)
{
CurrentParam = UMT_GRADIENTS_PARAM_COLOR;
}
}
GradientsTestInit (Ctx);
}
|
Joursoir/umt
|
UefiMonitorTest/tests/ChessBoard.c
|
<reponame>Joursoir/umt
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include "tests/ChessBoard.h"
STATIC UINT32 CurrentSideLength = 1;
VOID
ChessBoardTestInit (
IN UMT_CONTEXT *Ctx
)
{
UINT32 I;
UINT32 J;
enum UMT_COLORS ColorSquare;
enum UMT_COLORS FirstColorSquare;
enum UMT_COLORS TempColor;
GRAPHICS_CONTEXT *Graphics = Ctx->Graphics;
FirstColorSquare = UMT_COLOR_WHITE;
ColorSquare = UMT_COLOR_BLACK;
for (J = 0; J < Graphics->Height; J += CurrentSideLength)
{
TempColor = FirstColorSquare;
FirstColorSquare = ColorSquare;
ColorSquare = TempColor;
for (I = 0; I < Graphics->Width; I += CurrentSideLength)
{
PutRect (Graphics,
I,
J,
I + CurrentSideLength,
J + CurrentSideLength,
&gUmtColors[ColorSquare].Color);
ColorSquare = ((ColorSquare == UMT_COLOR_WHITE) ? UMT_COLOR_BLACK : UMT_COLOR_WHITE);
}
}
if (Ctx->ShowTip) {
ChessBoardTestTip (Ctx);
}
}
VOID
ChessBoardTestDoit (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
ChessBoardTestTip (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics;
Graphics = Ctx->Graphics;
if (Ctx->ShowTip == FALSE) {
// Restore
ChessBoardTestInit (Ctx);
return;
}
DrawRectWithBorder (Graphics,
15,
Graphics->Height - 15 - 124,
430, Graphics->Height - 15,
3,
&gUmtColors[UMT_COLOR_WHITE].Color,
&gUmtColors[UMT_COLOR_NAVY].Color);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 114,
&gUmtColors[UMT_COLOR_NAVY].Color,
STRING_TOKEN (STR_CHESSBOARD_TITLE), gUmtHiiHandle);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 94,
&gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_CHESSBOARD_MSG), gUmtHiiHandle,
CurrentSideLength);
}
VOID
ChessBoardTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
)
{
}
VOID
ChessBoardTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
)
{
UINT32 ValueOut;
UINT32 Height;
UINT32 Width;
Height = Ctx->Graphics->Height;
Width = Ctx->Graphics->Width;
ValueOut = CurrentSideLength + ValueStep;
if (ValueOut == 0) {
return;
}
while ((((Width / ValueOut) * ValueOut != Width) ||
((Height / ValueOut) * ValueOut != Height)) &&
((ValueOut < Height) && (ValueOut < Width)) &&
(ValueOut > 1))
{
ValueOut += ValueStep;
}
if ((ValueOut >= Height) || (ValueOut >= Width))
{
return;
}
CurrentSideLength = ValueOut;
ChessBoardTestInit (Ctx);
}
|
Joursoir/umt
|
UefiMonitorTest/SettingsMenu.c
|
<filename>UefiMonitorTest/SettingsMenu.c<gh_stars>0
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include "SettingsMenu.h"
#define INDENT 15
#define RECT_HALF_WIDTH 160
#define RECT_HALF_HEIGHT 28
STATIC UINT32 mModeNumber = 0;
STATIC
EFI_STATUS
SetGraphicsMode (
IN GRAPHICS_CONTEXT *Graphics,
IN UINT32 ModeNumber
)
{
EFI_STATUS Status;
ASSERT (Graphics != NULL);
if (Graphics->Gop->Mode->Mode == ModeNumber)
return EFI_SUCCESS;
Status = Graphics->Gop->SetMode (Graphics->Gop, ModeNumber);
if (!EFI_ERROR (Status)) {
ForgetGraphicsInfo (Graphics);
PrepareGraphicsInfo (Graphics, Graphics->Gop);
}
return Status;
}
STATIC
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *
GetGraphicsModeInfo (
IN GRAPHICS_CONTEXT *Graphics,
IN UINT32 ModeNumber
)
{
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *ModeInfo;
EFI_STATUS Status;
UINTN SizeOfInfo;
if (ModeNumber >= Graphics->Gop->Mode->MaxMode)
return NULL;
Status = Graphics->Gop->QueryMode(Graphics->Gop, ModeNumber, &SizeOfInfo, &ModeInfo);
if (EFI_ERROR(Status)) {
ModeInfo = NULL;
}
return ModeInfo;
}
VOID
SettingsMenuInit (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *ModeInfo;
UINT32 Width;
UINT32 Height;
UINTN FontHeight;
UINTN FontWidth;
UINTN Y;
Graphics = Ctx->Graphics;
Width = Graphics->Width;
Height = Graphics->Height;
GetFontParameters (Graphics, &FontWidth, &FontHeight);
// Background
Y = Height / 2 - RECT_HALF_HEIGHT;
PutRect (Graphics, 0, 0, Width, Height, &gUmtColors[UMT_COLOR_NAVY].Color);
DrawHiiStringF (Graphics,
(Width - 13 * FontWidth) / 2,
Y - (INDENT * 2),
&gUmtColors[UMT_COLOR_WHITE].Color,
STRING_TOKEN (STR_SM_TITLE), gUmtHiiHandle);
// Menu
DrawRoundedRect (Graphics,
Width / 2 - RECT_HALF_WIDTH,
Height / 2 - RECT_HALF_HEIGHT,
Width / 2 + RECT_HALF_WIDTH,
Height / 2 + RECT_HALF_HEIGHT,
20,
&gUmtColors[UMT_COLOR_WHITE].Color
);
ModeInfo = GetGraphicsModeInfo (Graphics, mModeNumber);
ASSERT (ModeInfo != NULL);
Y += INDENT + 5;
DrawHiiStringF (Graphics,
Width / 2 - RECT_HALF_WIDTH + INDENT,
Y,
&gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_SM_RESOLUTION_TITLE), gUmtHiiHandle);
DrawHiiStringF (Graphics,
Width / 2 + INDENT,
Y,
&gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_SM_RESOLUTION_OPTION), gUmtHiiHandle,
ModeInfo->HorizontalResolution,
ModeInfo->VerticalResolution,
(Graphics->Gop->Mode->Mode == mModeNumber) ? L'*' : L' ');
FreePool (ModeInfo);
}
VOID
SettingsMenuDoit (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
SettingsMenuTip (
IN UMT_CONTEXT *Ctx
)
{
EFI_STATUS Status;
Status = SetGraphicsMode (Ctx->Graphics, mModeNumber);
if (EFI_ERROR(Status))
return;
SettingsMenuInit (Ctx);
}
VOID
SettingsChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
)
{
}
VOID
SettingsMenuChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
)
{
if (mModeNumber == 0 && ValueStep < 0)
mModeNumber = Ctx->Graphics->Gop->Mode->MaxMode - 1;
else {
mModeNumber += ValueStep;
if (mModeNumber >= Ctx->Graphics->Gop->Mode->MaxMode)
mModeNumber = 0;
}
SettingsMenuInit (Ctx);
}
|
Joursoir/umt
|
UefiMonitorTest/tests/Gradients.h
|
#ifndef UMT_GRADIENTS_TEST_H
#define UMT_GRADIENTS_TEST_H
#include "UefiMonitorTest.h"
VOID
GradientsTestInit (
IN UMT_CONTEXT *Ctx
);
VOID
GradientsTestDoit (
IN UMT_CONTEXT *Ctx
);
VOID
GradientsTestTip (
IN UMT_CONTEXT *Ctx
);
VOID
GradientsTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
);
VOID
GradientsTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
);
#endif /* UMT_GRADIENTS_TEST_H */
|
Joursoir/umt
|
UefiMonitorTest/Graphics.h
|
<filename>UefiMonitorTest/Graphics.h
#ifndef UMT_GRAPHICS_H
#define UMT_GRAPHICS_H
#include <Uefi.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/SimpleTextIn.h>
#include <Protocol/SimplePointer.h>
#define GET_UCOLOR(Color) (*(UINT32 *)Color)
#define PUT_PUXEL(Graphics, X, Y, Icolor) \
Graphics->BackBuffer[X + (Y * Graphics->Pitch)] = Icolor
typedef struct {
UINT8 Blue;
UINT8 Green;
UINT8 Red;
UINT8 Reserved;
} GRAPHICS_PIXEL_COLOR;
typedef struct {
///
/// The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.
///
EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;
///
/// Base address of graphics linear frame buffer.
/// Starts from the upper left pixel.
///
UINT32 *FrontBuffer;
///
/// Pointer to allocated memory. Secondary linear buffer.
///
UINT32 *BackBuffer;
///
/// Amount of frame buffer needed to support the active mode in bytes.
///
UINTN BufferSize;
///
/// The size of video screen in pixels in the X dimension.
///
UINT32 Width;
///
/// The size of video screen in pixels in the Y dimension.
///
UINT32 Height;
///
/// Bit-mask defines what bits are used for different colors.
///
EFI_PIXEL_BITMASK PixelMasks;
///
/// Amount of bits to shift left.
/// R-G-B-Rsvd
///
INT8 PixelShl[4];
///
/// Amount of bits to shift right.
/// R-G-B-Rsvd
///
INT8 PixelShr[4];
///
/// The size of pixel color in bytes.
///
UINT32 PixelWidth;
///
/// Amount of bytes you should skip to go one pixel down.
///
UINT32 Pitch;
//
// The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
//
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInputEx;
//
// A mouse support.
//
BOOLEAN MouseSupported;
//
// The MouseInterface instance.
//
EFI_SIMPLE_POINTER_PROTOCOL *MouseInterface;
} GRAPHICS_CONTEXT;
enum UMT_COLORS {
UMT_COLOR_BLACK = 0,
UMT_COLOR_WHITE,
UMT_COLOR_RED,
UMT_COLOR_LIME,
UMT_COLOR_BLUE,
UMT_COLOR_YELLOW,
UMT_COLOR_AQUA,
UMT_COLOR_MAGENTA,
UMT_COLOR_SILVER,
UMT_COLOR_GRAY,
UMT_COLOR_MAROON,
UMT_COLOR_OLIVE,
UMT_COLOR_GREEN,
UMT_COLOR_PURPLE,
UMT_COLOR_TEAL,
UMT_COLOR_NAVY,
UMT_COLOR_END
};
typedef struct {
EFI_STRING_ID StringId;
GRAPHICS_PIXEL_COLOR Color;
} UMT_COLORS;
extern CONST UMT_COLORS gUmtColors[];
EFI_STATUS
PrepareGraphicsInfo (
IN GRAPHICS_CONTEXT *Graphics,
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop
);
VOID
ForgetGraphicsInfo (
IN GRAPHICS_CONTEXT *Graphics
);
/**
Get a color that doesn't depend on pixel format, i.e.
independent color.
@param[in] Graphics A graphics context.
@param[in] Ucolor A GRAPHICS_PIXEL_COLOR, which is
represented as unsigned 32-bit.
@retval UINT32 A color in independent format.
**/
UINT32
GetIcolor (
IN GRAPHICS_CONTEXT *Graphics,
IN UINT32 Ucolor
);
/**
Draw a line using Bresenham's algorithm
@retval VOID
**/
VOID
DrawLine (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN CONST GRAPHICS_PIXEL_COLOR *Color
);
VOID
PutRect (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN CONST GRAPHICS_PIXEL_COLOR *Color
);
VOID
DrawRectWithBorder (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN UINTN BorderSize,
IN CONST GRAPHICS_PIXEL_COLOR *MainColor,
IN CONST GRAPHICS_PIXEL_COLOR *BorderColor
);
VOID
DrawRoundedRect (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN X1,
IN UINTN Y1,
IN UINTN CornerRadius,
IN CONST GRAPHICS_PIXEL_COLOR *Color
);
VOID
DrawCircle (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X0,
IN UINTN Y0,
IN UINTN R,
IN CONST GRAPHICS_PIXEL_COLOR *Color
);
/**
Draws a character to the screen
@retval VOID
**/
VOID
DrawChar (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN UINT32 Icolor,
IN CHAR16 Char
);
EFI_STATUS
GetFontParameters (
IN GRAPHICS_CONTEXT *Graphics,
OUT UINTN *FontWidth,
OUT UINTN *FontHeight
);
/**
Draws output based on a null-terminated Unicode format string
and a arguments list to the screen
@retval The number of Unicode characters drawn
**/
UINTN
EFIAPI
DrawStringVF (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN CONST GRAPHICS_PIXEL_COLOR *Color,
IN CONST CHAR16 *FormatString,
IN VA_LIST Marker
);
UINTN
EFIAPI
DrawStringF (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN CONST GRAPHICS_PIXEL_COLOR *Color,
IN CONST CHAR16 *FormatString,
...
);
UINTN
EFIAPI
DrawHiiStringF (
IN GRAPHICS_CONTEXT *Graphics,
IN UINTN X,
IN UINTN Y,
IN CONST GRAPHICS_PIXEL_COLOR *Color,
IN CONST EFI_STRING_ID HiiFormatStringId,
IN CONST EFI_HII_HANDLE HiiFormatHandle,
...
);
#endif /* UMT_GRAPHICS_H */
|
Joursoir/umt
|
UefiMonitorTest/tests/Grayscale.h
|
#ifndef UMT_GRAYSCALE_TEST_H
#define UMT_GRAYSCALE_TEST_H
#include "UefiMonitorTest.h"
VOID
GrayscaleTestInit (
IN UMT_CONTEXT *Ctx
);
VOID
GrayscaleTestDoit (
IN UMT_CONTEXT *Ctx
);
VOID
GrayscaleTestTip (
IN UMT_CONTEXT *Ctx
);
VOID
GrayscaleTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
);
VOID
GrayscaleTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
);
#endif /* UMT_GRAYSCALE_TEST_H */
|
Joursoir/umt
|
UefiMonitorTest/tests/SolidColors.c
|
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include "SolidColors.h"
STATIC enum UMT_COLORS CurrentColor = 0;
VOID
SolidColorsTestInit (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics = Ctx->Graphics;
PutRect (Graphics, 0, 0, Graphics->Width, Graphics->Height, &gUmtColors[CurrentColor].Color);
if (Ctx->ShowTip)
SolidColorsTestTip (Ctx);
}
VOID
SolidColorsTestDoit (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
SolidColorsTestTip (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics;
EFI_STRING_ID MsgToken;
CHAR16 *ColorName;
CHAR16 *Msg;
Graphics = Ctx->Graphics;
if (Ctx->ShowTip == FALSE) {
// Restore
PutRect (Graphics, 15, Graphics->Height - 15 - 104, 470, Graphics->Height - 15, &gUmtColors[CurrentColor].Color);
return;
}
switch (CurrentColor) {
case UMT_COLOR_BLACK:
MsgToken = STRING_TOKEN (STR_SOLID_COLORS_BLACK_MSG);
break;
case UMT_COLOR_WHITE:
MsgToken = STRING_TOKEN (STR_SOLID_COLORS_WHITE_MSG);
break;
case UMT_COLOR_RED:
MsgToken = STRING_TOKEN (STR_SOLID_COLORS_RED_MSG);
break;
case UMT_COLOR_LIME:
MsgToken = STRING_TOKEN (STR_SOLID_COLORS_GREEN_MSG);
break;
case UMT_COLOR_BLUE:
MsgToken = STRING_TOKEN (STR_SOLID_COLORS_BLUE_MSG);
break;
default:
ASSERT (FALSE);
break;
}
ColorName = HiiGetString (gUmtHiiHandle, gUmtColors[CurrentColor].StringId, NULL);
Msg = HiiGetString (gUmtHiiHandle, MsgToken, NULL);
DrawRectWithBorder (Graphics, 15, Graphics->Height - 15 - 104, 470, Graphics->Height - 15,
3, &gUmtColors[UMT_COLOR_WHITE].Color, &gUmtColors[UMT_COLOR_NAVY].Color);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 94,
&gUmtColors[UMT_COLOR_NAVY].Color,
STRING_TOKEN (STR_SOLID_COLORS_TITLE), gUmtHiiHandle,
ColorName);
DrawStringF (Graphics, 25, Graphics->Height - 15 - 74, &gUmtColors[UMT_COLOR_BLACK].Color, Msg);
FreePool (ColorName);
FreePool (Msg);
}
VOID
SolidColorsTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
)
{
if (CurrentColor == 0 && ValueStep < 0)
CurrentColor = UMT_COLOR_BLUE;
else {
CurrentColor += ValueStep;
if (CurrentColor > UMT_COLOR_BLUE)
CurrentColor = 0;
}
SolidColorsTestInit (Ctx);
}
VOID
SolidColorsTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
)
{
}
VOID
SolidColorsTestChangeVar (
IN UMT_CONTEXT *Ctx,
IN INT8 VariableStep // -1, +1
)
{
}
|
Joursoir/umt
|
UefiMonitorTest/tests/SolidColors.h
|
#ifndef UMT_SOLID_COLORS_TEST_H
#define UMT_SOLID_COLORS_TEST_H
#include "UefiMonitorTest.h"
VOID
SolidColorsTestInit (
IN UMT_CONTEXT *Ctx
);
VOID
SolidColorsTestDoit (
IN UMT_CONTEXT *Ctx
);
VOID
SolidColorsTestTip (
IN UMT_CONTEXT *Ctx
);
VOID
SolidColorsTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
);
VOID
SolidColorsTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
);
#endif /* UMT_SOLID_COLORS_TEST_H */
|
Joursoir/umt
|
UefiMonitorTest/SettingsMenu.h
|
<filename>UefiMonitorTest/SettingsMenu.h
#ifndef UMT_SETTINGS_MENU_H
#define UMT_SETTINGS_MENU_H
#include "UefiMonitorTest.h"
VOID
SettingsMenuInit (
IN UMT_CONTEXT *Ctx
);
VOID
SettingsMenuDoit (
IN UMT_CONTEXT *Ctx
);
VOID
SettingsMenuTip (
IN UMT_CONTEXT *Ctx
);
VOID
SettingsChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
);
VOID
SettingsMenuChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
);
#endif /* UMT_SETTINGS_MENU_H */
|
Joursoir/umt
|
UefiMonitorTest/tests/ChessBoard.h
|
#ifndef UMT_CHESSBOARD_TEST_H
#define UMT_CHESSBOARD_TEST_H
#include "UefiMonitorTest.h"
VOID
ChessBoardTestInit (
IN UMT_CONTEXT *Ctx
);
VOID
ChessBoardTestDoit (
IN UMT_CONTEXT *Ctx
);
VOID
ChessBoardTestTip (
IN UMT_CONTEXT *Ctx
);
VOID
ChessBoardTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
);
VOID
ChessBoardTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
);
#endif /* UMT_CHESSBOARD_TEST_H */
|
Joursoir/umt
|
UefiMonitorTest/UefiMonitorTest.h
|
#ifndef UEFI_MONITOR_TEST_H
#define UEFI_MONITOR_TEST_H
#include "Graphics.h"
#define UMT_VERSION L"0.1.0"
typedef struct _UMT_CONTEXT UMT_CONTEXT;
typedef struct {
VOID (*Init)(UMT_CONTEXT *);
VOID (*Doit)(UMT_CONTEXT *);
VOID (*Tip)(UMT_CONTEXT *);
VOID (*ChangeParam)(UMT_CONTEXT *, INT8);
VOID (*ChangeValue)(UMT_CONTEXT *, INT8);
} UMT_STATE_ACTIONS;
enum UMT_STATE {
UMT_STATE_MAIN_MENU = 0,
UMT_STATE_SETTINGS,
UMT_STATE_SOLID_COLORS_TEST,
UMT_STATE_GRAYSCALE_TEST,
UMT_STATE_GRADIENTS_TEST,
UMT_STATE_CHESSBOARD_TEST,
UMT_STATE_END
};
struct _UMT_CONTEXT {
enum UMT_STATE State;
BOOLEAN Running;
BOOLEAN ShowTip;
CONST UMT_STATE_ACTIONS *Actions;
GRAPHICS_CONTEXT *Graphics;
};
extern EFI_HII_HANDLE gUmtHiiHandle;
#endif /* UEFI_MONITOR_TEST_H */
|
Joursoir/umt
|
UefiMonitorTest/tests/Grayscale.c
|
<reponame>Joursoir/umt<filename>UefiMonitorTest/tests/Grayscale.c<gh_stars>0
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/MemoryAllocationLib.h>
#include "Grayscale.h"
STATIC UINT32 CurrentGrayTone = 50;
VOID
GrayscaleTestInit (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_PIXEL_COLOR ColorOutput = { 0x00 };
GRAPHICS_CONTEXT *Graphics = Ctx->Graphics;
ColorOutput.Red = (CurrentGrayTone * 255) / 100;
ColorOutput.Green = (CurrentGrayTone * 255) / 100;
ColorOutput.Blue = (CurrentGrayTone * 255) / 100;
PutRect (Graphics,
0,
0,
Graphics->Width,
Graphics->Height,
&ColorOutput);
if (Ctx->ShowTip) {
GrayscaleTestTip (Ctx);
}
}
VOID
GrayscaleTestDoit (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
GrayscaleTestTip (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics;
Graphics = Ctx->Graphics;
if (Ctx->ShowTip == FALSE) {
// Restore
GrayscaleTestInit (Ctx);
return;
}
DrawRectWithBorder (Graphics,
15,
Graphics->Height - 15 - 134,
430, Graphics->Height - 15,
3,
&gUmtColors[UMT_COLOR_WHITE].Color,
&gUmtColors[UMT_COLOR_NAVY].Color);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 124,
&gUmtColors[UMT_COLOR_NAVY].Color,
STRING_TOKEN (STR_GRAYSCALE_TITLE), gUmtHiiHandle);
DrawHiiStringF (Graphics,
25,
Graphics->Height - 15 - 104,
&gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_GRAYSCALE_MSG), gUmtHiiHandle,
CurrentGrayTone);
}
VOID
GrayscaleTestChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
)
{
}
VOID
GrayscaleTestChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
)
{
if (CurrentGrayTone == 5 && ValueStep < 0) {
return;
} else {
CurrentGrayTone += ValueStep * 5;
if (CurrentGrayTone > 95)
{
CurrentGrayTone = 95;
return;
}
}
GrayscaleTestInit (Ctx);
}
|
Joursoir/umt
|
UefiMonitorTest/MainMenu.c
|
#include <Library/HiiLib.h>
#include "MainMenu.h"
#define INDENT 15
#define CHAR_PER_COLUMN 24
#define RECT_HALF_WIDTH 300
#define RECT_HALF_HEIGHT 130
VOID
MainMenuInit (
IN UMT_CONTEXT *Ctx
)
{
GRAPHICS_CONTEXT *Graphics;
UINT32 Width;
UINT32 Height;
UINTN FontHeight;
UINTN FontWidth;
UINTN LeftColX;
UINTN MiddleColX;
UINTN RightColX;
UINTN Y;
Graphics = Ctx->Graphics;
Width = Graphics->Width;
Height = Graphics->Height;
GetFontParameters (Graphics, &FontWidth, &FontHeight);
LeftColX = (Width - (CHAR_PER_COLUMN * 3) * FontWidth) / 2;
MiddleColX = LeftColX + (CHAR_PER_COLUMN * FontWidth);
RightColX = MiddleColX + (CHAR_PER_COLUMN * FontWidth);
// Background
PutRect (Graphics, 0, 0, Width, Height, &gUmtColors[UMT_COLOR_NAVY].Color);
DrawHiiStringF (Graphics,
(Width - 24 * FontWidth) / 2,
Height / 2 - RECT_HALF_HEIGHT - (INDENT * 2),
&gUmtColors[UMT_COLOR_WHITE].Color,
STRING_TOKEN (STR_MM_TITLE), gUmtHiiHandle, UMT_VERSION);
// Menu
DrawRoundedRect (Graphics,
Width / 2 - RECT_HALF_WIDTH,
Height / 2 - RECT_HALF_HEIGHT,
Width / 2 + RECT_HALF_WIDTH,
Height / 2 + RECT_HALF_HEIGHT,
20,
&gUmtColors[UMT_COLOR_WHITE].Color
);
Y = Height / 2 - RECT_HALF_HEIGHT + INDENT + 5;
DrawHiiStringF (Graphics, LeftColX, Y, &gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_MM_SUBTITLE), gUmtHiiHandle);
Y += FontHeight + INDENT;
DrawHiiStringF (Graphics, LeftColX, Y, &gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_MM_MENU), gUmtHiiHandle);
Y += (FontHeight * 4) + (INDENT * 2);
DrawHiiStringF (Graphics, (Width - 9 * FontWidth) / 2, Y, &gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_MM_TIP_TITLE), gUmtHiiHandle);
Y += FontHeight + INDENT;
DrawHiiStringF (Graphics, LeftColX, Y, &gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_MM_TIP_FIRST), gUmtHiiHandle);
DrawHiiStringF (Graphics, MiddleColX, Y, &gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_MM_TIP_SECOND), gUmtHiiHandle);
DrawHiiStringF (Graphics, RightColX, Y, &gUmtColors[UMT_COLOR_BLACK].Color,
STRING_TOKEN (STR_MM_TIP_THIRD), gUmtHiiHandle);
}
VOID
MainMenuDoit (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
MainMenuTip (
IN UMT_CONTEXT *Ctx
)
{
}
VOID
MainMenuChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
)
{
}
VOID
MainMenuChangeValue (
IN UMT_CONTEXT *Ctx,
IN INT8 ValueStep
)
{
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.