Skip to content

Commit 4f8d77e

Browse files
committed
CLT library code structure
1 parent 85c74c5 commit 4f8d77e

7 files changed

Lines changed: 43 additions & 4 deletions

File tree

library/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# CLT Library
2+
3+
This library allows to enable or disable CLT in the Linux kernel by using [generic netlink](https://docs.kernel.org/networking/generic_netlink.html) to interact with the kernel.
4+
5+
## Usage
6+
7+
The implementations **must** provide 2 methods:
8+
- One to **enable** CLT on a given socket with given trace and span IDs.
9+
- One to **disable** CLT on a given socket.
10+
11+
## Existing implementations
12+
13+
At the moment, implementations are available in the following languages:
14+
- [Python](./python/)
15+
- [Go](./golang/)
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# CLT Generic Netlink Go
1+
# CLT Library in Go
22

3-
This module allows to enable or disable CLT in the Linux kernel from software in Go.
4-
5-
It is an equivalent of [clt_genl.py](../clt_genl.py), which is written in Python.
3+
Implementation in Go of the library to enable or disable CLT.
64

75
## Usage
86

library/python/README.MD

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# CLT Library in Python
2+
3+
Implementation in Python of the library to enable or disable CLT.
4+
5+
## Usage
6+
7+
First, you need to download the dependency with the following command:
8+
```bash
9+
pip3 install pyroute2
10+
```
11+
12+
Then, you need to create an instance of the class `CrossLayerTelemetry`.
13+
14+
Now, you can enable CLT on a socket by calling the method:
15+
```python
16+
def enable(self, sockfd, traceId, spanId)
17+
```
18+
19+
Finally, when you want to disable CLT, you can call the method:
20+
```python
21+
def disable(self, sockfd)
22+
```
23+
24+
## Credits
25+
26+
To use (generic) netlink in Python, we use the package [pyroute2](https://pypi.org/project/pyroute2/) by [Peter Saveliev](https://github.com/svinota).
File renamed without changes.

0 commit comments

Comments
 (0)