├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── build.yml │ ├── codeql-analysis.yml │ └── release.yml ├── .gitignore ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── code ├── CMakeLists.txt ├── README.md ├── bgpupdate ├── bngblaster-cli ├── bngblaster │ ├── CMakeLists.txt │ ├── fuzzing │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── protocols_decode.c │ │ ├── protocols_decode_in │ │ │ ├── icmpv6_ra.raw │ │ │ ├── isis.raw │ │ │ ├── l2tp.raw │ │ │ └── pap.raw │ │ └── protocols_decode_out │ │ │ └── .gitkeep │ ├── src │ │ ├── bbl.c │ │ ├── bbl.h │ │ ├── bbl_a10nsp.c │ │ ├── bbl_a10nsp.h │ │ ├── bbl_access.c │ │ ├── bbl_access.h │ │ ├── bbl_access_line.h │ │ ├── bbl_arp_client.c │ │ ├── bbl_arp_client.h │ │ ├── bbl_cfm.c │ │ ├── bbl_cfm.h │ │ ├── bbl_config.c │ │ ├── bbl_config.h │ │ ├── bbl_ctrl.c │ │ ├── bbl_ctrl.h │ │ ├── bbl_ctx.c │ │ ├── bbl_ctx.h │ │ ├── bbl_def.h │ │ ├── bbl_dhcp.c │ │ ├── bbl_dhcp.h │ │ ├── bbl_dhcpv6.c │ │ ├── bbl_dhcpv6.h │ │ ├── bbl_fragment.c │ │ ├── bbl_fragment.h │ │ ├── bbl_http_client.c │ │ ├── bbl_http_client.h │ │ ├── bbl_http_server.c │ │ ├── bbl_http_server.h │ │ ├── bbl_icmp_client.c │ │ ├── bbl_icmp_client.h │ │ ├── bbl_igmp.c │ │ ├── bbl_igmp.h │ │ ├── bbl_interactive.c │ │ ├── bbl_interactive.h │ │ ├── bbl_interface.c │ │ ├── bbl_interface.h │ │ ├── bbl_l2tp.c │ │ ├── bbl_l2tp.h │ │ ├── bbl_l2tp_avp.c │ │ ├── bbl_l2tp_avp.h │ │ ├── bbl_lag.c │ │ ├── bbl_lag.h │ │ ├── bbl_li.c │ │ ├── bbl_li.h │ │ ├── bbl_network.c │ │ ├── bbl_network.h │ │ ├── bbl_pcap.c │ │ ├── bbl_pcap.h │ │ ├── bbl_protocols.c │ │ ├── bbl_protocols.h │ │ ├── bbl_rx.c │ │ ├── bbl_rx.h │ │ ├── bbl_session.c │ │ ├── bbl_session.h │ │ ├── bbl_stats.c │ │ ├── bbl_stats.h │ │ ├── bbl_stream.c │ │ ├── bbl_stream.h │ │ ├── bbl_tcp.c │ │ ├── bbl_tcp.h │ │ ├── bbl_tun.c │ │ ├── bbl_tun.h │ │ ├── bbl_tx.c │ │ ├── bbl_tx.h │ │ ├── bbl_txq.c │ │ ├── bbl_txq.h │ │ ├── bgp │ │ │ ├── bgp.c │ │ │ ├── bgp.h │ │ │ ├── bgp_ctrl.c │ │ │ ├── bgp_ctrl.h │ │ │ ├── bgp_def.h │ │ │ ├── bgp_message.c │ │ │ ├── bgp_message.h │ │ │ ├── bgp_raw_update.c │ │ │ ├── bgp_raw_update.h │ │ │ ├── bgp_receive.c │ │ │ ├── bgp_receive.h │ │ │ ├── bgp_session.c │ │ │ └── bgp_session.h │ │ ├── io │ │ │ ├── io.c │ │ │ ├── io.h │ │ │ ├── io_def.h │ │ │ ├── io_dpdk.c │ │ │ ├── io_dpdk.h │ │ │ ├── io_interface.c │ │ │ ├── io_interface.h │ │ │ ├── io_packet_mmap.c │ │ │ ├── io_packet_mmap.h │ │ │ ├── io_raw.c │ │ │ ├── io_raw.h │ │ │ ├── io_socket.c │ │ │ ├── io_socket.h │ │ │ ├── io_stream.c │ │ │ ├── io_stream.h │ │ │ ├── io_thread.c │ │ │ └── io_thread.h │ │ ├── isis │ │ │ ├── isis.c │ │ │ ├── isis.h │ │ │ ├── isis_adjacency.c │ │ │ ├── isis_adjacency.h │ │ │ ├── isis_csnp.c │ │ │ ├── isis_csnp.h │ │ │ ├── isis_ctrl.c │ │ │ ├── isis_ctrl.h │ │ │ ├── isis_def.h │ │ │ ├── isis_hello.c │ │ │ ├── isis_hello.h │ │ │ ├── isis_lsp.c │ │ │ ├── isis_lsp.h │ │ │ ├── isis_mrt.c │ │ │ ├── isis_mrt.h │ │ │ ├── isis_p2p_hello.c │ │ │ ├── isis_p2p_hello.h │ │ │ ├── isis_pdu.c │ │ │ ├── isis_pdu.h │ │ │ ├── isis_peer.c │ │ │ ├── isis_peer.h │ │ │ ├── isis_psnp.c │ │ │ ├── isis_psnp.h │ │ │ ├── isis_utils.c │ │ │ └── isis_utils.h │ │ ├── ldp │ │ │ ├── ldp.c │ │ │ ├── ldp.h │ │ │ ├── ldp_ctrl.c │ │ │ ├── ldp_ctrl.h │ │ │ ├── ldp_db.c │ │ │ ├── ldp_db.h │ │ │ ├── ldp_def.h │ │ │ ├── ldp_hello.c │ │ │ ├── ldp_hello.h │ │ │ ├── ldp_interface.c │ │ │ ├── ldp_interface.h │ │ │ ├── ldp_message.c │ │ │ ├── ldp_message.h │ │ │ ├── ldp_raw_update.c │ │ │ ├── ldp_raw_update.h │ │ │ ├── ldp_receive.c │ │ │ ├── ldp_receive.h │ │ │ ├── ldp_session.c │ │ │ └── ldp_session.h │ │ ├── lwip │ │ │ └── lwipopts.h │ │ ├── ospf │ │ │ ├── ospf.c │ │ │ ├── ospf.h │ │ │ ├── ospf_ctrl.c │ │ │ ├── ospf_ctrl.h │ │ │ ├── ospf_def.h │ │ │ ├── ospf_hello.c │ │ │ ├── ospf_hello.h │ │ │ ├── ospf_interface.c │ │ │ ├── ospf_interface.h │ │ │ ├── ospf_lsa.c │ │ │ ├── ospf_lsa.h │ │ │ ├── ospf_mrt.c │ │ │ ├── ospf_mrt.h │ │ │ ├── ospf_neighbor.c │ │ │ ├── ospf_neighbor.h │ │ │ ├── ospf_pdu.c │ │ │ ├── ospf_pdu.h │ │ │ ├── ospf_utils.c │ │ │ └── ospf_utils.h │ │ ├── picohttpparser.c │ │ └── picohttpparser.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── ethernet_packets.h │ │ ├── protocols.c │ │ └── protocols_decode_pcap.c ├── common │ ├── CMakeLists.txt │ ├── src │ │ ├── checksum.c │ │ ├── checksum.h │ │ ├── common.h │ │ ├── common_include.h │ │ ├── config.h │ │ ├── config.h.in │ │ ├── logging.c │ │ ├── logging.h │ │ ├── timer.c │ │ ├── timer.h │ │ ├── utils.c │ │ └── utils.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── checksum.c │ │ └── utils.c ├── ldpupdate ├── lspgen │ ├── CMakeLists.txt │ ├── src │ │ ├── hmac_md5.c │ │ ├── hmac_md5.h │ │ ├── lspgen.c │ │ ├── lspgen.h │ │ ├── lspgen_config.c │ │ ├── lspgen_ctrl.c │ │ ├── lspgen_forest.c │ │ ├── lspgen_isis.h │ │ ├── lspgen_lsdb.c │ │ ├── lspgen_lsdb.h │ │ ├── lspgen_mrt.c │ │ ├── lspgen_ospf.c │ │ ├── lspgen_ospf.h │ │ ├── lspgen_packet.c │ │ ├── lspgen_pcap.c │ │ ├── lspgen_seq_cache.c │ │ ├── lspgen_stream.c │ │ └── small-metrics.json │ └── test │ │ └── CMakeLists.txt └── lwip │ ├── BUILDING │ ├── CHANGELOG │ ├── CMakeLists.txt │ ├── COPYING │ ├── FEATURES │ ├── FILES │ ├── README │ ├── UPGRADING │ ├── codespell_changed_files.sh │ ├── codespell_check.sh │ ├── contrib │ ├── Coverity │ │ └── coverity.c │ ├── Filelists.cmake │ ├── Filelists.mk │ ├── addons │ │ ├── dhcp_extra_opts │ │ │ ├── README │ │ │ ├── dhcp_extra_opts.c │ │ │ └── dhcp_extra_opts.h │ │ ├── ipv6_static_routing │ │ │ ├── README │ │ │ ├── ip6_route_table.c │ │ │ └── ip6_route_table.h │ │ ├── netconn │ │ │ └── external_resolve │ │ │ │ ├── dnssd.c │ │ │ │ └── dnssd.h │ │ ├── tcp_isn │ │ │ ├── tcp_isn.c │ │ │ └── tcp_isn.h │ │ └── tcp_md5 │ │ │ ├── README │ │ │ ├── tcp_md5.c │ │ │ └── tcp_md5.h │ ├── apps │ │ ├── LwipMibCompiler │ │ │ ├── CCodeGeneration │ │ │ │ ├── CCodeGeneration.csproj │ │ │ │ ├── CFile.cs │ │ │ │ ├── CGenerator.cs │ │ │ │ ├── Code.cs │ │ │ │ ├── CodeContainerBase.cs │ │ │ │ ├── CodeElement.cs │ │ │ │ ├── Comment.cs │ │ │ │ ├── EmptyLine.cs │ │ │ │ ├── Function.cs │ │ │ │ ├── FunctionDeclaration.cs │ │ │ │ ├── IfThenElse.cs │ │ │ │ ├── PP_If.cs │ │ │ │ ├── PP_Ifdef.cs │ │ │ │ ├── PP_Include.cs │ │ │ │ ├── PP_Macro.cs │ │ │ │ ├── PlainText.cs │ │ │ │ ├── Properties │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── Switch.cs │ │ │ │ ├── VariableDeclaration.cs │ │ │ │ ├── VariablePrototype.cs │ │ │ │ └── VariableType.cs │ │ │ ├── LwipMibCompiler.sln │ │ │ ├── LwipMibCompiler │ │ │ │ ├── LwipMibCompiler.csproj │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ └── app.config │ │ │ ├── LwipSnmpCodeGeneration │ │ │ │ ├── IRestriction.cs │ │ │ │ ├── LwipSnmp.cs │ │ │ │ ├── LwipSnmpCodeGeneration.csproj │ │ │ │ ├── MibCFile.cs │ │ │ │ ├── MibHeaderFile.cs │ │ │ │ ├── Properties │ │ │ │ │ └── AssemblyInfo.cs │ │ │ │ ├── SnmpMib.cs │ │ │ │ ├── SnmpNode.cs │ │ │ │ ├── SnmpScalarAggregationNode.cs │ │ │ │ ├── SnmpScalarArrayNode.cs │ │ │ │ ├── SnmpScalarNode.cs │ │ │ │ ├── SnmpScalarNodeBits.cs │ │ │ │ ├── SnmpScalarNodeCounter64.cs │ │ │ │ ├── SnmpScalarNodeInt.cs │ │ │ │ ├── SnmpScalarNodeObjectIdentifier.cs │ │ │ │ ├── SnmpScalarNodeOctetString.cs │ │ │ │ ├── SnmpScalarNodeTruthValue.cs │ │ │ │ ├── SnmpScalarNodeUint.cs │ │ │ │ ├── SnmpTableNode.cs │ │ │ │ └── SnmpTreeNode.cs │ │ │ ├── MibViewer │ │ │ │ ├── FormMain.Designer.cs │ │ │ │ ├── FormMain.cs │ │ │ │ ├── FormMain.resx │ │ │ │ ├── MibViewer.csproj │ │ │ │ ├── Program.cs │ │ │ │ ├── Properties │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ ├── Resources.Designer.cs │ │ │ │ │ ├── Resources.resx │ │ │ │ │ ├── Settings.Designer.cs │ │ │ │ │ └── Settings.settings │ │ │ │ └── app.config │ │ │ ├── Mibs │ │ │ │ ├── IANA-ADDRESS-FAMILY-NUMBERS-MIB │ │ │ │ ├── IANA-CHARSET-MIB │ │ │ │ ├── IANA │ │ │ │ │ ├── IANA-ITU-ALARM-TC-MIB │ │ │ │ │ ├── IANA-LANGUAGE-MIB │ │ │ │ │ ├── IANA-MALLOC-MIB │ │ │ │ │ ├── IANA-MAU-MIB │ │ │ │ │ ├── IANA-PRINTER-MIB │ │ │ │ │ ├── IANA-RTPROTO-MIB │ │ │ │ │ ├── IANATn3270eTC-MIB │ │ │ │ │ └── IANAifType-MIB │ │ │ │ ├── IF-MIB │ │ │ │ ├── INET-ADDRESS-MIB │ │ │ │ ├── IP-MIB │ │ │ │ ├── RFC-1212 │ │ │ │ ├── RFC-1215 │ │ │ │ ├── RFC1065-SMI │ │ │ │ ├── RFC1155-SMI │ │ │ │ ├── RFC1158-MIB │ │ │ │ ├── RFC1213-MIB │ │ │ │ ├── SNMPv2-CONF │ │ │ │ ├── SNMPv2-MIB │ │ │ │ ├── SNMPv2-SMI │ │ │ │ ├── SNMPv2-TC │ │ │ │ ├── SNMPv2-TM │ │ │ │ ├── TCP-MIB │ │ │ │ └── UDP-MIB │ │ │ ├── SharpSnmpLib │ │ │ │ ├── Mib │ │ │ │ │ ├── DisplayHint.cs │ │ │ │ │ ├── Elements │ │ │ │ │ │ ├── Entities │ │ │ │ │ │ │ ├── AgentCapabilities.cs │ │ │ │ │ │ │ ├── EntityBase.cs │ │ │ │ │ │ │ ├── IEntity.cs │ │ │ │ │ │ │ ├── ModuleCompliance.cs │ │ │ │ │ │ │ ├── ModuleIdentity.cs │ │ │ │ │ │ │ ├── NotificationGroup.cs │ │ │ │ │ │ │ ├── NotificationType.cs │ │ │ │ │ │ │ ├── ObjectGroup.cs │ │ │ │ │ │ │ ├── ObjectIdentity.cs │ │ │ │ │ │ │ ├── ObjectType.cs │ │ │ │ │ │ │ └── OidValueAssignment.cs │ │ │ │ │ │ ├── Exports.cs │ │ │ │ │ │ ├── IDeclaration.cs │ │ │ │ │ │ ├── IElement.cs │ │ │ │ │ │ ├── ITypeReferrer.cs │ │ │ │ │ │ ├── Imports.cs │ │ │ │ │ │ ├── ImportsFrom.cs │ │ │ │ │ │ ├── TrapType.cs │ │ │ │ │ │ └── Types │ │ │ │ │ │ │ ├── BaseType.cs │ │ │ │ │ │ │ ├── BitsType.cs │ │ │ │ │ │ │ ├── Choice.cs │ │ │ │ │ │ │ ├── ITypeAssignment.cs │ │ │ │ │ │ │ ├── IntegerType.cs │ │ │ │ │ │ │ ├── IpAddressType.cs │ │ │ │ │ │ │ ├── Macro.cs │ │ │ │ │ │ │ ├── ObjectIdentifierType.cs │ │ │ │ │ │ │ ├── OctetStringType.cs │ │ │ │ │ │ │ ├── OpaqueType.cs │ │ │ │ │ │ │ ├── Sequence.cs │ │ │ │ │ │ │ ├── SequenceOf.cs │ │ │ │ │ │ │ ├── TextualConvention.cs │ │ │ │ │ │ │ ├── TypeAssignment.cs │ │ │ │ │ │ │ └── UnsignedType.cs │ │ │ │ │ ├── IModule.cs │ │ │ │ │ ├── ISymbolEnumerator.cs │ │ │ │ │ ├── Lexer.cs │ │ │ │ │ ├── MaxAccess.cs │ │ │ │ │ ├── MibDocument.cs │ │ │ │ │ ├── MibException.cs │ │ │ │ │ ├── MibModule.cs │ │ │ │ │ ├── MibResolver.cs │ │ │ │ │ ├── MibTree.cs │ │ │ │ │ ├── MibTreeNode.cs │ │ │ │ │ ├── MibTypesResolver.cs │ │ │ │ │ ├── ObjectIdentifier.cs │ │ │ │ │ ├── Status.cs │ │ │ │ │ ├── Symbol.cs │ │ │ │ │ ├── SymbolList.cs │ │ │ │ │ ├── ValueMap.cs │ │ │ │ │ └── ValueRange.cs │ │ │ │ ├── Properties │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ ├── Resources.Designer.cs │ │ │ │ │ └── Resources.resx │ │ │ │ ├── SharpSnmpLib.Mib.csproj │ │ │ │ ├── license.txt │ │ │ │ ├── readme.txt │ │ │ │ └── sharpsnmplib.snk │ │ │ └── example │ │ │ │ └── compile_udp_mib.sh │ │ ├── chargen │ │ │ ├── README │ │ │ ├── chargen.c │ │ │ └── chargen.h │ │ ├── httpserver │ │ │ ├── README │ │ │ ├── httpserver-netconn.c │ │ │ └── httpserver-netconn.h │ │ ├── netio │ │ │ ├── netio.c │ │ │ └── netio.h │ │ ├── ping │ │ │ ├── ping.c │ │ │ └── ping.h │ │ ├── rtp │ │ │ ├── rtp.c │ │ │ ├── rtp.h │ │ │ └── rtpdata.h │ │ ├── shell │ │ │ ├── shell.c │ │ │ └── shell.h │ │ ├── socket_examples │ │ │ ├── socket_examples.c │ │ │ └── socket_examples.h │ │ ├── tcpecho │ │ │ ├── tcpecho.c │ │ │ └── tcpecho.h │ │ ├── tcpecho_raw │ │ │ ├── tcpecho_raw.c │ │ │ └── tcpecho_raw.h │ │ ├── udpecho │ │ │ ├── udpecho.c │ │ │ └── udpecho.h │ │ └── udpecho_raw │ │ │ ├── udpecho_raw.c │ │ │ └── udpecho_raw.h │ ├── examples │ │ ├── ethernetif │ │ │ └── ethernetif.c │ │ ├── example_app │ │ │ ├── default_netif.h │ │ │ ├── lwipcfg.h.ci │ │ │ ├── lwipcfg.h.example │ │ │ ├── lwipopts.h │ │ │ ├── lwippools.h │ │ │ ├── ppp_settings.h │ │ │ ├── test.c │ │ │ └── test_configs │ │ │ │ ├── opt_default.h │ │ │ │ ├── opt_dualstack.h │ │ │ │ ├── opt_ipv4only.h │ │ │ │ ├── opt_ipv6only.h │ │ │ │ ├── opt_no_tcp_dualstack.h │ │ │ │ ├── opt_no_tcp_ipv4only.h │ │ │ │ ├── opt_no_tcp_ipv6only.h │ │ │ │ ├── opt_no_udp_dualstack.h │ │ │ │ ├── opt_no_udp_ipv4only.h │ │ │ │ ├── opt_no_udp_ipv6only.h │ │ │ │ ├── opt_none.h │ │ │ │ ├── opt_nosys_dual.h │ │ │ │ ├── opt_nosys_ipv4.h │ │ │ │ └── opt_nosys_ipv6.h │ │ ├── httpd │ │ │ ├── cgi_example │ │ │ │ ├── cgi_example.c │ │ │ │ └── cgi_example.h │ │ │ ├── examples_fs │ │ │ │ ├── 404.html │ │ │ │ ├── img │ │ │ │ │ └── sics.gif │ │ │ │ ├── index.html │ │ │ │ ├── login.html │ │ │ │ ├── loginfail.html │ │ │ │ ├── session.html │ │ │ │ └── ssi.shtml │ │ │ ├── examples_fsdata.c │ │ │ ├── fs_example │ │ │ │ ├── fs_example.c │ │ │ │ └── fs_example.h │ │ │ ├── genfiles_example │ │ │ │ ├── genfiles_example.c │ │ │ │ └── genfiles_example.h │ │ │ ├── https_example │ │ │ │ ├── https_example.c │ │ │ │ └── https_example.h │ │ │ ├── post_example │ │ │ │ └── post_example.c │ │ │ └── ssi_example │ │ │ │ ├── ssi_example.c │ │ │ │ └── ssi_example.h │ │ ├── lwiperf │ │ │ ├── lwiperf_example.c │ │ │ └── lwiperf_example.h │ │ ├── mdns │ │ │ ├── mdns_example.c │ │ │ └── mdns_example.h │ │ ├── mqtt │ │ │ ├── mqtt_example.c │ │ │ └── mqtt_example.h │ │ ├── ppp │ │ │ ├── pppos_example.c │ │ │ └── pppos_example.h │ │ ├── snmp │ │ │ ├── snmp_example.c │ │ │ ├── snmp_example.h │ │ │ ├── snmp_private_mib │ │ │ │ ├── lwip_prvmib.c │ │ │ │ └── private_mib.h │ │ │ └── snmp_v3 │ │ │ │ ├── snmpv3_dummy.c │ │ │ │ └── snmpv3_dummy.h │ │ ├── sntp │ │ │ ├── sntp_example.c │ │ │ └── sntp_example.h │ │ └── tftp │ │ │ ├── tftp_example.c │ │ │ └── tftp_example.h │ └── ports │ │ ├── CMakeCommon.cmake │ │ ├── Common.allports.mk │ │ ├── freertos │ │ ├── include │ │ │ └── arch │ │ │ │ └── sys_arch.h │ │ └── sys_arch.c │ │ ├── unix │ │ ├── Common.mk │ │ ├── Filelists.cmake │ │ ├── README │ │ ├── check │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── README │ │ │ └── config.h │ │ ├── example_app │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── default_netif.c │ │ │ └── iteropts.sh │ │ ├── lib │ │ │ ├── CMakeLists.txt │ │ │ ├── README │ │ │ └── lwipopts.h │ │ ├── port │ │ │ ├── include │ │ │ │ ├── arch │ │ │ │ │ ├── cc.h │ │ │ │ │ ├── perf.h │ │ │ │ │ └── sys_arch.h │ │ │ │ └── netif │ │ │ │ │ ├── fifo.h │ │ │ │ │ ├── list.h │ │ │ │ │ ├── pcapif.h │ │ │ │ │ ├── sio.h │ │ │ │ │ ├── tapif.h │ │ │ │ │ └── vdeif.h │ │ │ ├── netif │ │ │ │ ├── fifo.c │ │ │ │ ├── list.c │ │ │ │ ├── pcapif.c │ │ │ │ ├── sio.c │ │ │ │ ├── tapif.c │ │ │ │ └── vdeif.c │ │ │ ├── perf.c │ │ │ └── sys_arch.c │ │ ├── posixlib │ │ │ ├── CMakeLists.txt │ │ │ ├── Uninstall.cmake │ │ │ ├── include │ │ │ │ └── posix │ │ │ │ │ ├── inet.h │ │ │ │ │ └── sockets.h │ │ │ └── lwipopts.h │ │ └── setup-tapif │ │ └── win32 │ │ ├── Common.mk │ │ ├── Filelists.cmake │ │ ├── check │ │ ├── check_stdint.h │ │ ├── config.h │ │ ├── stdbool.h │ │ ├── sys │ │ │ └── time.h │ │ ├── time.c │ │ └── unistd.h │ │ ├── example_app │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ └── default_netif.c │ │ ├── include │ │ └── arch │ │ │ ├── bpstruct.h │ │ │ ├── cc.h │ │ │ ├── epstruct.h │ │ │ ├── perf.h │ │ │ └── sys_arch.h │ │ ├── msvc │ │ ├── libcheck.vcxproj │ │ ├── libcheck.vcxproj.filters │ │ ├── lwIP.vcxproj │ │ ├── lwIP.vcxproj.filters │ │ ├── lwIP_Test.sln │ │ ├── lwIP_Test.vcxproj │ │ ├── lwIP_Test.vcxproj.filters │ │ ├── lwIP_fuzz.sln │ │ ├── lwIP_pcapif.vcxproj │ │ ├── lwIP_pcapif.vcxproj.filters │ │ ├── lwIP_unittests.sln │ │ ├── lwip_fuzz.vcxproj │ │ ├── lwip_unittests.vcxproj │ │ ├── lwip_unittests.vcxproj.filters │ │ ├── makefsdata.vcxproj │ │ └── makefsdata.vcxproj.filters │ │ ├── pcapif.c │ │ ├── pcapif.h │ │ ├── pcapif_helper.c │ │ ├── pcapif_helper.h │ │ ├── readme.txt │ │ ├── sio.c │ │ └── sys_arch.c │ ├── doc │ ├── FILES │ ├── NO_SYS_SampleCode.c │ ├── ZeroCopyRx.c │ ├── contrib.txt │ ├── doxygen │ │ ├── generate.bat │ │ ├── generate.sh │ │ ├── lwip.Doxyfile │ │ ├── lwip.Doxyfile.cmake.in │ │ ├── main_page.h │ │ └── output │ │ │ └── index.html │ ├── mdns.txt │ ├── mqtt_client.txt │ ├── ppp.txt │ └── savannah.txt │ ├── src │ ├── FILES │ ├── Filelists.cmake │ ├── Filelists.mk │ ├── api │ │ ├── api_lib.c │ │ ├── api_msg.c │ │ ├── err.c │ │ ├── if_api.c │ │ ├── netbuf.c │ │ ├── netdb.c │ │ ├── netifapi.c │ │ ├── sockets.c │ │ └── tcpip.c │ ├── apps │ │ ├── altcp_tls │ │ │ ├── altcp_tls_mbedtls.c │ │ │ ├── altcp_tls_mbedtls_mem.c │ │ │ ├── altcp_tls_mbedtls_mem.h │ │ │ └── altcp_tls_mbedtls_structs.h │ │ ├── http │ │ │ ├── altcp_proxyconnect.c │ │ │ ├── fs.c │ │ │ ├── fs │ │ │ │ ├── 404.html │ │ │ │ ├── img │ │ │ │ │ └── sics.gif │ │ │ │ └── index.html │ │ │ ├── fsdata.c │ │ │ ├── fsdata.h │ │ │ ├── http_client.c │ │ │ ├── httpd.c │ │ │ ├── httpd_structs.h │ │ │ └── makefsdata │ │ │ │ ├── makefsdata │ │ │ │ ├── makefsdata.c │ │ │ │ ├── readme.txt │ │ │ │ └── tinydir.h │ │ ├── lwiperf │ │ │ └── lwiperf.c │ │ ├── mdns │ │ │ ├── mdns.c │ │ │ ├── mdns_domain.c │ │ │ └── mdns_out.c │ │ ├── mqtt │ │ │ └── mqtt.c │ │ ├── netbiosns │ │ │ └── netbiosns.c │ │ ├── smtp │ │ │ └── smtp.c │ │ ├── snmp │ │ │ ├── snmp_asn1.c │ │ │ ├── snmp_asn1.h │ │ │ ├── snmp_core.c │ │ │ ├── snmp_core_priv.h │ │ │ ├── snmp_mib2.c │ │ │ ├── snmp_mib2_icmp.c │ │ │ ├── snmp_mib2_interfaces.c │ │ │ ├── snmp_mib2_ip.c │ │ │ ├── snmp_mib2_snmp.c │ │ │ ├── snmp_mib2_system.c │ │ │ ├── snmp_mib2_tcp.c │ │ │ ├── snmp_mib2_udp.c │ │ │ ├── snmp_msg.c │ │ │ ├── snmp_msg.h │ │ │ ├── snmp_netconn.c │ │ │ ├── snmp_pbuf_stream.c │ │ │ ├── snmp_pbuf_stream.h │ │ │ ├── snmp_raw.c │ │ │ ├── snmp_scalar.c │ │ │ ├── snmp_snmpv2_framework.c │ │ │ ├── snmp_snmpv2_usm.c │ │ │ ├── snmp_table.c │ │ │ ├── snmp_threadsync.c │ │ │ ├── snmp_traps.c │ │ │ ├── snmpv3.c │ │ │ ├── snmpv3_mbedtls.c │ │ │ └── snmpv3_priv.h │ │ ├── sntp │ │ │ └── sntp.c │ │ └── tftp │ │ │ └── tftp.c │ ├── core │ │ ├── altcp.c │ │ ├── altcp_alloc.c │ │ ├── altcp_tcp.c │ │ ├── def.c │ │ ├── dns.c │ │ ├── inet_chksum.c │ │ ├── init.c │ │ ├── ip.c │ │ ├── ipv4 │ │ │ ├── acd.c │ │ │ ├── autoip.c │ │ │ ├── dhcp.c │ │ │ ├── etharp.c │ │ │ ├── icmp.c │ │ │ ├── igmp.c │ │ │ ├── ip4.c │ │ │ ├── ip4_addr.c │ │ │ └── ip4_frag.c │ │ ├── ipv6 │ │ │ ├── dhcp6.c │ │ │ ├── ethip6.c │ │ │ ├── icmp6.c │ │ │ ├── inet6.c │ │ │ ├── ip6.c │ │ │ ├── ip6_addr.c │ │ │ ├── ip6_frag.c │ │ │ ├── mld6.c │ │ │ └── nd6.c │ │ ├── mem.c │ │ ├── memp.c │ │ ├── netif.c │ │ ├── pbuf.c │ │ ├── raw.c │ │ ├── stats.c │ │ ├── sys.c │ │ ├── tcp.c │ │ ├── tcp_in.c │ │ ├── tcp_out.c │ │ ├── timeouts.c │ │ └── udp.c │ ├── include │ │ ├── compat │ │ │ ├── posix │ │ │ │ ├── arpa │ │ │ │ │ └── inet.h │ │ │ │ ├── net │ │ │ │ │ └── if.h │ │ │ │ ├── netdb.h │ │ │ │ └── sys │ │ │ │ │ └── socket.h │ │ │ └── stdc │ │ │ │ └── errno.h │ │ ├── lwip │ │ │ ├── acd.h │ │ │ ├── altcp.h │ │ │ ├── altcp_tcp.h │ │ │ ├── altcp_tls.h │ │ │ ├── api.h │ │ │ ├── apps │ │ │ │ ├── FILES │ │ │ │ ├── altcp_proxyconnect.h │ │ │ │ ├── altcp_tls_mbedtls_opts.h │ │ │ │ ├── fs.h │ │ │ │ ├── http_client.h │ │ │ │ ├── httpd.h │ │ │ │ ├── httpd_opts.h │ │ │ │ ├── lwiperf.h │ │ │ │ ├── mdns.h │ │ │ │ ├── mdns_domain.h │ │ │ │ ├── mdns_opts.h │ │ │ │ ├── mdns_out.h │ │ │ │ ├── mdns_priv.h │ │ │ │ ├── mqtt.h │ │ │ │ ├── mqtt_opts.h │ │ │ │ ├── mqtt_priv.h │ │ │ │ ├── netbiosns.h │ │ │ │ ├── netbiosns_opts.h │ │ │ │ ├── smtp.h │ │ │ │ ├── smtp_opts.h │ │ │ │ ├── snmp.h │ │ │ │ ├── snmp_core.h │ │ │ │ ├── snmp_mib2.h │ │ │ │ ├── snmp_opts.h │ │ │ │ ├── snmp_scalar.h │ │ │ │ ├── snmp_snmpv2_framework.h │ │ │ │ ├── snmp_snmpv2_usm.h │ │ │ │ ├── snmp_table.h │ │ │ │ ├── snmp_threadsync.h │ │ │ │ ├── snmpv3.h │ │ │ │ ├── sntp.h │ │ │ │ ├── sntp_opts.h │ │ │ │ ├── tftp_client.h │ │ │ │ ├── tftp_common.h │ │ │ │ ├── tftp_opts.h │ │ │ │ └── tftp_server.h │ │ │ ├── arch.h │ │ │ ├── autoip.h │ │ │ ├── debug.h │ │ │ ├── def.h │ │ │ ├── dhcp.h │ │ │ ├── dhcp6.h │ │ │ ├── dns.h │ │ │ ├── err.h │ │ │ ├── errno.h │ │ │ ├── etharp.h │ │ │ ├── ethip6.h │ │ │ ├── icmp.h │ │ │ ├── icmp6.h │ │ │ ├── if_api.h │ │ │ ├── igmp.h │ │ │ ├── inet.h │ │ │ ├── inet_chksum.h │ │ │ ├── init.h │ │ │ ├── init.h.cmake.in │ │ │ ├── ip.h │ │ │ ├── ip4.h │ │ │ ├── ip4_addr.h │ │ │ ├── ip4_frag.h │ │ │ ├── ip6.h │ │ │ ├── ip6_addr.h │ │ │ ├── ip6_frag.h │ │ │ ├── ip6_zone.h │ │ │ ├── ip_addr.h │ │ │ ├── mem.h │ │ │ ├── memp.h │ │ │ ├── mld6.h │ │ │ ├── nd6.h │ │ │ ├── netbuf.h │ │ │ ├── netdb.h │ │ │ ├── netif.h │ │ │ ├── netifapi.h │ │ │ ├── opt.h │ │ │ ├── pbuf.h │ │ │ ├── priv │ │ │ │ ├── altcp_priv.h │ │ │ │ ├── api_msg.h │ │ │ │ ├── mem_priv.h │ │ │ │ ├── memp_priv.h │ │ │ │ ├── memp_std.h │ │ │ │ ├── nd6_priv.h │ │ │ │ ├── raw_priv.h │ │ │ │ ├── sockets_priv.h │ │ │ │ ├── tcp_priv.h │ │ │ │ └── tcpip_priv.h │ │ │ ├── prot │ │ │ │ ├── acd.h │ │ │ │ ├── autoip.h │ │ │ │ ├── dhcp.h │ │ │ │ ├── dhcp6.h │ │ │ │ ├── dns.h │ │ │ │ ├── etharp.h │ │ │ │ ├── ethernet.h │ │ │ │ ├── iana.h │ │ │ │ ├── icmp.h │ │ │ │ ├── icmp6.h │ │ │ │ ├── ieee.h │ │ │ │ ├── igmp.h │ │ │ │ ├── ip.h │ │ │ │ ├── ip4.h │ │ │ │ ├── ip6.h │ │ │ │ ├── mld6.h │ │ │ │ ├── nd6.h │ │ │ │ ├── tcp.h │ │ │ │ └── udp.h │ │ │ ├── raw.h │ │ │ ├── sio.h │ │ │ ├── snmp.h │ │ │ ├── sockets.h │ │ │ ├── stats.h │ │ │ ├── sys.h │ │ │ ├── tcp.h │ │ │ ├── tcpbase.h │ │ │ ├── tcpip.h │ │ │ ├── timeouts.h │ │ │ └── udp.h │ │ └── netif │ │ │ ├── bridgeif.h │ │ │ ├── bridgeif_opts.h │ │ │ ├── etharp.h │ │ │ ├── ethernet.h │ │ │ ├── ieee802154.h │ │ │ ├── lowpan6.h │ │ │ ├── lowpan6_ble.h │ │ │ ├── lowpan6_common.h │ │ │ ├── lowpan6_opts.h │ │ │ ├── ppp │ │ │ ├── ccp.h │ │ │ ├── chap-md5.h │ │ │ ├── chap-new.h │ │ │ ├── chap_ms.h │ │ │ ├── eap.h │ │ │ ├── ecp.h │ │ │ ├── eui64.h │ │ │ ├── fsm.h │ │ │ ├── ipcp.h │ │ │ ├── ipv6cp.h │ │ │ ├── lcp.h │ │ │ ├── magic.h │ │ │ ├── mppe.h │ │ │ ├── polarssl │ │ │ │ ├── arc4.h │ │ │ │ ├── des.h │ │ │ │ ├── md4.h │ │ │ │ ├── md5.h │ │ │ │ └── sha1.h │ │ │ ├── ppp.h │ │ │ ├── ppp_impl.h │ │ │ ├── ppp_opts.h │ │ │ ├── pppapi.h │ │ │ ├── pppcrypt.h │ │ │ ├── pppdebug.h │ │ │ ├── pppoe.h │ │ │ ├── pppol2tp.h │ │ │ ├── pppos.h │ │ │ ├── upap.h │ │ │ └── vj.h │ │ │ ├── slipif.h │ │ │ └── zepif.h │ └── netif │ │ ├── FILES │ │ ├── bridgeif.c │ │ ├── bridgeif_fdb.c │ │ ├── ethernet.c │ │ ├── lowpan6.c │ │ ├── lowpan6_ble.c │ │ ├── lowpan6_common.c │ │ ├── ppp │ │ ├── PPPD_FOLLOWUP │ │ ├── auth.c │ │ ├── ccp.c │ │ ├── chap-md5.c │ │ ├── chap-new.c │ │ ├── chap_ms.c │ │ ├── demand.c │ │ ├── eap.c │ │ ├── ecp.c │ │ ├── eui64.c │ │ ├── fsm.c │ │ ├── ipcp.c │ │ ├── ipv6cp.c │ │ ├── lcp.c │ │ ├── magic.c │ │ ├── mppe.c │ │ ├── multilink.c │ │ ├── polarssl │ │ │ ├── README │ │ │ ├── arc4.c │ │ │ ├── des.c │ │ │ ├── md4.c │ │ │ ├── md5.c │ │ │ └── sha1.c │ │ ├── ppp.c │ │ ├── pppapi.c │ │ ├── pppcrypt.c │ │ ├── pppoe.c │ │ ├── pppol2tp.c │ │ ├── pppos.c │ │ ├── upap.c │ │ ├── utils.c │ │ └── vj.c │ │ ├── slipif.c │ │ └── zepif.c │ └── test │ ├── fuzz │ ├── Makefile │ ├── README │ ├── config.h │ ├── fuzz.c │ ├── fuzz2.c │ ├── fuzz3.c │ ├── fuzz_common.c │ ├── fuzz_common.h │ ├── inputs │ │ ├── arp │ │ │ └── arp_req.bin │ │ ├── icmp │ │ │ └── icmp_ping.bin │ │ ├── ipv6 │ │ │ ├── neighbor_solicitation.bin │ │ │ └── router_adv.bin │ │ ├── tcp │ │ │ └── tcp_syn.bin │ │ └── udp │ │ │ └── udp_port_5000.bin │ ├── lwipopts.h │ └── output_to_pcap.sh │ ├── sockets │ ├── sockets_stresstest.c │ └── sockets_stresstest.h │ └── unit │ ├── Filelists.cmake │ ├── Filelists.mk │ ├── Makefile │ ├── api │ ├── test_sockets.c │ └── test_sockets.h │ ├── arch │ ├── sys_arch.c │ └── sys_arch.h │ ├── core │ ├── test_def.c │ ├── test_def.h │ ├── test_dns.c │ ├── test_dns.h │ ├── test_mem.c │ ├── test_mem.h │ ├── test_netif.c │ ├── test_netif.h │ ├── test_pbuf.c │ ├── test_pbuf.h │ ├── test_timers.c │ └── test_timers.h │ ├── dhcp │ ├── test_dhcp.c │ └── test_dhcp.h │ ├── etharp │ ├── test_etharp.c │ └── test_etharp.h │ ├── ip4 │ ├── test_ip4.c │ └── test_ip4.h │ ├── ip6 │ ├── test_ip6.c │ └── test_ip6.h │ ├── lwip_check.h │ ├── lwip_unittests.c │ ├── lwipopts.h │ ├── mdns │ ├── test_mdns.c │ └── test_mdns.h │ ├── mqtt │ ├── test_mqtt.c │ └── test_mqtt.h │ ├── ppp │ ├── test_pppos.c │ └── test_pppos.h │ ├── tcp │ ├── tcp_helper.c │ ├── tcp_helper.h │ ├── test_tcp.c │ ├── test_tcp.h │ ├── test_tcp_oos.c │ ├── test_tcp_oos.h │ ├── test_tcp_state.c │ └── test_tcp_state.h │ └── udp │ ├── test_udp.c │ └── test_udp.h ├── default.nix ├── docs ├── .buildinfo ├── .nojekyll ├── _images │ ├── bbl_arch.png │ ├── bbl_flows.png │ ├── bbl_header.png │ ├── bbl_interactive.png │ ├── bbl_interactive_session.png │ ├── bbl_interfaces.png │ ├── bbl_isis.png │ ├── bbl_l2bsa_interfaces.png │ ├── bbl_ospf.png │ ├── bbl_session_traffic.png │ ├── bbl_streams.png │ ├── controller.png │ ├── quickstart1.png │ ├── quickstart_interactive.png │ ├── quickstart_isis.png │ ├── quickstart_pppoe.png │ ├── quickstart_streams.png │ └── tr-025.png ├── _sources │ ├── access │ │ ├── index.rst.txt │ │ ├── ipoe.rst.txt │ │ ├── l2bsa.rst.txt │ │ ├── l2tp.rst.txt │ │ ├── li.rst.txt │ │ ├── monkey.rst.txt │ │ ├── multicast.rst.txt │ │ ├── pppoe.rst.txt │ │ └── traffic.rst.txt │ ├── api │ │ ├── arp.rst.txt │ │ ├── bgp.rst.txt │ │ ├── cfm.rst.txt │ │ ├── http.rst.txt │ │ ├── icmp.rst.txt │ │ ├── igmp.rst.txt │ │ ├── index.rst.txt │ │ ├── interfaces.rst.txt │ │ ├── isis.rst.txt │ │ ├── l2tp.rst.txt │ │ ├── ldp.rst.txt │ │ ├── li.rst.txt │ │ ├── ospf.rst.txt │ │ ├── ppp.rst.txt │ │ ├── sessions.rst.txt │ │ ├── streams.rst.txt │ │ └── traffic.rst.txt │ ├── configuration │ │ ├── access_line.rst.txt │ │ ├── access_line_profiles.rst.txt │ │ ├── arp_client.rst.txt │ │ ├── bgp.rst.txt │ │ ├── dhcp.rst.txt │ │ ├── dhcpv6.rst.txt │ │ ├── http_client.rst.txt │ │ ├── http_server.rst.txt │ │ ├── icmp_client.rst.txt │ │ ├── igmp.rst.txt │ │ ├── index.rst.txt │ │ ├── interfaces.rst.txt │ │ ├── interfaces_a10nsp.rst.txt │ │ ├── interfaces_access.rst.txt │ │ ├── interfaces_lag.rst.txt │ │ ├── interfaces_links.rst.txt │ │ ├── interfaces_network.rst.txt │ │ ├── ipoe.rst.txt │ │ ├── isis.rst.txt │ │ ├── isis_external.rst.txt │ │ ├── isis_external_connections.rst.txt │ │ ├── ldp.rst.txt │ │ ├── lns.rst.txt │ │ ├── ospf.rst.txt │ │ ├── ospf_external.rst.txt │ │ ├── ospf_external_connections copy.rst.txt │ │ ├── ospf_external_connections.rst.txt │ │ ├── ppp.rst.txt │ │ ├── ppp_authentication.rst.txt │ │ ├── ppp_ip6cp.rst.txt │ │ ├── ppp_ipcp.rst.txt │ │ ├── ppp_lcp.rst.txt │ │ ├── pppoe.rst.txt │ │ ├── session_traffic.rst.txt │ │ ├── sessions.rst.txt │ │ ├── streams.rst.txt │ │ └── traffic.rst.txt │ ├── controller.rst.txt │ ├── faq.rst.txt │ ├── http.rst.txt │ ├── icmp.rst.txt │ ├── index.rst.txt │ ├── install.rst.txt │ ├── interfaces.rst.txt │ ├── nat.rst.txt │ ├── performance.rst.txt │ ├── quickstart.rst.txt │ ├── reference │ │ ├── architecture.rst.txt │ │ ├── index.rst.txt │ │ └── traffic.rst.txt │ ├── reports.rst.txt │ ├── routing │ │ ├── bgp.rst.txt │ │ ├── index.rst.txt │ │ ├── isis.rst.txt │ │ ├── ldp.rst.txt │ │ ├── lspgen.rst.txt │ │ ├── mpls.rst.txt │ │ └── ospf.rst.txt │ ├── streams.rst.txt │ └── troubleshooting.rst.txt ├── _static │ ├── _sphinx_javascript_frameworks_compat.js │ ├── basic.css │ ├── css │ │ ├── badge_only.css │ │ ├── fonts │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── lato-bold-italic.woff │ │ │ ├── lato-bold-italic.woff2 │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-normal-italic.woff │ │ │ ├── lato-normal-italic.woff2 │ │ │ ├── lato-normal.woff │ │ │ └── lato-normal.woff2 │ │ └── theme.css │ ├── custom.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── fonts │ │ ├── Lato-Bold.ttf │ │ ├── Lato-Bold.woff2 │ │ ├── Lato-BoldItalic.ttf │ │ ├── Lato-BoldItalic.woff2 │ │ ├── Lato-Italic.ttf │ │ ├── Lato-Italic.woff2 │ │ ├── Lato-Regular.ttf │ │ ├── Lato-Regular.woff2 │ │ ├── Lato │ │ │ ├── lato-bold.eot │ │ │ ├── lato-bold.ttf │ │ │ ├── lato-bold.woff │ │ │ ├── lato-bold.woff2 │ │ │ ├── lato-bolditalic.eot │ │ │ ├── lato-bolditalic.ttf │ │ │ ├── lato-bolditalic.woff │ │ │ ├── lato-bolditalic.woff2 │ │ │ ├── lato-italic.eot │ │ │ ├── lato-italic.ttf │ │ │ ├── lato-italic.woff │ │ │ ├── lato-italic.woff2 │ │ │ ├── lato-regular.eot │ │ │ ├── lato-regular.ttf │ │ │ ├── lato-regular.woff │ │ │ └── lato-regular.woff2 │ │ ├── RobotoSlab-Bold.woff2 │ │ ├── RobotoSlab-Regular.woff2 │ │ ├── RobotoSlab │ │ │ ├── roboto-slab-v7-bold.eot │ │ │ ├── roboto-slab-v7-bold.ttf │ │ │ ├── roboto-slab-v7-bold.woff │ │ │ ├── roboto-slab-v7-bold.woff2 │ │ │ ├── roboto-slab-v7-regular.eot │ │ │ ├── roboto-slab-v7-regular.ttf │ │ │ ├── roboto-slab-v7-regular.woff │ │ │ └── roboto-slab-v7-regular.woff2 │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── js │ │ ├── badge_only.js │ │ ├── html5shiv-printshiv.min.js │ │ ├── html5shiv.min.js │ │ ├── theme.js │ │ └── versions.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── rtbrick_logo.png │ ├── searchtools.js │ ├── sphinx_highlight.js │ ├── tabs.css │ ├── tabs.js │ ├── underscore-1.13.1.js │ └── underscore.js ├── access │ ├── index.html │ ├── ipoe.html │ ├── l2bsa.html │ ├── l2tp.html │ ├── li.html │ ├── monkey.html │ ├── multicast.html │ ├── pppoe.html │ └── traffic.html ├── api │ ├── arp.html │ ├── bgp.html │ ├── cfm.html │ ├── http.html │ ├── icmp.html │ ├── igmp.html │ ├── index.html │ ├── interfaces.html │ ├── isis.html │ ├── l2tp.html │ ├── ldp.html │ ├── li.html │ ├── ospf.html │ ├── ppp.html │ ├── sessions.html │ ├── streams.html │ └── traffic.html ├── configuration │ ├── access_line.html │ ├── access_line_profiles.html │ ├── arp_client.html │ ├── bgp.html │ ├── dhcp.html │ ├── dhcpv6.html │ ├── http_client.html │ ├── http_server.html │ ├── icmp_client.html │ ├── igmp.html │ ├── index.html │ ├── interfaces.html │ ├── interfaces_a10nsp.html │ ├── interfaces_access.html │ ├── interfaces_lag.html │ ├── interfaces_links.html │ ├── interfaces_network.html │ ├── ipoe.html │ ├── isis.html │ ├── isis_external.html │ ├── isis_external_connections.html │ ├── ldp.html │ ├── lns.html │ ├── ospf.html │ ├── ospf_external.html │ ├── ospf_external_connections copy.html │ ├── ospf_external_connections.html │ ├── ppp.html │ ├── ppp_authentication.html │ ├── ppp_ip6cp.html │ ├── ppp_ipcp.html │ ├── ppp_lcp.html │ ├── pppoe.html │ ├── session_traffic.html │ ├── sessions.html │ ├── streams.html │ └── traffic.html ├── controller.html ├── faq.html ├── genindex.html ├── http.html ├── icmp.html ├── index.html ├── install.html ├── interfaces.html ├── nat.html ├── objects.inv ├── performance.html ├── quickstart.html ├── reference │ ├── architecture.html │ ├── index.html │ └── traffic.html ├── reports.html ├── routing │ ├── bgp.html │ ├── index.html │ ├── isis.html │ ├── ldp.html │ ├── lspgen.html │ ├── mpls.html │ └── ospf.html ├── search.html ├── searchindex.js ├── streams.html └── troubleshooting.html ├── docsrc ├── Makefile ├── requirements.txt └── sources │ ├── _static │ └── custom.css │ ├── access │ ├── index.rst │ ├── ipoe.rst │ ├── l2bsa.rst │ ├── l2tp.rst │ ├── li.rst │ ├── monkey.rst │ ├── multicast.rst │ ├── pppoe.rst │ └── traffic.rst │ ├── api │ ├── arp.rst │ ├── bgp.rst │ ├── cfm.rst │ ├── http.rst │ ├── icmp.rst │ ├── igmp.rst │ ├── index.rst │ ├── interfaces.rst │ ├── isis.rst │ ├── l2tp.rst │ ├── ldp.rst │ ├── li.rst │ ├── ospf.rst │ ├── ppp.rst │ ├── sessions.rst │ ├── streams.rst │ └── traffic.rst │ ├── conf.py │ ├── configuration │ ├── access_line.rst │ ├── access_line_profiles.rst │ ├── arp_client.rst │ ├── bgp.rst │ ├── dhcp.rst │ ├── dhcpv6.rst │ ├── http_client.rst │ ├── http_server.rst │ ├── icmp_client.rst │ ├── igmp.rst │ ├── index.rst │ ├── interfaces.rst │ ├── interfaces_a10nsp.rst │ ├── interfaces_access.rst │ ├── interfaces_lag.rst │ ├── interfaces_links.rst │ ├── interfaces_network.rst │ ├── ipoe.rst │ ├── isis.rst │ ├── isis_external.rst │ ├── isis_external_connections.rst │ ├── ldp.rst │ ├── lns.rst │ ├── ospf.rst │ ├── ospf_external.rst │ ├── ospf_external_connections.rst │ ├── ppp.rst │ ├── ppp_authentication.rst │ ├── ppp_ip6cp.rst │ ├── ppp_ipcp.rst │ ├── ppp_lcp.rst │ ├── pppoe.rst │ ├── session_traffic.rst │ ├── sessions.rst │ ├── streams.rst │ └── traffic.rst │ ├── controller.rst │ ├── faq.rst │ ├── http.rst │ ├── icmp.rst │ ├── images │ ├── bbl_arch.png │ ├── bbl_flows.png │ ├── bbl_header.png │ ├── bbl_interactive.png │ ├── bbl_interactive_session.png │ ├── bbl_interfaces.png │ ├── bbl_isis.png │ ├── bbl_l2bsa_interfaces.png │ ├── bbl_ospf.png │ ├── bbl_session_traffic.png │ ├── bbl_streams.png │ ├── controller.png │ ├── logo.png │ ├── pppoe-fsm.dot │ ├── pppoe-fsm.svg │ ├── quickstart_interactive.png │ ├── quickstart_isis.png │ ├── quickstart_pppoe.png │ ├── quickstart_streams.png │ ├── rtbrick_logo.png │ └── tr-025.png │ ├── index.rst │ ├── install.rst │ ├── interfaces.rst │ ├── nat.rst │ ├── performance.rst │ ├── quickstart.rst │ ├── reports.rst │ ├── routing │ ├── bgp.rst │ ├── index.rst │ ├── isis.rst │ ├── ldp.rst │ ├── lspgen.rst │ ├── mpls.rst │ └── ospf.rst │ ├── streams.rst │ └── troubleshooting.rst ├── examples ├── README.md ├── dhcp11.json ├── dhcpn1.json ├── lag.json └── pppoe.json ├── flake.lock ├── flake.nix ├── shell.nix └── wireshark ├── README.md └── bbl_header.lua /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: GIC-de 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | 12 | A clear and concise description of what the bug is. 13 | 14 | **To Reproduce** 15 | 16 | Version (`bngblaster -v`): 17 | 18 | ``` 19 | ``` 20 | 21 | JSON configuration: 22 | ```json 23 | { 24 | } 25 | ``` 26 | 27 | Steps to reproduce the behavior: 28 | 1. ... 29 | 30 | **Expected behavior** 31 | 32 | A clear and concise description of what you expected to happen. 33 | 34 | **Screenshots** 35 | 36 | If applicable, add screenshots to help explain your problem. 37 | 38 | **Additional context** 39 | 40 | Add any other context about the problem here. 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: GIC-de 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | **Describe the solution you'd like** 15 | 16 | A clear and concise description of what you want to happen. 17 | 18 | **Describe alternatives you've considered** 19 | 20 | A clear and concise description of any alternative solutions or features you've considered. 21 | 22 | **Additional context** 23 | 24 | Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | 54 | # Editor Files 55 | .vscode 56 | 57 | # Build Files 58 | build/ 59 | 60 | # Test Files 61 | test/Testing/Temporary 62 | fuzzing/*/.cur_input 63 | 64 | # SonarQube 65 | .scannerwork 66 | sonar-project.properties 67 | 68 | # Config Files 69 | config 70 | 71 | # Misc 72 | code/common/src/config.h 73 | tmp -------------------------------------------------------------------------------- /code/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories("common/src/") 2 | 3 | add_subdirectory(common) 4 | add_subdirectory(lwip) 5 | add_subdirectory(bngblaster) 6 | add_subdirectory(lspgen) 7 | 8 | install(PROGRAMS bngblaster-cli DESTINATION sbin) 9 | install(PROGRAMS bgpupdate DESTINATION bin) 10 | install(PROGRAMS ldpupdate DESTINATION bin) -------------------------------------------------------------------------------- /code/README.md: -------------------------------------------------------------------------------- 1 | # Code 2 | 3 | ## Directory Structure 4 | 5 | ### common 6 | 7 | Shared resources used by multiple sub-projects. 8 | 9 | ### lwip 10 | 11 | Local fork of the Lightweight TCP/IP stack (lwIP) with 12 | some performance optimizations for massive TCP session 13 | support. 14 | 15 | https://savannah.nongnu.org/projects/lwip/ 16 | 17 | ### bngblaster 18 | 19 | BNG Blaster directory. 20 | 21 | ### lspgen 22 | 23 | LSPGEN directory. 24 | 25 | ## Scripts 26 | 27 | ### bngblaster-cli 28 | 29 | Simple python script to interact with the BNG Blaster 30 | control socket JSON RPC API. 31 | 32 | ### bgpupdate 33 | 34 | Simple python script to generate BGP RAW update 35 | streams for use with the BNG Blaster. 36 | 37 | ### ldpupdate 38 | 39 | Simple python script to generate LDP RAW update 40 | streams for use with the BNG Blaster. 41 | -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.10) 2 | project(bngbalster-fuzzing C) 3 | 4 | set(CMAKE_C_COMPILER "afl-gcc") 5 | set(PROPERTIES 6 | POSITION_INDEPENDENT_CODE OFF) 7 | 8 | include_directories("../src") 9 | include_directories("../../common/src") 10 | 11 | find_library(libdict NAMES libdict.a REQUIRED) 12 | set(LINK_LIBS ${libdict} m) 13 | add_executable(fuzz-protocols-decode protocols_decode.c ../src/bbl_protocols.c) 14 | target_link_libraries(fuzz-protocols-decode ${LINK_LIBS}) 15 | target_compile_options(fuzz-protocols-decode PRIVATE -Wall -Wextra -pedantic) -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/README.md: -------------------------------------------------------------------------------- 1 | # AFL Fuzzing 2 | 3 | ## Install AFL 4 | 5 | ``` 6 | sudo apt install afl 7 | ``` 8 | 9 | ## Build Fuzzing Tests 10 | 11 | ``` 12 | # cd fuzzing 13 | export AFL_USE_ASAN=1 14 | cmake . 15 | make clean all; 16 | ``` 17 | 18 | ## Run Tests 19 | 20 | ### Protocols Decode 21 | 22 | ``` 23 | # cd fuzzing 24 | afl-fuzz -m none -i protocols_decode_in -o protocols_decode_out ./fuzz-protocols-decode @@ 25 | ``` 26 | 27 | ## RAM Disks and Saving Your SSD From AFL Fuzzing 28 | 29 | ``` 30 | mkdir /tmp/afl-ramdisk && chmod 777 /tmp/afl-ramdisk 31 | sudo mount -t tmpfs -o size=512M tmpfs /tmp/afl-ramdisk 32 | cp -R bngblaster /tmp/afl-ramdisk/ 33 | cd /tmp/afl-ramdisk/bngblaster 34 | ``` 35 | -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/protocols_decode_in/icmpv6_ra.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/bngblaster/fuzzing/protocols_decode_in/icmpv6_ra.raw -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/protocols_decode_in/isis.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/bngblaster/fuzzing/protocols_decode_in/isis.raw -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/protocols_decode_in/l2tp.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/bngblaster/fuzzing/protocols_decode_in/l2tp.raw -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/protocols_decode_in/pap.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/bngblaster/fuzzing/protocols_decode_in/pap.raw -------------------------------------------------------------------------------- /code/bngblaster/fuzzing/protocols_decode_out/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/bngblaster/fuzzing/protocols_decode_out/.gitkeep -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_arp_client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - ARP Client 3 | * 4 | * Christian Giese, March 2025 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_ARP_CLIENT_H__ 11 | #define __BBL_ARP_CLIENT_H__ 12 | 13 | typedef struct bbl_arp_client_config_ 14 | { 15 | uint16_t arp_client_group_id; 16 | 17 | uint8_t interval; 18 | uint8_t vlan_priority; 19 | uint32_t target_ip; 20 | 21 | bbl_arp_client_config_s *next; /* Next arp client config */ 22 | } bbl_arp_client_config_s; 23 | 24 | typedef struct bbl_arp_client_ 25 | { 26 | uint8_t vlan_priority; 27 | uint8_t target_mac[ETH_ADDR_LEN]; 28 | uint32_t target_ip; 29 | uint32_t tx; 30 | uint32_t rx; 31 | 32 | bbl_session_s *session; 33 | bbl_arp_client_s *next; /* Next arp client of same session */ 34 | 35 | struct timer_ *timer; 36 | } bbl_arp_client_s; 37 | 38 | void 39 | bbl_arp_client_rx(bbl_session_s *session, bbl_arp_s *arp); 40 | 41 | bool 42 | bbl_arp_client_session_init(bbl_session_s *session); 43 | 44 | int 45 | bbl_arp_client_ctrl(int fd, uint32_t session_id, json_t *arguments __attribute__((unused))); 46 | 47 | int 48 | bbl_arp_client_ctrl_reset(int fd, uint32_t session_id, json_t *arguments __attribute__((unused))); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_cfm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - CFM Functions 3 | * 4 | * Christian Giese, October 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_CFM_H__ 11 | #define __BBL_CFM_H__ 12 | 13 | typedef struct bbl_cfm_session_ 14 | { 15 | bool cfm_cc; 16 | bool cfm_rdi; 17 | 18 | uint32_t cfm_cc_tx; 19 | uint32_t cfm_cc_rx; 20 | 21 | uint32_t cfm_seq; 22 | uint8_t cfm_level; 23 | uint16_t cfm_ma_id; 24 | char *cfm_ma_name; 25 | 26 | struct timer_ *timer_cfm_cc; 27 | 28 | bbl_session_s *session; 29 | bbl_network_interface_s *network_interface; 30 | } bbl_cfm_session_s; 31 | 32 | void 33 | bbl_cfm_cc_start(bbl_cfm_session_s *session); 34 | 35 | int 36 | bbl_cfm_ctrl_cc_start(int fd, uint32_t session_id, json_t *arguments __attribute__((unused))); 37 | 38 | int 39 | bbl_cfm_ctrl_cc_stop(int fd, uint32_t session_id, json_t *arguments __attribute__((unused))); 40 | 41 | int 42 | bbl_cfm_ctrl_cc_rdi_on(int fd, uint32_t session_id, json_t *arguments __attribute__((unused))); 43 | 44 | int 45 | bbl_cfm_ctrl_cc_rdi_off(int fd, uint32_t session_id, json_t *arguments __attribute__((unused))); 46 | 47 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - Control Socket 3 | * 4 | * Christian Giese, January 2021 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_CTRL_H__ 11 | #define __BBL_CTRL_H__ 12 | 13 | typedef struct bbl_ctrl_thread_ { 14 | int socket; 15 | 16 | pthread_t thread; 17 | pthread_mutex_t mutex; 18 | pthread_cond_t cond; 19 | 20 | volatile bool active; 21 | 22 | /** Commands to be executed in main thread */ 23 | struct { 24 | struct timer_ *timer; 25 | volatile size_t action; 26 | volatile int fd; 27 | volatile uint32_t session_id; 28 | volatile json_t *arguments; 29 | } main; 30 | } bbl_ctrl_thread_s; 31 | 32 | int 33 | bbl_ctrl_status(int fd, const char *status, uint32_t code, const char *message); 34 | 35 | bool 36 | bbl_ctrl_socket_init(); 37 | 38 | bool 39 | bbl_ctrl_socket_close(); 40 | 41 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_dhcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - DHCP 3 | * 4 | * Christian Giese, April 2021 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_DHCP_H__ 11 | #define __BBL_DHCP_H__ 12 | 13 | void 14 | bbl_dhcp_stop(bbl_session_s *session); 15 | 16 | void 17 | bbl_dhcp_start(bbl_session_s *session); 18 | 19 | void 20 | bbl_dhcp_restart(bbl_session_s *session); 21 | 22 | void 23 | bbl_dhcp_rx(bbl_session_s *session, bbl_ethernet_header_s *eth, bbl_dhcp_s *dhcp); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_dhcpv6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - DHCPv6 3 | * 4 | * Christian Giese, May 2021 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_DHCPV6_H__ 11 | #define __BBL_DHCPV6_H__ 12 | 13 | void 14 | bbl_dhcpv6_stop(bbl_session_s *session); 15 | 16 | void 17 | bbl_dhcpv6_start(bbl_session_s *session); 18 | 19 | void 20 | bbl_dhcpv6_restart(bbl_session_s *session); 21 | 22 | void 23 | bbl_dhcpv6_rx(bbl_session_s *session, bbl_ethernet_header_s *eth, bbl_dhcpv6_s *dhcpv6); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_fragment.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IP Fragmentation 3 | * 4 | * Christian Giese, October 2024 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_FRAGMENT_H__ 11 | #define __BBL_FRAGMENT_H__ 12 | 13 | typedef struct bbl_fragment_ { 14 | uint32_t timestamp; 15 | uint32_t src; 16 | uint32_t dst; 17 | uint16_t id; 18 | uint16_t fragments; /* Number of fragments */ 19 | uint16_t max_offset; /* Max offset value */ 20 | uint16_t max_length; /* Max length (L2) */ 21 | uint16_t received; 22 | uint16_t expected; 23 | 24 | struct bbl_fragment_ *prev; 25 | struct bbl_fragment_ *next; 26 | 27 | uint8_t buf[4050]; 28 | 29 | } bbl_fragment_s; 30 | 31 | void 32 | bbl_fragment_rx(bbl_access_interface_s *access_interface, 33 | bbl_network_interface_s *network_interface, 34 | bbl_ethernet_header_s *eth, bbl_ipv4_s *ipv4); 35 | 36 | void 37 | bbl_fragment_init(); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_http_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - HTTP Server 3 | * 4 | * Christian Giese, June 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_HTTP_SERVER_H__ 11 | #define __BBL_HTTP_SERVER_H__ 12 | 13 | #define HTTP_SERVER_RESPONSE_STRING "HTTP/1.1 200 OK\r\nServer: BNG-Blaster\r\n\r\n" 14 | #define HTTP_SERVER_RESPONSE_STRING_IP_PORT "HTTP/1.1 200 OK\r\nServer: BNG-Blaster\r\nX-Client-Ip: %s\r\nX-Client-Port: %d\r\n\r\n" 15 | 16 | typedef struct bbl_http_server_config_ 17 | { 18 | char *name; 19 | char *network_interface; 20 | 21 | uint16_t port; 22 | uint32_t ipv4_address; /* set IPv4 address */ 23 | ipv6addr_t ipv6_address; /* set IPv6 address */ 24 | 25 | bbl_http_server_config_s *next; /* next http server config */ 26 | } bbl_http_server_config_s; 27 | 28 | typedef struct bbl_http_server_connection_ 29 | { 30 | bbl_tcp_ctx_s *tcpc; 31 | bbl_http_server_connection_s *next; /* next connection */ 32 | } bbl_http_server_connection_s; 33 | 34 | typedef struct bbl_http_server_ 35 | { 36 | bbl_http_server_config_s *config; 37 | bbl_http_server_connection_s *connections; 38 | bbl_tcp_ctx_s *listen_tcpc; 39 | 40 | struct timer_ *gc_timer; 41 | 42 | bbl_http_server_s *next; /* next http server of same network interface */ 43 | } bbl_http_server_s; 44 | 45 | bool 46 | bbl_http_server_init(bbl_network_interface_s *network_interface); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_interactive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - Interactive Mode 3 | * 4 | * Hannes Gredler, July 2020 5 | * Christian Giese, October 2020 6 | * 7 | * Copyright (C) 2020-2025, RtBrick, Inc. 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | 11 | #ifndef __BBL_INTERACTIVE_H__ 12 | #define __BBL_INTERACTIVE_H__ 13 | 14 | void 15 | bbl_interactive_log_buf_init(); 16 | 17 | void 18 | bbl_interactive_init(); 19 | 20 | void 21 | bbl_interactive_start(); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_li.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LI Functions 3 | * 4 | * Christian Giese, February 2021 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_LI_H__ 11 | #define __BBL_LI_H__ 12 | 13 | typedef struct bbl_interface_ bbl_interface_s; 14 | 15 | typedef struct bbl_li_flow_ 16 | { 17 | uint32_t src_ipv4; 18 | uint32_t dst_ipv4; 19 | uint32_t src_port; 20 | uint32_t dst_port; 21 | 22 | uint8_t direction; 23 | uint8_t packet_type; 24 | uint8_t sub_packet_type; 25 | uint32_t liid; 26 | 27 | uint64_t packets_rx; 28 | uint64_t bytes_rx; 29 | uint64_t packets_rx_bbl; 30 | uint64_t packets_rx_ipv4; 31 | uint64_t packets_rx_ipv4_tcp; 32 | uint64_t packets_rx_ipv4_udp; 33 | uint64_t packets_rx_ipv4_internal; 34 | uint64_t packets_rx_ipv6; 35 | uint64_t packets_rx_ipv6_tcp; 36 | uint64_t packets_rx_ipv6_udp; 37 | uint64_t packets_rx_ipv6_internal; 38 | uint64_t packets_rx_ipv6_no_next_header; 39 | } bbl_li_flow_t; 40 | 41 | void 42 | bbl_qmx_li_handler_rx(bbl_network_interface_s *interface, bbl_ethernet_header_s *eth, bbl_qmx_li_s *qmx_li); 43 | 44 | int 45 | bbl_li_ctrl_flows(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 46 | 47 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_pcap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - PCAP 3 | * Write packets to a file in pcapng format. 4 | * 5 | * Hannes Gredler, October 2020 6 | * 7 | * Copyright (C) 2020-2025, RtBrick, Inc. 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | 11 | #ifndef __BBL_PCAP_H__ 12 | #define __BBL_PCAP_H__ 13 | 14 | #define PCAPNG_WRITEBUFSIZE 65536 15 | #define PCAPNG_PERMS 0644 16 | 17 | #define PCAPNG_SHB 0x0a0d0d0a 18 | #define PCAPNG_SHB_USERAPPL_OPTION 4 19 | #define PCAPNG_SHB_USERAPPL "rtbrick-bngblaster" 20 | 21 | #define PCAPNG_IDB 0x00000001 22 | #define PCAPNG_IDB_IFNAME_OPTION 2 23 | 24 | #define PCAPNG_EPB 0x00000006 25 | #define PCAPNG_EPB_FLAGS_OPTION 2 26 | #define PCAPNG_EPB_FLAGS_INBOUND 0x1 27 | #define PCAPNG_EPB_FLAGS_OUTBOUND 0x2 28 | 29 | /* Ethernet (10Mb, 100Mb, 1000Mb, and up); 30 | * the 10MB in the DLT_ name is historical. */ 31 | #define DLT_EN10MB 1 /* Ethernet (10Mb) */ 32 | #define DLT_NULL 0 /* RAW IP */ 33 | 34 | void 35 | pcapng_open(); 36 | 37 | void 38 | pcapng_init(); 39 | 40 | void 41 | pcapng_fflush(); 42 | 43 | void 44 | pcapng_free(); 45 | 46 | void 47 | pcapng_push_packet_header(struct timespec *ts, uint8_t *data, uint32_t packet_length, 48 | uint32_t ifindex, uint32_t direction); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_rx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - RX 3 | * 4 | * Hannes Gredler, July 2020 5 | * Christian Giese, October 2020 6 | * 7 | * Copyright (C) 2020-2025, RtBrick, Inc. 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | 11 | #ifndef __BBL_RX_H__ 12 | #define __BBL_RX_H__ 13 | 14 | bool 15 | bbl_rx_thread(bbl_interface_s *interface, 16 | bbl_ethernet_header_s *eth); 17 | 18 | void 19 | bbl_rx_handler(bbl_interface_s *interface, 20 | bbl_ethernet_header_s *eth); 21 | 22 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_tun.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - TUN Interfaces 3 | * 4 | * Christian Giese, March 2025 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #ifndef __BBL_TUN_H__ 11 | #define __BBL_TUN_H__ 12 | 13 | #include "bbl.h" 14 | 15 | bool 16 | bbl_tun_session_up(bbl_session_s *session); 17 | 18 | bool 19 | bbl_tun_session_down(bbl_session_s *session); 20 | 21 | bool 22 | bbl_tun_session_init(bbl_session_s *session); 23 | 24 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bbl_tx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - TX Job 3 | * 4 | * Hannes Gredler, July 2020 5 | * Christian Giese, October 2020 6 | * 7 | * Copyright (C) 2020-2025, RtBrick, Inc. 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | #ifndef __BBL_TX_H__ 11 | #define __BBL_TX_H__ 12 | 13 | void 14 | bbl_arp_timeout(timer_s *timer); 15 | 16 | protocol_error_t 17 | bbl_tx(bbl_interface_s *interface, uint8_t *buf, uint16_t *len); 18 | 19 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bgp/bgp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - BGP Main 3 | * 4 | * Christian Giese, Mach 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_BGP_H__ 10 | #define __BBL_BGP_H__ 11 | 12 | #include "../bbl.h" 13 | #include "bgp_def.h" 14 | #include "bgp_session.h" 15 | #include "bgp_message.h" 16 | #include "bgp_receive.h" 17 | #include "bgp_raw_update.h" 18 | #include "bgp_ctrl.h" 19 | 20 | bool 21 | bgp_init(); 22 | 23 | void 24 | bgp_teardown(); 25 | 26 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bgp/bgp_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - BGP CTRL (Control Commands) 3 | * 4 | * Christian Giese, March 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_BGP_CTRL_H__ 10 | #define __BBL_BGP_CTRL_H__ 11 | 12 | int 13 | bgp_ctrl_sessions(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 14 | 15 | int 16 | bgp_ctrl_teardown(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 17 | 18 | int 19 | bgp_ctrl_raw_update(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 20 | 21 | int 22 | bgp_ctrl_raw_update_list(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 23 | 24 | int 25 | bgp_ctrl_disconnect(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 26 | 27 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bgp/bgp_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - BGP Protocol Messages 3 | * 4 | * Christian Giese, March 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_BGP_MESSAGE_H__ 10 | #define __BBL_BGP_MESSAGE_H__ 11 | 12 | void 13 | bgp_push_open_message(bgp_session_s *session); 14 | 15 | void 16 | bgp_push_keepalive_message(bgp_session_s *session); 17 | 18 | void 19 | bgp_push_notification_message(bgp_session_s *session); 20 | 21 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bgp/bgp_raw_update.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - BGP RAW Update Functions 3 | * 4 | * Christian Giese, March 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_BGP_RAW_UPDATE_H__ 10 | #define __BBL_BGP_RAW_UPDATE_H__ 11 | 12 | bgp_raw_update_s * 13 | bgp_raw_update_load(const char *file, bool decode_file); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bgp/bgp_receive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - BGP Message Receive Functions 3 | * 4 | * Christian Giese, March 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_BGP_RECEIVE_H__ 10 | #define __BBL_BGP_RECEIVE_H__ 11 | 12 | void 13 | bgp_receive_cb(void *arg, uint8_t *buf, uint16_t len); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/bgp/bgp_session.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - BGP Session Functions 3 | * 4 | * Christian Giese, March 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_BGP_SESSION_H__ 10 | #define __BBL_BGP_SESSION_H__ 11 | 12 | const char * 13 | bgp_session_state_string(bgp_state_t state); 14 | 15 | void 16 | bgp_session_update_job(timer_s *timer); 17 | 18 | void 19 | bgp_session_state_change(bgp_session_s *session, bgp_state_t new_state); 20 | 21 | void 22 | bgp_session_connect(bgp_session_s *session, time_t delay); 23 | 24 | void 25 | bgp_session_close(bgp_session_s *session); 26 | 27 | void 28 | bgp_restart_hold_timer(bgp_session_s *session, time_t timeout); 29 | 30 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io.c: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO 3 | * 4 | * Christian Giese, July 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | 10 | #include "io.h" -------------------------------------------------------------------------------- /code/bngblaster/src/io/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO 3 | * 4 | * Christian Giese, August 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_H__ 10 | #define __BBL_IO_H__ 11 | 12 | #include 13 | 14 | #include "../bbl.h" 15 | #include "../bbl_pcap.h" 16 | #include "../bbl_stream.h" 17 | #include "../bbl_rx.h" 18 | #include "../bbl_tx.h" 19 | #include "../bbl_txq.h" 20 | 21 | #include "io_def.h" 22 | #include "io_stream.h" 23 | #include "io_socket.h" 24 | #include "io_interface.h" 25 | #include "io_thread.h" 26 | 27 | #include "io_raw.h" 28 | #include "io_packet_mmap.h" 29 | 30 | #ifdef BNGBLASTER_DPDK 31 | #include "io_dpdk.h" 32 | #endif 33 | 34 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_dpdk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO DPDK 3 | * 4 | * Christian Giese, August 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_DPDK_H__ 10 | #define __BBL_IO_DPDK_H__ 11 | 12 | bool 13 | io_dpdk_init(); 14 | 15 | bool 16 | io_dpdk_interface_init(bbl_interface_s *interface); 17 | 18 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO Interface Functions 3 | * 4 | * Christian Giese, August 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_INTERFACE_H__ 10 | #define __BBL_IO_INTERFACE_H__ 11 | 12 | bool 13 | io_interface_init(bbl_interface_s *interface); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_packet_mmap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO PACKET_MMAP 3 | * 4 | * Christian Giese, July 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_PACKET_MMAP_H__ 10 | #define __BBL_IO_PACKET_MMAP_H__ 11 | 12 | bool 13 | io_packet_mmap_init(io_handle_s *io); 14 | 15 | void 16 | io_packet_mmap_set_max_stream_len(); 17 | 18 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_raw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO RAW 3 | * 4 | * Christian Giese, July 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_RAW_H__ 10 | #define __BBL_IO_RAW_H__ 11 | 12 | bool 13 | io_raw_init(io_handle_s *io); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_socket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO Linux Socket Functions 3 | * 4 | * Christian Giese, August 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_SOCKET_H__ 10 | #define __BBL_IO_SOCKET_H__ 11 | 12 | bool 13 | io_socket_open(io_handle_s *io); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO Stream 3 | * 4 | * Christian Giese, January 2024 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_STREAM_H__ 10 | #define __BBL_IO_STREAM_H__ 11 | 12 | void 13 | io_stream_add(io_handle_s *io, bbl_stream_s *stream); 14 | 15 | void 16 | io_stream_clear(io_handle_s *io); 17 | 18 | void 19 | io_stream_smear(io_handle_s *io); 20 | 21 | void 22 | io_stream_smear_all(); 23 | 24 | void 25 | io_stream_update_pps(io_handle_s *io); 26 | 27 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/io/io_thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IO RX Threads 3 | * 4 | * Christian Giese, July 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_IO_THREAD_H__ 10 | #define __BBL_IO_THREAD_H__ 11 | 12 | bool 13 | io_thread_init(io_handle_s *io); 14 | 15 | void 16 | io_thread_start_all(); 17 | 18 | void 19 | io_thread_stop_all(); 20 | 21 | io_result_t 22 | io_thread_rx_handler(io_thread_s *thread, io_handle_s *io); 23 | 24 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS Main 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_H__ 10 | #define __BBL_ISIS_H__ 11 | 12 | #include "../bbl.h" 13 | #include "isis_def.h" 14 | #include "isis_utils.h" 15 | #include "isis_pdu.h" 16 | #include "isis_adjacency.h" 17 | #include "isis_peer.h" 18 | #include "isis_hello.h" 19 | #include "isis_p2p_hello.h" 20 | #include "isis_csnp.h" 21 | #include "isis_psnp.h" 22 | #include "isis_lsp.h" 23 | #include "isis_ctrl.h" 24 | #include "isis_mrt.h" 25 | 26 | extern uint8_t g_isis_mac_p2p_hello[]; 27 | extern uint8_t g_isis_mac_all_l1[]; 28 | extern uint8_t g_isis_mac_all_l2[]; 29 | 30 | int 31 | isis_lsp_id_compare(void *id1, void *id2); 32 | 33 | void 34 | isis_flood_entry_free(void *key, void *ptr); 35 | 36 | void 37 | isis_psnp_free(void *key, void *ptr); 38 | 39 | bool 40 | isis_init(); 41 | 42 | void 43 | isis_handler_rx(bbl_network_interface_s *interface, bbl_ethernet_header_s *eth); 44 | 45 | void 46 | isis_teardown(); 47 | 48 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_adjacency.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS Adjacency 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_ADJACENCY_H__ 10 | #define __BBL_ISIS_ADJACENCY_H__ 11 | 12 | bool 13 | isis_adjacency_init(bbl_network_interface_s *interface, 14 | bbl_network_config_s *interface_config, 15 | isis_instance_s *instance); 16 | 17 | void 18 | isis_adjacency_up(isis_adjacency_s *adjacency); 19 | 20 | void 21 | isis_adjacency_down(isis_adjacency_s *adjacency, const char *reason); 22 | 23 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_csnp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS CSNP 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_CSNP_H__ 10 | #define __BBL_ISIS_CSNP_H__ 11 | 12 | void 13 | isis_csnp_job (timer_s *timer); 14 | 15 | void 16 | isis_csnp_handler_rx(bbl_network_interface_s *interface, isis_pdu_s *pdu, uint8_t level); 17 | 18 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS CTRL (Control Commands) 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_CTRL_H__ 10 | #define __BBL_ISIS_CTRL_H__ 11 | 12 | int 13 | isis_ctrl_adjacencies(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 14 | 15 | int 16 | isis_ctrl_database(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 17 | 18 | int 19 | isis_ctrl_load_mrt(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 20 | 21 | int 22 | isis_ctrl_lsp_update(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 23 | 24 | int 25 | isis_ctrl_lsp_purge(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 26 | 27 | int 28 | isis_ctrl_lsp_flap(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 29 | 30 | int 31 | isis_ctrl_teardown(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 32 | 33 | int 34 | isis_ctrl_update_priority(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 35 | 36 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_hello.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS Hello 3 | * 4 | * Christian Giese, June 2024 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_HELLO_H__ 10 | #define __BBL_ISIS_HELLO_H__ 11 | 12 | protocol_error_t 13 | isis_hello_encode(bbl_network_interface_s *interface, 14 | uint8_t *buf, uint16_t *len, 15 | bbl_ethernet_header_s *eth, 16 | uint8_t level); 17 | 18 | void 19 | isis_hello_handler_rx(bbl_network_interface_s *interface, 20 | bbl_ethernet_header_s *eth, 21 | isis_pdu_s *pdu, uint8_t level); 22 | 23 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_lsp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS LSP 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_LSP_H__ 10 | #define __BBL_ISIS_LSP_H__ 11 | 12 | void 13 | isis_lsp_flood_adjacency(isis_lsp_s *lsp, isis_adjacency_s *adjacency); 14 | 15 | void 16 | isis_lsp_flood(isis_lsp_s *lsp); 17 | 18 | void 19 | isis_lsp_process_entries(isis_adjacency_s *adjacency, hb_tree *lsdb, isis_pdu_s *pdu, uint64_t csnp_scan); 20 | 21 | void 22 | isis_lsp_gc_job(timer_s *timer); 23 | 24 | void 25 | isis_lsp_retry_job(timer_s *timer); 26 | 27 | void 28 | isis_lsp_refresh(isis_lsp_s *lsp); 29 | 30 | void 31 | isis_lsp_refresh_job(timer_s *timer); 32 | 33 | void 34 | isis_lsp_lifetime(isis_lsp_s *lsp); 35 | 36 | void 37 | isis_lsp_tx_job(timer_s *timer); 38 | 39 | void 40 | isis_lsp_tx_p2p_job(timer_s *timer); 41 | 42 | isis_lsp_s * 43 | isis_lsp_new(uint64_t id, uint8_t level, isis_instance_s *instance); 44 | 45 | bool 46 | isis_lsp_self_update(isis_instance_s *instance, uint8_t level); 47 | 48 | void 49 | isis_lsp_handler_rx(bbl_network_interface_s *interface, isis_pdu_s *pdu, uint8_t level); 50 | 51 | void 52 | isis_lsp_purge(isis_lsp_s *lsp); 53 | 54 | void 55 | isis_lsp_purge_all_external(isis_instance_s *instance, uint8_t level); 56 | 57 | bool 58 | isis_lsp_update_external(isis_instance_s *instance, isis_pdu_s *pdu, bool refresh); 59 | 60 | bool 61 | isis_lsp_flap(isis_lsp_s *lsp, time_t timer); 62 | 63 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_mrt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS MRT Files 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_MRT_H__ 10 | #define __BBL_ISIS_MRT_H__ 11 | 12 | #define ISIS_MRT_TYPE 32 13 | 14 | typedef struct isis_mrt_hdr_ { 15 | uint32_t timestamp; 16 | uint16_t type; 17 | uint16_t subtype; 18 | uint32_t length; 19 | } __attribute__ ((__packed__)) isis_mrt_hdr_t; 20 | 21 | bool 22 | isis_mrt_load(isis_instance_s *instance, char *file_path, bool startup); 23 | 24 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_p2p_hello.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS P2P Hello 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_P2P_HELLO_H__ 10 | #define __BBL_ISIS_P2P_HELLO_H__ 11 | 12 | protocol_error_t 13 | isis_p2p_hello_encode(bbl_network_interface_s *interface, 14 | uint8_t *buf, uint16_t *len, 15 | bbl_ethernet_header_s *eth); 16 | 17 | void 18 | isis_p2p_hello_handler_rx(bbl_network_interface_s *interface, 19 | isis_pdu_s *pdu); 20 | 21 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_peer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS Peer 3 | * 4 | * Christian Giese, June 2024 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_PEER_H__ 10 | #define __BBL_ISIS_PEER_H__ 11 | 12 | bool 13 | isis_peer_dis_elect(isis_adjacency_s *adjacency); 14 | 15 | void 16 | isis_peer_update(isis_peer_s *peer, isis_pdu_s *pdu); 17 | 18 | isis_peer_s* 19 | isis_peer(isis_adjacency_s *adjacency, uint8_t *mac); 20 | 21 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_psnp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS PSNP 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_PSNP_H__ 10 | #define __BBL_ISIS_PSNP_H__ 11 | 12 | void 13 | isis_psnp_job (timer_s *timer); 14 | 15 | void 16 | isis_psnp_handler_rx(bbl_network_interface_s *interface, isis_pdu_s *pdu, uint8_t level); 17 | 18 | void 19 | isis_psnp_tree_add(isis_adjacency_s *adjacency, isis_lsp_s *lsp); 20 | 21 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/isis/isis_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - IS-IS Helper Functions 3 | * 4 | * Christian Giese, February 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_ISIS_UTILS_H__ 10 | #define __BBL_ISIS_UTILS_H__ 11 | 12 | const char * 13 | isis_source_string(uint8_t source); 14 | 15 | const char * 16 | isis_level_string(uint8_t level); 17 | 18 | const char * 19 | isis_peer_state_string(uint8_t state); 20 | 21 | const char * 22 | isis_p2p_adjacency_state_string(uint8_t state); 23 | 24 | const char * 25 | isis_adjacency_state_string(uint8_t state); 26 | 27 | const char * 28 | isis_pdu_type_string(uint8_t type); 29 | 30 | bool 31 | isis_str_to_area(const char *str, isis_area_s *area); 32 | 33 | char * 34 | isis_area_so_str(isis_area_s *area); 35 | 36 | bool 37 | isis_str_to_system_id(const char *str, uint8_t *system_id); 38 | 39 | char * 40 | isis_system_id_to_str(uint8_t *system_id); 41 | 42 | char * 43 | isis_pseudo_node_id_to_str(uint8_t *system_id, uint8_t pseudo_node_id); 44 | 45 | bool 46 | isis_str_to_lsp_id(const char *str, uint64_t *lsp_id); 47 | 48 | char * 49 | isis_lsp_id_to_str(uint64_t *lsp_id); 50 | 51 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Main 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_H__ 10 | #define __BBL_LDP_H__ 11 | 12 | #include "../bbl.h" 13 | #include "ldp_def.h" 14 | #include "ldp_hello.h" 15 | #include "ldp_interface.h" 16 | #include "ldp_session.h" 17 | #include "ldp_message.h" 18 | #include "ldp_db.h" 19 | #include "ldp_receive.h" 20 | #include "ldp_raw_update.h" 21 | #include "ldp_ctrl.h" 22 | 23 | char * 24 | ldp_id_to_str(uint32_t lsr_id, uint16_t label_space_id); 25 | 26 | bool 27 | ldp_init(); 28 | 29 | void 30 | ldp_teardown(); 31 | 32 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP CTRL (Control Commands) 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_CTRL_H__ 10 | #define __BBL_LDP_CTRL_H__ 11 | 12 | int 13 | ldp_ctrl_adjacencies(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 14 | 15 | int 16 | ldp_ctrl_sessions(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 17 | 18 | int 19 | ldp_ctrl_teardown(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 20 | 21 | int 22 | ldp_ctrl_raw_update(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 23 | 24 | int 25 | ldp_ctrl_raw_update_list(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 26 | 27 | int 28 | ldp_ctrl_disconnect(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 29 | 30 | int 31 | ldb_ctrl_database(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 32 | 33 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_db.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Database 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_DB_H__ 10 | #define __BBL_LDP_DB_H__ 11 | 12 | bool 13 | ldb_db_init(ldp_instance_s *instance); 14 | 15 | bool 16 | ldb_db_add_ipv4(ldp_session_s *session, ipv4_prefix *prefix, uint32_t label); 17 | 18 | ldp_db_entry_s * 19 | ldb_db_lookup_ipv4(ldp_instance_s *instance, uint32_t address); 20 | 21 | bool 22 | ldb_db_add_ipv6(ldp_session_s *session, ipv6_prefix *prefix, uint32_t label); 23 | 24 | ldp_db_entry_s * 25 | ldb_db_lookup_ipv6(ldp_instance_s *instance, ipv6addr_t *address); 26 | 27 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_hello.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Hello 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_HELLO_H__ 10 | #define __BBL_LDP_HELLO_H__ 11 | 12 | protocol_error_t 13 | ldp_hello_ipv4_encode(bbl_network_interface_s *interface, 14 | uint8_t *buf, uint16_t *len, 15 | bbl_ethernet_header_s *eth); 16 | 17 | protocol_error_t 18 | ldp_hello_ipv6_encode(bbl_network_interface_s *interface, 19 | uint8_t *buf, uint16_t *len, 20 | bbl_ethernet_header_s *eth); 21 | 22 | void 23 | ldp_hello_start(ldp_adjacency_s *adjacency); 24 | 25 | void 26 | ldp_hello_ipv4_rx(bbl_network_interface_s *interface, 27 | bbl_ethernet_header_s *eth, 28 | bbl_ipv4_s *ipv4, 29 | bbl_ldp_hello_s *ldp); 30 | 31 | void 32 | ldp_hello_ipv6_rx(bbl_network_interface_s *interface, 33 | bbl_ethernet_header_s *eth, 34 | bbl_ipv6_s *ipv6, 35 | bbl_ldp_hello_s *ldp); 36 | 37 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Interface 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_INTERFACE_H__ 10 | #define __BBL_LDP_INTERFACE_H__ 11 | 12 | bool 13 | ldp_interface_init(bbl_network_interface_s *interface, 14 | bbl_network_config_s *interface_config, 15 | ldp_instance_s *instance); 16 | 17 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Protocol Messages 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_MESSAGE_H__ 10 | #define __BBL_LDP_MESSAGE_H__ 11 | 12 | void 13 | ldp_pdu_close(ldp_session_s *session); 14 | 15 | bool 16 | ldp_pdu_init(ldp_session_s *session); 17 | 18 | void 19 | ldp_push_init_message(ldp_session_s *session); 20 | 21 | void 22 | ldp_push_keepalive_message(ldp_session_s *session); 23 | 24 | void 25 | ldp_push_notification_message(ldp_session_s *session); 26 | 27 | void 28 | ldp_push_label_mapping_message(ldp_session_s *session, ipv4_prefix *prefix, uint32_t label); 29 | 30 | void 31 | ldp_push_self_message(ldp_session_s *session); 32 | 33 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_raw_update.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP RAW Update Functions 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_RAW_UPDATE_H__ 10 | #define __BBL_LDP_RAW_UPDATE_H__ 11 | 12 | ldp_raw_update_s * 13 | ldp_raw_update_load(const char *file, bool decode_file); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_receive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Receive Functions 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_RECEIVE_H__ 10 | #define __BBL_LDP_RECEIVE_H__ 11 | 12 | void 13 | ldp_receive_cb(void *arg, uint8_t *buf, uint16_t len); 14 | 15 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ldp/ldp_session.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - LDP Session 3 | * 4 | * Christian Giese, November 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_LDP_SESSION_H__ 10 | #define __BBL_LDP_SESSION_H__ 11 | 12 | const char * 13 | ldp_session_state_string(ldp_state_t state); 14 | 15 | void 16 | ldp_session_update_job(timer_s *timer); 17 | 18 | void 19 | ldp_session_restart_keepalive_timeout(ldp_session_s *session); 20 | 21 | void 22 | ldp_session_fsm(ldp_session_s *session, ldp_event_t event); 23 | 24 | void 25 | ldp_session_connect(ldp_session_s *session, time_t delay); 26 | 27 | void 28 | ldp_session_ipv4_init(ldp_session_s *session, ldp_adjacency_s *adjacency, 29 | bbl_ipv4_s *ipv4, bbl_ldp_hello_s *ldp); 30 | 31 | void 32 | ldp_session_ipv6_init(ldp_session_s *session, ldp_adjacency_s *adjacency, 33 | bbl_ipv6_s *ipv6, bbl_ldp_hello_s *ldp); 34 | 35 | void 36 | ldp_session_close(ldp_session_s *session); 37 | 38 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF Main 3 | * 4 | * Christian Giese, May 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_H__ 10 | #define __BBL_OSPF_H__ 11 | 12 | #include "../bbl.h" 13 | #include "ospf_def.h" 14 | #include "ospf_utils.h" 15 | #include "ospf_pdu.h" 16 | #include "ospf_interface.h" 17 | #include "ospf_neighbor.h" 18 | #include "ospf_hello.h" 19 | #include "ospf_lsa.h" 20 | #include "ospf_ctrl.h" 21 | #include "ospf_mrt.h" 22 | 23 | int 24 | ospf_lsa_key_compare(void *id1, void *id2); 25 | 26 | bool 27 | ospf_init(); 28 | 29 | void 30 | ospf_handler_rx_ipv4(bbl_network_interface_s *interface, 31 | bbl_ethernet_header_s *eth, 32 | bbl_ipv4_s *ipv4); 33 | 34 | void 35 | ospf_handler_rx_ipv6(bbl_network_interface_s *interface, 36 | bbl_ethernet_header_s *eth, 37 | bbl_ipv6_s *ipv6); 38 | 39 | void 40 | ospf_teardown(); 41 | 42 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF CTRL (Control Commands) 3 | * 4 | * Christian Giese, May 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_CTRL_H__ 10 | #define __BBL_OSPF_CTRL_H__ 11 | 12 | int 13 | ospf_ctrl_database(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 14 | 15 | int 16 | ospf_ctrl_interfaces(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 17 | 18 | int 19 | ospf_ctrl_neighbors(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 20 | 21 | int 22 | ospf_ctrl_load_mrt(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 23 | 24 | int 25 | ospf_ctrl_lsa_update(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 26 | 27 | int 28 | ospf_ctrl_pdu_update(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments); 29 | 30 | int 31 | ospf_ctrl_teardown(int fd, uint32_t session_id __attribute__((unused)), json_t *arguments __attribute__((unused))); 32 | 33 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf_hello.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF Hello 3 | * 4 | * Christian Giese, May 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_HELLO_H__ 10 | #define __BBL_OSPF_HELLO_H__ 11 | 12 | protocol_error_t 13 | ospf_hello_v2_encode(bbl_network_interface_s *interface, 14 | uint8_t *buf, uint16_t *len, 15 | bbl_ethernet_header_s *eth); 16 | 17 | protocol_error_t 18 | ospf_hello_v3_encode(bbl_network_interface_s *interface, 19 | uint8_t *buf, uint16_t *len, 20 | bbl_ethernet_header_s *eth); 21 | 22 | void 23 | ospf_hello_rx(ospf_interface_s *ospf_interface, 24 | ospf_neighbor_s *ospf_neighbor, 25 | ospf_pdu_s *pdu); 26 | 27 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF Interface 3 | * 4 | * Christian Giese, May 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_INTERFACE_H__ 10 | #define __BBL_OSPF_INTERFACE_H__ 11 | 12 | void 13 | ospf_interface_neighbor_change(ospf_interface_s *ospf_interface); 14 | 15 | bool 16 | ospf_interface_init(bbl_network_interface_s *interface, 17 | bbl_network_config_s *network_config, 18 | uint8_t version); 19 | 20 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf_mrt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF MRT Files 3 | * 4 | * Christian Giese, May 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_MRT_H__ 10 | #define __BBL_OSPF_MRT_H__ 11 | 12 | #define OSPFv2_MRT_TYPE 11 13 | #define OSPFv3_MRT_TYPE 48 14 | 15 | #define OSPFv2_MRT_PDU_OFFSET 8 16 | #define OSPFv3_MRT_PDU_OFFSET 34 17 | 18 | typedef struct ospf_mrt_hdr_ { 19 | uint32_t timestamp; 20 | uint16_t type; 21 | uint16_t subtype; 22 | uint32_t length; 23 | } __attribute__ ((__packed__)) ospf_mrt_hdr_t; 24 | 25 | bool 26 | ospf_mrt_load(ospf_instance_s *instance, char *file_path, bool startup); 27 | 28 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf_neighbor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF Neighbor 3 | * 4 | * Christian Giese, June 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_NEIGHBOR_H__ 10 | #define __BBL_OSPF_NEIGHBOR_H__ 11 | 12 | void 13 | ospf_neighbor_update_state(ospf_neighbor_s *neighbor, uint8_t state); 14 | 15 | void 16 | ospf_neighbor_update(ospf_neighbor_s *ospf_neighbor, ospf_pdu_s *pdu); 17 | 18 | ospf_neighbor_s * 19 | ospf_neighbor_new(ospf_interface_s *ospf_interface, ospf_pdu_s *pdu); 20 | 21 | void 22 | ospf_neighbor_full(ospf_neighbor_s *ospf_neighbor); 23 | 24 | void 25 | ospf_neighbor_adjok(ospf_neighbor_s *ospf_neighbor); 26 | 27 | void 28 | ospf_neighbor_dbd_rx(ospf_interface_s *ospf_interface, 29 | ospf_neighbor_s *ospf_neighbor, 30 | ospf_pdu_s *pdu); 31 | 32 | #endif -------------------------------------------------------------------------------- /code/bngblaster/src/ospf/ospf_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BNG Blaster (BBL) - OSPF Helper Functions 3 | * 4 | * Christian Giese, May 2023 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __BBL_OSPF_UTILS_H__ 10 | #define __BBL_OSPF_UTILS_H__ 11 | 12 | const char * 13 | ospf_source_string(uint8_t source); 14 | 15 | const char * 16 | ospf_p2p_adjacency_state_string(uint8_t state); 17 | 18 | const char * 19 | ospf_adjacency_state_string(uint8_t state); 20 | 21 | const char * 22 | ospf_neighbor_state_string(uint8_t state); 23 | 24 | const char * 25 | ospf_interface_state_string(uint8_t state); 26 | 27 | const char * 28 | ospf_interface_type_string(uint8_t state); 29 | 30 | const char * 31 | ospf_pdu_type_string(uint8_t type); 32 | 33 | void 34 | ospf_rx_error(bbl_network_interface_s *interface, ospf_pdu_s *pdu, const char *error); 35 | 36 | char * 37 | ospf_lsa_hdr_string(ospf_lsa_header_s *hdr); 38 | 39 | #endif -------------------------------------------------------------------------------- /code/bngblaster/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories("../src/") 2 | 3 | # Disable LWIP for unit tests 4 | remove_definitions(-DBNGBLASTER_LWIP) 5 | 6 | set(LINK_LIBS ${libdict} cmocka pcap m) 7 | 8 | add_executable(test-protocols protocols.c ../src/bbl_protocols.c) 9 | target_link_libraries(test-protocols ${LINK_LIBS}) 10 | target_compile_options(test-protocols PRIVATE -Werror -Wall -Wextra) 11 | add_test(NAME "TestProtocols" COMMAND test-protocols) 12 | 13 | add_executable(test-decode-pcap protocols_decode_pcap.c ../src/bbl_protocols.c) 14 | target_link_libraries(test-decode-pcap ${LINK_LIBS}) 15 | target_compile_options(test-decode-pcap PRIVATE -Werror -Wall -Wextra) -------------------------------------------------------------------------------- /code/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in" 2 | "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h") 3 | 4 | FILE(GLOB COMMON_SOURCES src/*.c) 5 | 6 | # Deterministic randomness for symbol name creation 7 | list(SORT COMMON_SOURCES) 8 | foreach(_file ${COMMON_SOURCES}) 9 | file(SHA1 ${_file} checksum) 10 | string(SUBSTRING ${checksum} 0 8 checksum) 11 | set_property(SOURCE ${_file} APPEND_STRING PROPERTY COMPILE_FLAGS "-frandom-seed=0x${checksum}") 12 | endforeach() 13 | 14 | # Export variable one level up 15 | set(COMMON_SOURCES ${COMMON_SOURCES} PARENT_SCOPE) 16 | 17 | # Build tests only if required 18 | if(BNGBLASTER_TESTS) 19 | message("Build common tests") 20 | enable_testing() 21 | add_subdirectory(test) 22 | endif() -------------------------------------------------------------------------------- /code/common/src/checksum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Checksum Library 3 | * 4 | * Hannes Gredler, February 2024 5 | * Christian Giese, October 2024 6 | * 7 | * Copyright (C) 2020-2025, RtBrick, Inc. 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | 11 | #ifndef __COMMON_CHECKSUM_H__ 12 | #define __COMMON_CHECKSUM_H__ 13 | #include "common.h" 14 | 15 | uint16_t 16 | validate_fletcher_checksum(const uint8_t *pptr, uint length); 17 | 18 | uint16_t 19 | calculate_fletcher_checksum(uint8_t *pptr, uint checksum_offset, uint length); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /code/common/src/common_include.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common Functions and Defines 3 | * 4 | * Hannes Gredler, July 2020 5 | * Christian Giese, October 2020 6 | * 7 | * Copyright (C) 2020-2025, RtBrick, Inc. 8 | * SPDX-License-Identifier: BSD-3-Clause 9 | */ 10 | #ifndef __COMMON_INCLUDE_H__ 11 | #define __COMMON_INCLUDE_H__ 12 | 13 | #include "common.h" 14 | #include "config.h" 15 | #include "utils.h" 16 | #include "logging.h" 17 | #include "timer.h" 18 | #include "checksum.h" 19 | 20 | #endif -------------------------------------------------------------------------------- /code/common/src/config.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H__ 2 | #define __CONFIG_H__ 3 | 4 | /* CMake Project Details */ 5 | #define PROJECT_NAME "bngblaster" 6 | #define PROJECT_VER "0.0.0" 7 | #define PROJECT_VER_MAJOR "0" 8 | #define PROJECT_VER_MINOR "0" 9 | #define PROJECT_VER_PATCH "0" 10 | 11 | #define BNGBLASTER_VERSION "" 12 | #define GIT_REF "" 13 | #define GIT_SHA "" 14 | 15 | #define COMPILER_ID "GNU" 16 | #define COMPILER_VERSION "11.4.0" 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /code/common/src/config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H__ 2 | #define __CONFIG_H__ 3 | 4 | /* CMake Project Details */ 5 | #define PROJECT_NAME "@PROJECT_NAME@" 6 | #define PROJECT_VER "@PROJECT_VERSION@" 7 | #define PROJECT_VER_MAJOR "@PROJECT_VERSION_MAJOR@" 8 | #define PROJECT_VER_MINOR "@PROJECT_VERSION_MINOR@" 9 | #define PROJECT_VER_PATCH "@PROJECT_VERSION_PATCH@" 10 | 11 | #define BNGBLASTER_VERSION "@BNGBLASTER_VERSION@" 12 | #define GIT_REF "@GIT_REF@" 13 | #define GIT_SHA "@GIT_SHA@" 14 | 15 | #define COMPILER_ID "@CMAKE_C_COMPILER_ID@" 16 | #define COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@" 17 | 18 | #endif -------------------------------------------------------------------------------- /code/common/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LINK_LIBS cmocka m) 2 | 3 | add_executable(test-utils utils.c ../src/utils.c) 4 | target_link_libraries(test-utils ${LINK_LIBS}) 5 | target_compile_options(test-utils PRIVATE -Werror -Wall -Wextra) 6 | add_test(NAME "TestUtils" COMMAND test-utils) 7 | 8 | add_executable(test-checksum checksum.c ../src/checksum.c) 9 | target_link_libraries(test-checksum ${LINK_LIBS}) 10 | target_compile_options(test-checksum PRIVATE -Werror -Wall -Wextra) 11 | add_test(NAME "TestChecksum" COMMAND test-checksum) -------------------------------------------------------------------------------- /code/lspgen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | FILE(GLOB LSPGEN_SOURCES src/*.c) 3 | list(SORT LSPGEN_SOURCES) 4 | 5 | # Deterministic randomness for symbol name creation 6 | foreach(_file ${LSPGEN_SOURCES}) 7 | file(SHA1 ${_file} checksum) 8 | string(SUBSTRING ${checksum} 0 8 checksum) 9 | set_property(SOURCE ${_file} APPEND_STRING PROPERTY COMPILE_FLAGS "-frandom-seed=0x${checksum}") 10 | endforeach() 11 | 12 | add_executable(lspgen ${COMMON_SOURCES} ${LSPGEN_SOURCES}) 13 | target_link_libraries(lspgen crypto jansson ${libdict} m) 14 | 15 | if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0) 16 | target_compile_options(lspgen PUBLIC "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") 17 | endif() 18 | 19 | if(BNGBLASTER_CPU_NATIVE) 20 | target_compile_options(lspgen PRIVATE -Werror -Wall -Wextra -Wno-deprecated-declarations -pedantic -march=native -mtune=native) 21 | else() 22 | target_compile_options(lspgen PRIVATE -Werror -Wall -Wextra -Wno-deprecated-declarations -pedantic -mtune=generic) 23 | endif() 24 | 25 | # Optional IPO. Do not use IPO if it's not supported by compiler. 26 | check_ipo_supported(RESULT result OUTPUT output) 27 | if(result) 28 | set_property(TARGET bngblaster PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) 29 | else() 30 | message(WARNING "IPO is not supported: ${output}") 31 | endif() 32 | 33 | install(TARGETS lspgen DESTINATION sbin) 34 | 35 | # Build tests only if required 36 | if(BNGBLASTER_TESTS) 37 | message("Build lspgen tests") 38 | enable_testing() 39 | add_subdirectory(test) 40 | endif() -------------------------------------------------------------------------------- /code/lspgen/src/hmac_md5.c: -------------------------------------------------------------------------------- 1 | /* 2 | * LSPGEN - HMAC MD5 3 | * 4 | * Hannes Gredler, January 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #include 10 | #include 11 | #include 12 | 13 | /** 14 | * @brief 15 | * 16 | * @param text pointer to data stream 17 | * @param text_len length of data stream 18 | * @param key pointer to authentication key 19 | * @param key_len length of authentication key 20 | * @param digest caller digest to be filled in 21 | */ 22 | void 23 | hmac_md5(unsigned char* text, int text_len, 24 | unsigned char* key, int key_len, 25 | uint8_t* digest) 26 | { 27 | HMAC_CTX *hmac = HMAC_CTX_new(); 28 | HMAC_Init_ex(hmac, key, key_len, EVP_md5(), NULL); 29 | HMAC_Update(hmac, text, text_len); 30 | HMAC_Final(hmac, digest, NULL); 31 | HMAC_CTX_free(hmac); 32 | } -------------------------------------------------------------------------------- /code/lspgen/src/hmac_md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LSPGEN - HMAC MD5 3 | * 4 | * Hannes Gredler, January 2022 5 | * 6 | * Copyright (C) 2020-2025, RtBrick, Inc. 7 | * SPDX-License-Identifier: BSD-3-Clause 8 | */ 9 | #ifndef __HMAC_MD5_H__ 10 | #define __HMAC_MD5_H__ 11 | 12 | void 13 | hmac_md5(unsigned char* text, int text_len, 14 | unsigned char*key, int key_len, 15 | uint8_t* digest); 16 | 17 | #endif -------------------------------------------------------------------------------- /code/lspgen/src/lspgen_isis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic Link State Packet generation for link-state protocols. 3 | * 4 | * IS-IS protocol definitions. 5 | * 6 | * Hannes Gredler, January 2022 7 | * 8 | * Copyright (C) 2015-2022, RtBrick, Inc. 9 | */ 10 | 11 | enum { 12 | ISIS_AUTH_NONE = 0, 13 | ISIS_AUTH_SIMPLE = 1, 14 | ISIS_AUTH_MD5 = 54 15 | }; 16 | 17 | #define ISIS_PDU_L1_LSP 18 18 | #define ISIS_PDU_L2_LSP 20 19 | 20 | #define NLPID_IPV4 0xcc 21 | #define NLPID_IPV6 0x8e 22 | 23 | #define TLV_OVERHEAD 2 24 | 25 | #define ISIS_TLV_AREA 1 26 | #define ISIS_TLV_IS_REACH 2 27 | #define ISIS_TLV_AUTH 10 28 | #define ISIS_TLV_LSP_BUFFER_SIZE 14 29 | #define ISIS_TLV_EXTD_IS_REACH 22 30 | #define ISIS_TLV_INT_IPV4_REACH 128 31 | #define ISIS_TLV_PROTOCOLS 129 32 | #define ISIS_TLV_EXT_IPV4_REACH 130 33 | #define ISIS_TLV_IPV4_ADDR 132 34 | #define ISIS_TLV_EXTD_IPV4_REACH 135 35 | #define ISIS_TLV_HOSTNAME 137 36 | #define ISIS_TLV_BINDING 149 37 | #define ISIS_TLV_IPV6_ADDR 232 38 | #define ISIS_TLV_EXTD_IPV6_REACH 236 39 | #define ISIS_TLV_CAP 242 40 | 41 | #define ISIS_SUBTLV_CAP_SR 2 42 | #define ISIS_SUBTLV_CAP_SR_ALGO 19 43 | 44 | #define ISIS_SUBTLV_IS_EXT_ADJ_SID 31 45 | 46 | #define ISIS_SUBTLV_PREFIX_TAG 1 47 | #define ISIS_SUBTLV_PREFIX_SID 3 48 | #define ISIS_SUBTLV_PREFIX_FLAG 4 49 | 50 | #define ISIS_DEFAULT_LSP_BUFFER_SIZE 1492 51 | -------------------------------------------------------------------------------- /code/lspgen/src/lspgen_ospf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic Link State Packet generation for link-state protocols. 3 | * 4 | * OSPF protocol helper functions. 5 | * 6 | * Hannes Gredler, July 2023 7 | * 8 | * Copyright (C) 2015-2024, RtBrick, Inc. 9 | */ 10 | 11 | #include "lspgen.h" 12 | #include "lspgen_ospf.h" 13 | 14 | /* 15 | * Link State Attributes / name mappings 16 | */ 17 | struct keyval_ ospf_attr_names[] = { 18 | { OSPF_MSG_LSUPDATE, "LS-Update" }, 19 | { OSPF_LSA_ROUTER, "Router-LSA" }, 20 | { OSPF_LSA_EXTERNAL, "External-LSA" }, 21 | { OSPF_LSA_EXTERNAL6, "External-LSA" }, 22 | { OSPF_LSA_INTRA_AREA_PREFIX, "Intra-Area-Prefix-LSA" }, 23 | { OSPF_LSA_E_INTRA_AREA_PREFIX, "Extd-Intra-Area-Prefix-LSA" }, 24 | { OSPF_LSA_OPAQUE_AREA_RI, "Opaque-LSA-RI" }, 25 | { OSPF_LSA_OPAQUE_AREA_EP, "Opaque-LSA-EP" }, 26 | { OSPF_ROUTER_LSA_LINK_PTP, "ptp-link" }, 27 | { OSPF_ROUTER_LSA_LINK_STUB, "ptp-stub" }, 28 | { OSPF_TLV_HOSTNAME, "Hostname" }, 29 | { OSPF_TLV_SID_LABEL_RANGE, "SID/Label-Range" }, 30 | { OSPF_TLV_EXTENDED_PREFIX, "Extended-Prefix" }, 31 | { OSPF_TLV_EXTENDED_PREFIX_RANGE, "Extended-Prefix-Range" }, 32 | { OSPF_TLV_INTRA_AREA_PREFIX, "Intra-Area-Prefix" }, 33 | { OSPF_SUBTLV_PREFIX_SID, "Prefix-SID" }, 34 | { OSPF_IA_PREFIX_LSA_PREFIX, "Prefix" }, 35 | { 0, NULL} 36 | }; 37 | -------------------------------------------------------------------------------- /code/lspgen/src/lspgen_ospf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generic Link State Packet generation for link-state protocols. 3 | * 4 | * OSPF protocol definitions. 5 | * 6 | * Hannes Gredler, July 2023 7 | * 8 | * Copyright (C) 2015-2024, RtBrick, Inc. 9 | */ 10 | 11 | /* 12 | * Those codepoints are purely used for lspgen internal handling. 13 | * They do not (!) represent the IANA allocated codepoints on the wire. 14 | */ 15 | enum { 16 | OSPF_UNKNOWN = 0, 17 | 18 | /* Message Type */ 19 | OSPF_MSG_LSUPDATE, 20 | 21 | /* LSA Type */ 22 | OSPF_LSA_ROUTER, 23 | OSPF_LSA_EXTERNAL, 24 | OSPF_LSA_EXTERNAL6, /* ospf3*/ 25 | OSPF_LSA_INTRA_AREA_PREFIX, /* ospf3 */ 26 | OSPF_LSA_E_INTRA_AREA_PREFIX, /* ospf3, rfc8362 */ 27 | OSPF_LSA_OPAQUE_AREA_RI, 28 | OSPF_LSA_OPAQUE_AREA_EP, /* rfc 7684 */ 29 | 30 | /* Router LSA subtypes */ 31 | OSPF_ROUTER_LSA_LINK_PTP, 32 | OSPF_ROUTER_LSA_LINK_STUB, 33 | 34 | /* Opaque LSA RI TLVs*/ 35 | OSPF_TLV_HOSTNAME, 36 | OSPF_TLV_SID_LABEL_RANGE, 37 | 38 | /* Opaque LSA Extended Prefix TLVs */ 39 | OSPF_TLV_EXTENDED_PREFIX, 40 | OSPF_TLV_EXTENDED_PREFIX_RANGE, 41 | 42 | /* rfc 8362 */ 43 | OSPF_TLV_INTRA_AREA_PREFIX, 44 | 45 | /* rfc 8666 */ 46 | OSPF_SUBTLV_PREFIX_SID, 47 | 48 | /* Inter Area Prefix LSA */ 49 | OSPF_IA_PREFIX_LSA_PREFIX, 50 | }; 51 | 52 | extern struct keyval_ ospf_attr_names[]; 53 | -------------------------------------------------------------------------------- /code/lspgen/test/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lspgen/test/CMakeLists.txt -------------------------------------------------------------------------------- /code/lwip/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) -------------------------------------------------------------------------------- /code/lwip/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001, 2002 Swedish Institute of Computer Science. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 3. The name of the author may not be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 18 | SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 20 | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 23 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 24 | OF SUCH DAMAGE. 25 | 26 | -------------------------------------------------------------------------------- /code/lwip/FEATURES: -------------------------------------------------------------------------------- 1 | lwIP is a small independent implementation of the TCP/IP protocol suite targeted at embedded systems. 2 | 3 | The focus of the lwIP TCP/IP implementation is to reduce resource usage while still having a full scale TCP. This makes lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM. 4 | 5 | Main features include: 6 | - Protocols: IP, IPv6, ICMP, ND, MLD, UDP, TCP, IGMP, ARP, PPPoS, PPPoE, 6LowPAN (via IEEE 802.15.4, BLE or ZEP; since v2.1.0) 7 | - DHCP client, stateless DHCPv6 (since v2.1.0), DNS client (incl. mDNS hostname resolver), AutoIP/APIPA (Zeroconf), ACD (Address Conflict Detection), SNMP agent (v1, v2c, v3 (since v2.1.0), private MIB support & MIB compiler) 8 | - APIs: specialized APIs for enhanced performance & zero copy, optional Berkeley-alike socket API 9 | - Extended features: IP forwarding over multiple network interfaces 10 | - Extended TCP features: congestion control, RTT estimation and fast recovery/fast retransmit, sending SACKs (since v2.1.0), "altcp": nearly transparent TLS for any tcp pcb (since v2.1.0) 11 | - Addon applications: HTTP server (HTTPS via altcp), HTTP(S) client (since v2.1.0), SNTP client, SMTP client (SMTPS via altcp), ping, NetBIOS nameserver, mDNS responder, MQTT client (TLS support since v2.1.0), TFTP server, iPerf2 counterpart 12 | -------------------------------------------------------------------------------- /code/lwip/FILES: -------------------------------------------------------------------------------- 1 | contrib/ - lwIP examples, ports, and small apps (formerly http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git/) 2 | src/ - The source code for the lwIP TCP/IP stack. 3 | doc/ - The documentation for lwIP. 4 | test/ - Some code to test whether the sources do what they should. 5 | 6 | See also the FILES file in each subdirectory. 7 | -------------------------------------------------------------------------------- /code/lwip/codespell_changed_files.sh: -------------------------------------------------------------------------------- 1 | # Copyright 2017 Kaspar Schleiser 2 | # Copyright 2014 Ludwig Knüpfer 3 | # Copyright 2014 Hinnerk van Bruinehsen 4 | # Copyright 2020 Jonathan Demeyer 5 | # 6 | # This file is subject to the terms and conditions of the GNU Lesser 7 | # General Public License v2.1. See the file LICENSE in the top level 8 | # directory for more details. 9 | 10 | changed_files() { 11 | : ${FILEREGEX:='\.([CcHh])$'} 12 | : ${EXCLUDE:=''} 13 | : ${DIFFFILTER:='ACMR'} 14 | 15 | DIFFFILTER="--diff-filter=${DIFFFILTER}" 16 | 17 | # select either all or only touched-in-branch files, filter through FILEREGEX 18 | if [ -z "${BASE_BRANCH}" ]; then 19 | FILES="$(git ls-tree -r --full-tree --name-only HEAD | grep -E ${FILEREGEX})" 20 | else 21 | FILES="$(git diff ${DIFFFILTER} --name-only ${BASE_BRANCH} | grep -E ${FILEREGEX})" 22 | fi 23 | 24 | # filter out negatives 25 | echo "${FILES}" | grep -v -E ${EXCLUDE} 26 | } 27 | -------------------------------------------------------------------------------- /code/lwip/contrib/addons/dhcp_extra_opts/README: -------------------------------------------------------------------------------- 1 | A simple example of using LWIP_HOOK_DHCP_PARSE/APPEND_OPTION hooks to implement: 2 | * DHCP_OPTION_MTU (option 26) to update the netif's MTU 3 | * DHCP_OPTION_CLIENT_ID (option 61) to advertize client's HW id of LWIP_IANA_HWTYPE_ETHERNET type 4 | 5 | Please follow the instructions in dhcp_extra_opts.h to add the hooks, definitions in lwipopts.h and enabling the extra options. 6 | -------------------------------------------------------------------------------- /code/lwip/contrib/addons/tcp_md5/README: -------------------------------------------------------------------------------- 1 | This folder provides an example implementation of how to add custom tcp header 2 | options and custom socket options. 3 | 4 | It does this by implementing the (seldom used) tcp md5 signature. 5 | 6 | To enable it, add an LWIP_HOOK_FILENAME hook file, include tcp_md5.h in it and 7 | define these hooks: 8 | 9 | #define LWIP_HOOK_TCP_INPACKET_PCB(pcb, hdr, optlen, opt1len, opt2, p) tcp_md5_check_inpacket(pcb, hdr, optlen, opt1len, opt2, p) 10 | #define LWIP_HOOK_TCP_OPT_LENGTH_SEGMENT(pcb, internal_len) tcp_md5_get_additional_option_length(pcb, internal_len) 11 | #define LWIP_HOOK_TCP_ADD_TX_OPTIONS(p, hdr, pcb, opts) tcp_md5_add_tx_options(p, hdr, pcb, opts) 12 | #define LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, err) tcp_md5_setsockopt_hook(sock, level, optname, optval, optlen, err) 13 | 14 | Then, in your sockets application, enable md5 signature on a socket like this: 15 | 16 | struct tcp_md5sig md5; 17 | struct sockaddr_storage addr_remote; /* Initialize this to remote address and port */ 18 | memcpy(&md5.tcpm_addr, &addr_remote, sizeof(addr_remote)); 19 | strcpy(md5.tcpm_key, key); /* this is the md5 key per connection */ 20 | md5.tcpm_keylen = strlen(key); 21 | if ((ret = setsockopt(sockfd, IPPROTO_TCP, TCP_MD5SIG, &md5, sizeof(md5))) < 0) { 22 | perror("setsockopt TCP_MD5SIG"); 23 | return; 24 | } 25 | 26 | After that, your connection (client) or all incoming connections (server) require 27 | tcp md5 signatures. 28 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/LwipMibCompiler/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Dieser Code wurde von einem Tool generiert. 4 | // Laufzeitversion:4.0.30319.225 5 | // 6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn 7 | // der Code erneut generiert wird. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace LwipMibViewer.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/MibViewer/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/MibViewer/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/Mibs/RFC-1215: -------------------------------------------------------------------------------- 1 | RFC-1215 DEFINITIONS ::= BEGIN 2 | 3 | IMPORTS 4 | ObjectName 5 | FROM RFC1155-SMI; 6 | 7 | TRAP-TYPE MACRO ::= 8 | BEGIN 9 | TYPE NOTATION ::= "ENTERPRISE" value 10 | (enterprise OBJECT IDENTIFIER) 11 | VarPart 12 | DescrPart 13 | ReferPart 14 | VALUE NOTATION ::= value (VALUE INTEGER) 15 | 16 | VarPart ::= 17 | "VARIABLES" "{" VarTypes "}" 18 | | empty 19 | VarTypes ::= 20 | VarType | VarTypes "," VarType 21 | VarType ::= 22 | value (vartype ObjectName) 23 | 24 | DescrPart ::= 25 | "DESCRIPTION" value (description DisplayString) 26 | | empty 27 | 28 | ReferPart ::= 29 | "REFERENCE" value (reference DisplayString) 30 | | empty 31 | 32 | END 33 | 34 | END 35 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 13:18 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// The AGENT-CAPABILITIES construct is used to specify implementation characteristics of an SNMP agent sub-system with respect to object types and events. 14 | /// 15 | public sealed class AgentCapabilities : EntityBase 16 | { 17 | /// 18 | /// Creates an instance. 19 | /// 20 | /// 21 | /// 22 | /// 23 | public AgentCapabilities(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 24 | : base(module, preAssignSymbols, symbols) 25 | { 26 | } 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 4 | { 5 | public abstract class EntityBase: IEntity 6 | { 7 | private readonly IModule _module; 8 | private string _parent; 9 | private readonly uint _value; 10 | private readonly string _name; 11 | 12 | public EntityBase(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 13 | { 14 | _module = module; 15 | _name = preAssignSymbols[0].ToString(); 16 | 17 | Lexer.ParseOidValue(symbols, out _parent, out _value); 18 | } 19 | 20 | public IModule Module 21 | { 22 | get { return _module; } 23 | } 24 | 25 | public string Parent 26 | { 27 | get { return _parent; } 28 | set { _parent = value; } 29 | } 30 | 31 | public uint Value 32 | { 33 | get { return _value; } 34 | } 35 | 36 | public string Name 37 | { 38 | get { return _name; } 39 | } 40 | 41 | public virtual string Description 42 | { 43 | get { return string.Empty; } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:35 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of ModuleComplianceNode. 14 | /// 15 | public sealed class ModuleCompliance : EntityBase 16 | { 17 | public ModuleCompliance(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs: -------------------------------------------------------------------------------- 1 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 2 | { 3 | public sealed class ModuleIdentity : EntityBase 4 | { 5 | public ModuleIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 6 | : base(module, preAssignSymbols, symbols) 7 | { 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:34 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of NotificationGroupNode. 14 | /// 15 | public sealed class NotificationGroup : EntityBase 16 | { 17 | public NotificationGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 3 | { 4 | public sealed class NotificationType : EntityBase 5 | { 6 | public NotificationType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 7 | : base(module, preAssignSymbols, symbols) 8 | { 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/21 5 | * Time: 19:27 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 11 | { 12 | /// 13 | /// Description of ObjectGroupNode. 14 | /// 15 | public sealed class ObjectGroup : EntityBase 16 | { 17 | public ObjectGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 18 | : base(module, preAssignSymbols, symbols) 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 3 | { 4 | /// 5 | /// Object identifier node. 6 | /// 7 | public sealed class ObjectIdentity : EntityBase 8 | { 9 | 10 | /// 11 | /// Creates a . 12 | /// 13 | /// Module name 14 | /// Header 15 | /// Lexer 16 | public ObjectIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 17 | : base(module, preAssignSymbols, symbols) 18 | { 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/17 5 | * Time: 20:49 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | using System; 11 | 12 | namespace Lextm.SharpSnmpLib.Mib.Elements.Entities 13 | { 14 | /// 15 | /// Object identifier node. 16 | /// 17 | public sealed class OidValueAssignment : EntityBase 18 | { 19 | /// 20 | /// Creates a . 21 | /// 22 | /// Module 23 | /// Name 24 | /// Lexer 25 | public OidValueAssignment(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 26 | : base(module, preAssignSymbols, symbols) 27 | { 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib.Elements 7 | { 8 | public interface IDeclaration: IElement 9 | { 10 | /// 11 | /// Name. 12 | /// 13 | string Name 14 | { 15 | get; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs: -------------------------------------------------------------------------------- 1 | // Construct interface. 2 | // Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | namespace Lextm.SharpSnmpLib.Mib.Elements 19 | { 20 | /// 21 | /// Construct interface. 22 | /// 23 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] 24 | public interface IElement 25 | { 26 | /// 27 | /// Containing module. 28 | /// 29 | IModule Module 30 | { 31 | get; 32 | } 33 | 34 | } 35 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs: -------------------------------------------------------------------------------- 1 | using Lextm.SharpSnmpLib.Mib.Elements.Types; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements 4 | { 5 | public interface ITypeReferrer 6 | { 7 | ITypeAssignment ReferredType { get; set; } 8 | ITypeAssignment BaseType { get; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 12:20 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements 11 | { 12 | public sealed class TrapType : IDeclaration 13 | { 14 | private readonly IModule _module; 15 | private readonly string _name; 16 | private readonly int _value; 17 | 18 | public TrapType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 19 | { 20 | _module = module; 21 | _name = preAssignSymbols[0].ToString(); 22 | 23 | Symbol valueSymbol = symbols.NextNonEOLSymbol(); 24 | 25 | bool succeeded = int.TryParse(valueSymbol.ToString(), out _value); 26 | valueSymbol.Assert(succeeded, "not a decimal"); 27 | } 28 | 29 | public int Value 30 | { 31 | get { return _value; } 32 | } 33 | 34 | #region IDeclaration Member 35 | 36 | public IModule Module 37 | { 38 | get { return _module; } 39 | } 40 | 41 | public string Name 42 | { 43 | get { return _name; } 44 | } 45 | 46 | #endregion 47 | } 48 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 5 | { 6 | public class BitsType : BaseType 7 | { 8 | private ValueMap _map; 9 | 10 | public BitsType(IModule module, string name, ISymbolEnumerator symbols) 11 | : base(module, name) 12 | { 13 | _map = Lexer.DecodeEnumerations(symbols); 14 | } 15 | 16 | public ValueMap Map 17 | { 18 | get { return _map; } 19 | } 20 | 21 | public string this[int value] 22 | { 23 | get { return _map[value]; } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Created by SharpDevelop. 3 | * User: lextm 4 | * Date: 2008/5/31 5 | * Time: 11:39 6 | * 7 | * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 | */ 9 | 10 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 11 | { 12 | /// 13 | /// The CHOICE type represents a list of alternatives.. 14 | /// 15 | public sealed class Choice : BaseType 16 | { 17 | /// 18 | /// Creates a instance. 19 | /// 20 | /// 21 | /// 22 | /// 23 | public Choice(IModule module, string name, ISymbolEnumerator symbols) 24 | : base(module, name) 25 | { 26 | while (symbols.NextNonEOLSymbol() != Symbol.OpenBracket) 27 | { 28 | } 29 | 30 | while (symbols.NextNonEOLSymbol() != Symbol.CloseBracket) 31 | { 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs: -------------------------------------------------------------------------------- 1 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 2 | { 3 | public interface ITypeAssignment : IDeclaration 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class IpAddressType : OctetStringType 5 | { 6 | public IpAddressType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name, symbols) 8 | { 9 | if (this.Size.Count != 0) 10 | { 11 | throw new MibException("Size definition not allowed for IpAddress type!"); 12 | } 13 | 14 | // IpAddress type is defined as: 15 | // IpAddress ::= 16 | // [APPLICATION 0] 17 | // IMPLICIT OCTET STRING (SIZE (4)) 18 | this.Size.Add(new ValueRange(4, null)); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public sealed class Macro : ITypeAssignment 5 | { 6 | private IModule _module; 7 | private string _name; 8 | 9 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "temp")] 10 | public Macro(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) 11 | { 12 | _module = module; 13 | _name = preAssignSymbols[0].ToString(); 14 | 15 | while (symbols.NextNonEOLSymbol() != Symbol.Begin) 16 | { 17 | } 18 | 19 | while (symbols.NextNonEOLSymbol() != Symbol.End) 20 | { 21 | } 22 | } 23 | 24 | public IModule Module 25 | { 26 | get { return _module; } 27 | } 28 | 29 | public string Name 30 | { 31 | get { return _name; } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class ObjectIdentifierType : BaseType 5 | { 6 | public ObjectIdentifierType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 4 | { 5 | public class OctetStringType : BaseType 6 | { 7 | private ValueRanges _size; 8 | 9 | public OctetStringType(IModule module, string name, ISymbolEnumerator symbols) 10 | : base(module, name) 11 | { 12 | Symbol current = symbols.NextNonEOLSymbol(); 13 | if (current == Symbol.OpenParentheses) 14 | { 15 | symbols.PutBack(current); 16 | _size = Lexer.DecodeRanges(symbols); 17 | current.Assert(_size.IsSizeDeclaration, "SIZE keyword is required for ranges of octet string!"); 18 | } 19 | else 20 | { 21 | symbols.PutBack(current); 22 | _size = new ValueRanges(isSizeDecl: true); 23 | } 24 | } 25 | 26 | public ValueRanges Size 27 | { 28 | get { return _size; } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 3 | { 4 | public class OpaqueType : OctetStringType 5 | { 6 | public OpaqueType(IModule module, string name, ISymbolEnumerator symbols) 7 | : base(module, name, symbols) 8 | { 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types 4 | { 5 | /// 6 | /// The SEQUENCE OF type represents a list of data sets.. 7 | /// 8 | public sealed class SequenceOf : BaseType 9 | { 10 | private string _type; 11 | 12 | public SequenceOf(IModule module, string name, ISymbolEnumerator sym) 13 | : base(module, name) 14 | { 15 | _type = sym.NextNonEOLSymbol().ToString(); 16 | } 17 | 18 | public string Type 19 | { 20 | get { return _type; } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Lextm.SharpSnmpLib.Mib 4 | { 5 | public interface ISymbolEnumerator: IEnumerator 6 | { 7 | bool PutBack(Symbol item); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib 7 | { 8 | public enum MaxAccess 9 | { 10 | notAccessible, 11 | accessibleForNotify, 12 | readOnly, 13 | readWrite, 14 | readCreate 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Lextm.SharpSnmpLib.Mib 7 | { 8 | public enum Status 9 | { 10 | current, 11 | deprecated, 12 | obsolete, 13 | mandatory, 14 | optional 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/readme.txt: -------------------------------------------------------------------------------- 1 | See docs in src/apps/snmp/snmp_core.c. 2 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk -------------------------------------------------------------------------------- /code/lwip/contrib/apps/LwipMibCompiler/example/compile_udp_mib.sh: -------------------------------------------------------------------------------- 1 | ../LwipMibCompiler/bin/Debug/LwipMibCompiler.exe ../Mibs/UDP-MIB ./ ../Mibs/ 2 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/chargen/chargen.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_CHARGEN_H 2 | #define LWIP_CHARGEN_H 3 | 4 | #include "lwip/opt.h" 5 | 6 | #if LWIP_SOCKET 7 | 8 | void chargen_init(void); 9 | 10 | #endif /* LWIP_SOCKET */ 11 | 12 | #endif /* LWIP_CHARGEN_H */ 13 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/httpserver/README: -------------------------------------------------------------------------------- 1 | HTTPSERVER 2 | 3 | This is a demonstration of how to make the most basic kind 4 | of server using lWIP. 5 | 6 | * httpserver-raw.c - uses raw TCP calls (coming soon!) 7 | 8 | * httpserver-netconn.c - uses netconn and netbuf API 9 | 10 | This code updates the examples in Adam Dunkel's original 11 | lwIP documentation to match changes in the code since that 12 | PDF release. 13 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/httpserver/httpserver-netconn.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HTTPSERVER_NETCONN_H 2 | #define LWIP_HTTPSERVER_NETCONN_H 3 | 4 | void http_server_netconn_init(void); 5 | 6 | #endif /* LWIP_HTTPSERVER_NETCONN_H */ 7 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/netio/netio.c: -------------------------------------------------------------------------------- 1 | #include "netio.h" 2 | 3 | #include "lwip/opt.h" 4 | #include "lwip/tcp.h" 5 | 6 | /* See http://www.nwlab.net/art/netio/netio.html to get the netio tool */ 7 | 8 | #if LWIP_TCP && LWIP_CALLBACK_API 9 | static err_t 10 | netio_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) 11 | { 12 | LWIP_UNUSED_ARG(arg); 13 | 14 | if (err == ERR_OK && p != NULL) { 15 | tcp_recved(pcb, p->tot_len); 16 | pbuf_free(p); 17 | } else { 18 | pbuf_free(p); 19 | } 20 | 21 | if (err == ERR_OK && p == NULL) { 22 | tcp_arg(pcb, NULL); 23 | tcp_sent(pcb, NULL); 24 | tcp_recv(pcb, NULL); 25 | tcp_close(pcb); 26 | } 27 | 28 | return ERR_OK; 29 | } 30 | 31 | static err_t 32 | netio_accept(void *arg, struct tcp_pcb *pcb, err_t err) 33 | { 34 | LWIP_UNUSED_ARG(arg); 35 | LWIP_UNUSED_ARG(err); 36 | 37 | if (pcb != NULL) { 38 | tcp_arg(pcb, NULL); 39 | tcp_sent(pcb, NULL); 40 | tcp_recv(pcb, netio_recv); 41 | } 42 | return ERR_OK; 43 | } 44 | 45 | void 46 | netio_init(void) 47 | { 48 | struct tcp_pcb *pcb; 49 | 50 | pcb = tcp_new_ip_type(IPADDR_TYPE_ANY); 51 | tcp_bind(pcb, IP_ANY_TYPE, 18767); 52 | pcb = tcp_listen(pcb); 53 | tcp_accept(pcb, netio_accept); 54 | } 55 | #endif /* LWIP_TCP && LWIP_CALLBACK_API */ 56 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/netio/netio.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_NETIO_H 2 | #define LWIP_NETIO_H 3 | 4 | void netio_init(void); 5 | 6 | #endif /* LWIP_NETIO_H */ 7 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/ping/ping.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PING_H 2 | #define LWIP_PING_H 3 | 4 | #include "lwip/ip_addr.h" 5 | 6 | /** 7 | * PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used 8 | */ 9 | #ifndef PING_USE_SOCKETS 10 | #define PING_USE_SOCKETS LWIP_SOCKET 11 | #endif 12 | 13 | void ping_init(const ip_addr_t* ping_addr); 14 | void ping_stop(void); 15 | 16 | #if !PING_USE_SOCKETS 17 | void ping_send_now(void); 18 | #endif /* !PING_USE_SOCKETS */ 19 | 20 | #endif /* LWIP_PING_H */ 21 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/rtp/rtp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_RTP_H 2 | #define LWIP_RTP_H 3 | 4 | #if LWIP_SOCKET && LWIP_IGMP 5 | void rtp_init(void); 6 | #endif /* LWIP_SOCKET && LWIP_IGMP */ 7 | 8 | #endif /* LWIP_RTP_H */ 9 | -------------------------------------------------------------------------------- /code/lwip/contrib/apps/socket_examples/socket_examples.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SOCKET_EXAMPLES_H 2 | #define LWIP_SOCKET_EXAMPLES_H 3 | 4 | void socket_examples_init(void); 5 | 6 | #endif /* LWIP_SOCKET_EXAMPLES_H */ 7 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/lwippools.h: -------------------------------------------------------------------------------- 1 | /* OPTIONAL: Pools to replace heap allocation 2 | * Optional: Pools can be used instead of the heap for mem_malloc. If 3 | * so, these should be defined here, in increasing order according to 4 | * the pool element size. 5 | * 6 | * LWIP_MALLOC_MEMPOOL(number_elements, element_size) 7 | */ 8 | #if MEM_USE_POOLS 9 | LWIP_MALLOC_MEMPOOL_START 10 | LWIP_MALLOC_MEMPOOL(100, 256) 11 | LWIP_MALLOC_MEMPOOL(50, 512) 12 | LWIP_MALLOC_MEMPOOL(20, 1024) 13 | LWIP_MALLOC_MEMPOOL(20, 1536) 14 | LWIP_MALLOC_MEMPOOL_END 15 | #endif /* MEM_USE_POOLS */ 16 | 17 | /* Optional: Your custom pools can go here if you would like to use 18 | * lwIP's memory pools for anything else. 19 | */ 20 | LWIP_MEMPOOL(SYS_MBOX, 22, 100, "SYS_MBOX") 21 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/ppp_settings.h: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #pragma warning (disable: 4242) /* PPP only: conversion from 'x' to 'y', possible loss of data */ 3 | #pragma warning (disable: 4244) /* PPP only: conversion from 'x' to 'y', possible loss of data (again?) */ 4 | #pragma warning (disable: 4310) /* PPP only: cast truncates constant value */ 5 | #pragma warning (disable: 4706) /* PPP only: assignment within conditional expression */ 6 | #endif /* MSC_VER */ 7 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_no_tcp_dualstack.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_dualstack.h" 2 | 3 | #undef LWIP_TCP 4 | #define LWIP_TCP 0 5 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_no_tcp_ipv4only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv4only.h" 2 | 3 | #undef LWIP_TCP 4 | #define LWIP_TCP 0 5 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_no_tcp_ipv6only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv6only.h" 2 | 3 | #undef LWIP_TCP 4 | #define LWIP_TCP 0 5 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_no_udp_dualstack.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_dualstack.h" 2 | 3 | #undef LWIP_UDP 4 | #define LWIP_UDP 0 5 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_no_udp_ipv4only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv4only.h" 2 | 3 | #undef LWIP_UDP 4 | #define LWIP_UDP 0 5 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_no_udp_ipv6only.h: -------------------------------------------------------------------------------- 1 | #include "test_configs/opt_ipv6only.h" 2 | 3 | #undef LWIP_UDP 4 | #define LWIP_UDP 0 5 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/example_app/test_configs/opt_none.h: -------------------------------------------------------------------------------- 1 | /* test and empty lwipopts.h file */ 2 | 3 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/httpd/examples_fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/httpd/examples_fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/contrib/examples/httpd/examples_fs/img/sics.gif -------------------------------------------------------------------------------- /code/lwip/contrib/examples/httpd/examples_fs/login.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 7 | 10 | 22 | 25 | 26 |
8 | SICS logo 9 | 11 |

