Skip to content

Instantly share code, notes, and snippets.

View sm101's full-sized avatar

Stevan Markovic sm101

  • Akamai Technologies
View GitHub Profile
@lukego
lukego / README.md
Last active February 21, 2021 14:39
Example using snsh (snabb shell) to feed packets to a C program

This is a simple example of a low-level script that uses the Snabb Switch 82599 10G ethernet device driver directly to feed packets into a C function provided as a shared library. Written for a discussion with Pavel Odintsov.

Here is now to run it:

  1. Compile snabbswitch to get snabb executable.
  2. Compile a C callback function to a shared library e.g. capturecallback.c below.
  3. Run: sudo ./snabb snsh capture2c <pciaddress> <filename.so>

The output should look something like this:

@pklaus
pklaus / ddnsserver.py
Last active January 23, 2026 01:20 — forked from andreif/Simple DNS server (UDP and TCP) in Python using dnslib.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
#!/usr/bin/env python
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import argparse
import datetime
import sys
import time
import threading