2023-07-31 20:05:36 +01:00
|
|
|
.. only:: comment
|
|
|
|
|
|
|
|
|
|
© Crown-owned copyright 2023, Defence Science and Technology Laboratory UK
|
|
|
|
|
|
2023-10-24 15:41:39 +01:00
|
|
|
#############
|
2023-08-02 21:54:21 +01:00
|
|
|
Base Hardware
|
2023-10-24 15:41:39 +01:00
|
|
|
#############
|
2023-07-31 20:05:36 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
The ``base.py`` module in ``primaite.simulator.network.hardware`` provides foundational components, interfaces, and classes for
|
|
|
|
|
modeling network hardware within PrimAITE simulations. It establishes core building blocks and abstractions that more
|
|
|
|
|
complex, specialized hardware components inherit from and build upon.
|
2023-07-31 20:05:36 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
The key elements defined in ``base.py`` are:
|
2023-10-24 15:41:39 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
NetworkInterface
|
|
|
|
|
================
|
2023-07-31 20:05:36 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
- Abstract base class for network interfaces like NICs. Defines common attributes like MAC address, speed, MTU.
|
|
|
|
|
- Requires subclasses to implement ``enable()``, ``disable()``, ``send_frame()`` and ``receive_frame()``.
|
|
|
|
|
- Provides basic state description and request handling capabilities.
|
2023-07-31 20:05:36 +01:00
|
|
|
|
2023-08-08 20:22:18 +01:00
|
|
|
Node
|
2023-10-24 15:41:39 +01:00
|
|
|
====
|
2023-08-08 20:22:18 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
The Node class is the most crucial component defined in base.py, serving as the parent class for all nodes within a
|
|
|
|
|
PrimAITE network simulation.
|
2023-08-08 20:22:18 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
It encapsulates the following key attributes and behaviors:
|
2023-08-08 20:22:18 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
- ``hostname`` - The node's hostname on the network.
|
|
|
|
|
- ``network_interfaces`` - Dict of NetworkInterface objects attached to the node.
|
|
|
|
|
- ``operating_state`` - The hardware state (on/off) of the node.
|
|
|
|
|
- ``sys_log`` - System log to record node events.
|
|
|
|
|
- ``session_manager`` - Manages user sessions on the node.
|
|
|
|
|
- ``software_manager`` - Manages software and services installed on the node.
|
|
|
|
|
- ``connect_nic()`` - Connects a NetworkInterface to the node.
|
|
|
|
|
- ``disconnect_nic()`` - Disconnects a NetworkInterface from the node.
|
|
|
|
|
- ``receive_frame()`` - Receive and process an incoming network frame.
|
|
|
|
|
- ``apply_timestep()`` - Progresses node state for a simulation timestep.
|
|
|
|
|
- ``power_on()`` - Powers on the node and enables NICs.
|
|
|
|
|
- ``power_off()`` - Powers off the node and disables NICs.
|
2023-08-08 20:22:18 +01:00
|
|
|
|
2023-07-31 20:05:36 +01:00
|
|
|
|
#2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation
2024-02-08 22:37:21 +00:00
|
|
|
The Node class handles installation of system software, network connectivity, frame processing, system logging, and
|
|
|
|
|
power states. It establishes baseline functionality while allowing subclassing to model specific node types like hosts,
|
|
|
|
|
routers, firewalls etc. The flexible architecture enables composing complex network topologies.
|