repo_name stringlengths 8 74 | repo_path stringlengths 7 155 | content stringlengths 0 557k | id int64 0 42.6k |
|---|---|---|---|
allp4files/praveingk | /DPTP/v_16/p4_src/dptp_headers.p4 | /*******************************************************************************
* DPTP : Headers Declaration
*
*
*
*
******************************************************************************/
#ifndef _DPTP_HEADERS
#define _DPTP_HEADERS
header dptp_t {
bit<16> magic;
bit<8> command; ... | 0 |
allp4files/praveingk | /DPTP/v_16/p4_src/dptp_parser.p4 | /*******************************************************************************
* DPTP : Parser Declaration
*
*
*
*
******************************************************************************/
#ifndef _DPTP_PARSER
#define _DPTP_PARSER
#define DPTP_FOLLOWUP_DIGEST_TYPE 2
#define DPTP_REPLY_DIGEST_TYPE ... | 1 |
allp4files/praveingk | /DPTP/v_16/p4_src/dptp_simple_switch.p4 | /* -*- P4_16 -*- */
/*******************************************************************************
* Switch with DPTP enabled
* This code demonstrates how to integrate DPTP control inside any p4_16 code
*
******************************************************************************/
#include "dptp.p4"
#include... | 2 |
allp4files/L-Law1iet | /P4-SVM/src/include/parsers.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 3 |
allp4files/L-Law1iet | /P4-SVM/src/basic.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 4 |
allp4files/L-Law1iet | /P4-SVM/src/include/wcmp.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 5 |
allp4files/L-Law1iet | /P4-SVM/src/include/headers.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 7 |
allp4files/SilnoEnamored | /2022_2023-network_programming-k34212-demidyuk_o_s/lab4/basic.p4 | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
/*************************************************************************
*********************** H E A D E R S ***********************************
*************************************************************************/... | 8 |
allp4files/L-Law1iet | /P4-SVM/src/include/telemetry_report_headers.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 9 |
allp4files/praveingk | /DPTP/v_16/p4_src/dptp.p4 | /* -*- P4_16 -*- */
/*******************************************************************************
* DPTP : Data-Plane Time-synchronization Protocol
*
*
******************************************************************************/
#include <core.p4>
#if __TARGET_TOFINO__ == 2
#include <t2na.p4>
#else
#include <... | 10 |
allp4files/L-Law1iet | /P4-SVM/src/include/checksums.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 11 |
allp4files/L-Law1iet | /P4-SVM/src/include/defines.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 12 |
allp4files/L-Law1iet | /P4-SVM/src/include/port_meters.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 14 |
allp4files/L-Law1iet | /P4-SVM/src/include/actions.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 15 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_definitions.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 16 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_parser.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 17 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_source.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 18 |
allp4files/L-Law1iet | /P4-SVM/src/include/table0.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 19 |
allp4files/L-Law1iet | /P4-SVM/src/include/port_counters.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 20 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_sink.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 21 |
allp4files/L-Law1iet | /P4-SVM/src/include/custom_headers.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 23 |
allp4files/L-Law1iet | /P4-SVM/src/include/host_meter_table.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 24 |
allp4files/L-Law1iet | /P4-SVM/src/include/packet_io.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 25 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_report.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 26 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_headers.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 27 |
allp4files/L-Law1iet | /P4-SVM/src/include/int_transit.p4 | /*
* Copyright 2017-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable law or agreed to in writing, so... | 28 |
allp4files/GlaiChen | /p4lang_memcached_load_balancer/memcached.p4 | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> PROTOCOL_UDP = 0x11;
/*************************************************************************
*********************** H E A D E R S ***********************************
***************************************... | 30 |
allp4files/AkFormat | /up4/include/checksum.p4 | 36 | |
allp4files/AkFormat | /up4/include/define.p4 | /*
* Copyright 2020-2021 Open Networking Foundation
* Copyright 2021-present Princeton University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable... | 37 |
allp4files/L-Law1iet | /P4-SVM/src/main.p4 |
#include <core.p4>
#include <v1model.p4>
#define HASH_BASE 10w0
#define HASH_MAX 10w1023
#define ETH_TYPE_IPV4 0x0800
#define IP_PROTO_TCP 8w6
#define IP_PROTO_UDP 8w17
header ethernet_t {
bit<48> dst_addr;
bit<48> src_addr;
bit<16> ether_type;
}
header ipv4_t {
bit<4> version;
bit<4> ihl;
... | 38 |
allp4files/bartoszlomiej | /Mininet-P4-introduction/code/w6/my_code.p4 | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> TYPE_TCP = 6;
const bit<8> TYPE_UDP = 17;
/*
match_kind {
exact,
ternary,
lpm
}
#define PORT_4 4;
#define PORT_8 8;
*/
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
typedef bit... | 39 |
allp4files/bartoszlomiej | /Mininet-P4-introduction/code/w7/meters.p4 | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<8> TYPE_TCP = 6;
const bit<8> TYPE_UDP = 17;
/*
match_kind {
exact
}
#define PORT_4 4;
#define PORT_8 8;
*/
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
typedef bit<128> ip6Addr_t;
typed... | 40 |
allp4files/bartoszlomiej | /Mininet-P4-introduction/code/w8/digest.p4 | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<16> TYPE_8021Q = 0x8100;
/*
match_kind {
exact
}
#define PORT_4 4;
#define PORT_8 8;
*/
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
typedef bit<16> tpid_t;
header ethernet_t{
macAdd... | 41 |
allp4files/bartoszlomiej | /Mininet-P4-introduction/code/w5/solution.p4 | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<16> TYPE_8021Q = 0x8100;
/*
match_kind {
exact
}
#define PORT_4 4;
#define PORT_8 8;
*/
typedef bit<9> egressSpec_t;
typedef bit<48> macAddr_t;
typedef bit<32> ip4Addr_t;
typedef bit<16> tpid_t;
header ethernet_t{
macAdd... | 42 |
allp4files/zolboo1024 | /sdn_shaping/padding.p4 | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
/*************************************************************************
*********************** H E A D E R S ***********************************
*************************************************************************/... | 43 |
allp4files/RicardoParizotto | /Tutorials_P4_TNA/simpleLB/ipv4.p4 | /* -*- P4_16 -*- */
/*******************************************************************************
* BAREFOOT NETWORKS CONFIDENTIAL & PROPRIETARY
*
* Copyright (c) Intel Corporation
* SPDX-License-Identifier: CC-BY-ND-4.0
*/
#include <core.p4>
#if __TARGET_TOFINO__ == 2
#include <t2na.p4>
#else
#include <tna... | 44 |
allp4files/bartoszlomiej | /Mininet-P4-introduction/code/w7/registers.p4 | #include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<16> TYPE_SAVE_PKT = 0x690;
const bit<16> TYPE_READ_PKT = 0x700;
const bit<8> TYPE_TCP = 6;
const bit<8> TYPE_UDP = 17;
/*
match_kind {
exact
}
#define PORT_4 4;
#define PORT_8 8;
*/
typedef bit<9> egressSpec_t;
typedef bit<48>... | 46 |
allp4files/RicardoParizotto | /Tutorials_P4_TNA/simpleLB/util.p4 | /* -*- P4_16 -*- */
/*******************************************************************************
* BAREFOOT NETWORKS CONFIDENTIAL & PROPRIETARY
*
* Copyright (c) Intel Corporation
* SPDX-License-Identifier: CC-BY-ND-4.0
*/
#ifndef _UTIL_
#define _UTIL_
parser TofinoIngressParser(
packet_in pkt,
... | 47 |
allp4files/AkFormat | /up4/include/header.p4 | /*
* Copyright 2020-2021 Open Networking Foundation
* Copyright 2021-present Princeton University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable... | 48 |
allp4files/RicardoParizotto | /Tutorials_P4_TNA/simpleLB/headers.p4 | /* -*- P4_16 -*- */
/*******************************************************************************
* BAREFOOT NETWORKS CONFIDENTIAL & PROPRIETARY
*
* Copyright (c) Intel Corporation
* SPDX-License-Identifier: CC-BY-ND-4.0
*/
#ifndef _HEADERS_
#define _HEADERS_
typedef bit<48> mac_addr_t;
typedef bit<32> ipv... | 49 |
allp4files/zolboo1024 | /sdn_shaping/multi_queueing.p4 | /* -*- P4_16 -*- */
#include <core.p4>
#include "./v1model.p4"
/*
* Send packets at a constant rate.
* Inject dummy packets when we cannot reach the given rate with the real traffic.
* 2 queues with different priorities. real packets are given high priority
* and dummy ones are given low priority and whatever leav... | 51 |
allp4files/RicardoParizotto | /CMP610/exercises/source_routing/source_routing.p4 | /* -*- P4_16 -*- */
#include <core.p4>
#include <v1model.p4>
const bit<16> TYPE_IPV4 = 0x800;
const bit<16> TYPE_SRCROUTING = 0x1234;
#define MAX_HOPS 9
/*************************************************************************
*********************** H E A D E R S ***********************************
**************... | 55 |
allp4files/AkFormat | /up4/include/parser.p4 | /*
* Copyright 2020-2021 Open Networking Foundation
* Copyright 2021-present Princeton University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:
*
* Unless required by applicable... | 56 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 3