repo_name stringlengths 8 95 | desc stringclasses 61
values | repo_path stringlengths 26 113 | p4_version stringclasses 2
values | p4_file_path stringlengths 41 148 | readme_path stringlengths 39 123 ⌀ | license stringclasses 6
values | inferred_from stringclasses 3
values | raw_p4 stringlengths 293 67.3k | raw_readme stringlengths 0 29.4k | cleaned_p4 stringlengths 729 166k | compiles bool 1
class | annotation stringlengths 26 159 | detailed_annotation listlengths 0 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abhikjain360/sdn-project | null | raw-repositories/abhikjain360__sdn-project | p4_16 | raw-repositories/abhikjain360__sdn-project/swtichtree.p4 | raw-repositories/abhikjain360__sdn-project/README.md | mit | LICENSE_FILE | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> TYPE_TCP = 6;
const bit<48> ACTIVE_FLOW_THRESHOLD = 5000000; // in microseconds
const bit<48> FLOW_THRESHOLD = 120000000; // in microseconds
const bit<48> MALICIOUS_TIMEOUT = 600000000; // in microseconds
const bit<2> MALWARE_FL... | # Flow-Based IDS on P4 Switch
## Dependencies
The code has only been tested to run on Linux.
Following needs to be installed in order to run the model:
- [`behaviour-model (bmv2)`](https://github.com/p4lang/behavioral-model). Refer to repository's README for installation instructions.
- [`p4c compiler`](https://git... | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> TYPE_TCP = 6;
const bit<48> ACTIVE_FLOW_THRESHOLD = 5000000;
// in microseconds
const bit<48> FLOW_THRESHOLD = 120000000;
// in microseconds
const bit<48> MALICIOUS_TIMEOUT = 600000000;
// in microseconds
const bit<2> MALWARE... | true | Classify TCP flows as malicious or benign using a decision tree model and update flow statistics. | [
"Uses a bloom filter-like data structure with registers to store flow statistics.",
"Implements a decision tree model with multiple levels and nodes to classify flows.",
"Updates flow statistics, including flag counts, packet lengths, and timestamps.",
"Checks if a flow is already classified as malicious and ... |
abdulovia/2024_2025-network_programming-k3321-abdulov_i_a | null | raw-repositories/abdulovia__2024_2025-network_programming-k3321-abdulov_i_a | p4_16 | raw-repositories/abdulovia__2024_2025-network_programming-k3321-abdulov_i_a/lab4/basic.p4 | raw-repositories/abdulovia__2024_2025-network_programming-k3321-abdulov_i_a/README.md | apache-2.0 | P4_FILE | // SPDX-License-Identifier: Apache-2.0
/* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
/*************************************************************************
*********************** H E A D E R S ***********************************
***********************************... | # Сетевое программирование
Описание репозитория, интересные замечания по деятельности и т.д. ...
|
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
header ethernet_t {
macAddr_t dstAddr;
macAddr_t srcAddr;
bit<16> etherType;
}
header ipv4_t {
bit<4> version;
bit<4> ihl;
... | true | Forwards IPv4 packets based on destination IP address, decrementing TTL and updating Ethernet headers. | [
"Parses Ethernet and IPv4 headers, transitioning based on EtherType.",
"Uses a LPM (Longest Prefix Match) table to determine forwarding actions for IPv4 packets.",
"Forwards IPv4 packets by updating Ethernet source and destination addresses, egress port, and decrementing IPv4 TTL.",
"Recomputes IPv4 header ch... |
agh-cs-imbeciles/p4-load-balancing | null | raw-repositories/agh-cs-imbeciles__p4-load-balancing | p4_16 | raw-repositories/agh-cs-imbeciles__p4-load-balancing/link_monitor/link_monitor.p4 | raw-repositories/agh-cs-imbeciles__p4-load-balancing/link_monitor/README.md | apache-2.0 | P4_FILE | // SPDX-License-Identifier: Apache-2.0
/* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<16> TYPE_PROBE = 0x812;
#define MAX_HOPS 10
#define MAX_PORTS 8
/*************************************************************************
*********************** H E A D E ... |
[comment]: # (SPDX-License-Identifier: Apache-2.0)
# Implementing Link Monitoring
## Introduction
The objective of this exercise is to write a P4 program that enables
a host to monitor the utilization of all links in the network. This
exercise builds upon the basic IPv4 forwarding exercise so be sure
to complete t... |
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<16> TYPE_PROBE = 0x812;
#define MAX_HOPS 10
#define MAX_PORTS 8
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
typedef bit<48> time_t;
header ethernet_t {
macAddr_t dstAddr;
macAddr_... | true | Implements a network telemetry system using probe packets to track packet forwarding and collect statistics at each hop. | [
"Parses custom probe packet headers and extracts forwarding information.",
"Performs IPv4 forwarding using a LPM table.",
"Increments probe hop count and updates egress spec for probe packets.",
"Collects byte count and timestamp statistics at each hop using registers.",
"Updates probe packet headers with s... |
andre-romano/p4_laboratorio | null | raw-repositories/andre-romano__p4_laboratorio | p4_16 | raw-repositories/andre-romano__p4_laboratorio/p4_laboratorio.p4 | raw-repositories/andre-romano__p4_laboratorio/README.md | apache-2.0 | LICENSE_FILE | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
/*************************************************************************
*********************** H E A D E R S ***********************************
*************************************************************************/
typedef bit<9> egressSpec_t;
ty... | # P4 Laboratorio
Conjunto de scripts para construção de ambiente de emulação para a linguagem de programação de plano de dados P4, como parte de um ambiente de experimentação prático (laboratório) da disciplina de Redes de Computadores para o curso de Gradução em Ciência da Computação da UFBA (Universidade Federal da ... | #include <core.p4>
#include <v1model.p4>
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
header ethernet_t {
macAddr_t dstAddr;
macAddr_t srcAddr;
bit<16> etherType;
}
struct metadata {
/* empty */
}
// headers do pacote
struct headers {
ethernet_t ethernet;
}
parser MyParser(pac... | true | Ethernet switch that forwards or broadcasts packets based on destination MAC address | [
"Parses Ethernet headers from incoming packets",
"Uses a match-action table to determine whether to forward, broadcast, or drop packets based on the destination MAC address",
"Updates source and destination MAC addresses when forwarding packets",
"Sets the egress port or multicast group accordingly",
"Emits... |
alighanbari2002/ECMP-and-HHD-P4-Exercises | P4 exercises on Equal-Cost Multi-Path Routing and Heavy Hitter Detection, inspired by ETH p4-learning repository. | raw-repositories/alighanbari2002__ECMP-and-HHD-P4-Exercises | p4_16 | raw-repositories/alighanbari2002__ECMP-and-HHD-P4-Exercises/HHD/heavy_hitter.p4 | raw-repositories/alighanbari2002__ECMP-and-HHD-P4-Exercises/HHD/README.md | mit | LICENSE_FILE | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
/* CONSTANTS */
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> TYPE_TCP = 6;
#define BLOOM_FILTER_ENTRIES 4096
#define BLOOM_FILTER_BIT_WIDTH 32
#define PACKET_THRESHOLD 1000
/*************************************************************************
*****... | # Heavy Hitter Detection
<p align="center">
<img src="https://github.com/nsg-ethz/p4-learning/blob/master/exercises/06-Heavy_Hitter_Detector/images/heavy_hitter_topo.png" title="Small Topology"/>
<p/>
In this exercise we will play with probabilistic data structures. First we will implement very simple heavy hitter ... | #include <core.p4>
#include <v1model.p4>
/* CONSTANTS */
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> TYPE_TCP = 6;
#define BLOOM_FILTER_ENTRIES 4096
#define BLOOM_FILTER_BIT_WIDTH 32
#define PACKET_THRESHOLD 1000
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
header ether... | true | Implements a network function that tracks TCP connections using a Bloom filter and drops packets when a threshold is exceeded. | [
"Uses a Bloom filter implemented with a register to track TCP connections, hashing source and destination IP addresses, ports, and protocol.",
"Updates the Bloom filter counters based on the hashed values and checks if the counters exceed a predefined threshold.",
"Drops packets when the threshold is exceeded, ... |
alighanbari2002/ECMP-and-HHD-P4-Exercises | P4 exercises on Equal-Cost Multi-Path Routing and Heavy Hitter Detection, inspired by ETH p4-learning repository. | raw-repositories/alighanbari2002__ECMP-and-HHD-P4-Exercises | p4_16 | raw-repositories/alighanbari2002__ECMP-and-HHD-P4-Exercises/ECMP/p4src/ecmp.p4 | raw-repositories/alighanbari2002__ECMP-and-HHD-P4-Exercises/ECMP/README.md | mit | LICENSE_FILE | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
//My includes
#include "include/headers.p4"
#include "include/parsers.p4"
/*************************************************************************
************ C H E C K S U M V E R I F I C A T I O N *************
**********************************... | # Equal-Cost Multi-Path Routing
In this exercise we will implement a layer 3 forwarding switch that is able to load balance traffic
towards a destination across equal cost paths. To load balance traffic across multiple ports we will implement ECMP (Equal-Cost
Multi-Path) routing. When a packet with multiple candidate ... | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
header ethernet_t {
macAddr_t dstAddr;
macAddr_t srcAddr;
bit<16> etherType;
}
header ipv4_t {
bit<4> version;
bit<4> ihl;
... | true | Implements IPv4 routing with ECMP (Equal-Cost Multi-Path) routing | [
"Performs LPM (Longest Prefix Match) lookup on IPv4 destination address to determine next hop",
"Supports ECMP routing by hashing packet headers to select a next hop within an ECMP group",
"Updates IPv4 header checksum after decrementing TTL",
"Modifies Ethernet header by swapping source and destination MAC a... |
Akira1906/CuckooGuard-SYN-Flood-Defense-P4 | "Memory-efficient SYN flood defense architecture for SmartNICs using P4 and eBPF. Implements a split(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4 | p4_16 | "raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/demo-split-proxy/implementation/p4src/(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/README.md | gpl | P4_FILE | "/*\n SmartCookie: Blocking Large-Scale SYN Floods with a Split-Proxy Defense on Programmable Dat(...TRUNCATED) | "# CuckooGuard: High-Precision SYN Flood Defense for SmartNICs\n\nCuckooGuard is a memory-efficient (...TRUNCATED) | "#include <core.p4>\n#include <v1model.p4>\n\n\n// Testbed parameters\nconst bit<9> SERVER_PORT=12; (...TRUNCATED) | true | Implement SYN cookie mechanism using SipHash to verify TCP connections | ["Uses SipHash algorithm to generate and verify cookies for TCP SYN and ACK packets","Implements Blo(...TRUNCATED) |
Akira1906/CuckooGuard-SYN-Flood-Defense-P4 | "Memory-efficient SYN flood defense architecture for SmartNICs using P4 and eBPF. Implements a split(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4 | p4_16 | "raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/demo-split-proxy/implementation/p4src/(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/README.md | gpl | LICENSE_FILE | "#include <core.p4>\n#include <v1model.p4>\n\n#ifndef FILTER_SIZE\n#define FILTER_SIZE 32w4096\n#end(...TRUNCATED) | "# CuckooGuard: High-Precision SYN Flood Defense for SmartNICs\n\nCuckooGuard is a memory-efficient (...TRUNCATED) | "#include <core.p4>\n#include <v1model.p4>\n\n#ifndef FILTER_SIZE\n#define FILTER_SIZE 32w4096\n#end(...TRUNCATED) | true | "Implements a network proxy that verifies and transforms TCP packets using Bloom filters and cookie-(...TRUNCATED) | ["Utilizes Bloom filters to track TCP flows and validate packet authenticity.","Computes and verifie(...TRUNCATED) |
Akira1906/CuckooGuard-SYN-Flood-Defense-P4 | "Memory-efficient SYN flood defense architecture for SmartNICs using P4 and eBPF. Implements a split(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4 | p4_16 | "raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/demo-split-proxy/implementation/p4src/(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/README.md | gpl | LICENSE_FILE | "#include <core.p4>\n#include <v1model.p4>\n\n#ifndef FILTER_SIZE\n#define FILTER_SIZE 32w4096\n#end(...TRUNCATED) | "# CuckooGuard: High-Precision SYN Flood Defense for SmartNICs\n\nCuckooGuard is a memory-efficient (...TRUNCATED) | "#include <core.p4>\n#include <v1model.p4>\n\n#ifndef FILTER_SIZE\n#define FILTER_SIZE 32w4096\n#end(...TRUNCATED) | true | "Implements a network proxy that uses Bloom filters to track TCP connections and verify ACK packets.(...TRUNCATED) | ["Uses two Bloom filters to track TCP connections and synchronize between them.","Computes a cookie (...TRUNCATED) |
Akira1906/CuckooGuard-SYN-Flood-Defense-P4 | "Memory-efficient SYN flood defense architecture for SmartNICs using P4 and eBPF. Implements a split(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4 | p4_16 | "raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/demo-split-proxy/implementation/p4src/(...TRUNCATED) | raw-repositories/Akira1906__CuckooGuard-SYN-Flood-Defense-P4/README.md | gpl | LICENSE_FILE | "#include <core.p4>\n#include <v1model.p4>\n\n#ifndef FILTER_SIZE\n#define FILTER_SIZE 32w4096\n#end(...TRUNCATED) | "# CuckooGuard: High-Precision SYN Flood Defense for SmartNICs\n\nCuckooGuard is a memory-efficient (...TRUNCATED) | "#include <core.p4>\n#include <v1model.p4>\n\n#ifndef FILTER_SIZE\n#define FILTER_SIZE 32w4096\n#end(...TRUNCATED) | true | "Implements a network proxy that uses Bloom filters to track TCP connections and validates TCP packe(...TRUNCATED) | ["Uses Bloom filters to track TCP connections and detect duplicate or invalid packets.","Implements (...TRUNCATED) |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 51