# ``CPAPluginSDK``

The single-import umbrella for writing CocoaPacketAnalyzer protocol-analyzer plugins.

## Overview

`CPAPluginSDK` is the toolkit you depend on to build a `.cpaplugin` bundle that CocoaPacketAnalyzer (CPA) loads at runtime. It re-exports every type, protocol, and helper a plugin needs from CPA's internal packages, plus a small set of convenience builders that collapse the registration ceremony to a few lines.

A minimal plugin consists of three Swift files and an `Info.plist`:

- A **principal class** (`CPAPluginPrincipalClassProtocol`) that registers itself with the host on load, and declares its settings via ``CPAPluginSettingsHosting``.
- An **analyzer class** (`CPAPluginAnalyzerProtocol`) that parses one packet at a time.
- A **dissector** (plain Swift) that turns wire bytes into named values.

All three live behind `import CPAPluginSDK`. You never need to import `CPADependencies`, `CPAModels`, `CPACommonTools`, or any other internal package directly — they are all surfaced through this module via `@_exported import`.

## Topics

### Getting started

- [Writing Your First Plugin](../walkthrough.md)

### The protocol contract

- [Protocol Contract](ProtocolContract.md)
- ``CPAPluginPrincipalClassProtocol``
- ``CPAPluginAnalyzerProtocol``
- ``CPAPluginPreferencesProtocol``
- ``CPANodeProtocol``

### Settings

- [Analyzer Settings](AnalyzerSettings.md)
- ``CPAPluginSettingsHosting``
- ``AnalyzerSettingsConfig``
- ``AnalyzerColorSpec``
- ``AnalyzerToggleSpec``
- ``AnalyzerPortsSpec``
- ``CPAAnalyzerColorStore``

### Registration

- ``CPAPlugInStructure``
- ``CPAPlugInNetworkProtocol``
- ``CPAPlugInColumn``
- ``CPAPlugInAnalyzerAttribute``
- ``kCPASourceProtocols``

### Interpreting TCP streams

- [Interpreting TCP Streams](InterpretingTCPStreams.md)
- ``CPAStreamInterpreting``
- ``StreamMessage``
- ``StreamInterpretation``
- ``StreamBodyHint``

### Threading and concurrency

- [Threading Model](ThreadingModel.md)
- ``CPAProtocolKonstants``

### Distribution

- [Distributing Your Plugin](DistributingYourPlugin.md)
