├── .clang-format
├── .gitignore
├── .travis.yml
├── AFI
├── Makefile
├── README.md
├── afi-cap-action.yang
├── afi-cap-entry-action.yang
├── afi-cap-entry-match.yang
├── afi-cap-entry.yang
├── afi-cap-match.yang
├── afi-cap.yang
├── afi-common.yang
├── afi-cos-classifier.yang
├── afi-counter.yang
├── afi-decap.yang
├── afi-discard.yang
├── afi-encap-entry.yang
├── afi-encap.yang
├── afi-filter.yang
├── afi-fwd-sandbox.yang
├── afi-indexed-list.yang
├── afi-indirect.yang
├── afi-list.yang
├── afi-match.yang
├── afi-oam.yang
├── afi-policer.yang
├── afi-port.yang
├── afi-receive.yang
├── afi-replicate.yang
├── afi-sample.yang
├── afi-sandbox.yang
├── afi-selector.yang
├── afi-switch.yang
├── afi-table.yang
├── afi-tree-encap-entry.yang
├── afi-tree-encap.yang
├── afi-tree-entry.yang
├── afi-tree.yang
├── afi-types.yang
├── afi.yang
├── protos
│ ├── juniper
│ │ ├── afi_cap
│ │ │ └── afi_cap.proto
│ │ ├── afi_cap_action
│ │ │ └── afi_cap_action.proto
│ │ ├── afi_cap_entry
│ │ │ └── afi_cap_entry.proto
│ │ ├── afi_cap_entry_action
│ │ │ └── afi_cap_entry_action.proto
│ │ ├── afi_cap_entry_match
│ │ │ └── afi_cap_entry_match.proto
│ │ ├── afi_cap_match
│ │ │ └── afi_cap_match.proto
│ │ ├── afi_cos_classifier
│ │ │ └── afi_cos_classifier.proto
│ │ ├── afi_counter
│ │ │ └── afi_counter.proto
│ │ ├── afi_decap
│ │ │ └── afi_decap.proto
│ │ ├── afi_discard
│ │ │ └── afi_discard.proto
│ │ ├── afi_encap
│ │ │ └── afi_encap.proto
│ │ ├── afi_encap_entry
│ │ │ └── afi_encap_entry.proto
│ │ ├── afi_filter
│ │ │ └── afi_filter.proto
│ │ ├── afi_fwd_sandbox
│ │ │ └── afi_fwd_sandbox.proto
│ │ ├── afi_indexed_list
│ │ │ └── afi_indexed_list.proto
│ │ ├── afi_indirect
│ │ │ └── afi_indirect.proto
│ │ ├── afi_list
│ │ │ └── afi_list.proto
│ │ ├── afi_match
│ │ │ └── afi_match.proto
│ │ ├── afi_oam
│ │ │ └── afi_oam.proto
│ │ ├── afi_policer
│ │ │ └── afi_policer.proto
│ │ ├── afi_port
│ │ │ └── afi_port.proto
│ │ ├── afi_receive
│ │ │ └── afi_receive.proto
│ │ ├── afi_replicate
│ │ │ └── afi_replicate.proto
│ │ ├── afi_sample
│ │ │ └── afi_sample.proto
│ │ ├── afi_sandbox
│ │ │ └── afi_sandbox.proto
│ │ ├── afi_selector
│ │ │ └── afi_selector.proto
│ │ ├── afi_switch
│ │ │ └── afi_switch.proto
│ │ ├── afi_table
│ │ │ └── afi_table.proto
│ │ ├── afi_tree
│ │ │ └── afi_tree.proto
│ │ ├── afi_tree_encap
│ │ │ └── afi_tree_encap.proto
│ │ ├── afi_tree_encap_entry
│ │ │ └── afi_tree_encap_entry.proto
│ │ ├── afi_tree_entry
│ │ │ └── afi_tree_entry.proto
│ │ └── enums
│ │ │ └── enums.proto
│ ├── yext
│ │ └── yext.proto
│ └── ywrapper
│ │ └── ywrapper.proto
└── test
│ └── afi-controller
│ ├── .depend
│ ├── Makefile
│ ├── afi-controller
│ ├── afi_switch.json
│ ├── base64.cpp
│ ├── base64.h
│ └── main.cpp
├── EULA.docx
├── LICENSE
├── Makefile
├── README.md
├── build
├── make-all-aft.sh
├── make-all-brcm.sh
├── make-all-null-wrl.sh
└── make-all-null.sh
├── cli
├── build.sh
├── cli.py
├── jp4cli_pb2.py
└── jp4cli_pb2_grpc.py
├── config
├── afi-switch-cfg.json
├── aft-target-halp-cfg.json
├── jp4agent-brcm-cfg.json
└── jp4agent-cfg.json
├── docs
├── CodingGuidelines.md
├── Jaeger.md
├── README.md
├── WorkingWithVMX.md
├── p4
│ └── README.md
└── resources
│ ├── External-tester.png
│ ├── JP4Agent.png
│ ├── JP4Agent_layers.png
│ ├── JaegerIntegration.png
│ ├── README.md
│ ├── afi-yang-compilation.png
│ ├── docker-setup.png
│ ├── jaeger-vector.svg
│ ├── jp4agent_python_cli.png
│ └── vmx_with_tester.png
├── src
├── .gitignore
├── README.md
├── afi
│ ├── include
│ │ ├── Afi.h
│ │ ├── AfiCap.h
│ │ ├── AfiCapAction.h
│ │ ├── AfiCapEntry.h
│ │ ├── AfiCapEntryAction.h
│ │ ├── AfiCapEntryMatch.h
│ │ ├── AfiCapMatch.h
│ │ ├── AfiCreator.h
│ │ ├── AfiDM.h
│ │ ├── AfiDevice.h
│ │ ├── AfiEncap.h
│ │ ├── AfiEncapEntry.h
│ │ ├── AfiJsonResource.h
│ │ ├── AfiNext.h
│ │ ├── AfiObject.h
│ │ ├── AfiTree.h
│ │ ├── AfiTreeEncap.h
│ │ ├── AfiTreeEncapEntry.h
│ │ ├── AfiTreeEntry.h
│ │ └── AfiTypes.h
│ └── src
│ │ ├── Afi.cpp
│ │ ├── AfiCap.cpp
│ │ ├── AfiCapAction.cpp
│ │ ├── AfiCapEntry.cpp
│ │ ├── AfiCapEntryAction.cpp
│ │ ├── AfiCapEntryMatch.cpp
│ │ ├── AfiCapMatch.cpp
│ │ ├── AfiDevice.cpp
│ │ ├── AfiEncap.cpp
│ │ ├── AfiEncapEntry.cpp
│ │ ├── AfiJsonResource.cpp
│ │ ├── AfiTree.cpp
│ │ ├── AfiTreeEncap.cpp
│ │ ├── AfiTreeEncapEntry.cpp
│ │ ├── AfiTreeEntry.cpp
│ │ └── Makefile
├── config.yaml
├── jp4agent
│ ├── include
│ │ └── JP4Agent.h
│ └── src
│ │ ├── JP4Agent.cpp
│ │ └── Makefile
├── pi
│ ├── include
│ │ ├── CLIService.h
│ │ ├── ControllerConnection.h
│ │ ├── DeviceHPPacket.h
│ │ ├── Hostpath.h
│ │ ├── P4Info.h
│ │ ├── P4RuntimeService.h
│ │ ├── PI.h
│ │ ├── PIServer.h
│ │ └── pvtPI.h
│ ├── protos
│ │ ├── .gitignore
│ │ ├── Makefile
│ │ ├── cli
│ │ │ └── jp4cli.proto
│ │ ├── google
│ │ │ └── rpc
│ │ │ │ ├── code.proto
│ │ │ │ ├── error_details.proto
│ │ │ │ └── status.proto
│ │ ├── p4
│ │ │ ├── config
│ │ │ │ └── p4info.proto
│ │ │ └── tmp
│ │ │ │ └── p4config.proto
│ │ ├── p4info.proto
│ │ ├── p4runtime.proto
│ │ ├── p4runtime_wrl.proto
│ │ └── status.proto
│ └── src
│ │ ├── CLIService.cpp
│ │ ├── ControllerConnection.cpp
│ │ ├── DeviceHPPacket.cpp
│ │ ├── Hostpath.cpp
│ │ ├── Makefile
│ │ ├── P4Info.cpp
│ │ ├── P4RuntimeService.cpp
│ │ ├── PI.cpp
│ │ └── PIServer.cpp
├── targets
│ ├── aft
│ │ ├── aft
│ │ │ ├── README.md
│ │ │ ├── include
│ │ │ │ ├── Aft.h
│ │ │ │ ├── AftClient.h
│ │ │ │ ├── AftDevice.h
│ │ │ │ ├── AftObject.h
│ │ │ │ ├── AftTree.h
│ │ │ │ └── AftTreeEntry.h
│ │ │ └── src
│ │ │ │ ├── Aft.cpp
│ │ │ │ ├── AftClient.cpp
│ │ │ │ ├── AftDevice.cpp
│ │ │ │ ├── AftObject.cpp
│ │ │ │ ├── AftTree.cpp
│ │ │ │ ├── AftTreeEntry.cpp
│ │ │ │ └── Makefile
│ │ ├── bin
│ │ │ ├── .gitignore
│ │ │ ├── gdb-jp4agent
│ │ │ └── run-jp4agent
│ │ ├── config
│ │ │ └── aft-cfg.json
│ │ └── src
│ │ │ ├── Main.cpp
│ │ │ └── Makefile
│ ├── brcm
│ │ ├── .gitkeep
│ │ ├── bin
│ │ │ ├── gdb-jp4agent
│ │ │ └── run-jp4agent
│ │ ├── brcm
│ │ │ ├── README.md
│ │ │ ├── include
│ │ │ │ ├── Brcm.h
│ │ │ │ ├── BrcmCap.h
│ │ │ │ ├── BrcmCapEntry.h
│ │ │ │ ├── BrcmDevice.h
│ │ │ │ ├── BrcmObject.h
│ │ │ │ ├── BrcmTree.h
│ │ │ │ └── BrcmTreeEntry.h
│ │ │ └── src
│ │ │ │ ├── Brcm.cpp
│ │ │ │ ├── BrcmCap.cpp
│ │ │ │ ├── BrcmCapEntry.cpp
│ │ │ │ ├── BrcmDevice.cpp
│ │ │ │ ├── BrcmObject.cpp
│ │ │ │ ├── BrcmTree.cpp
│ │ │ │ ├── BrcmTreeEntry.cpp
│ │ │ │ └── Makefile
│ │ └── src
│ │ │ ├── Main.cpp
│ │ │ └── Makefile
│ └── null
│ │ ├── README.md
│ │ ├── bin
│ │ ├── .gitignore
│ │ ├── gdb-jp4agent
│ │ └── run-jp4agent
│ │ ├── config
│ │ └── null-target-cfg.json
│ │ ├── null
│ │ ├── README.md
│ │ ├── include
│ │ │ ├── Null.h
│ │ │ ├── NullDevice.h
│ │ │ ├── NullObject.h
│ │ │ ├── NullTree.h
│ │ │ └── NullTreeEntry.h
│ │ └── src
│ │ │ ├── Makefile
│ │ │ ├── Null.cpp
│ │ │ ├── NullDevice.cpp
│ │ │ ├── NullObject.cpp
│ │ │ ├── NullTree.cpp
│ │ │ └── NullTreeEntry.cpp
│ │ └── src
│ │ ├── Main.cpp
│ │ └── Makefile
└── utils
│ ├── include
│ ├── JaegerLog.h
│ ├── Log.h
│ ├── Utils.h
│ └── uint128.h
│ └── src
│ ├── JaegerLog.cpp
│ ├── Makefile
│ ├── Utils.cpp
│ └── uint128.cpp
├── test
├── controller
│ ├── .gitignore
│ ├── README
│ ├── bin
│ │ ├── gdb-controller
│ │ └── run-controller
│ ├── include
│ │ ├── Controller.h
│ │ ├── P4InfoUtils.h
│ │ └── Utils.h
│ ├── src
│ │ ├── Controller.cpp
│ │ ├── Main.cpp
│ │ ├── Makefile
│ │ └── P4InfoUtils.cpp
│ └── testdata
│ │ ├── afi_switch.json
│ │ ├── loopback.json
│ │ ├── loopback.p4
│ │ ├── loopback.proto.txt
│ │ ├── packet_io.json
│ │ ├── packet_io.p4
│ │ ├── packet_io.proto.txt
│ │ ├── simple_router.json
│ │ ├── simple_router.proto.txt
│ │ ├── spine.json
│ │ └── spine.p4rt
├── gtest
│ ├── .gitignore
│ ├── README.md
│ ├── bin
│ │ ├── GTEST_EXPECTED
│ │ │ └── P4
│ │ │ │ ├── hostPing
│ │ │ │ └── ge-0.0.2-vmx1.pcap
│ │ │ │ ├── injectL2Pkt
│ │ │ │ └── ge-0.0.2-vmx1.pcap
│ │ │ │ ├── ipv4Router
│ │ │ │ ├── ge-0.0.2-vmx1.pcap
│ │ │ │ └── ge-0.0.3-vmx1.pcap
│ │ │ │ ├── puntL2Pkt
│ │ │ │ └── ge-0.0.2-vmx1.pcap
│ │ │ │ └── sendArpReq
│ │ │ │ └── ge-0.0.2-vmx1.pcap
│ │ └── run-jp4agent-gtest
│ ├── include
│ │ ├── TapIf.h
│ │ ├── TestPacket.h
│ │ └── TestUtils.h
│ └── src
│ │ ├── GTest.cpp
│ │ ├── GTestBrcm.cpp
│ │ ├── GTestBrcmSpine.cpp
│ │ ├── Makefile
│ │ ├── TapIf.cpp
│ │ ├── TestPacket.cpp
│ │ └── TestUtils.cpp
└── scripts
│ ├── nullTest.sh
│ └── udp_server.py
└── tools
├── .gitignore
├── README.md
├── config
├── cron.cfg
├── regression-cfg.xml
└── vmx-cfg.xml
├── docker
├── Dockerfile_p4
├── Dockerfile_p4_vmx
├── cfg
│ ├── _vPFE-ref.xml
│ ├── cron.cfg
│ ├── fwd_sandbox_junos_config.txt
│ ├── junos_config.txt
│ ├── vmx-junosdev.conf
│ └── vmx.conf
├── entrypoint.sh
├── env
│ ├── bash_aliases
│ ├── tmux.conf
│ └── vimrc
└── scripts
│ ├── .gitignore
│ ├── build-jp4.sh
│ ├── check_vmx.exp
│ ├── clear_rior_zt.log.sh
│ ├── cmn.sh
│ ├── config_br-int-vmx1.sh
│ ├── config_fpc0.exp
│ ├── config_fwd_sandbox.exp
│ ├── config_junos.exp
│ ├── config_tap_interfaces.sh
│ ├── config_vfp_ext_if.exp
│ ├── config_vmx_links.sh
│ ├── cp_aft_pkg_to_vcp.exp
│ ├── disable_flow_cache.exp
│ ├── dump_debug_info.exp
│ ├── generate_coverage_report.sh
│ ├── lib.exp
│ ├── restart_fpc0.exp
│ ├── setup_vmx.sh
│ ├── shutdown_jp4agent.sh
│ └── stop_vmx.sh
├── report
├── .gitignore
├── gtest-not-run.xml
├── gtest-result.dtd
├── gtest-result.xsl
├── index.html
└── regression.xsl
└── scripts
├── bridge_cleanup.sh
├── build_push_docker.sh
├── clang-format.sh
├── cmn.sh
├── cpplint.py
├── cpplint.sh
├── delete_old_reports.sh
├── docker_run_gtests.exp
├── docker_setup_vmx.exp
├── generate_final_report.sh
├── http_server.py
├── install_packages.sh
├── lib.exp
├── package-vmx.sh
├── regression.sh
├── run-regression
├── schedule_cron_job.sh
├── setup-vmx
└── start-http-server
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.so.*
4 | *.so
5 | *.o
6 | *.a
7 | obj
8 |
9 | # cscope/tags #
10 | ###############
11 | cscope.*
12 | tags
13 |
14 | # grpc/protobuf generated files #
15 | #################################
16 | *.pb.cc
17 | *.pb.h
18 |
19 | # More files to ignore #
20 | ########################
21 | *.swp
22 | *.pyc
23 | *.bak
24 | .depend
25 | AFI/protos/juniper
26 | CPPLINT.cfg
27 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # Travis YAML file
2 | #
3 | #
4 | # Created by Manmeet Singh, February 2018
5 | # Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | #
7 | # All rights reserved.
8 | #
9 | # Notice and Disclaimer: This code is licensed to you under the Apache
10 | # License 2.0 (the "License"). You may not use this code except in compliance
11 | # with the License. This code is not an official Juniper product. You can
12 | # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Third-Party Code: This code may depend on other components under separate
15 | # copyright notice and license terms. Your use of the source code for those
16 | # components is subject to the terms and conditions of the respective license
17 | # as noted in the Third-Party source code file.
18 |
19 | language: cpp
20 | sudo: required
21 | dist: xenial
22 | services:
23 | - docker
24 | compiler:
25 | - gcc
26 | os:
27 | - linux
28 | before_install:
29 | - cd tools/docker; docker build -f Dockerfile_p4 -t juniper-p4 .
30 | - cd ../..
31 | - docker run -d --name travis-p4 -v `pwd`:/root/JP4Agent --privileged -i -t juniper-p4 /bin/bash
32 | - docker ps -a
33 | script:
34 | - docker exec travis-p4 /bin/bash -c "cd /root/JP4Agent/build; ./make-all-null.sh"
35 | - docker exec travis-p4 /bin/bash -c "cd /root/JP4Agent/test/scripts; ./nullTest.sh"
36 | branches:
37 | only:
38 | - master
39 |
--------------------------------------------------------------------------------
/AFI/README.md:
--------------------------------------------------------------------------------
1 | # AFI yang data model
2 |
3 |
4 | ### Compilation
5 | ```
6 | make
7 | ```
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AFI/afi-cap-entry.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Cap Entry
3 | //
4 | // Created by Sudheendra Gopinath, June 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-cap-entry {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-cap-entry/junos/17.3";
14 | prefix "afi-cap-entry";
15 |
16 | organization
17 | "Juniper Networks, Inc.";
18 |
19 | contact
20 | "Sudheendra Gopinath
21 | sgopinath@juniper.net";
22 |
23 | description
24 | "This module provides data model for AFI Content Aware Processor Entry";
25 |
26 | revision 2018-06-02 {
27 | description "Initial revision.";
28 | }
29 |
30 | container afi-cap-entry {
31 | leaf parent-name {
32 | type string;
33 | description "Parent name";
34 | }
35 |
36 | leaf match-object {
37 | type string;
38 | description "Match set";
39 | }
40 |
41 | leaf action-object {
42 | type string;
43 | description "Action set";
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/AFI/afi-cap.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Content Aware Processor
3 | //
4 | // Created by Sudheendra Gopinath, June 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-cap {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-cap/junos/17.3";
14 | prefix "afi-cap";
15 |
16 | organization
17 | "Juniper Networks, Inc.";
18 |
19 | contact
20 | "Sudheendra Gopinath
21 | sgopinath@juniper.net";
22 |
23 | description
24 | "This module provides data model for AFI Content Aware Processor";
25 |
26 | revision 2019-06-02 {
27 | description "Initial revision.";
28 | }
29 |
30 | container afi-cap {
31 | leaf cap-type {
32 | type enumeration {
33 | enum "VLAN";
34 | enum "INGRESS";
35 | enum "EGRESS";
36 | enum "MY-MAC";
37 | }
38 | description "Content Aware Processor Type";
39 | }
40 |
41 | leaf group-id {
42 | type uint8;
43 | description "Group ID";
44 | }
45 |
46 | leaf group-priority {
47 | type uint8;
48 | description "Group Priority";
49 | }
50 |
51 | leaf match-object {
52 | type string;
53 | description "Match set";
54 | }
55 |
56 | leaf action-object {
57 | type string;
58 | description "Action set";
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/AFI/afi-common.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Juniper Networks, Inc.
3 | // All rights reserved.
4 | //
5 |
6 | module afi-common {
7 |
8 | yang-version "1";
9 |
10 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-cmn/junos/17.3";
11 | prefix "afi-cmn";
12 |
13 | organization
14 | "Juniper Networks, Inc.";
15 |
16 | contact
17 | "Sandesh Kumar Sodhi
18 | sksodhi@juniper.net";
19 |
20 | description
21 | "This module provides data model for Juniper's Advanced Forwarding Interface";
22 |
23 | revision 2017-12-02 {
24 | description "Initial revision.";
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/AFI/afi-cos-classifier.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : COS Classifier
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-cos-classifier {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-cos-classifier/junos/17.3";
14 | prefix "afi-cos-classifier";
15 |
16 |
17 | import afi-types { prefix "afi-types"; }
18 | import afi-common { prefix "afi-cmn"; }
19 |
20 | organization
21 | "Juniper Networks, Inc.";
22 |
23 | contact
24 | "Sandesh Kumar Sodhi
25 | sksodhi@juniper.net";
26 |
27 | description
28 | "COS classifier";
29 |
30 | revision 2017-12-02 {
31 | description "Initial revision.";
32 | }
33 |
34 | container cos-classifier {
35 | description "Class of Service Classifier";
36 |
37 | leaf name {
38 | description "Name";
39 | type string;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/AFI/afi-counter.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Counter
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-counter {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-counter/junos/17.3";
14 | prefix "afi-counter";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI Counter";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-counter {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-decap.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Decap
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-decap {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-decap/junos/17.3";
14 | prefix "afi-decap";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI Decap";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-decap {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-discard.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Discard
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-discard {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-discard/junos/17.3";
14 | prefix "afi-discard";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "Disacard";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-discard {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-encap-entry.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Encap Entry
3 | //
4 | // Created by Sudheendra Gopinath, August 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-encap-entry {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-encap-entry/junos/17.3";
14 | prefix "afi-encap-entry";
15 |
16 | import afi-types { prefix "afi-types"; }
17 |
18 | organization
19 | "Juniper Networks, Inc.";
20 |
21 | contact
22 | "Sudheendra Gopinath
23 | sgopinath@juniper.net";
24 |
25 | description
26 | "This module provides data model for AFI Encap Entry in Juniper's Advanced Forwarding Interface";
27 |
28 | revision 2018-02-12 {
29 | description "Initial revision.";
30 | }
31 |
32 | container afi-encap-entry {
33 | description "AFT Encap Entry";
34 |
35 | leaf name {
36 | description "Name";
37 | type string;
38 | }
39 |
40 | leaf parent-name {
41 | description "Parent name";
42 | type string;
43 | }
44 |
45 | list afi-key {
46 | key "field-name";
47 | unique "field-name";
48 |
49 | leaf field-name {
50 | description "Encap field name";
51 | type afi-types:afi-field;
52 | }
53 |
54 | leaf field-data {
55 | description "Encap field data";
56 | type binary;
57 | }
58 | }
59 |
60 | leaf-list dummy {
61 | type afi-types:afi-field;
62 | description "Dummy";
63 | }
64 |
65 | leaf target-afi-object {
66 | description "Target afi object to execute on entry match";
67 | type string;
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/AFI/afi-encap.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Encap
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-encap {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-encap/junos/17.3";
14 | prefix "afi-encap";
15 |
16 | import afi-types { prefix "afi-types"; }
17 |
18 | organization
19 | "Juniper Networks, Inc.";
20 |
21 | contact
22 | "Sandesh Kumar Sodhi
23 | sksodhi@juniper.net";
24 |
25 | description
26 | "Encap";
27 |
28 | revision 2017-12-02 {
29 | description "Initial revision.";
30 | }
31 |
32 | container afi-encap {
33 | description "AFI Encap";
34 |
35 | leaf name {
36 | description "Name";
37 | type string;
38 | }
39 |
40 | leaf encap-name {
41 | type string;
42 | description "Encapsulation name";
43 | }
44 |
45 | leaf-list key-fields {
46 | type afi-types:afi-field;
47 | description "List of fields";
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/AFI/afi-filter.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Filter
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-filter {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-filter/junos/17.3";
14 | prefix "afi-filter";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "This module provides data model for AFI Filter";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-filter {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-fwd-sandbox.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Juniper Networks, Inc.
3 | // All rights reserved.
4 | //
5 |
6 | module afi-fwd-sandbox {
7 |
8 | yang-version "1";
9 |
10 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-fwd-sandbox/junos/17.3";
11 | prefix "afi-fwd-sb";
12 |
13 | import afi-types { prefix "afi-types"; }
14 | import afi-common { prefix "afi-cmn"; }
15 |
16 | organization
17 | "Juniper Networks, Inc.";
18 |
19 | contact
20 | "Sandesh Kumar Sodhi
21 | sksodhi@juniper.net";
22 |
23 | description
24 | "This module provides data model for Juniper's Advanced Forwarding Interface";
25 |
26 | revision 2017-12-02 {
27 | description "Initial revision.";
28 | }
29 |
30 | container fwd-sandbox {
31 | description "Forwarding sandbox";
32 |
33 | leaf sandbox-name {
34 | description "Sandbox name";
35 | type string;
36 | }
37 |
38 | list input-port {
39 | description "Forwarding sandbox input port";
40 | key "port-index";
41 | unique "port-name";
42 |
43 | leaf port-index {
44 | description "Port index";
45 | type uint32;
46 | }
47 |
48 | leaf port-name {
49 | description "Port name";
50 | type string;
51 | }
52 | }
53 |
54 | list output-port {
55 | description "Forwarding sandbox ouput port";
56 | key "port-index";
57 | unique "port-name";
58 |
59 | leaf port-index {
60 | description "Port index";
61 | type uint32;
62 | }
63 |
64 | leaf port-name {
65 | description "Port name";
66 | type string;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/AFI/afi-indexed-list.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Indexed list
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-indexed-list {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-indexed-list/junos/17.3";
14 | prefix "afi-indexed-list";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI indexed list";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-indexed-list {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-indirect.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Indirect
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-indirect {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-indirect/junos/17.3";
14 | prefix "afi-indirect";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "Indirect";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-indirect {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-list.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : List
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-list {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-list/junos/17.3";
14 | prefix "afi-list";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI list";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-list {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-match.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Match
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-match {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-match/junos/17.3";
14 | prefix "afi-match";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI match";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-match {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-oam.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : OAM
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-oam {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-oam/junos/17.3";
14 | prefix "afi-oam";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI OAM";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-oam {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-policer.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Policer/Meter
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-policer {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-policer/junos/17.3";
14 | prefix "afi-policer";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI policer/meter";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-policer {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-port.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Port
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-port {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-port/junos/17.3";
14 | prefix "afi-port";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI port";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-port {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-receive.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Receive
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-receive {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-receive/junos/17.3";
14 | prefix "afi-receive";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI receive";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-receive {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-replicate.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Replicate
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-replicate {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-replicate/junos/17.3";
14 | prefix "afi-replicate";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI Replicate";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-replicate {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-sample.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Sample
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-sample {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-sample/junos/17.3";
14 | prefix "afi-sample";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI Sample";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-sample {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-sandbox.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Sandbox
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-sandbox {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-sandbox/junos/17.3";
14 | prefix "afi-sb";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "This module provides data model for Juniper's Advanced Forwarding Interface";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container sandbox {
34 | description "Sandbox";
35 |
36 | leaf sandbox-name {
37 | description "Sandbox name";
38 | type string;
39 | }
40 |
41 | list input-port {
42 | description "Sandbox input port";
43 | key "port-index";
44 | unique "port-name";
45 |
46 | leaf port-index {
47 | description "Port index";
48 | type uint32;
49 | }
50 |
51 | leaf port-name {
52 | description "Port name";
53 | type string;
54 | }
55 | }
56 |
57 | list output-port {
58 | description "Sandbox ouput port";
59 | key "port-index";
60 | unique "port-name";
61 |
62 | leaf port-index {
63 | description "Port index";
64 | type uint32;
65 | }
66 |
67 | leaf port-name {
68 | description "Port name";
69 | type string;
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/AFI/afi-selector.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Selector
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-selector {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-selector/junos/17.3";
14 | prefix "afi-selector";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI Selector";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-selector {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-switch.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Switch
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-switch {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-switch/junos/17.3";
14 | prefix "afi-switch";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "Static multi-part conditional";
28 |
29 | revision 2018-01-31 {
30 | description "Initial revision.";
31 | }
32 |
33 | container switch-case {
34 | description "AFI switch case";
35 |
36 | leaf name {
37 | type string;
38 | description "Name of switch case";
39 | }
40 |
41 | leaf value {
42 | type string;
43 | description "Field to use for switch";
44 | }
45 |
46 | leaf node {
47 | type string;
48 | description "Node to go to, on match";
49 | }
50 | }
51 |
52 | container afi-switch {
53 | description "AFI switch";
54 |
55 | leaf name {
56 | type string;
57 | description "Name of switch node";
58 | }
59 |
60 | leaf switch-field {
61 | type afi-types:afi-field;
62 | description "Field to use for switch";
63 | }
64 |
65 | leaf-list key-fields {
66 | type afi-types:afi-field;
67 | description "List of fields";
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/AFI/afi-table.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : Table
3 | //
4 | // Created by Sandesh Kumar Sodhi, January 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-table {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-table/junos/17.3";
14 | prefix "afi-table";
15 |
16 | import afi-types { prefix "afi-types"; }
17 | import afi-common { prefix "afi-cmn"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "AFI table";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-table {
34 | description "TBD";
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AFI/afi-tree-encap-entry.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Tree EnCap Entry
3 | //
4 | // Created by Sudheendra Gopinath, June 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-tree-encap-entry {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-tree-encap-entry/junos/17.3";
14 | prefix "afi-tree-encap-entry";
15 |
16 | organization
17 | "Juniper Networks, Inc.";
18 |
19 | contact
20 | "Sudheendra Gopinath
21 | sgopinath@juniper.net";
22 |
23 | description
24 | "This module provides data model for AFI Tree and Packet Encapsulation Entry";
25 |
26 | revision 2018-06-02 {
27 | description "Initial revision.";
28 | }
29 |
30 | container afi-tree-encap-entry {
31 | leaf parent-name {
32 | type string;
33 | description "Parent name";
34 | }
35 |
36 | leaf tree-entry-object {
37 | type string;
38 | description "Tree entry object";
39 | }
40 |
41 | leaf encap-entry-object {
42 | type string;
43 | description "Encap entry object";
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/AFI/afi-tree-encap.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Tree_And_Encapuslation
3 | //
4 | // Created by Sudheendra Gopinath, August 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-tree-encap {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-tree-encap/junos/17.3";
14 | prefix "afi-tree-encap";
15 |
16 | organization
17 | "Juniper Networks, Inc.";
18 |
19 | contact
20 | "Sudheendra Gopinath
21 | sgopinath@juniper.net";
22 |
23 | description
24 | "This module provides data model for AFI Tree and Encapsulation";
25 |
26 | revision 2019-06-02 {
27 | description "Initial revision.";
28 | }
29 |
30 | container afi-tree-encap {
31 | leaf tree-object {
32 | type string;
33 | description "Tree object";
34 | }
35 |
36 | leaf encap-object {
37 | type string;
38 | description "Encap object";
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/AFI/afi-tree-entry.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Tree Entry
3 | //
4 | // Created by Sandesh Kumar Sodhi, February 2018
5 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-tree-entry {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-tree-entry/junos/17.3";
14 | prefix "afi-tree-entry";
15 |
16 | import afi-types { prefix "afi-types"; }
17 |
18 | organization
19 | "Juniper Networks, Inc.";
20 |
21 | contact
22 | "Sandesh Kumar Sodhi
23 | sksodhi@juniper.net";
24 |
25 | description
26 | "This module provides data model for AFI Tree Entry in Juniper's Advanced Forwarding Interface";
27 |
28 | revision 2018-02-12 {
29 | description "Initial revision.";
30 | }
31 |
32 | container afi-tree-entry {
33 | description "AFT Tree Entry";
34 |
35 | leaf name {
36 | description "Name";
37 | type string;
38 | }
39 |
40 | leaf parent-name {
41 | description "Parent name";
42 | type string;
43 | }
44 |
45 | leaf prefix-bytes {
46 | description "Prefix bytes";
47 | type string;
48 | }
49 |
50 | leaf prefix-length {
51 | description "Prefix length";
52 | type uint16;
53 | }
54 |
55 | leaf vrf-id {
56 | description "VRF ID";
57 | type uint32;
58 | }
59 |
60 | leaf target-afi-object {
61 | description "Target afi object to execute this entry matches";
62 | type string;
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/AFI/afi-tree.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper AFI : AFI Tree
3 | //
4 | // Created by Sandesh Kumar Sodhi, December 2017
5 | // Copyright (c) [2017] Juniper Networks, Inc. All rights reserved.
6 | //
7 | //
8 |
9 | module afi-tree {
10 |
11 | yang-version "1";
12 |
13 | namespace "http://yang.juniper.net/yang/1.1/jc/afi-tree/junos/17.3";
14 | prefix "afi-tree";
15 |
16 |
17 | import afi-types { prefix "afi-types"; }
18 |
19 | organization
20 | "Juniper Networks, Inc.";
21 |
22 | contact
23 | "Sandesh Kumar Sodhi
24 | sksodhi@juniper.net";
25 |
26 | description
27 | "This module provides data model for AFI Tree in Juniper's Advanced Forwarding Interface";
28 |
29 | revision 2017-12-02 {
30 | description "Initial revision.";
31 | }
32 |
33 | container afi-tree {
34 | description "AFT Tree";
35 |
36 | leaf name {
37 | description "Name of tree";
38 | type string;
39 | }
40 |
41 | leaf-list key-fields {
42 | type afi-types:afi-field;
43 | description "List of fields";
44 | }
45 |
46 | // Below must be removed.
47 | leaf key-field {
48 | type string;
49 | description "Key field";
50 | }
51 |
52 | leaf proto {
53 | description "Protocol";
54 | type afi-types:afi-protocol-index;
55 | }
56 |
57 | leaf type {
58 | type afi-types:afi-tree-type;
59 | description "Tree type";
60 | }
61 |
62 | leaf default-next-node {
63 | description "Default node to execute if no match made";
64 | type string;
65 | }
66 |
67 | leaf size {
68 | description "Size";
69 | type uint32;
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/AFI/afi.yang:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2017 Juniper Networks, Inc.
3 | // All rights reserved.
4 | //
5 |
6 | module afi {
7 |
8 | yang-version "1";
9 |
10 | namespace "http://yang.juniper.net/yang/1.1/jc/afi/junos/17.3";
11 | prefix "afi";
12 |
13 | import afi-types { prefix "afi-types"; }
14 | import afi-common { prefix "afi-cmn"; }
15 |
16 | organization
17 | "Juniper Networks, Inc.";
18 |
19 | contact
20 | "Sandesh Kumar Sodhi
21 | sksodhi@juniper.net";
22 |
23 | description
24 | "Data model for Advanced Forwarding Interface";
25 |
26 | revision 2017-12-02 {
27 | description "Initial revision.";
28 | }
29 |
30 | typedef port-state {
31 | description "Port state";
32 | type enumeration {
33 | enum DOWN {
34 | description
35 | "Port state DOWN";
36 | }
37 | enum UP {
38 | description
39 | "Port state UP";
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_cap/afi_cap.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_cap is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_cap;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiCap {
48 | enum CapType {
49 | CAPTYPE_UNSET = 0;
50 | CAPTYPE_VLAN = 1 [(yext.yang_name) = "VLAN"];
51 | CAPTYPE_INGRESS = 2 [(yext.yang_name) = "INGRESS"];
52 | CAPTYPE_EGRESS = 3 [(yext.yang_name) = "EGRESS"];
53 | CAPTYPE_MY_MAC = 4 [(yext.yang_name) = "MY-MAC"];
54 | }
55 | ywrapper.StringValue action_object = 359987726;
56 | CapType cap_type = 305421565;
57 | ywrapper.UintValue group_id = 502911037;
58 | ywrapper.UintValue group_priority = 302957514;
59 | ywrapper.StringValue match_object = 89788449;
60 | }
61 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_cap_action/afi_cap_action.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_cap_action is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_cap_action;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiCapAction {
48 | ywrapper.BoolValue copy_to_cpu = 503826992;
49 | ywrapper.BoolValue copy_to_cpu_cancel = 530999003;
50 | ywrapper.BoolValue cpu_queue = 315246306;
51 | ywrapper.BoolValue cpu_queue_mask = 451340863;
52 | ywrapper.BoolValue destination_class_id = 39883017;
53 | ywrapper.BoolValue drop = 334671545;
54 | ywrapper.BoolValue drop_cancel = 232920976;
55 | ywrapper.BoolValue source_class_id = 13743256;
56 | ywrapper.BoolValue vrf = 33275360;
57 | }
58 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_cap_entry/afi_cap_entry.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_cap_entry is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_cap_entry;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiCapEntry {
48 | ywrapper.StringValue action_object = 27856950;
49 | ywrapper.StringValue match_object = 215134633;
50 | ywrapper.StringValue parent_name = 87410884;
51 | }
52 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_cap_entry_action/afi_cap_entry_action.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_cap_entry_action is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_cap_entry_action;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiCapEntryAction {
48 | ywrapper.BoolValue copy_to_cpu = 244904514;
49 | ywrapper.BoolValue copy_to_cpu_cancel = 533151157;
50 | ywrapper.UintValue cpu_queue = 319334888;
51 | ywrapper.UintValue destination_class_id = 163126875;
52 | ywrapper.BoolValue drop = 363439759;
53 | ywrapper.BoolValue drop_cancel = 390299182;
54 | ywrapper.UintValue source_class_id = 279532798;
55 | ywrapper.UintValue vrf = 72687718;
56 | }
57 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_cos_classifier/afi_cos_classifier.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_cos_classifier is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_cos_classifier;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message CosClassifier {
48 | ywrapper.StringValue name = 125369254;
49 | }
50 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_counter/afi_counter.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_counter is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_counter;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiCounter {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_decap/afi_decap.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_decap is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_decap;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiDecap {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_discard/afi_discard.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_discard is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_discard;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiDiscard {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_encap/afi_encap.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_encap is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_encap;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 | import "juniper/enums/enums.proto";
47 |
48 | message AfiEncap {
49 | ywrapper.StringValue encap_name = 393899969;
50 | repeated juniper.enums.AfiEncapAfiField key_fields = 103217797;
51 | ywrapper.StringValue name = 73308845;
52 | }
53 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_encap_entry/afi_encap_entry.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_encap_entry is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_encap_entry;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 | import "juniper/enums/enums.proto";
47 |
48 | message AfiEncapEntry {
49 | message AfiKey {
50 | ywrapper.BytesValue field_data = 53072422;
51 | }
52 | message AfiKeyKey {
53 | juniper.enums.AfiEncapEntryAfiField field_name = 1;
54 | AfiKey afi_key = 2;
55 | }
56 | repeated AfiKeyKey afi_key = 212250188;
57 | repeated juniper.enums.AfiEncapEntryAfiField dummy = 108175812;
58 | ywrapper.StringValue name = 145587281;
59 | ywrapper.StringValue parent_name = 155499100;
60 | ywrapper.StringValue target_afi_object = 406864802;
61 | }
62 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_filter/afi_filter.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_filter is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_filter;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiFilter {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_fwd_sandbox/afi_fwd_sandbox.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_fwd_sandbox is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_fwd_sandbox;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message FwdSandbox {
48 | message InputPort {
49 | ywrapper.StringValue port_name = 146084661;
50 | }
51 | message InputPortKey {
52 | uint64 port_index = 1;
53 | InputPort input_port = 2;
54 | }
55 | message OutputPort {
56 | ywrapper.StringValue port_name = 463812234;
57 | }
58 | message OutputPortKey {
59 | uint64 port_index = 1;
60 | OutputPort output_port = 2;
61 | }
62 | repeated InputPortKey input_port = 74510687;
63 | repeated OutputPortKey output_port = 90683676;
64 | ywrapper.StringValue sandbox_name = 66102704;
65 | }
66 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_indexed_list/afi_indexed_list.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_indexed_list is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_indexed_list;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiIndexedList {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_indirect/afi_indirect.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_indirect is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_indirect;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiIndirect {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_list/afi_list.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_list is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_list;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiList {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_match/afi_match.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_match is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_match;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiMatch {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_oam/afi_oam.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_oam is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_oam;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiOam {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_policer/afi_policer.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_policer is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_policer;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiPolicer {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_port/afi_port.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_port is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_port;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiPort {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_receive/afi_receive.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_receive is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_receive;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiReceive {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_replicate/afi_replicate.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_replicate is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_replicate;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiReplicate {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_sample/afi_sample.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_sample is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_sample;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiSample {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_sandbox/afi_sandbox.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_sandbox is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_sandbox;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message Sandbox {
48 | message InputPort {
49 | ywrapper.StringValue port_name = 2033717;
50 | }
51 | message InputPortKey {
52 | uint64 port_index = 1;
53 | InputPort input_port = 2;
54 | }
55 | message OutputPort {
56 | ywrapper.StringValue port_name = 393340298;
57 | }
58 | message OutputPortKey {
59 | uint64 port_index = 1;
60 | OutputPort output_port = 2;
61 | }
62 | repeated InputPortKey input_port = 168164959;
63 | repeated OutputPortKey output_port = 252391452;
64 | ywrapper.StringValue sandbox_name = 272956080;
65 | }
66 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_selector/afi_selector.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_selector is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_selector;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiSelector {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_switch/afi_switch.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_switch is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_switch;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 | import "juniper/enums/enums.proto";
47 |
48 | message AfiSwitch {
49 | repeated juniper.enums.AfiSwitchAfiField key_fields = 43023453;
50 | ywrapper.StringValue name = 531046261;
51 | juniper.enums.AfiSwitchAfiField switch_field = 185566099;
52 | }
53 |
54 | message SwitchCase {
55 | ywrapper.StringValue name = 375078443;
56 | ywrapper.StringValue node = 457392418;
57 | ywrapper.StringValue value = 278619649;
58 | }
59 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_table/afi_table.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_table is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_table;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiTable {
48 | }
49 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_tree/afi_tree.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_tree is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_tree;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 | import "juniper/enums/enums.proto";
47 |
48 | message AfiTree {
49 | ywrapper.StringValue default_next_node = 188585364;
50 | ywrapper.StringValue key_field = 32307618;
51 | repeated juniper.enums.AfiTreeAfiField key_fields = 168622709;
52 | ywrapper.StringValue name = 71110621;
53 | ywrapper.UintValue proto = 228442342;
54 | ywrapper.UintValue size = 287392455;
55 | juniper.enums.AfiTreeAfiTreeType type = 184483852;
56 | }
57 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_tree_encap/afi_tree_encap.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_tree_encap is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_tree_encap;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiTreeEncap {
48 | ywrapper.StringValue encap_object = 226157325;
49 | ywrapper.StringValue tree_object = 261395432;
50 | }
51 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_tree_encap_entry/afi_tree_encap_entry.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_tree_encap_entry is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_tree_encap_entry;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiTreeEncapEntry {
48 | ywrapper.StringValue encap_entry_object = 299512082;
49 | ywrapper.StringValue parent_name = 448450194;
50 | ywrapper.StringValue tree_entry_object = 174244527;
51 | }
52 |
--------------------------------------------------------------------------------
/AFI/protos/juniper/afi_tree_entry/afi_tree_entry.proto:
--------------------------------------------------------------------------------
1 | // juniper.afi_tree_entry is generated by proto_generator as a protobuf
2 | // representation of a YANG schema.
3 | //
4 | // Input schema modules:
5 | // - afi-cap-action.yang
6 | // - afi-cap-entry-action.yang
7 | // - afi-cap-entry-match.yang
8 | // - afi-cap-entry.yang
9 | // - afi-cap-match.yang
10 | // - afi-cap.yang
11 | // - afi-common.yang
12 | // - afi-cos-classifier.yang
13 | // - afi-counter.yang
14 | // - afi-decap.yang
15 | // - afi-discard.yang
16 | // - afi-encap-entry.yang
17 | // - afi-encap.yang
18 | // - afi-filter.yang
19 | // - afi-fwd-sandbox.yang
20 | // - afi-indexed-list.yang
21 | // - afi-indirect.yang
22 | // - afi-list.yang
23 | // - afi-match.yang
24 | // - afi-oam.yang
25 | // - afi-policer.yang
26 | // - afi-port.yang
27 | // - afi-receive.yang
28 | // - afi-replicate.yang
29 | // - afi-sample.yang
30 | // - afi-sandbox.yang
31 | // - afi-selector.yang
32 | // - afi-switch.yang
33 | // - afi-table.yang
34 | // - afi-tree-encap-entry.yang
35 | // - afi-tree-encap.yang
36 | // - afi-tree-entry.yang
37 | // - afi-tree.yang
38 | // - afi-types.yang
39 | // - afi.yang
40 | syntax = "proto3";
41 |
42 | package juniper.afi_tree_entry;
43 |
44 | import "ywrapper/ywrapper.proto";
45 | import "yext/yext.proto";
46 |
47 | message AfiTreeEntry {
48 | ywrapper.StringValue name = 298281935;
49 | ywrapper.StringValue parent_name = 84475654;
50 | ywrapper.StringValue prefix_bytes = 312714340;
51 | ywrapper.UintValue prefix_length = 35426751;
52 | ywrapper.StringValue target_afi_object = 227270412;
53 | ywrapper.UintValue vrf_id = 245987046;
54 | }
55 |
--------------------------------------------------------------------------------
/AFI/protos/yext/yext.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Google Inc.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | // yext extends the Protobuf FieldOptions to add allow new options to be
16 | // set storing characteristics of the YANG schema from which a protobuf
17 | // is generated.
18 | syntax = "proto3";
19 |
20 | import "google/protobuf/descriptor.proto";
21 |
22 | package yext;
23 |
24 | extend google.protobuf.FieldOptions {
25 | // schemapath stores the schema path to the field within the YANG schema.
26 | // The path stored is absolute if the entity is at the root of the schema
27 | // tree. In the case that it is not (i.e., it is an entity that has a parent
28 | // which is not a module, the path supplied is the relative path to the
29 | // parent of the entity). The field number for this extension is reserved
30 | // in the global protobuf registry.
31 | string schemapath = 1040;
32 | }
33 |
34 | extend google.protobuf.EnumValueOptions {
35 | // yang_name stores the original YANG name of the enumerated value, for
36 | // serialisation to a string. The field number for this extension is
37 | // reserved in the global protobuf registry.
38 | string yang_name = 1040;
39 | }
40 |
--------------------------------------------------------------------------------
/AFI/test/afi-controller/.depend:
--------------------------------------------------------------------------------
1 | base64.o: base64.cpp base64.h
2 | main.o: main.cpp ../yang/AFI/protos/juniper/afi_tree/afi_tree.pb.h \
3 | ../yang/AFI/protos/ywrapper/ywrapper.pb.h \
4 | ../yang/AFI/protos/yext/yext.pb.h base64.h
5 | afi_tree.pb.o: ../yang/AFI/protos/juniper/afi_tree/afi_tree.pb.cc \
6 | ../yang/AFI/protos/juniper/afi_tree/afi_tree.pb.h \
7 | ../yang/AFI/protos/ywrapper/ywrapper.pb.h \
8 | ../yang/AFI/protos/yext/yext.pb.h
9 | yext.pb.o: ../yang/AFI/protos/yext/yext.pb.cc \
10 | ../yang/AFI/protos/yext/yext.pb.h
11 | ywrapper.pb.o: ../yang/AFI/protos/ywrapper/ywrapper.pb.cc \
12 | ../yang/AFI/protos/ywrapper/ywrapper.pb.h
13 |
--------------------------------------------------------------------------------
/AFI/test/afi-controller/afi-controller:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/AFI/test/afi-controller/afi-controller
--------------------------------------------------------------------------------
/AFI/test/afi-controller/afi_switch.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "afi-object" : "kpqfexIKEHBhY2tldC5pcDQuZGFkZHLq/aGPAgoKCGlwdjRfbHBtuqyoyAgCCAo=",
4 | "afi-object-id" : 101,
5 | "afi-object-name" : "ipv4_lpm",
6 | "afi-object-type" : "afi-tree"
7 | }
8 | ]
9 |
--------------------------------------------------------------------------------
/AFI/test/afi-controller/base64.h:
--------------------------------------------------------------------------------
1 | //
2 | // base64 encoding and decoding with C++.
3 | // Version: 1.01.00
4 | //
5 |
6 | #ifndef BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
7 | #define BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
8 |
9 | #include
10 |
11 | std::string base64_encode(char const* , unsigned int len);
12 | //std::string base64_decode(std::string const& s);
13 | int base64_decode(std::string const& encoded_string, char *bytes, unsigned int len);
14 |
15 | #endif /* BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A */
16 |
--------------------------------------------------------------------------------
/EULA.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/EULA.docx
--------------------------------------------------------------------------------
/cli/build.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 | protoc -I. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ./jp4cli.proto
3 | protoc -I. --cpp_out=. ./jp4cli.proto
4 | python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./jp4cli.proto
5 |
6 | g++ -std=c++14 `pkg-config --cflags protobuf grpc` -c -o jp4cli.pb.o jp4cli.pb.cc
7 | g++ -std=c++14 `pkg-config --cflags protobuf grpc` -c -o jp4cli.grpc.pb.o jp4cli.grpc.pb.cc
8 | g++ -std=c++14 `pkg-config --cflags protobuf grpc` -c -o handle_cmd.o handle_cmd.cpp
9 | g++ jp4cli.pb.o jp4cli.grpc.pb.o handle_cmd.o -L/usr/local/lib `pkg-config --libs protobuf grpc++ grpc` -lgrpc++_reflection -ldl -o handle_cmd
10 |
--------------------------------------------------------------------------------
/cli/jp4cli_pb2_grpc.py:
--------------------------------------------------------------------------------
1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2 | import grpc
3 |
4 | import jp4cli_pb2 as jp4cli__pb2
5 |
6 |
7 | class CmdHandlerStub(object):
8 | # missing associated documentation comment in .proto file
9 | pass
10 |
11 | def __init__(self, channel):
12 | """Constructor.
13 |
14 | Args:
15 | channel: A grpc.Channel.
16 | """
17 | self.SendCmd = channel.unary_unary(
18 | '/jp4cli.CmdHandler/SendCmd',
19 | request_serializer=jp4cli__pb2.CmdRequest.SerializeToString,
20 | response_deserializer=jp4cli__pb2.CmdReply.FromString,
21 | )
22 |
23 |
24 | class CmdHandlerServicer(object):
25 | # missing associated documentation comment in .proto file
26 | pass
27 |
28 | def SendCmd(self, request, context):
29 | # missing associated documentation comment in .proto file
30 | pass
31 | context.set_code(grpc.StatusCode.UNIMPLEMENTED)
32 | context.set_details('Method not implemented!')
33 | raise NotImplementedError('Method not implemented!')
34 |
35 |
36 | def add_CmdHandlerServicer_to_server(servicer, server):
37 | rpc_method_handlers = {
38 | 'SendCmd': grpc.unary_unary_rpc_method_handler(
39 | servicer.SendCmd,
40 | request_deserializer=jp4cli__pb2.CmdRequest.FromString,
41 | response_serializer=jp4cli__pb2.CmdReply.SerializeToString,
42 | ),
43 | }
44 | generic_handler = grpc.method_handlers_generic_handler(
45 | 'jp4cli.CmdHandler', rpc_method_handlers)
46 | server.add_generic_rpc_handlers((generic_handler,))
47 |
--------------------------------------------------------------------------------
/config/afi-switch-cfg.json:
--------------------------------------------------------------------------------
1 | {
2 | "Note" : "This is AFI switch cofiguration file",
3 | "AfiSwitchConfig" : {
4 | "Interfaces" : {
5 | "Note" : "Interfaces config",
6 | "if1" : "eth0",
7 | "if2" : "eth1"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/config/aft-target-halp-cfg.json:
--------------------------------------------------------------------------------
1 | [
2 | "Note" : "This is the cofiguration file for aft target",
3 | "AFTConfig" : {
4 | "aft-server-ip" : "0.0.0.0",
5 | "aft-server-port" : "50051"
6 | }
7 | ]
8 |
--------------------------------------------------------------------------------
/config/jp4agent-brcm-cfg.json:
--------------------------------------------------------------------------------
1 | {
2 | "Note" : "JP4Agent cofiguration file",
3 | "JP4AgentConfig" : {
4 | "PIConfig" : {
5 | "Note" : "JP4Agent's PI server listen address",
6 | "pi-server-address" : "0.0.0.0:50051"
7 | },
8 | "HostpathConfig" : {
9 | "Note" : "Address where JP4Agent listens for hostpath packets from PacketIO",
10 | "hostpath-server-ip" : "0.0.0.0",
11 | "hostpath-server-port" : 64015
12 | },
13 | "DevicePktIOConfig" : {
14 | "Note" : "Address where PacketIO listens for hostpath packets from JP4Agent",
15 | "pktio-server-address" : "0.0.0.0:64014"
16 | },
17 | "DebugConfig" : {
18 | "Note" : "Debug mode",
19 | "debug-mode" : "debug-afi-objects"
20 | },
21 | "DebugCLIConfig" : {
22 | "Note" : "Debug CLI config",
23 | "cli-server-address" : "0.0.0.0:53421"
24 | },
25 | "TargetConfig" : {
26 | "Note" : "Target config",
27 | "target-address" : "10.207.66.110",
28 | "config-file" : "/root/JP4Agent/src/targets/aft/config/aft-cfg.json"
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/config/jp4agent-cfg.json:
--------------------------------------------------------------------------------
1 | {
2 | "Note" : "JP4Agent cofiguration file",
3 | "JP4AgentConfig" : {
4 | "PIConfig" : {
5 | "Note" : "JP4Agent's PI server listen address",
6 | "pi-server-address" : "0.0.0.0:50051"
7 | },
8 | "HostpathConfig" : {
9 | "Note" : "Address where JP4Agent listens for hostpath packets from PacketIO",
10 | "hostpath-server-ip" : "0.0.0.0",
11 | "hostpath-server-port" : 64015
12 | },
13 | "DevicePktIOConfig" : {
14 | "Note" : "Address where PacketIO listens for hostpath packets from JP4Agent",
15 | "pktio-server-address" : "128.0.0.16:64014"
16 | },
17 | "DebugConfig" : {
18 | "Note" : "Debug mode",
19 | "debug-mode" : "debug-afi-objects"
20 | },
21 | "DebugCLIConfig" : {
22 | "Note" : "Debug CLI config",
23 | "cli-server-address" : "0.0.0.0:53421"
24 | },
25 | "TargetConfig" : {
26 | "Note" : "Target config",
27 | "config-file" : "/root/JP4Agent/src/targets/aft/config/aft-cfg.json"
28 | },
29 | "JaegerConfig" : {
30 | "Note" : "Jaeger config",
31 | "jaeger-config-file" : ""
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/docs/CodingGuidelines.md:
--------------------------------------------------------------------------------
1 | Coding guidelines
2 | ===================
3 |
4 | ```
5 | TBD
6 |
7 |
8 | ```
9 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | ## JP4Agent documentation
2 |
3 | * [Working with VMX](./WorkingWithVMX.md)
4 | * [Jaeger Integration](./Jaeger.md)
5 |
--------------------------------------------------------------------------------
/docs/WorkingWithVMX.md:
--------------------------------------------------------------------------------
1 |
2 | ## Working with VMX
3 |
4 | ### Login to VCP
5 | ```
6 | Console:
7 | telnet localhost 8601
8 | Username: root
9 | Password: JunAFI
10 |
11 | Ssh:
12 | ssh root@
13 | Password: JunAFI
14 | ```
15 |
16 | ### Login to VFP
17 | ```
18 | Console:
19 | telnet localhost 8602 <<< Console
20 | Username: root
21 | Password: root
22 |
23 | Ssh:
24 | ssh pfe@
25 | Password: pfe
26 |
27 | After logging as user 'pfe', to become root do 'su' (root password: root)
28 | ```
29 |
30 |
31 | ### Configuring forwarding sandbox
32 | ```
33 | root@6a7738d10b2a:~# ssh root@
34 | Password:
35 | Last login: Sat Dec 23 12:20:58 2017 from 172.18.0.4
36 | --- JUNOS 17.3I20171118_2053_sksodhi Kernel 64-bit JNPR-10.3-20170605.150032_fbsd-
37 | root@:~ # cli
38 | root> configure
39 | Entering configuration mode
40 |
41 | [edit]
42 | root# set forwarding-options forwarding-sandbox jp4agent port p1 interface xe-0/0/0:1
43 |
44 | [edit]
45 | root# set forwarding-options forwarding-sandbox jp4agent port p2 interface xe-0/0/0:2
46 |
47 | [edit]
48 | root#
49 | root# show | compare
50 | [edit]
51 | + forwarding-options {
52 | + forwarding-sandbox jp4agent {
53 | + port p1 {
54 | + interface xe-0/0/0:1;
55 | + }
56 | + port p2 {
57 | + interface xe-0/0/0:2;
58 | + }
59 | + }
60 | + }
61 |
62 | [edit]
63 | root# commit
64 | commit complete
65 |
66 | [edit]
67 | root#
68 | ```
69 |
--------------------------------------------------------------------------------
/docs/p4/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | P4 Resources
4 | ============
5 | * [P4 Language Consortium](https://p4.org/)
6 | * [P4 on GitHub](https://github.com/p4lang/)
7 |
--------------------------------------------------------------------------------
/docs/resources/External-tester.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/External-tester.png
--------------------------------------------------------------------------------
/docs/resources/JP4Agent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/JP4Agent.png
--------------------------------------------------------------------------------
/docs/resources/JP4Agent_layers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/JP4Agent_layers.png
--------------------------------------------------------------------------------
/docs/resources/JaegerIntegration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/JaegerIntegration.png
--------------------------------------------------------------------------------
/docs/resources/README.md:
--------------------------------------------------------------------------------
1 | ## JP4Agent documentation resources
2 |
--------------------------------------------------------------------------------
/docs/resources/afi-yang-compilation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/afi-yang-compilation.png
--------------------------------------------------------------------------------
/docs/resources/docker-setup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/docker-setup.png
--------------------------------------------------------------------------------
/docs/resources/jp4agent_python_cli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/jp4agent_python_cli.png
--------------------------------------------------------------------------------
/docs/resources/vmx_with_tester.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/docs/resources/vmx_with_tester.png
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled binary #
2 | ###################
3 |
--------------------------------------------------------------------------------
/src/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | 
4 |
5 |
6 |
7 | ### Compile jp4agent
8 | ```
9 | cd build
10 |
11 | To build JPAgent with aft target:
12 | ./make-all-aft.sh
13 |
14 | To build JPAgent with Broadcom target:
15 | 1. Set the following environment variables:
16 | export BCM_HALP_DIR_PATH=
17 | export BCM_SDK_DIR_PATH=
18 |
19 | 2. ./make-all-brcm.sh
20 |
21 | To build JPAgent with null target:
22 | ./make-all-null.sh
23 | ```
24 |
25 | ### Run jp4agent
26 | ```
27 | To run JPAgent (aft target):
28 | cd src/targets/aft/bin
29 | ./run-jp4agent
30 |
31 | To run JPAgent (Broadcom target):
32 | cd src/targets/brcm/bin
33 | ./run-jp4agent
34 |
35 | To run JPAgent (null target):
36 | cd src/targets/null/bin
37 | ./run-jp4agent
38 |
39 | ```
40 |
--------------------------------------------------------------------------------
/src/afi/include/AfiCapAction.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapAction.h
5 | /// @brief Afi Content Aware Processor Action Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFICAPACTION_H_
24 | #define SRC_AFI_INCLUDE_AFICAPACTION_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiCapAction;
33 | using AfiCapActionPtr = std::shared_ptr;
34 | using AfiCapActionWeakPtr = std::weak_ptr;
35 |
36 | class AfiCapAction : public AfiObject
37 | {
38 | public:
39 | explicit AfiCapAction(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiCapAction() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiCapActionPtr &aficapaction)
49 | {
50 | return aficapaction->description(os);
51 | }
52 |
53 | #ifdef SUD
54 | // attached object
55 | protected:
56 | #endif // SUD
57 | juniper::afi_cap_action::AfiCapAction capAction;
58 | };
59 |
60 | } // namespace AFIHAL
61 |
62 | #endif // SRC_AFI_INCLUDE_AFICAPACTION_H_
63 |
--------------------------------------------------------------------------------
/src/afi/include/AfiCapEntry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapEntry.h
5 | /// @brief Afi Content Aware Processor Entry
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFICAPEntry_H_
24 | #define SRC_AFI_INCLUDE_AFICAPEntry_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiCapEntry;
33 | using AfiCapEntryPtr = std::shared_ptr;
34 | using AfiCapEntryWeakPtr = std::weak_ptr;
35 |
36 | class AfiCapEntry : public AfiObject
37 | {
38 | public:
39 | explicit AfiCapEntry(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiCapEntry() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiCapEntryPtr &aficapEntry)
49 | {
50 | return aficapEntry->description(os);
51 | }
52 |
53 | protected:
54 | juniper::afi_cap_entry::AfiCapEntry _capEntry;
55 | };
56 |
57 | } // namespace AFIHAL
58 |
59 | #endif // SRC_AFI_INCLUDE_AFICAPEntry_H_
60 |
--------------------------------------------------------------------------------
/src/afi/include/AfiCapEntryMatch.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapEntryMatch.h
5 | /// @brief Afi Content Aware Processor Entry Match Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFICAPEntryMatch_H_
24 | #define SRC_AFI_INCLUDE_AFICAPEntryMatch_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiCapEntryMatch;
33 | using AfiCapEntryMatchPtr = std::shared_ptr;
34 | using AfiCapEntryMatchWeakPtr = std::weak_ptr;
35 |
36 | class AfiCapEntryMatch : public AfiObject
37 | {
38 | public:
39 | explicit AfiCapEntryMatch(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiCapEntryMatch() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiCapEntryMatchPtr &aficapEntryMatch)
49 | {
50 | return aficapEntryMatch->description(os);
51 | }
52 |
53 | // attached object
54 | //protected:
55 | juniper::afi_cap_entry_match::AfiCapEntryMatch capEntryMatch;
56 | };
57 |
58 | } // namespace AFIHAL
59 |
60 | #endif // SRC_AFI_INCLUDE_AFICAPEntryMatch_H_
61 |
--------------------------------------------------------------------------------
/src/afi/include/AfiCapMatch.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapMatch.h
5 | /// @brief Afi Content Aware Processor Match Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFICAPMATCH_H_
24 | #define SRC_AFI_INCLUDE_AFICAPMATCH_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiCapMatch;
33 | using AfiCapMatchPtr = std::shared_ptr;
34 | using AfiCapMatchWeakPtr = std::weak_ptr;
35 |
36 | class AfiCapMatch : public AfiObject
37 | {
38 | public:
39 | explicit AfiCapMatch(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiCapMatch() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiCapMatchPtr &aficapmatch)
49 | {
50 | return aficapmatch->description(os);
51 | }
52 |
53 | #ifdef SUD
54 | // attached object
55 | protected:
56 | #endif // SUD
57 | juniper::afi_cap_match::AfiCapMatch capMatch;
58 | };
59 |
60 | } // namespace AFIHAL
61 |
62 | #endif // SRC_AFI_INCLUDE_AFICAPMATCH_H_
63 |
--------------------------------------------------------------------------------
/src/afi/include/AfiDM.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiDM.h
5 | /// @brief Afi Data Model
6 | //
7 | // Created by Sandesh Kumar Sodhi, December 2017
8 | // Copyright (c) [2017] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFIDM_H_
24 | #define SRC_AFI_INCLUDE_AFIDM_H_
25 |
26 | #include "afi_tree/afi_tree.pb.h"
27 | #include "afi_tree_entry/afi_tree_entry.pb.h"
28 | #include "afi_cap/afi_cap.pb.h"
29 | #include "afi_cap_match/afi_cap_match.pb.h"
30 | #include "afi_cap_action/afi_cap_action.pb.h"
31 | #include "afi_cap_entry/afi_cap_entry.pb.h"
32 | #include "afi_cap_entry_match/afi_cap_entry_match.pb.h"
33 | #include "afi_cap_entry_action/afi_cap_entry_action.pb.h"
34 | #include "afi_encap/afi_encap.pb.h"
35 | #include "afi_encap_entry/afi_encap_entry.pb.h"
36 | #include "afi_tree_encap/afi_tree_encap.pb.h"
37 | #include "afi_tree_encap_entry/afi_tree_encap_entry.pb.h"
38 |
39 | namespace AFIHAL
40 | {
41 | } // namespace AFIHAL
42 |
43 | #endif // SRC_AFI_INCLUDE_AFIDM_H_
44 |
--------------------------------------------------------------------------------
/src/afi/include/AfiEncap.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiEncap.h
5 | /// @brief Afi packet encapsulation
6 | //
7 | // Created by Sudheendra Gopinath, August 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFIENCAP_H_
24 | #define SRC_AFI_INCLUDE_AFIENCAP_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiEncap;
33 | using AfiEncapPtr = std::shared_ptr;
34 | using AfiEncapWeakPtr = std::weak_ptr;
35 |
36 | class AfiEncap : public AfiObject
37 | {
38 | public:
39 | explicit AfiEncap(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiEncap() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiEncapPtr &afiencap)
49 | {
50 | return afiencap->description(os);
51 | }
52 |
53 | protected:
54 | juniper::afi_encap::AfiEncap _encap;
55 | };
56 |
57 | } // namespace AFIHAL
58 |
59 | #endif // SRC_AFI_INCLUDE_AFIENCAP_H_
60 |
--------------------------------------------------------------------------------
/src/afi/include/AfiEncapEntry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiEncapEntry.h
5 | /// @brief Afi Packet Encapsulation Entry
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFIENCAPEntry_H_
24 | #define SRC_AFI_INCLUDE_AFIENCAPEntry_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiEncapEntry;
33 | using AfiEncapEntryPtr = std::shared_ptr;
34 | using AfiEncapEntryWeakPtr = std::weak_ptr;
35 |
36 | class AfiEncapEntry : public AfiObject
37 | {
38 | public:
39 | explicit AfiEncapEntry(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiEncapEntry() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiEncapEntryPtr &afiEncapEntry)
49 | {
50 | return afiEncapEntry->description(os);
51 | }
52 |
53 | protected:
54 | juniper::afi_encap_entry::AfiEncapEntry _encapEntry;
55 | };
56 |
57 | } // namespace AFIHAL
58 |
59 | #endif // SRC_AFI_INCLUDE_AFIENCAPEntry_H_
60 |
--------------------------------------------------------------------------------
/src/afi/include/AfiTree.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiTree.h
5 | /// @brief Afi Tree
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFITREE_H_
24 | #define SRC_AFI_INCLUDE_AFITREE_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiTree;
33 | using AfiTreePtr = std::shared_ptr;
34 | using AfiTreeWeakPtr = std::weak_ptr;
35 |
36 | class AfiTree : public AfiObject
37 | {
38 | public:
39 | explicit AfiTree(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiTree() {}
42 |
43 | ::juniper::enums::AfiTreeAfiTreeType type() { return _tree.type(); }
44 |
45 | //
46 | // Debug
47 | //
48 | std::ostream &description(std::ostream &os) const;
49 |
50 | friend std::ostream &operator<<(std::ostream &os, const AfiTreePtr &afitree)
51 | {
52 | return afitree->description(os);
53 | }
54 |
55 | protected:
56 | juniper::afi_tree::AfiTree _tree;
57 | };
58 |
59 | } // namespace AFIHAL
60 |
61 | #endif // SRC_AFI_INCLUDE_AFITREE_H_
62 |
--------------------------------------------------------------------------------
/src/afi/include/AfiTreeEncapEntry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiTreeEncapEntry.h
5 | /// @brief Afi Tree and Packet Encapsulation Entry
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFITREEENCAPEntry_H_
24 | #define SRC_AFI_INCLUDE_AFITREEENCAPEntry_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiTreeEncapEntry;
33 | using AfiTreeEncapEntryPtr = std::shared_ptr;
34 | using AfiTreeEncapEntryWeakPtr = std::weak_ptr;
35 |
36 | class AfiTreeEncapEntry : public AfiObject
37 | {
38 | public:
39 | explicit AfiTreeEncapEntry(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiTreeEncapEntry() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream &os, const AfiTreeEncapEntryPtr &afiTreeEncapEntry)
49 | {
50 | return afiTreeEncapEntry->description(os);
51 | }
52 |
53 | protected:
54 | juniper::afi_tree_encap_entry::AfiTreeEncapEntry _treeEncapEntry;
55 | };
56 |
57 | } // namespace AFIHAL
58 |
59 | #endif // SRC_AFI_INCLUDE_AFITREEENCAPEntry_H_
60 |
--------------------------------------------------------------------------------
/src/afi/include/AfiTreeEntry.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiTreeEntry.h
5 | /// @brief Afi tree entry
6 | //
7 | // Created by Sandesh Kumar Sodhi, February 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_AFI_INCLUDE_AFITREEENTRY_H_
24 | #define SRC_AFI_INCLUDE_AFITREEENTRY_H_
25 |
26 | #include
27 | #include "AfiDM.h"
28 | #include "AfiObject.h"
29 |
30 | namespace AFIHAL
31 | {
32 | class AfiTreeEntry;
33 | using AfiTreeEntryPtr = std::shared_ptr;
34 | using AfiTreeEntryWeakPtr = std::weak_ptr;
35 |
36 | class AfiTreeEntry : public AfiObject
37 | {
38 | public:
39 | explicit AfiTreeEntry(const AfiJsonResource &jsonRes);
40 |
41 | ~AfiTreeEntry() {}
42 |
43 | //
44 | // Debug
45 | //
46 | std::ostream &description(std::ostream &os) const;
47 |
48 | friend std::ostream &operator<<(std::ostream & os,
49 | const AfiTreeEntryPtr &afitree)
50 | {
51 | return afitree->description(os);
52 | }
53 |
54 | protected:
55 | juniper::afi_tree_entry::AfiTreeEntry _treeEntry;
56 | };
57 |
58 | } // namespace AFIHAL
59 |
60 | #endif // SRC_AFI_INCLUDE_AFITREEENTRY_H_
61 |
--------------------------------------------------------------------------------
/src/afi/src/AfiCapAction.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapAction.cpp
5 | /// @brief Afi Content Aware Processor Action Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiCapAction.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiCapAction::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiCapAction _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiCapAction::AfiCapAction(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | capAction.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "capAction.ByteSize(): " << capAction.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/afi/src/AfiCapEntry.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapEntry.cpp
5 | /// @brief Afi Content Aware Processor Entry
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiCapEntry.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiCapEntry::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiCapEntry _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiCapEntry::AfiCapEntry(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | _capEntry.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "capEntry.ByteSize(): " << _capEntry.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/afi/src/AfiCapEntryAction.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapEntryAction.cpp
5 | /// @brief Afi Content Aware Processor Entry Action Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiCapEntryAction.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiCapEntryAction::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiCapEntryAction _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiCapEntryAction::AfiCapEntryAction(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | capEntryAction.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "capEntryAction.ByteSize(): " << capEntryAction.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/afi/src/AfiCapEntryMatch.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapEntryMatch.cpp
5 | /// @brief Afi Content Aware Processor Entry Match Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiCapEntryMatch.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiCapEntryMatch::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiCapEntryMatch _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiCapEntryMatch::AfiCapEntryMatch(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | capEntryMatch.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "capEntryMatch.ByteSize(): " << capEntryMatch.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/afi/src/AfiCapMatch.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiCapMatch.cpp
5 | /// @brief Afi Content Aware Processor Match Set
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiCapMatch.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiCapMatch::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiCapMatch _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiCapMatch::AfiCapMatch(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | capMatch.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "cap.ByteSize(): " << capMatch.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/afi/src/AfiEncapEntry.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiEncapEntry.cpp
5 | /// @brief Afi Packet Encapsulation Entry
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiEncapEntry.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiEncapEntry::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiEncapEntry _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiEncapEntry::AfiEncapEntry(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | _encapEntry.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "encapEntry.ByteSize(): " << _encapEntry.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/afi/src/AfiJsonResource.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiJsonResource.cpp
5 | /// @brief Afi Json Resource
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiJsonResource.h"
24 | #include
25 |
26 | namespace AFIHAL
27 | {
28 | //
29 | // Description
30 | //
31 | std::ostream &
32 | AfiJsonResource::description(std::ostream &os) const
33 | {
34 | os << "_________ AfiJsonResource _______" << std::endl;
35 | os << "Name :" << this->name() << std::endl;
36 | os << "Id :" << this->id() << std::endl;
37 | os << "Type :" << this->type() << std::endl;
38 | os << "Object String :" << this->objStr() << std::endl;
39 | return os;
40 | }
41 |
42 | } // namespace AFIHAL
43 |
--------------------------------------------------------------------------------
/src/afi/src/AfiTreeEncapEntry.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AfiTreeEncapEntry.cpp
5 | /// @brief Afi Tree and Packet Encapsulation Entry
6 | //
7 | // Created by Sudheendra Gopinath, June 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "AfiTreeEncapEntry.h"
24 | #include
25 | #include
26 |
27 | #include "Log.h"
28 | #include "Utils.h"
29 | #include "JaegerLog.h"
30 |
31 | namespace AFIHAL
32 | {
33 | //
34 | // Description
35 | //
36 | std::ostream &
37 | AfiTreeEncapEntry::description(std::ostream &os) const
38 | {
39 | os << "_________ AfiTreeEncapEntry _______" << std::endl;
40 | return os;
41 | }
42 |
43 | AfiTreeEncapEntry::AfiTreeEncapEntry(const AfiJsonResource &jsonRes) : AfiObject(jsonRes)
44 | {
45 | // TBD: FIXME magic number 5000
46 | char bytes_decoded[5000];
47 | memset(bytes_decoded, 0, sizeof(bytes_decoded));
48 | int num_decoded_bytes =
49 | base64_decode(jsonRes.objStr(), bytes_decoded, 5000);
50 | _treeEncapEntry.ParseFromArray(bytes_decoded, num_decoded_bytes);
51 |
52 | Log(DEBUG) << "num_decoded_bytes: " << num_decoded_bytes;
53 | Log(DEBUG) << "treeEncapEntry.ByteSize(): " << _treeEncapEntry.ByteSize();
54 | }
55 |
56 | } // namespace AFIHAL
57 |
--------------------------------------------------------------------------------
/src/config.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # YAML config file for Jaeger tracing
3 | #
4 | # Created by Manmeet Singh, January 2018
5 | # Copyright (c) [2017] Juniper Networks, Inc. All rights reserved.
6 | #
7 | # All rights reserved.
8 | #
9 | # Notice and Disclaimer: This code is licensed to you under the Apache
10 | # License 2.0 (the "License"). You may not use this code except in compliance
11 | # with the License. This code is not an official Juniper product. You can
12 | # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Third-Party Code: This code may depend on other components under separate
15 | # copyright notice and license terms. Your use of the source code for those
16 | # components is subject to the terms and conditions of the respective license
17 | # as noted in the Third-Party source code file.
18 | #
19 |
20 | #
21 | # Please update the IP address of Jaeger backend server in localAgentHostPort
22 | # and hostPort before launching JP4Agent
23 | #
24 |
25 | disabled: false
26 |
27 | sampler:
28 | type: const
29 | param: 1
30 |
31 | reporter:
32 | queueSize: 100
33 | bufferFlushInterval: 10
34 | logSpans: true
35 | localAgentHostPort: 10.102.144.109:6831
36 |
37 | headers:
38 | jaegerDebugHeader: debug-id
39 | jaegerBaggageHeader: baggage
40 | TraceContextHeaderName: trace-id
41 | traceBaggageHeaderPrefix: "testctx-"
42 |
43 | baggage_restrictions:
44 | denyBaggageOnInitializationFailure: false
45 | hostPort: 10.102.144.109:5778
46 | refreshInterval: 10
--------------------------------------------------------------------------------
/src/pi/include/CLIService.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file CLIServer.h
5 | /// @brief Debug CLI command handler service
6 | //
7 | // Created by Karthikeyan Sivaraj, February 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include
24 | #include "cli/jp4cli.grpc.pb.h"
25 |
26 | using grpc::Server;
27 | using grpc::ServerBuilder;
28 | using grpc::ServerContext;
29 | using grpc::Status;
30 |
31 | using jp4cli::CmdHandler;
32 | using jp4cli::CmdReply;
33 | using jp4cli::CmdRequest;
34 |
35 | class CmdHandlerSvcImpl final : public CmdHandler::Service
36 | {
37 | Status SendCmd(ServerContext *context, const CmdRequest *req,
38 | CmdReply *reply) override;
39 | };
40 |
41 | class CLIService
42 | {
43 | private:
44 | const std::string _cli_serv_addr;
45 | CmdHandlerSvcImpl _service;
46 |
47 | void runGrpcServer();
48 |
49 | public:
50 | explicit CLIService(const std::string &serv_addr)
51 | : _cli_serv_addr(serv_addr)
52 | {
53 | }
54 |
55 | void startCLIService();
56 | };
57 |
--------------------------------------------------------------------------------
/src/pi/include/PI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file PI.h
5 | /// @brief PI
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef __PI__
24 | #define __PI__
25 |
26 | #include
27 | #include
28 | #include "pvtPI.h"
29 |
30 | class PI;
31 | using PIUPtr = std::unique_ptr;
32 |
33 | class PI
34 | {
35 | public:
36 | PI(const std::string &piServAddr, uint16_t hpUdpPort,
37 | const std::string &pktIOListenAddr, const std::string &cliServAddr)
38 | {
39 | _piServer = std::make_unique(piServAddr, hpUdpPort,
40 | pktIOListenAddr, cliServAddr);
41 | }
42 |
43 | void init()
44 | {
45 | _piServer->startPIServer();
46 | _piServer->startPktIOHandler();
47 | _piServer->startDbgCLIServer();
48 | }
49 |
50 | private:
51 | PIServerUPtr _piServer;
52 | };
53 |
54 | #endif // __PI__
55 |
--------------------------------------------------------------------------------
/src/pi/include/pvtPI.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file pvtPI.h
5 | /// @brief prirave PI declaration and includes
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef __pvtPI__
24 | #define __pvtPI__
25 |
26 | #include
27 | #include
28 |
29 | #include "Afi.h"
30 | #include "Log.h"
31 | #include "Utils.h"
32 | #include "google/rpc/code.pb.h"
33 | #include "p4/tmp/p4config.pb.h"
34 | #ifdef UBUNTU
35 | #include "p4runtime.grpc.pb.h"
36 | #include "p4runtime.pb.h"
37 | #else
38 | #include "p4runtime_wrl.grpc.pb.h"
39 | #include "p4runtime_wrl.pb.h"
40 | #endif
41 | #include "uint128.h"
42 |
43 | using SandboxId = uint16_t; ///< Sandbox Id
44 | using DevicePortIndex = uint16_t; ///< Device port index
45 |
46 | using StreamChannelReaderWriter =
47 | grpc::ServerReaderWriter;
49 |
50 | using grpc::Server;
51 | using grpc::ServerBuilder;
52 | using grpc::ServerContext;
53 | using grpc::ServerReaderWriter;
54 | using grpc::ServerWriter;
55 | using grpc::Status;
56 | using grpc::StatusCode;
57 |
58 | #include "P4Info.h"
59 | #include "P4RuntimeService.h"
60 | #include "PIServer.h"
61 |
62 | #endif // __pvtPI__
63 |
--------------------------------------------------------------------------------
/src/pi/protos/.gitignore:
--------------------------------------------------------------------------------
1 | # grpc/protobuf generated files #
2 | ###################
3 | *.pb.cc
4 | *.pb.h
5 |
--------------------------------------------------------------------------------
/src/pi/protos/cli/jp4cli.proto:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file jp4cli.proto
5 | /// @brief CLI service for JP4Agent
6 | //
7 | // Created by Karthikeyan Sivaraj, February 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | syntax = "proto3";
24 |
25 | package jp4cli;
26 |
27 | service CmdHandler {
28 | rpc SendCmd (CmdRequest) returns (CmdReply) {}
29 | }
30 |
31 | message CmdRequest {
32 | string cmdstr = 1;
33 | }
34 |
35 | message CmdReply {
36 | int32 status = 1;
37 | string cmdout = 2;
38 | }
39 |
--------------------------------------------------------------------------------
/src/pi/protos/p4/tmp/p4config.proto:
--------------------------------------------------------------------------------
1 | // Copyright 2013-present Barefoot Networks, Inc.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | syntax = "proto3";
16 |
17 | // This package is temporary.
18 |
19 | package p4.tmp;
20 |
21 | // p4-device specific config
22 | message P4DeviceConfig {
23 | message Extras {
24 | map kv = 1;
25 | }
26 | bool reassign = 1;
27 | Extras extras = 2;
28 | bytes device_data = 3;
29 | };
30 |
--------------------------------------------------------------------------------
/src/pi/protos/p4info.proto:
--------------------------------------------------------------------------------
1 | p4/config/p4info.proto
--------------------------------------------------------------------------------
/src/pi/protos/status.proto:
--------------------------------------------------------------------------------
1 | google/rpc/status.proto
--------------------------------------------------------------------------------
/src/pi/src/ControllerConnection.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file JP4Agent.cpp
5 | /// @brief Juniper P4 Agent
6 | //
7 | // Created by Sandesh Kumar Sodhi, November 2017
8 | // Copyright (c) [2017] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "ControllerConnection.h"
24 |
25 | ControllerConnection controller_conn;
26 |
27 |
--------------------------------------------------------------------------------
/src/pi/src/PI.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file PI.cpp
5 | /// @brief PI
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "pvtPI.h"
24 | #include "PI.h"
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/targets/aft/aft/README.md:
--------------------------------------------------------------------------------
1 | AFT
2 | ===
3 |
--------------------------------------------------------------------------------
/src/targets/aft/aft/include/Aft.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file Aft.h
5 | /// @brief Aft includes
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_TARGETS_AFT_AFT_INCLUDE_AFT_H_
24 | #define SRC_TARGETS_AFT_AFT_INCLUDE_AFT_H_
25 |
26 | #include
27 |
28 | extern const std::string _aft_debugmode;
29 |
30 | #include "Afi.h"
31 | #include "AftClient.h"
32 | #include "AftDevice.h"
33 | #include "AftObject.h"
34 | #include "AftTree.h"
35 | #include "AftTreeEntry.h"
36 | #include "Log.h"
37 | #include "Utils.h"
38 |
39 | AFIHAL::AfiDeviceUPtr createDevice(const std::string &name);
40 |
41 | namespace AFTHALP
42 | {
43 | } // namespace AFTHALP
44 |
45 | #endif // SRC_TARGETS_AFT_AFT_INCLUDE_AFT_H_
46 |
--------------------------------------------------------------------------------
/src/targets/aft/aft/include/AftDevice.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AftDevice.h
5 | /// @brief Aft Device
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef SRC_TARGETS_AFT_AFT_INCLUDE_AFTDEVICE_H_
24 | #define SRC_TARGETS_AFT_AFT_INCLUDE_AFTDEVICE_H_
25 |
26 | #include
27 | #include
28 | #include "Aft.h"
29 |
30 | namespace AFTHALP
31 | {
32 | //
33 | // AftDevice
34 | //
35 |
36 | class AftDevice;
37 | using AftDeviceUPtr = std::unique_ptr;
38 | using AftDevicePtr = std::shared_ptr;
39 | using AftDeviceWeakPtr = std::weak_ptr;
40 |
41 | class AftDevice final : public AFIHAL::AfiDevice
42 | {
43 | public:
44 | //
45 | // Constructor and destructor
46 | //
47 | explicit AftDevice(const std::string &name);
48 | ~AftDevice();
49 |
50 | static AftDeviceUPtr create(const std::string &newName);
51 | void destroy();
52 |
53 | void setObjectCreators();
54 | };
55 |
56 | } // namespace AFTHALP
57 |
58 | #endif // SRC_TARGETS_AFT_AFT_INCLUDE_AFTDEVICE_H_
59 |
--------------------------------------------------------------------------------
/src/targets/aft/aft/src/Aft.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file Aft.cpp
5 | /// @brief Aft
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #include "Aft.h"
24 | #include
25 |
26 | AFIHAL::AfiDeviceUPtr
27 | createDevice(const std::string &name)
28 | {
29 | Log(DEBUG) << "___ createDevice___";
30 | return AFTHALP::AftDevice::create(name);
31 | }
32 |
33 | // const std::string _aft_debugmode = "no-aft-server";
34 | const std::string _aft_debugmode = "";
35 | namespace AFTHALP
36 | {
37 | } // namespace AFTHALP
38 |
--------------------------------------------------------------------------------
/src/targets/aft/aft/src/AftObject.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file AftTree.h
5 | /// @brief Aft Tree
6 | //
7 | // Created by Sandesh Kumar Sodhi, January 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | namespace AFTHALP
24 | {
25 | } // namespace AFTHALP
26 |
--------------------------------------------------------------------------------
/src/targets/aft/bin/.gitignore:
--------------------------------------------------------------------------------
1 | jp4agent
2 |
--------------------------------------------------------------------------------
/src/targets/aft/bin/gdb-jp4agent:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | JP4AGENT_LOC=../../../..
4 | export LD_LIBRARY_PATH=/root/VMX/afi/lib
5 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/jp4agent/obj
6 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/utils/obj
7 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/obj
8 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/afi/obj
9 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/protos
10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/AFI
11 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/targets/aft/aft/obj
12 |
13 | gdb $JP4AGENT_LOC/src/targets/aft/bin/jp4agent
14 |
--------------------------------------------------------------------------------
/src/targets/aft/bin/run-jp4agent:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | JP4AGENT_LOC=../../../..
4 | export LD_LIBRARY_PATH=/root/VMX/afi/lib
5 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/jp4agent/obj
6 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/utils/obj
7 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/obj
8 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/afi/obj
9 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/protos
10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/AFI
11 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/targets/aft/aft/obj
12 |
13 | if [ "$#" -eq 1 ]; then
14 | #
15 | # If provided first arguments is the log file
16 | #
17 | LOG_FILE=$1
18 | $JP4AGENT_LOC/src/targets/aft/bin/jp4agent | tee $LOG_FILE
19 | else
20 | #ldd $JP4AGENT_LOC/src/targets/aft/obj/jp4agent
21 | #LD_DEBUG=all $JP4AGENT_LOC/src/targets/aft/obj/jp4agent
22 | #gdb $JP4AGENT_LOC/src/targets/aft/obj/jp4agent
23 | $JP4AGENT_LOC/src/targets/aft/bin/jp4agent
24 | fi
25 |
--------------------------------------------------------------------------------
/src/targets/aft/config/aft-cfg.json:
--------------------------------------------------------------------------------
1 | {
2 | "Note" : "Cofiguration file for target aft",
3 | "AFTConfig" : {
4 | "aft-server-address" : "0.0.0.0:50051"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/targets/brcm/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Juniper/JP4Agent/c5773a901990df0a8cff7990a62fbc683449c231/src/targets/brcm/.gitkeep
--------------------------------------------------------------------------------
/src/targets/brcm/bin/gdb-jp4agent:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | JP4AGENT_LOC=../../../..
4 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/jp4agent/obj
5 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/utils/obj
6 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/obj
7 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/afi/obj
8 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/protos
9 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/AFI
10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/targets/brcm/brcm/obj
11 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BCM_HALP_DIR_PATH/obj/
12 |
13 | gdb $JP4AGENT_LOC/src/targets/brcm/bin/jp4agent
14 |
--------------------------------------------------------------------------------
/src/targets/brcm/bin/run-jp4agent:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | JP4AGENT_LOC=../../../..
4 | export LD_LIBRARY_PATH=/usr/local/lib
5 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/jp4agent/obj
6 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/utils/obj
7 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/obj
8 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/afi/obj
9 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/pi/protos
10 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/AFI
11 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JP4AGENT_LOC/src/targets/brcm/brcm/obj
12 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BCM_HALP_DIR_PATH/obj/
13 |
14 | if [ "$#" -eq 1 ]; then
15 | #
16 | # If provided first arguments is the log file
17 | #
18 | $JP4AGENT_LOC/src/targets/brcm/bin/jp4agent | tee $1
19 | else
20 | $JP4AGENT_LOC/src/targets/brcm/bin/jp4agent
21 | fi
22 |
--------------------------------------------------------------------------------
/src/targets/brcm/brcm/README.md:
--------------------------------------------------------------------------------
1 | BRCM TARGET
2 | ============
3 |
--------------------------------------------------------------------------------
/src/targets/brcm/brcm/include/Brcm.h:
--------------------------------------------------------------------------------
1 | //
2 | // Juniper P4 Agent
3 | //
4 | /// @file Brcm.h
5 | /// @brief Brcm target includes
6 | //
7 | // Created by Sudheendra Gopinath, March 2018
8 | // Copyright (c) [2018] Juniper Networks, Inc. All rights reserved.
9 | //
10 | // All rights reserved.
11 | //
12 | // Notice and Disclaimer: This code is licensed to you under the Apache
13 | // License 2.0 (the "License"). You may not use this code except in compliance
14 | // with the License. This code is not an official Juniper product. You can
15 | // obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
16 | //
17 | // Third-Party Code: This code may depend on other components under separate
18 | // copyright notice and license terms. Your use of the source code for those
19 | // components is subject to the terms and conditions of the respective license
20 | // as noted in the Third-Party source code file.
21 | //
22 |
23 | #ifndef __Brcm__
24 | #define __Brcm__
25 |
26 | #include
27 | #include