Metadata-Version: 2.4
Name: c10net
Version: 0.0.2
Summary: Python utility to make Chapter 10/11 file packets available to network tools or replay as UDP packets.
Author-Email: Stephen Frees <sfrees@avtest.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Networking
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Project-URL: Homepage, https://github.com/atac/c10net
Project-URL: Issues, https://github.com/atac/c10net/issues
Project-URL: Repository, https://github.com/atac/c10net.git
Project-URL: Documentation, https://github.com/atac/c10net/blob/main/README.md
Requires-Python: >=3.9
Requires-Dist: bitarray>=3.8.0
Requires-Dist: bitstring>=4.3.1
Requires-Dist: bitstruct>=8.11.0
Requires-Dist: colorama>=0.4.6
Requires-Dist: editables>=0.5
Requires-Dist: iniconfig>=2.3.0
Requires-Dist: packaging>=26.0
Requires-Dist: pluggy>=1.6.0
Requires-Dist: pychapter10>=1.1.19
Requires-Dist: Pygments>=2.19.2
Requires-Dist: pytimedinput>=2.0.1
Requires-Dist: scapy>=2.7.0
Provides-Extra: test
Requires-Dist: pytest>=9.0.2; extra == "test"
Provides-Extra: dev
Requires-Dist: pdm_backend>=2.4.7; extra == "dev"
Provides-Extra: all
Requires-Dist: c10net[test]; extra == "all"
Requires-Dist: c10net[dev]; extra == "all"
Description-Content-Type: text/markdown

# c10net

**Python utility to make Chapter 10/11 file packets available to network tools or replay as UDP packets.**

## Features

- Convert Chapter 10 data into a PCAP file containing UDP packets for analysis.
- Replay Chapter 10 data over the network, preserving original timing.
- Filter by channel ID and channel type during conversion or replay.
- Specify destination port and IP.

## Installation

### Install utility from PyPI:

```bash
pip install c10net
```


**Note:** `c10net` uses libpcap for pcap packet generation.  
On Windows, install [Npcap](https://nmap.org/npcap/) and ensure it is available to your system.

### Install for developers (Windows):

```
git clone https://github.com/atac/c10net
py -m venv .venv
.\.venv\Scripts\activate
pip install -e .[all]
```

The `[all]` group installs the `[test]` and `[dev]` dependency groups.

## Usage

The package installs a console script `c10net`. Run `c10net -h` for top-level help.

### `convert_pcap`

Convert Chapter 10 file to a PCAP file comprised of UDP packets.

```
c10net convert_pcap "C:\path\to\myfile.ch10"
```

With default options, a PCAP file is generated at "C:\path\to\myfile.pcap"

Use `ch10net convert_pcap -h` for more options.

### `replay`

Generate UDP packets from Chapter 10 file and send over a network interface.

```bash
c10net replay "C:\path\to\myfile.ch10"
```

With default options, UDP packets are replayed over available network interface with destination IP 127.0.0.1 and port 5006.

Use `ch10net replay -h` for more options.

### Network Options

* Use `--port` to set the destination port number of generated UDP packets.
* Use `--ip` to set the destination IP address of generated UDP packets.

#### Examples

Convert a Chapter 10 file to PCAP:

```bash
c10net convert_pcap input.ch10 --out output.pcap
```

Replay over the network (pulse setup packet every second):

```bash
c10net replay input.ch10 --pulse --ip 192.168.1.10 --port 49152
```

## Testing

Run the test suite with `pytest` (after installing the optional `[test]` dependency group):

```bash
pytest -q
```

## License

BSD-3-Clause