Login

12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
23 |   24 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/httpd/examples_fs/loginfail.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 7 | 10 | 19 | 22 | 23 |
8 | SICS logo 9 | 11 |

lwIP - A Lightweight TCP/IP Stack

12 |

13 | Login failed. 14 |

15 |

16 | Click here to retry login. 17 |

18 |
20 |   21 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/httpd/examples_fs/session.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 7 | 10 | 19 | 22 | 23 |
8 | SICS logo 9 | 11 |

lwIP - A Lightweight TCP/IP Stack

12 |

13 | Login succeeded, session active. 14 |

15 |

16 | Click here to retry login. 17 |

18 |
20 |   21 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/snmp/snmp_private_mib/private_mib.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Exports Private lwIP MIB 4 | */ 5 | 6 | #ifndef LWIP_HDR_PRIVATE_MIB_H 7 | #define LWIP_HDR_PRIVATE_MIB_H 8 | 9 | #include "lwip/apps/snmp_opts.h" 10 | 11 | #include "lwip/apps/snmp_core.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /* export MIB */ 18 | extern const struct snmp_mib mib_private; 19 | 20 | void lwip_privmib_init(void); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /code/lwip/contrib/examples/tftp/tftp_example.h: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | /* 8 | * File: tftp_example.h 9 | * Author: dziegel 10 | * 11 | * Created on February 17, 2018, 3:43 PM 12 | */ 13 | 14 | #ifndef TFTP_EXAMPLE_H 15 | #define TFTP_EXAMPLE_H 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void tftp_example_init_server(void); 22 | void tftp_example_init_client(void); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif /* TFTP_EXAMPLE_H */ 29 | 30 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/README: -------------------------------------------------------------------------------- 1 | This port contains infrastructure and examples for running lwIP on Unix-like 2 | operating systems (Linux, OpenBSD, cygwin). Much of this is targeted towards 3 | testing lwIP applications. 4 | 5 | * port/sys_arch.c, port/perf.c, port/include/arch/: Generic platform porting, 6 | for both states of NO_SYS. (Mapping debugging to printf, providing 7 | sys_now & co from the system time etc.) 8 | 9 | * check: Runs the unit tests shipped with main lwIP on the Unix port. 10 | 11 | * port/netif, port/include/netif: Various network interface implementations and 12 | their helpers, some explicitly for Unix infrastructure, some generic (but most 13 | useful on an easy to debug system): 14 | 15 | * fifo: Helper for sio 16 | 17 | * list: Helper for unixif 18 | 19 | * pcapif: Network interface that replays packages from a PCAP dump file, and 20 | discards packages sent out from it 21 | 22 | * sio: Mapping Unix character devices to lwIP's sio mechanisms 23 | 24 | * tapif: Network interface that is mapped to a tap interface (Unix user 25 | space layer 2 network device). Uses lwIP threads. 26 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/check/README: -------------------------------------------------------------------------------- 1 | 2 | Helper files to run lwIP unit tests on unix-like systems. 3 | 4 | 1. Install the check library, through a package manager or from https://libcheck.github.io/check/ 5 | 2. Put the lwip code in a directory called 'lwip' 6 | 3. Run `make check` 7 | 4. Make sure all tests pass 8 | 9 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/check/config.h: -------------------------------------------------------------------------------- 1 | /* Enable this to simplify debugging */ 2 | /* #define LWIP_UNITTESTS_NOFORK */ 3 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/example_app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) 2 | 3 | set (LWIP_INCLUDE_DIRS 4 | "${LWIP_DIR}/src/include" 5 | "${LWIP_DIR}/contrib/" 6 | "${LWIP_DIR}/contrib/ports/unix/port/include" 7 | "${LWIP_DIR}/contrib/examples/example_app" 8 | ) 9 | 10 | include(${LWIP_DIR}/src/Filelists.cmake) 11 | include(${LWIP_DIR}/contrib/Filelists.cmake) 12 | include(${LWIP_DIR}/contrib/ports/unix/Filelists.cmake) 13 | 14 | add_executable(example_app ${LWIP_DIR}/contrib/examples/example_app/test.c default_netif.c) 15 | target_include_directories(example_app PRIVATE ${LWIP_INCLUDE_DIRS}) 16 | target_compile_options(example_app PRIVATE ${LWIP_COMPILER_FLAGS}) 17 | target_compile_definitions(example_app PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) 18 | target_link_libraries(example_app ${LWIP_SANITIZER_LIBS} lwipcontribexamples lwipcontribapps lwipcontribaddons lwipallapps lwipcontribportunix lwipcore lwipmbedtls) 19 | 20 | add_executable(makefsdata ${lwipmakefsdata_SRCS}) 21 | target_compile_options(makefsdata PRIVATE ${LWIP_COMPILER_FLAGS}) 22 | target_include_directories(makefsdata PRIVATE ${LWIP_INCLUDE_DIRS}) 23 | target_link_libraries(makefsdata ${LWIP_SANITIZER_LIBS}) 24 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/example_app/iteropts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LOGFILE=iteropts.log 4 | EXAPPDIR=../../../examples/example_app 5 | RETVAL=0 6 | 7 | pushd `dirname "$0"` 8 | pwd 9 | echo Starting Iteropts run >> $LOGFILE 10 | for f in $EXAPPDIR/test_configs/*.h 11 | do 12 | echo Cleaning... 13 | make clean > /dev/null 14 | BUILDLOG=$(basename "$f" ".h").log 15 | echo testing $f 16 | echo testing $f >> $LOGFILE 17 | rm -f $EXAPPDIR/lwipopts_test.h 18 | # cat the file to update its timestamp 19 | cat $f > $EXAPPDIR/lwipopts_test.h 20 | make TESTFLAGS="-DLWIP_OPTTEST_FILE -Wno-documentation" -j 4 1> $BUILDLOG 2>&1 21 | ERR=$? 22 | if [ $ERR != 0 ]; then 23 | cat $BUILDLOG 24 | echo file $f failed with $ERR >> $LOGFILE 25 | echo ++++++++ $f FAILED +++++++ 26 | RETVAL=1 27 | fi 28 | echo test $f done >> $LOGFILE 29 | done 30 | echo done, cleaning 31 | make clean > /dev/null 32 | popd 33 | echo Exit value: $RETVAL 34 | exit $RETVAL 35 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | 3 | project(lwip C) 4 | 5 | set (BUILD_SHARED_LIBS ON) 6 | 7 | if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "GNU") 8 | message(FATAL_ERROR "Lwip shared library is only working on Linux or the Hurd") 9 | endif() 10 | 11 | set(LWIP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../..) 12 | include(${LWIP_DIR}/contrib/ports/CMakeCommon.cmake) 13 | 14 | set (LWIP_DEFINITIONS -DLWIP_DEBUG) 15 | set (LWIP_INCLUDE_DIRS 16 | "${LWIP_DIR}/src/include" 17 | "${LWIP_CONTRIB_DIR}/" 18 | "${LWIP_CONTRIB_DIR}/ports/unix/port/include" 19 | "${CMAKE_CURRENT_SOURCE_DIR}/" 20 | ) 21 | 22 | set (LWIP_EXCLUDE_SLIPIF TRUE) 23 | include(${LWIP_CONTRIB_DIR}/ports/unix/Filelists.cmake) 24 | include(${LWIP_DIR}/src/Filelists.cmake) 25 | 26 | add_library(lwip ${lwipnoapps_SRCS} ${lwipcontribportunix_SRCS} ${lwipcontribportunixnetifs_SRCS}) 27 | target_compile_options(lwip PRIVATE ${LWIP_COMPILER_FLAGS}) 28 | target_compile_definitions(lwip PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS}) 29 | target_include_directories(lwip PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS}) 30 | target_link_libraries(lwip ${LWIP_SANITIZER_LIBS}) 31 | 32 | find_library(LIBPTHREAD pthread) 33 | target_link_libraries(lwip ${LIBPTHREAD}) 34 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/lib/README: -------------------------------------------------------------------------------- 1 | This directory contains an example of how to compile lwIP as a shared library 2 | on Linux. 3 | 4 | Some brief instructions: 5 | 6 | * Compile the code: 7 | 8 | > mkdir build 9 | > cd build 10 | > cmake .. 11 | > make clean all 12 | 13 | This should produce liblwip.so. This is the shared library. 14 | 15 | * Link an application against the shared library 16 | 17 | If you're using gcc you can do this by including -llwip in your link command. 18 | 19 | * Run your application 20 | 21 | Ensure that LD_LIBRARY_PATH includes the directory that contains liblwip.so 22 | (ie. this directory) 23 | 24 | 25 | If you are unsure about shared libraries and libraries on linux in 26 | general, you might find this HOWTO useful: 27 | 28 | 29 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/port/include/netif/list.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LWIP_LIST_H 3 | #define LWIP_LIST_H 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | struct elem; 10 | 11 | struct list { 12 | struct elem *first, *last; 13 | int size, elems; 14 | }; 15 | 16 | struct elem { 17 | struct elem *next; 18 | void *data; 19 | }; 20 | 21 | struct list *list_new(int size); 22 | int list_push(struct list *list, void *data); 23 | void *list_pop(struct list *list); 24 | void *list_first(struct list *list); 25 | int list_elems(struct list *list); 26 | void list_delete(struct list *list); 27 | int list_remove(struct list *list, void *elem); 28 | void list_map(struct list *list, void (* func)(void *arg)); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/posixlib/Uninstall.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") 3 | 4 | if(NOT EXISTS ${MANIFEST}) 5 | message(FATAL_ERROR "Cannot find install manifest: '${MANIFEST}'") 6 | endif() 7 | 8 | file(STRINGS ${MANIFEST} files) 9 | foreach(file ${files}) 10 | if(EXISTS ${file} OR IS_SYMLINK ${file}) 11 | message(STATUS "Removing: ${file}") 12 | 13 | execute_process( 14 | COMMAND rm -f ${file} 15 | RESULT_VARIABLE retcode 16 | ) 17 | 18 | if(NOT "${retcode}" STREQUAL "0") 19 | message(WARNING "Failed to remove: ${file}") 20 | endif() 21 | endif() 22 | endforeach(file) 23 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/posixlib/include/posix/inet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/contrib/ports/unix/posixlib/include/posix/inet.h -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/posixlib/include/posix/sockets.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/contrib/ports/unix/posixlib/include/posix/sockets.h -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/posixlib/lwipopts.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/contrib/ports/unix/posixlib/lwipopts.h -------------------------------------------------------------------------------- /code/lwip/contrib/ports/unix/setup-tapif: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script needs bridge-util debian package or similar 4 | # for other distros. 5 | 6 | # Run using "source setup-tapif" to get exported PRECONFIGURED_TAPIF variable 7 | # Alternatively, add "export PRECONFIGURED_TAPIF=tap0" to ~/.bashrc 8 | 9 | # http://backreference.org/2010/03/26/tuntap-interface-tutorial/ 10 | 11 | # After executing this script, start example_app. 12 | # Enter 192.168.1.200 or "http://lwip.local/" (Zeroconf) 13 | # in your webbrowser to see example_app webpage. 14 | 15 | export PRECONFIGURED_TAPIF=tap0 16 | 17 | sudo ip tuntap add dev $PRECONFIGURED_TAPIF mode tap user `whoami` 18 | sudo ip link set $PRECONFIGURED_TAPIF up 19 | sudo brctl addbr lwipbridge 20 | sudo brctl addif lwipbridge $PRECONFIGURED_TAPIF 21 | sudo ip addr add 192.168.1.1/24 dev lwipbridge 22 | sudo ip link set dev lwipbridge up 23 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/check/check_stdint.h: -------------------------------------------------------------------------------- 1 | /* deliberateliy empty */ 2 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/check/config.h: -------------------------------------------------------------------------------- 1 | /* config.h for check-0.11.0 on win32 under MSVC/MinGW */ 2 | 3 | #ifdef _MSC_VER 4 | 5 | typedef unsigned int pid_t; 6 | typedef unsigned int uint32_t; 7 | 8 | typedef int ssize_t; 9 | 10 | #define HAVE_DECL_STRDUP 1 11 | #define HAVE_DECL_FILENO 1 12 | #define HAVE_DECL_PUTENV 1 13 | 14 | #define _CRT_SECURE_NO_WARNINGS 15 | 16 | /* disable some warnings */ 17 | #pragma warning (disable: 4090) /* const assigned to non-const */ 18 | #pragma warning (disable: 4996) /* fileno is deprecated */ 19 | 20 | #endif /* _ MSC_VER */ 21 | 22 | 23 | #define LWIP_UNITTESTS_NOFORK 24 | 25 | #include 26 | #include 27 | 28 | typedef unsigned int clockid_t; 29 | typedef unsigned int timer_t; 30 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/check/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_STDBOOL_H 2 | #define MY_STDBOOL_H 3 | 4 | typedef int bool; 5 | #define true 1 6 | #define false 0 7 | #define __bool_true_false_are_defined 1 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/check/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SYS__TIME_H 2 | #define LWIP_SYS__TIME_H 3 | 4 | #include /* time_t */ 5 | 6 | struct timeval { 7 | time_t tv_sec; /* seconds */ 8 | long tv_usec; /* and microseconds */ 9 | }; 10 | int gettimeofday(struct timeval* tp, void* tzp); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/check/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_UNISTD_H 2 | #define LWIP_UNISTD_H 3 | 4 | /* include io.h for read() and write() */ 5 | #include 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/include/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(push,1) 2 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/include/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(pop) 2 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/msvc/lwIP_pcapif.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {0d38b8c3-e694-4572-89b8-fc6e825a092d} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {e5ce29d5-319e-4e99-978b-b88e8d6167e4} 10 | 11 | 12 | 13 | 14 | Source Files 15 | 16 | 17 | Source Files 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/msvc/makefsdata.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Quelldateien 12 | 13 | 14 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/pcapif.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PCAPIF_H 2 | #define LWIP_PCAPIF_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "lwip/err.h" 9 | 10 | /** Set to 1 to let rx use an own thread (only for NO_SYS==0). 11 | * If set to 0, ethernetif_poll is used to poll for packets. 12 | */ 13 | #ifndef PCAPIF_RX_USE_THREAD 14 | #define PCAPIF_RX_USE_THREAD !NO_SYS 15 | #endif 16 | #if PCAPIF_RX_USE_THREAD && NO_SYS 17 | #error "Can't create a dedicated RX thread with NO_SYS==1" 18 | #endif 19 | 20 | struct netif; 21 | 22 | err_t pcapif_init (struct netif *netif); 23 | void pcapif_shutdown(struct netif *netif); 24 | #if !PCAPIF_RX_USE_THREAD 25 | void pcapif_poll (struct netif *netif); 26 | #endif /* !PCAPIF_RX_USE_THREAD */ 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif /* LWIP_PCAPIF_H */ 33 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/pcapif_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_PCAPIF_HELPER_H 2 | #define LWIP_PCAPIF_HELPER_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | struct pcapifh_linkstate; 11 | 12 | enum pcapifh_link_event { 13 | PCAPIF_LINKEVENT_UNKNOWN, 14 | PCAPIF_LINKEVENT_UP, 15 | PCAPIF_LINKEVENT_DOWN 16 | }; 17 | 18 | struct pcapifh_linkstate* pcapifh_linkstate_init(char *adapter_name); 19 | enum pcapifh_link_event pcapifh_linkstate_get(struct pcapifh_linkstate* state); 20 | void pcapifh_linkstate_close(struct pcapifh_linkstate* state); 21 | 22 | void *pcapifh_alloc_readonly_copy(void *data, size_t len); 23 | void pcapifh_free_readonly_mem(void *data); 24 | 25 | void pcapifh_init_npcap(void); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif /* LWIP_PCAPIF_HELPER_H */ 32 | -------------------------------------------------------------------------------- /code/lwip/contrib/ports/win32/readme.txt: -------------------------------------------------------------------------------- 1 | lwIP for Win32 2 | 3 | This is an example port of lwIP for Win32. It uses WinPCAP to send & receive packets. 4 | To compile it, use the MSVC projects in the 'msvc' subdir, the CMake files, or the Makefile 5 | in the 'mingw' subdir. 6 | 7 | For all compilers/build systems: 8 | - you have to set an environment variable PCAP_DIR pointing to the WinPcap Developer's 9 | Pack (containing 'include' and 'lib') 10 | alternatively, place the WinPcap Developer's pack next to the "lwip" folder: 11 | "winpcap\WpdPack" 12 | 13 | You also will have to copy the file 'contrib/examples/example_app/lwipcfg.h.example' to 14 | 'contrib/examples/example_app/lwipcfg.h' and modify to suit your needs (WinPcap adapter number, 15 | IP configuration, applications...). 16 | 17 | Included in the contrib\ports\win32 directory is the network interface driver 18 | using the winpcap library. 19 | 20 | lwIP: http://savannah.nongnu.org/projects/lwip/ 21 | WinPCap: https://www.winpcap.org/devel.htm 22 | Visual C++: http://www.microsoft.com/express/download/ 23 | 24 | To compile the unittests (msvc\lwIP_unittests.sln), download check (tested with v0.11.0) from 25 | https://github.com/libcheck/check/releases/ 26 | and place it in a folder "check" next to the "contrib" folder. 27 | -------------------------------------------------------------------------------- /code/lwip/doc/FILES: -------------------------------------------------------------------------------- 1 | doxygen/ - Configuration files and scripts to create the lwIP doxygen source 2 | documentation (found at http://www.nongnu.org/lwip/) 3 | 4 | savannah.txt - How to obtain the current development source code. 5 | contrib.txt - How to contribute to lwIP as a developer. 6 | ppp.txt - Documentation of the PPP interface for lwIP. 7 | -------------------------------------------------------------------------------- /code/lwip/doc/ZeroCopyRx.c: -------------------------------------------------------------------------------- 1 | typedef struct my_custom_pbuf 2 | { 3 | struct pbuf_custom p; 4 | void* dma_descriptor; 5 | } my_custom_pbuf_t; 6 | 7 | LWIP_MEMPOOL_DECLARE(RX_POOL, 10, sizeof(my_custom_pbuf_t), "Zero-copy RX PBUF pool"); 8 | 9 | void my_pbuf_free_custom(void* p) 10 | { 11 | SYS_ARCH_DECL_PROTECT(old_level); 12 | 13 | my_custom_pbuf_t* my_puf = (my_custom_pbuf_t*)p; 14 | 15 | // invalidate data cache here - lwIP and/or application may have written into buffer! 16 | // (invalidate is faster than flushing, and no one needs the correct data in the buffer) 17 | invalidate_cpu_cache(p->payload, p->tot_len); 18 | 19 | SYS_ARCH_PROTECT(old_level); 20 | free_rx_dma_descriptor(my_pbuf->dma_descriptor); 21 | LWIP_MEMPOOL_FREE(RX_POOL, my_pbuf); 22 | SYS_ARCH_UNPROTECT(old_level); 23 | } 24 | 25 | void eth_rx_irq() 26 | { 27 | dma_descriptor* dma_desc = get_RX_DMA_descriptor_from_ethernet(); 28 | my_custom_pbuf_t* my_pbuf = (my_custom_pbuf_t*)LWIP_MEMPOOL_ALLOC(RX_POOL); 29 | 30 | my_pbuf->p.custom_free_function = my_pbuf_free_custom; 31 | my_pbuf->dma_descriptor = dma_desc; 32 | 33 | invalidate_cpu_cache(dma_desc->rx_data, dma_desc->rx_length); 34 | 35 | struct pbuf* p = pbuf_alloced_custom(PBUF_RAW, 36 | dma_desc->rx_length, 37 | PBUF_REF, 38 | &my_pbuf->p, 39 | dma_desc->rx_data, 40 | dma_desc->max_buffer_size); 41 | 42 | if(netif->input(p, netif) != ERR_OK) { 43 | pbuf_free(p); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /code/lwip/doc/doxygen/generate.bat: -------------------------------------------------------------------------------- 1 | doxygen lwip.Doxyfile 2 | -------------------------------------------------------------------------------- /code/lwip/doc/doxygen/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | doxygen lwip.Doxyfile 4 | -------------------------------------------------------------------------------- /code/lwip/doc/doxygen/output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirection 5 | 6 | 7 | 8 | index.html 9 | 10 | 11 | -------------------------------------------------------------------------------- /code/lwip/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | apps/ - Higher layer applications that are specifically programmed 5 | with the lwIP low-level raw API. 6 | 7 | core/ - The core of the TPC/IP stack; protocol implementations, 8 | memory and buffer management, and the low-level raw API. 9 | 10 | include/ - lwIP include files. 11 | 12 | netif/ - Generic network interface device drivers are kept here. 13 | 14 | For more information on the various subdirectories, check the FILES 15 | file in each directory. 16 | -------------------------------------------------------------------------------- /code/lwip/src/apps/http/fs/404.html: -------------------------------------------------------------------------------- 1 | 2 | lwIP - A Lightweight TCP/IP Stack 3 | 4 | 5 | 6 | 19 |
7 | SICS logo 9 | 10 |

