# microsoft/etl2pcapng architecture

> Architecture diagram of the GitHub repository microsoft/etl2pcapng, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/etl2pcapng
- Repository: https://github.com/microsoft/etl2pcapng

## Overview

etl2pcapng is a Windows command-line converter that turns ETL packet captures from ndiscap or pktmon into pcapng for Wireshark and other analysis tools. The user supplies an ETL file and output path; the converter interprets events, tracks capture interfaces, and writes packet and provider-event data. Documented output capabilities include interface metadata, packet identifiers and drop verdicts, and systemd journal export blocks. The single large source file is only partially excerpted, so internal dispatch and call relationships not shown there are omitted or left unverified.

Main entry points: [`src/main.c`](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c) (CLI converter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversion["Conversion"]
  node_converter["CLI converter<br/>[main.c]"]
  node_interface_tracking["Interface tracking<br/>[main.c]"]
end

subgraph group_decode["Event decoding"]
  node_event_decode["Event decoding<br/>[main.c]"]
  node_pktmon_support["pktmon events<br/>[main.c]"]
  node_ras_support["RAS events<br/>[main.c]"]
end

subgraph group_output["Output"]
  node_interface_output["Interface blocks<br/>[main.c]"]
  node_packet_output["Packet blocks<br/>[main.c]"]
  node_provider_output["Provider events<br/>[main.c]"]
end

node_user(("Engineer"))
node_capture["ETL capture"]
node_pcapng["pcapng file"]
node_wireshark["Wireshark"]

node_user -->|"runs"| node_converter
node_capture -->|"converts"| node_converter
node_converter -.->|"processes events"| node_event_decode
node_event_decode -.->|"decodes"| node_pktmon_support
node_event_decode -->|"decodes"| node_ras_support
node_event_decode -.->|"tracks interfaces"| node_interface_tracking
node_converter -->|"writes interfaces"| node_interface_output
node_converter -->|"writes packets"| node_packet_output
node_converter -->|"writes events"| node_provider_output
node_interface_output -.->|"adds blocks"| node_pcapng
node_packet_output -.->|"adds blocks"| node_pcapng
node_provider_output -.->|"adds blocks"| node_pcapng
node_pcapng -->|"opens"| node_wireshark

click node_converter "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_event_decode "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_pktmon_support "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_ras_support "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_interface_tracking "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_interface_output "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_packet_output "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"
click node_provider_output "https://github.com/microsoft/etl2pcapng/blob/main/src/main.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_converter,node_interface_tracking toneBlue
class node_event_decode,node_pktmon_support,node_ras_support toneAmber
class node_interface_output,node_packet_output,node_provider_output toneMint
class node_user,node_capture,node_pcapng,node_wireshark toneIndigo
```

## Components

### Conversion

- [CLI converter](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`
- [Interface tracking](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`

### Event decoding

- [Event decoding](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`
- [pktmon events](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`
- [RAS events](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`

### Output

- [Interface blocks](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`
- [Packet blocks](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`
- [Provider events](https://github.com/microsoft/etl2pcapng/blob/main/src/main.c): `src/main.c`

### Other components

- **Engineer**
- **ETL capture**
- **pcapng file**
- **Wireshark**

## Connections

- Engineer → CLI converter: runs (evidence: `README.md`)
- ETL capture → CLI converter: converts (evidence: `README.md`)
- CLI converter → Event decoding: processes events (evidence: `src/main.c`)
- Event decoding → pktmon events: decodes (evidence: `src/main.c`)
- Event decoding → RAS events: decodes (evidence: `src/main.c`)
- Event decoding → Interface tracking: tracks interfaces (evidence: `src/main.c`)
- CLI converter → Interface blocks: writes interfaces (evidence: `README.md`)
- CLI converter → Packet blocks: writes packets (evidence: `README.md`)
- CLI converter → Provider events: writes events (evidence: `README.md`)
- Interface blocks → pcapng file: adds blocks
- Packet blocks → pcapng file: adds blocks
- Provider events → pcapng file: adds blocks
- pcapng file → Wireshark: opens (evidence: `README.md`)