lwIP - A Lightweight TCP/IP Stack

11 |

404 - Page not found

12 |

13 | Sorry, the page you are requesting was not found on this 14 | server. 15 |

16 |
17 |   18 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /code/lwip/src/apps/http/fs/img/sics.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/src/apps/http/fs/img/sics.gif -------------------------------------------------------------------------------- /code/lwip/src/apps/http/makefsdata/readme.txt: -------------------------------------------------------------------------------- 1 | This directory contains a script ('makefsdata') to create C code suitable for 2 | httpd for given html pages (or other files) in a directory. 3 | 4 | There is also a plain C console application doing the same and extended a bit. 5 | 6 | Usage: htmlgen [targetdir] [-s] [-i]s 7 | targetdir: relative or absolute path to files to convert 8 | switch -s: toggle processing of subdirectories (default is on) 9 | switch -e: exclude HTTP header from file (header is created at runtime, default is on) 10 | switch -11: include HTTP 1.1 header (1.0 is default) 11 | 12 | if targetdir not specified, makefsdata will attempt to 13 | process files in subdirectory 'fs'. 14 | 15 | The C version of this program can optionally store the none-SSI files in 16 | a compressed form in which they are also sent to the web client (which 17 | must support the Deflate content encoding). Files that grow during compression 18 | (due to being not compressible well), will stored umcompressed automatically. 19 | In order to do so, compile the program with MAKEFS_SUPPORT_DEFLATE set to 1. You must 20 | manually download minizip.c for this to work. As an alternative, you can additionally 21 | define MAKEFS_SUPPORT_DEFLATE_ZLIB to use your system's zlib instead. 22 | Compression of .html, .js, .css and .svg files usually yields very good compression 23 | rates and is a great way of reducing your program's size. 24 | -------------------------------------------------------------------------------- /code/lwip/src/include/lwip/apps/FILES: -------------------------------------------------------------------------------- 1 | This directory contains application headers. 2 | Every application shall provide one api file APP.h and optionally one options file APP_opts.h 3 | -------------------------------------------------------------------------------- /code/lwip/src/include/lwip/apps/snmp_snmpv2_framework.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_obj_id usmNoAuthProtocol; 18 | extern const struct snmp_obj_id usmHMACMD5AuthProtocol; 19 | extern const struct snmp_obj_id usmHMACSHAAuthProtocol; 20 | 21 | extern const struct snmp_obj_id usmNoPrivProtocol; 22 | extern const struct snmp_obj_id usmDESPrivProtocol; 23 | extern const struct snmp_obj_id usmAESPrivProtocol; 24 | 25 | extern const struct snmp_mib snmpframeworkmib; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif /* __cplusplus */ 30 | 31 | #endif /* LWIP_SNMP */ 32 | #endif /* LWIP_HDR_APPS_SNMP_FRAMEWORK_MIB_H */ 33 | -------------------------------------------------------------------------------- /code/lwip/src/include/lwip/apps/snmp_snmpv2_usm.h: -------------------------------------------------------------------------------- 1 | /* 2 | Generated by LwipMibCompiler 3 | */ 4 | 5 | #ifndef LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 6 | #define LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H 7 | 8 | #include "lwip/apps/snmp_opts.h" 9 | #if LWIP_SNMP 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif /* __cplusplus */ 14 | 15 | #include "lwip/apps/snmp_core.h" 16 | 17 | extern const struct snmp_mib snmpusmmib; 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif /* __cplusplus */ 22 | 23 | #endif /* LWIP_SNMP */ 24 | #endif /* LWIP_HDR_APPS_SNMP_USER_BASED_SM_MIB_H */ 25 | -------------------------------------------------------------------------------- /code/lwip/src/include/netif/etharp.h: -------------------------------------------------------------------------------- 1 | /* ARP has been moved to core/ipv4, provide this #include for compatibility only */ 2 | #include "lwip/etharp.h" 3 | #include "netif/ethernet.h" 4 | -------------------------------------------------------------------------------- /code/lwip/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | ethernet.c 6 | Shared code for Ethernet based interfaces. 7 | 8 | lowpan6.c 9 | A 6LoWPAN implementation as a netif. 10 | 11 | lowpan6_ble.c 12 | A 6LoWPAN over Bluetooth Low Energy (BLE) implementation as netif, 13 | according to RFC-7668. 14 | 15 | slipif.c 16 | A generic implementation of the SLIP (Serial Line IP) 17 | protocol. It requires a sio (serial I/O) module to work. 18 | 19 | ppp/ Point-to-Point Protocol stack 20 | The lwIP PPP support is based from pppd (http://ppp.samba.org) with 21 | huge changes to match code size and memory requirements for embedded 22 | devices. Please read /doc/ppp.txt and ppp/PPPD_FOLLOWUP for a detailed 23 | explanation. 24 | -------------------------------------------------------------------------------- /code/lwip/src/netif/ppp/polarssl/README: -------------------------------------------------------------------------------- 1 | About PolarSSL files into lwIP PPP support 2 | ------------------------------------------ 3 | 4 | This folder contains some files fetched from the latest BSD release of 5 | the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption 6 | methods we need for lwIP PPP support. 7 | 8 | The PolarSSL files were cleaned to contain only the necessary struct 9 | fields and functions needed for lwIP. 10 | 11 | The PolarSSL API was not changed at all, so if you are already using 12 | PolarSSL you can choose to skip the compilation of the included PolarSSL 13 | library into lwIP. 14 | 15 | If you are not using the embedded copy you must include external 16 | libraries into your arch/cc.h port file. 17 | 18 | Beware of the stack requirements which can be a lot larger if you are not 19 | using our cleaned PolarSSL library. 20 | 21 | 22 | PolarSSL project website: http://polarssl.org/ 23 | -------------------------------------------------------------------------------- /code/lwip/test/fuzz/config.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/config.h -------------------------------------------------------------------------------- /code/lwip/test/fuzz/inputs/arp/arp_req.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/inputs/arp/arp_req.bin -------------------------------------------------------------------------------- /code/lwip/test/fuzz/inputs/icmp/icmp_ping.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/inputs/icmp/icmp_ping.bin -------------------------------------------------------------------------------- /code/lwip/test/fuzz/inputs/ipv6/neighbor_solicitation.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/inputs/ipv6/neighbor_solicitation.bin -------------------------------------------------------------------------------- /code/lwip/test/fuzz/inputs/ipv6/router_adv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/inputs/ipv6/router_adv.bin -------------------------------------------------------------------------------- /code/lwip/test/fuzz/inputs/tcp/tcp_syn.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/inputs/tcp/tcp_syn.bin -------------------------------------------------------------------------------- /code/lwip/test/fuzz/inputs/udp/udp_port_5000.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/code/lwip/test/fuzz/inputs/udp/udp_port_5000.bin -------------------------------------------------------------------------------- /code/lwip/test/fuzz/output_to_pcap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ] 4 | then 5 | echo "This script will make pcap files from the afl-fuzz crash/hang files" 6 | echo "It needs hexdump and text2pcap" 7 | echo "Please give output directory as argument" 8 | exit 2 9 | fi 10 | 11 | for i in `ls $1/crashes/id*` 12 | do 13 | PCAPNAME=`echo $i | grep pcap` 14 | if [ -z "$PCAPNAME" ]; then 15 | hexdump -C $i > $1/$$.tmp 16 | text2pcap $1/$$.tmp ${i}.pcap 17 | fi 18 | done 19 | for i in `ls $1/hangs/id*` 20 | do 21 | PCAPNAME=`echo $i | grep pcap` 22 | if [ -z "$PCAPNAME" ]; then 23 | hexdump -C $i > $1/$$.tmp 24 | text2pcap $1/$$.tmp ${i}.pcap 25 | fi 26 | done 27 | rm -f $1/$$.tmp 28 | 29 | echo 30 | echo "Created pcap files:" 31 | ls $1/*/*.pcap 32 | -------------------------------------------------------------------------------- /code/lwip/test/unit/Filelists.cmake: -------------------------------------------------------------------------------- 1 | # This file is indended to be included in end-user CMakeLists.txt 2 | # include(/path/to/Filelists.cmake) 3 | # It assumes the variable LWIP_DIR is defined pointing to the 4 | # root path of lwIP sources. 5 | # 6 | # This file is NOT designed (on purpose) to be used as cmake 7 | # subdir via add_subdirectory() 8 | # The intention is to provide greater flexibility to users to 9 | # create their own targets using the *_SRCS variables. 10 | 11 | if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0") 12 | include_guard(GLOBAL) 13 | endif() 14 | 15 | set(LWIP_TESTDIR ${LWIP_DIR}/test/unit) 16 | set(LWIP_TESTFILES 17 | ${LWIP_TESTDIR}/lwip_unittests.c 18 | ${LWIP_TESTDIR}/api/test_sockets.c 19 | ${LWIP_TESTDIR}/arch/sys_arch.c 20 | ${LWIP_TESTDIR}/core/test_def.c 21 | ${LWIP_TESTDIR}/core/test_dns.c 22 | ${LWIP_TESTDIR}/core/test_mem.c 23 | ${LWIP_TESTDIR}/core/test_netif.c 24 | ${LWIP_TESTDIR}/core/test_pbuf.c 25 | ${LWIP_TESTDIR}/core/test_timers.c 26 | ${LWIP_TESTDIR}/dhcp/test_dhcp.c 27 | ${LWIP_TESTDIR}/etharp/test_etharp.c 28 | ${LWIP_TESTDIR}/ip4/test_ip4.c 29 | ${LWIP_TESTDIR}/ip6/test_ip6.c 30 | ${LWIP_TESTDIR}/mdns/test_mdns.c 31 | ${LWIP_TESTDIR}/mqtt/test_mqtt.c 32 | ${LWIP_TESTDIR}/tcp/tcp_helper.c 33 | ${LWIP_TESTDIR}/tcp/test_tcp_oos.c 34 | ${LWIP_TESTDIR}/tcp/test_tcp_state.c 35 | ${LWIP_TESTDIR}/tcp/test_tcp.c 36 | ${LWIP_TESTDIR}/udp/test_udp.c 37 | ${LWIP_TESTDIR}/ppp/test_pppos.c 38 | ) 39 | -------------------------------------------------------------------------------- /code/lwip/test/unit/Makefile: -------------------------------------------------------------------------------- 1 | # Shortcuts to building and running tests on unix platforms. 2 | # Output files will be written to the directory listed below. 3 | 4 | all: 5 | cd ../../contrib/ports/unix/check/ && $(MAKE) 6 | 7 | check: 8 | cd ../../contrib/ports/unix/check/ && $(MAKE) check 9 | 10 | clean: 11 | cd ../../contrib/ports/unix/check/ && $(MAKE) clean 12 | -------------------------------------------------------------------------------- /code/lwip/test/unit/api/test_sockets.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_SOCKETS_H 2 | #define LWIP_HDR_TEST_SOCKETS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *sockets_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_def.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DEF_H 2 | #define LWIP_HDR_TEST_DEF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *def_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_dns.c: -------------------------------------------------------------------------------- 1 | #include "test_dns.h" 2 | 3 | #include "lwip/dns.h" 4 | 5 | /* Setups/teardown functions */ 6 | 7 | static void 8 | dns_setup(void) 9 | { 10 | } 11 | 12 | static void 13 | dns_teardown(void) 14 | { 15 | } 16 | 17 | /* Test functions */ 18 | 19 | START_TEST(test_dns_set_get_server) 20 | { 21 | int n; 22 | LWIP_UNUSED_ARG(_i); 23 | 24 | for (n = 0; n < 256; n++) { 25 | u8_t i = (u8_t)n; 26 | ip_addr_t server; 27 | /* Should return a zeroed address for any index */ 28 | fail_unless(dns_getserver(i)); 29 | fail_unless(ip_addr_isany(dns_getserver(i))); 30 | 31 | /* Should accept setting address for any index, and ignore if out of range */ 32 | IP_ADDR4(&server, 10, 0, 0, i); 33 | dns_setserver(i, &server); 34 | fail_unless(dns_getserver(i)); 35 | if (i < DNS_MAX_SERVERS) { 36 | fail_unless(ip_addr_eq(dns_getserver(i), &server) == 1); 37 | } else { 38 | fail_unless(ip_addr_isany(dns_getserver(i))); 39 | } 40 | } 41 | } 42 | END_TEST 43 | 44 | /** Create the suite including all tests for this module */ 45 | Suite * 46 | dns_suite(void) 47 | { 48 | testfunc tests[] = { 49 | TESTFUNC(test_dns_set_get_server) 50 | }; 51 | return create_suite("DNS", tests, sizeof(tests)/sizeof(testfunc), dns_setup, dns_teardown); 52 | } 53 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_dns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DNS_H 2 | #define LWIP_HDR_TEST_DNS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *dns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MEM_H 2 | #define LWIP_HDR_TEST_MEM_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *mem_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_netif.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_NETIF_H 2 | #define LWIP_HDR_TEST_NETIF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *netif_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_pbuf.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PBUF_H 2 | #define LWIP_HDR_TEST_PBUF_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *pbuf_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/core/test_timers.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TIMERS_H 2 | #define LWIP_HDR_TEST_TIMERS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *timers_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/dhcp/test_dhcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_DHCP_H 2 | #define LWIP_HDR_TEST_DHCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* dhcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/etharp/test_etharp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_ETHARP_H 2 | #define LWIP_HDR_TEST_ETHARP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* etharp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/ip4/test_ip4.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP4_H 2 | #define LWIP_HDR_TEST_IP4_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip4_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/ip6/test_ip6.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_IP6_H 2 | #define LWIP_HDR_TEST_IP6_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* ip6_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/mdns/test_mdns.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MDNS_H__ 2 | #define LWIP_HDR_TEST_MDNS_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mdns_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/mqtt/test_mqtt.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_MQTT_H__ 2 | #define LWIP_HDR_TEST_MQTT_H__ 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* mqtt_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/ppp/test_pppos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_PPPOS_H 2 | #define LWIP_HDR_TEST_PPPOS_H 3 | 4 | #include "../lwip_check.h" 5 | #include "netif/ppp/ppp.h" 6 | 7 | #if PPP_SUPPORT && PPPOS_SUPPORT 8 | 9 | Suite* pppos_suite(void); 10 | 11 | #endif /* PPP_SUPPORT && PPPOS_SUPPORT */ 12 | 13 | #endif /* LWIP_HDR_TEST_PPPOS_H */ 14 | -------------------------------------------------------------------------------- /code/lwip/test/unit/tcp/test_tcp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_H 2 | #define LWIP_HDR_TEST_TCP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/tcp/test_tcp_oos.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_OOS_H 2 | #define LWIP_HDR_TEST_TCP_OOS_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_oos_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/tcp/test_tcp_state.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_TCP_STATE_H 2 | #define LWIP_HDR_TEST_TCP_STATE_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite *tcp_state_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /code/lwip/test/unit/udp/test_udp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_HDR_TEST_UDP_H 2 | #define LWIP_HDR_TEST_UDP_H 3 | 4 | #include "../lwip_check.h" 5 | 6 | Suite* udp_suite(void); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | (import ( 2 | fetchTarball { 3 | url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; 4 | sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; 5 | } 6 | ) { 7 | src = ./.; 8 | }) 9 | .defaultNix 10 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 98f872734b11adb2bc9b932972e9c5b4 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_images/bbl_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_arch.png -------------------------------------------------------------------------------- /docs/_images/bbl_flows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_flows.png -------------------------------------------------------------------------------- /docs/_images/bbl_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_header.png -------------------------------------------------------------------------------- /docs/_images/bbl_interactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_interactive.png -------------------------------------------------------------------------------- /docs/_images/bbl_interactive_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_interactive_session.png -------------------------------------------------------------------------------- /docs/_images/bbl_interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_interfaces.png -------------------------------------------------------------------------------- /docs/_images/bbl_isis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_isis.png -------------------------------------------------------------------------------- /docs/_images/bbl_l2bsa_interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_l2bsa_interfaces.png -------------------------------------------------------------------------------- /docs/_images/bbl_ospf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_ospf.png -------------------------------------------------------------------------------- /docs/_images/bbl_session_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_session_traffic.png -------------------------------------------------------------------------------- /docs/_images/bbl_streams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/bbl_streams.png -------------------------------------------------------------------------------- /docs/_images/controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/controller.png -------------------------------------------------------------------------------- /docs/_images/quickstart1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/quickstart1.png -------------------------------------------------------------------------------- /docs/_images/quickstart_interactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/quickstart_interactive.png -------------------------------------------------------------------------------- /docs/_images/quickstart_isis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/quickstart_isis.png -------------------------------------------------------------------------------- /docs/_images/quickstart_pppoe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/quickstart_pppoe.png -------------------------------------------------------------------------------- /docs/_images/quickstart_streams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/quickstart_streams.png -------------------------------------------------------------------------------- /docs/_images/tr-025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_images/tr-025.png -------------------------------------------------------------------------------- /docs/_sources/api/arp.rst.txt: -------------------------------------------------------------------------------- 1 | +-----------------------------------+----------------------------------------------------------------------+ 2 | | Command | Description | 3 | +===================================+======================================================================+ 4 | | **arp-clients** | | Display all ARP client instances. | 5 | | | | | 6 | | | | **Arguments:** | 7 | | | | ``session-id`` | 8 | +-----------------------------------+----------------------------------------------------------------------+ 9 | | **arp-clients-reset** | | Reset all ARP client instances. | 10 | | | | | 11 | | | | **Arguments:** | 12 | | | | ``session-id`` | 13 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docs/_sources/api/li.rst.txt: -------------------------------------------------------------------------------- 1 | +-----------------------------------+----------------------------------------------------------------------+ 2 | | Command | Description | 3 | +===================================+======================================================================+ 4 | | **li-flows** | | List all LI flows with detailed statistics. | 5 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docs/_sources/api/traffic.rst.txt: -------------------------------------------------------------------------------- 1 | +-----------------------------------+----------------------------------------------------------------------+ 2 | | Command | Description | 3 | +===================================+======================================================================+ 4 | | **traffic-start** | | This command can be used to start or stop all traffic globally. | 5 | | | | This command does not alter the current state of a traffic stream. | 6 | | **traffic-stop** | | In example, if a stream has not been started or has been stopped, | 7 | | | | it can't be started with this command. Instead, this command acts | 8 | | | | as a global block to control the transmission of traffic streams. | 9 | +-----------------------------------+----------------------------------------------------------------------+ 10 | | **multicast-traffic-start** | | This command can be used to start or stop all multicast traffic. | 11 | | | | This includes auto generated multicast traffic and RAW streams | 12 | | **multicast-traffic-stop** | | with multicast destination address. | 13 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docs/_sources/configuration/interfaces_a10nsp.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "interfaces": { "a10nsp": [] } } 4 | 5 | +-----------------------------------+----------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +===================================+======================================================================+ 8 | | **interface** | | Parent interface/link name (e.g. eth0, ...). | 9 | +-----------------------------------+----------------------------------------------------------------------+ 10 | | **qinq** | | Set outer VLAN ethertype to QinQ (0x88a8). | 11 | | | | Default: false | 12 | +-----------------------------------+----------------------------------------------------------------------+ 13 | | **mac** | | Optional set gateway interface address manually. | 14 | | | | Default: `parent interface/link MAC address` | 15 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docs/_sources/configuration/isis_external.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "isis": { "external": {} } } 4 | 5 | +-----------------------------------+----------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +===================================+======================================================================+ 8 | | **purge** | | Automatically purge all external LSP during teardown. This option | 9 | | | | requires a reasonable teardown-time depending on the database size.| 10 | | | | Default: true | 11 | +-----------------------------------+----------------------------------------------------------------------+ 12 | | **auto-refresh** | | Automatically refresh all external LSP. | 13 | | | | Default: false | 14 | +-----------------------------------+----------------------------------------------------------------------+ 15 | | **mrt-file** | | MRT file | 16 | +-----------------------------------+----------------------------------------------------------------------+ 17 | -------------------------------------------------------------------------------- /docs/_sources/configuration/isis_external_connections.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "isis": { "external": { "connections": [] } } } 4 | 5 | +-----------------------------------+----------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +===================================+======================================================================+ 8 | | **system-id** | | ISIS system identifier. | 9 | +-----------------------------------+----------------------------------------------------------------------+ 10 | | **l1-metric** | | ISIS level 1 interface metric. | 11 | | | | Default: 10 | 12 | +-----------------------------------+----------------------------------------------------------------------+ 13 | | **l2-metric** | | ISIS level 2 interface metric. | 14 | | | | Default: 10 | 15 | +-----------------------------------+----------------------------------------------------------------------+ 16 | -------------------------------------------------------------------------------- /docs/_sources/configuration/ospf_external.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ospf": { "external": {} } } 4 | 5 | +------------------+------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +==================+==================================================================+ 8 | | **purge** | | Automatically purge all external LSA during teardown. | 9 | | | | Default: true | 10 | +------------------+------------------------------------------------------------------+ 11 | | **mrt-file** | | OSPF MRT file. | 12 | +------------------+------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docs/_sources/configuration/ospf_external_connections copy.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ospf": { "external": { "connections": [] } } } 4 | 5 | 6 | .. list-table:: 7 | :widths: 25 50 25 8 | :header-rows: 1 9 | 10 | * - Attribute 11 | - Description 12 | - Default 13 | * - `router-id` 14 | - Mandatory remote router identifier 15 | - 16 | * - `local-ipv4-address` 17 | - Mandatory local IPv4 address (OSPFv2 only) 18 | - 19 | * - `metric` 20 | - Optional interface metric 21 | - 10 -------------------------------------------------------------------------------- /docs/_sources/configuration/ppp.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ppp": {} } 4 | 5 | +-------------+------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +=============+==================================================================+ 8 | | **mru** | | Define the maximum receive unit proposed via PPP. | 9 | | | | Default: 1492 Range: 1 - 65535 | 10 | +-------------+------------------------------------------------------------------+ 11 | -------------------------------------------------------------------------------- /docs/_sources/configuration/ppp_ip6cp.rst.txt: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ppp": { "ip6cp": {} } } 4 | 5 | +----------------------------------+-------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +==================================+===================================================================+ 8 | | **enable** | | This option allows to enable or disable the IP6CP protocol. | 9 | | | | Default: true | 10 | +----------------------------------+-------------------------------------------------------------------+ 11 | | **conf-request-timeout** | | IP6CP configuration request timeout in seconds. | 12 | | | | Default: 5 | 13 | +----------------------------------+-------------------------------------------------------------------+ 14 | | **conf-request-retry** | | IP6CP configuration request max retry. | 15 | | | | Default: 10 | 16 | +----------------------------------+-------------------------------------------------------------------+ 17 | -------------------------------------------------------------------------------- /docs/_sources/faq.rst.txt: -------------------------------------------------------------------------------- 1 | Frequently Asked Questions 2 | ========================== 3 | 4 | **Outer VLAN header not captured in PCAP?** 5 | 6 | Some interface drivers drop the outer VLAN header. The BNG Blaster tries to 7 | recover the VLAN from kernel headers but will not change the packets stored 8 | in the PCAP file. 9 | 10 | **Some sessions established on BNG are not established on BNG Blaster?** 11 | 12 | The BNG Blaster considers a session only as established if all configured 13 | protocols are established. This could occur if the device under test (your BNG) 14 | is configured for IPv4 only but the BNG Blaster is configured for IPv4 and IPv6. 15 | 16 | The idea here is to prevent potential failures will be overseen. 17 | 18 | **DHCPv6 does not start for PPPoE sessions?** 19 | 20 | The BNG Blaster expects an ICMPv6 router-advertisement with an other-config flag 21 | before it starts sending DHCPv6 within a PPPoE session. 22 | 23 | **Why is stream length limited to 3936 bytes?** 24 | 25 | The stream length limit is dynamically calculated depending on the configured 26 | IO mode. The default mode using Packet MMAP limits the stream length to pagesize 27 | minus internal header and overhead (ethernet, MPLS, ...) which results in 3936 bytes 28 | on most systems. The IO mode RAW would allow streams with up to 9000 bytes. -------------------------------------------------------------------------------- /docs/_sources/reference/index.rst.txt: -------------------------------------------------------------------------------- 1 | Reference 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | architecture.rst 8 | -------------------------------------------------------------------------------- /docs/_sources/routing/index.rst.txt: -------------------------------------------------------------------------------- 1 | Routing Protocols 2 | ================= 3 | 4 | Multiple routing protocols are available, including ISIS and BGP. 5 | To perform comprehensive end-to-end testing for both BNG and 6 | non-BNG routers, you can use the BNG Blaster. 7 | 8 | The routing protocols are designed to create a virtual node linked to 9 | one or multiple network interface functions. These virtual nodes enable 10 | the attachment of emulated network topologies. These topologies are 11 | generated offline using built-in tools such as lspgen (for ISIS and OSPF), 12 | bgpupdate, ldpupdate, or through the creation of custom tools using 13 | provided examples. 14 | 15 | For ISIS and OSPF, the generated topologies are serialized into an 16 | MRT file as defined in `RFC6396 `_. 17 | This serialized topology can be dynamically updated to simulate 18 | link flapping in real-time. 19 | 20 | Additionally, commands are available to for example inject LSA/LSP 21 | messages via CLI/REST API. 22 | 23 | In the case of LDP and BGP, update messages are produced as raw updates 24 | and then transmitted to the established session. Similar to ISIS and OSPF, 25 | live updates can replace the file to mimic link flapping. 26 | 27 | .. toctree:: 28 | :maxdepth: 1 29 | 30 | isis.rst 31 | ospf.rst 32 | mpls.rst 33 | bgp.rst 34 | ldp.rst 35 | lspgen.rst 36 | -------------------------------------------------------------------------------- /docs/_sources/routing/mpls.rst.txt: -------------------------------------------------------------------------------- 1 | MPLS 2 | ---- 3 | 4 | The BNG Blaster can send and receive traffic with 5 | up to two MPLS labels. -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: 1000px; 3 | } 4 | 5 | table { 6 | width: 100%; 7 | max-width: 100%; 8 | table-layout: auto; 9 | } -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | const DOCUMENTATION_OPTIONS = { 2 | VERSION: '0.9', 3 | LANGUAGE: 'en', 4 | COLLAPSE_INDEX: false, 5 | BUILDER: 'html', 6 | FILE_SUFFIX: '.html', 7 | LINK_SUFFIX: '.html', 8 | HAS_SOURCE: true, 9 | SOURCELINK_SUFFIX: '.txt', 10 | NAVIGATION_WITH_KEYS: false, 11 | SHOW_SEARCH_SUMMARY: true, 12 | ENABLE_SEARCH_SHORTCUTS: true, 13 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-BoldItalic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-Italic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-Italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/rtbrick_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/_static/rtbrick_logo.png -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docs/objects.inv -------------------------------------------------------------------------------- /docsrc/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | 3 | # You can set these variables from the command line, and also 4 | # from the environment for the first two. 5 | SPHINXOPTS ?= 6 | SPHINXBUILD ?= sphinx-build 7 | SOURCEDIR = sources 8 | BUILDDIR = build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # GitHub Pages 17 | github: 18 | @make clean 19 | @make html 20 | @touch build/html/.nojekyll 21 | @cp -a build/html/. ../docs 22 | 23 | # Catch-all target: route all unknown targets to Sphinx using the new 24 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 25 | %: Makefile 26 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 27 | -------------------------------------------------------------------------------- /docsrc/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx 2 | sphinx-rtd-theme 3 | sphinx-tabs -------------------------------------------------------------------------------- /docsrc/sources/_static/custom.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: 1000px; 3 | } 4 | 5 | table { 6 | width: 100%; 7 | max-width: 100%; 8 | table-layout: auto; 9 | } -------------------------------------------------------------------------------- /docsrc/sources/api/arp.rst: -------------------------------------------------------------------------------- 1 | +-----------------------------------+----------------------------------------------------------------------+ 2 | | Command | Description | 3 | +===================================+======================================================================+ 4 | | **arp-clients** | | Display all ARP client instances. | 5 | | | | | 6 | | | | **Arguments:** | 7 | | | | ``session-id`` | 8 | +-----------------------------------+----------------------------------------------------------------------+ 9 | | **arp-clients-reset** | | Reset all ARP client instances. | 10 | | | | | 11 | | | | **Arguments:** | 12 | | | | ``session-id`` | 13 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docsrc/sources/api/li.rst: -------------------------------------------------------------------------------- 1 | +-----------------------------------+----------------------------------------------------------------------+ 2 | | Command | Description | 3 | +===================================+======================================================================+ 4 | | **li-flows** | | List all LI flows with detailed statistics. | 5 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docsrc/sources/api/traffic.rst: -------------------------------------------------------------------------------- 1 | +-----------------------------------+----------------------------------------------------------------------+ 2 | | Command | Description | 3 | +===================================+======================================================================+ 4 | | **traffic-start** | | This command can be used to start or stop all traffic globally. | 5 | | | | This command does not alter the current state of a traffic stream. | 6 | | **traffic-stop** | | In example, if a stream has not been started or has been stopped, | 7 | | | | it can't be started with this command. Instead, this command acts | 8 | | | | as a global block to control the transmission of traffic streams. | 9 | +-----------------------------------+----------------------------------------------------------------------+ 10 | | **multicast-traffic-start** | | This command can be used to start or stop all multicast traffic. | 11 | | | | This includes auto generated multicast traffic and RAW streams | 12 | | **multicast-traffic-stop** | | with multicast destination address. | 13 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docsrc/sources/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | 3 | # -- Project information 4 | 5 | project = 'BNG Blaster' 6 | copyright = '2020-2025, RtBrick, Inc.' 7 | author = 'Christian Giese' 8 | release = '0.9' 9 | version = '0.9.X' 10 | 11 | # -- General configuration 12 | 13 | extensions = [ 14 | 'sphinx_tabs.tabs' 15 | ] 16 | 17 | master_doc = 'index' 18 | html_logo = 'images/rtbrick_logo.png' 19 | 20 | templates_path = ['_templates'] 21 | 22 | # -- Options for HTML output 23 | 24 | html_theme = 'sphinx_rtd_theme' 25 | html_theme_options = { 26 | 'logo_only': False, 27 | 'display_version': False, 28 | } 29 | html_static_path = ['_static'] 30 | html_css_files = [ 31 | 'custom.css', # Add your custom CSS file 32 | ] 33 | 34 | # -- Options for EPUB output 35 | 36 | epub_show_urls = 'footnote' 37 | -------------------------------------------------------------------------------- /docsrc/sources/configuration/interfaces_a10nsp.rst: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "interfaces": { "a10nsp": [] } } 4 | 5 | +-----------------------------------+----------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +===================================+======================================================================+ 8 | | **interface** | | Parent interface/link name (e.g. eth0, ...). | 9 | +-----------------------------------+----------------------------------------------------------------------+ 10 | | **qinq** | | Set outer VLAN ethertype to QinQ (0x88a8). | 11 | | | | Default: false | 12 | +-----------------------------------+----------------------------------------------------------------------+ 13 | | **mac** | | Optional set gateway interface address manually. | 14 | | | | Default: `parent interface/link MAC address` | 15 | +-----------------------------------+----------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docsrc/sources/configuration/isis_external.rst: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "isis": { "external": {} } } 4 | 5 | +-----------------------------------+----------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +===================================+======================================================================+ 8 | | **purge** | | Automatically purge all external LSP during teardown. This option | 9 | | | | requires a reasonable teardown-time depending on the database size.| 10 | | | | Default: true | 11 | +-----------------------------------+----------------------------------------------------------------------+ 12 | | **auto-refresh** | | Automatically refresh all external LSP. | 13 | | | | Default: false | 14 | +-----------------------------------+----------------------------------------------------------------------+ 15 | | **mrt-file** | | MRT file | 16 | +-----------------------------------+----------------------------------------------------------------------+ 17 | -------------------------------------------------------------------------------- /docsrc/sources/configuration/isis_external_connections.rst: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "isis": { "external": { "connections": [] } } } 4 | 5 | +-----------------------------------+----------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +===================================+======================================================================+ 8 | | **system-id** | | ISIS system identifier. | 9 | +-----------------------------------+----------------------------------------------------------------------+ 10 | | **l1-metric** | | ISIS level 1 interface metric. | 11 | | | | Default: 10 | 12 | +-----------------------------------+----------------------------------------------------------------------+ 13 | | **l2-metric** | | ISIS level 2 interface metric. | 14 | | | | Default: 10 | 15 | +-----------------------------------+----------------------------------------------------------------------+ 16 | -------------------------------------------------------------------------------- /docsrc/sources/configuration/ospf_external.rst: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ospf": { "external": {} } } 4 | 5 | +------------------+------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +==================+==================================================================+ 8 | | **purge** | | Automatically purge all external LSA during teardown. | 9 | | | | Default: true | 10 | +------------------+------------------------------------------------------------------+ 11 | | **mrt-file** | | OSPF MRT file. | 12 | +------------------+------------------------------------------------------------------+ -------------------------------------------------------------------------------- /docsrc/sources/configuration/ppp.rst: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ppp": {} } 4 | 5 | +-------------+------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +=============+==================================================================+ 8 | | **mru** | | Define the maximum receive unit proposed via PPP. | 9 | | | | Default: 1492 Range: 1 - 65535 | 10 | +-------------+------------------------------------------------------------------+ 11 | -------------------------------------------------------------------------------- /docsrc/sources/configuration/ppp_ip6cp.rst: -------------------------------------------------------------------------------- 1 | .. code-block:: json 2 | 3 | { "ppp": { "ip6cp": {} } } 4 | 5 | +----------------------------------+-------------------------------------------------------------------+ 6 | | Attribute | Description | 7 | +==================================+===================================================================+ 8 | | **enable** | | This option allows to enable or disable the IP6CP protocol. | 9 | | | | Default: true | 10 | +----------------------------------+-------------------------------------------------------------------+ 11 | | **conf-request-timeout** | | IP6CP configuration request timeout in seconds. | 12 | | | | Default: 5 | 13 | +----------------------------------+-------------------------------------------------------------------+ 14 | | **conf-request-retry** | | IP6CP configuration request max retry. | 15 | | | | Default: 10 | 16 | +----------------------------------+-------------------------------------------------------------------+ 17 | -------------------------------------------------------------------------------- /docsrc/sources/faq.rst: -------------------------------------------------------------------------------- 1 | Frequently Asked Questions 2 | ========================== 3 | 4 | **Outer VLAN header not captured in PCAP?** 5 | 6 | Some interface drivers drop the outer VLAN header. The BNG Blaster tries to 7 | recover the VLAN from kernel headers but will not change the packets stored 8 | in the PCAP file. 9 | 10 | **Some sessions established on BNG are not established on BNG Blaster?** 11 | 12 | The BNG Blaster considers a session only as established if all configured 13 | protocols are established. This could occur if the device under test (your BNG) 14 | is configured for IPv4 only but the BNG Blaster is configured for IPv4 and IPv6. 15 | 16 | The idea here is to prevent potential failures will be overseen. 17 | 18 | **DHCPv6 does not start for PPPoE sessions?** 19 | 20 | The BNG Blaster expects an ICMPv6 router-advertisement with an other-config flag 21 | before it starts sending DHCPv6 within a PPPoE session. 22 | 23 | **Why is stream length limited to 3936 bytes?** 24 | 25 | The stream length limit is dynamically calculated depending on the configured 26 | IO mode. The default mode using Packet MMAP limits the stream length to pagesize 27 | minus internal header and overhead (ethernet, MPLS, ...) which results in 3936 bytes 28 | on most systems. The IO mode RAW would allow streams with up to 9000 bytes. -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_arch.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_flows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_flows.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_header.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_interactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_interactive.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_interactive_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_interactive_session.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_interfaces.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_isis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_isis.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_l2bsa_interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_l2bsa_interfaces.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_ospf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_ospf.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_session_traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_session_traffic.png -------------------------------------------------------------------------------- /docsrc/sources/images/bbl_streams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/bbl_streams.png -------------------------------------------------------------------------------- /docsrc/sources/images/controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/controller.png -------------------------------------------------------------------------------- /docsrc/sources/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/logo.png -------------------------------------------------------------------------------- /docsrc/sources/images/pppoe-fsm.dot: -------------------------------------------------------------------------------- 1 | digraph "pppoe-fsm" { 2 | "idle"; 3 | "idle" -> "discovery_init" [label="send_padi"]; 4 | "discovery_init"; 5 | "discovery_init" -> "discovery_offer" [label="pado received"]; 6 | "discovery_init" -> "idle" [label="timeout 5s"]; 7 | "discovery_offer"; 8 | "discovery_offer" -> "discovery_request" [label="send padr"]; 9 | "discovery_offer" -> "idle" [label="3x timeout"]; 10 | "discovery_request"; 11 | "discovery_request" -> "discovery_confirmed" [label="pads received"]; 12 | "discovery_request" -> "discovery_offer" [label="timeout 5s"]; 13 | "discovery_confirmed"; 14 | "discovery_confirmed" -> "idle" [label="padt received"]; 15 | } -------------------------------------------------------------------------------- /docsrc/sources/images/quickstart_interactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/quickstart_interactive.png -------------------------------------------------------------------------------- /docsrc/sources/images/quickstart_isis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/quickstart_isis.png -------------------------------------------------------------------------------- /docsrc/sources/images/quickstart_pppoe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/quickstart_pppoe.png -------------------------------------------------------------------------------- /docsrc/sources/images/quickstart_streams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/quickstart_streams.png -------------------------------------------------------------------------------- /docsrc/sources/images/rtbrick_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/rtbrick_logo.png -------------------------------------------------------------------------------- /docsrc/sources/images/tr-025.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rtbrick/bngblaster/87e0040651469f9e0c15163fa9b60f1dbe3ba615/docsrc/sources/images/tr-025.png -------------------------------------------------------------------------------- /docsrc/sources/routing/index.rst: -------------------------------------------------------------------------------- 1 | Routing Protocols 2 | ================= 3 | 4 | Multiple routing protocols are available, including ISIS and BGP. 5 | To perform comprehensive end-to-end testing for both BNG and 6 | non-BNG routers, you can use the BNG Blaster. 7 | 8 | The routing protocols are designed to create a virtual node linked to 9 | one or multiple network interface functions. These virtual nodes enable 10 | the attachment of emulated network topologies. These topologies are 11 | generated offline using built-in tools such as lspgen (for ISIS and OSPF), 12 | bgpupdate, ldpupdate, or through the creation of custom tools using 13 | provided examples. 14 | 15 | For ISIS and OSPF, the generated topologies are serialized into an 16 | MRT file as defined in `RFC6396 `_. 17 | This serialized topology can be dynamically updated to simulate 18 | link flapping in real-time. 19 | 20 | Additionally, commands are available to for example inject LSA/LSP 21 | messages via CLI/REST API. 22 | 23 | In the case of LDP and BGP, update messages are produced as raw updates 24 | and then transmitted to the established session. Similar to ISIS and OSPF, 25 | live updates can replace the file to mimic link flapping. 26 | 27 | .. toctree:: 28 | :maxdepth: 1 29 | 30 | isis.rst 31 | ospf.rst 32 | mpls.rst 33 | bgp.rst 34 | ldp.rst 35 | lspgen.rst 36 | -------------------------------------------------------------------------------- /docsrc/sources/routing/mpls.rst: -------------------------------------------------------------------------------- 1 | MPLS 2 | ---- 3 | 4 | The BNG Blaster can send and receive traffic with 5 | up to two MPLS labels. -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # BNG Blaster Configuration Examples 2 | 3 | This directory contains some BNG Blaster 4 | configuration examples. 5 | -------------------------------------------------------------------------------- /examples/dhcp11.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "network": { 4 | "interface": "eth2", 5 | "address": "10.0.0.10", 6 | "gateway": "10.0.0.2", 7 | "address-ipv6": "fc66:1337:7331:8::10", 8 | "gateway-ipv6": "fc66:1337:7331:8::1" 9 | }, 10 | "access": [ 11 | { 12 | "interface": "eth1", 13 | "type": "ipoe", 14 | "outer-vlan-min": 128, 15 | "outer-vlan-max": 400, 16 | "inner-vlan-min": 7, 17 | "inner-vlan-max": 7 18 | } 19 | ] 20 | }, 21 | "sessions": { 22 | "count": 1, 23 | "max-outstanding": 800, 24 | "start-rate": 400, 25 | "stop-rate": 400 26 | }, 27 | "access-line": { 28 | "agent-remote-id": "DEU.RTBRICK.{session-global}", 29 | "agent-circuit-id": "0.0.0.0/0.0.0.0 eth 0:{session-global}" 30 | }, 31 | "dhcp": { 32 | "enable": true, 33 | "broadcast": false 34 | }, 35 | "dhcpv6": { 36 | "enable": true 37 | }, 38 | "session-traffic": { 39 | "autostart": true, 40 | "ipv4-pps": 1, 41 | "ipv6-pps": 1, 42 | "ipv6pd-pps": 1 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /examples/dhcpn1.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "network": { 4 | "interface": "eth2", 5 | "address": "10.0.0.10", 6 | "gateway": "10.0.0.2", 7 | "address-ipv6": "fc66:1337:7331:8::10", 8 | "gateway-ipv6": "fc66:1337:7331:8::1" 9 | }, 10 | "access": [ 11 | { 12 | "interface": "eth1", 13 | "type": "ipoe", 14 | "outer-vlan": 7, 15 | "vlan-mode": "N:1" 16 | } 17 | ] 18 | }, 19 | "sessions": { 20 | "count": 1, 21 | "max-outstanding": 800, 22 | "start-rate": 400, 23 | "stop-rate": 400 24 | }, 25 | "access-line": { 26 | "agent-remote-id": "DEU.RTBRICK.{session-global}", 27 | "agent-circuit-id": "0.0.0.0/0.0.0.0 eth 0:{session-global}" 28 | }, 29 | "dhcp": { 30 | "enable": true, 31 | "broadcast": false 32 | }, 33 | "dhcpv6": { 34 | "enable": true 35 | }, 36 | "session-traffic": { 37 | "autostart": true, 38 | "ipv4-pps": 1, 39 | "ipv6-pps": 1, 40 | "ipv6pd-pps": 1 41 | } 42 | } -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | (import ( 2 | fetchTarball { 3 | url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz"; 4 | sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; 5 | } 6 | ) { 7 | src = ./.; 8 | }) 9 | .shellNix 10 | -------------------------------------------------------------------------------- /wireshark/README.md: -------------------------------------------------------------------------------- 1 | # Wireshark BBL 2 | *Wireshark BNG Blaster Header Dissector* 3 | 4 | Download the LUA dissector script `bbl_header.lua` and start wireshark as shown below from the directory where the script is placed. 5 | 6 | ```bash 7 | $ wireshark -X lua_script:bbl_header.lua 8 | ``` 9 | --------------------------------------------------------------------------------