Skip to content

Commit

Permalink
Updated naming schema for the Raw protocol files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccie18643 committed Jul 13, 2024
1 parent 87450be commit 2b1a10b
Show file tree
Hide file tree
Showing 23 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion pytcp/protocols/arp/packet_handler_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PacketHandlerTxArp(ABC):
from pytcp.protocols.ethernet.base import EthernetPayload
from pytcp.protocols.ip4.assembler import Ip4Assembler, Ip4FragAssembler
from pytcp.protocols.ip6.assembler import Ip6Assembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler

packet_stats_tx: PacketStatsTx

Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ethernet/assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from pytcp.lib.proto import ProtoAssembler
from pytcp.protocols.ethernet.base import Ethernet
from pytcp.protocols.ethernet.header import EthernetHeader
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler

if TYPE_CHECKING:
from pytcp.protocols.ethernet.base import EthernetPayload
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ethernet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from pytcp.protocols.ethernet.header import EthernetHeader
from pytcp.protocols.ip4.assembler import Ip4Assembler, Ip4FragAssembler
from pytcp.protocols.ip6.assembler import Ip6Assembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler

EthernetPayload: TypeAlias = (
ArpAssembler
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ethernet/packet_handler_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
from pytcp.protocols.ethernet.assembler import EthernetAssembler
from pytcp.protocols.ip4.assembler import Ip4Assembler, Ip4FragAssembler
from pytcp.protocols.ip6.assembler import Ip6Assembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler


class PacketHandlerTxEthernet(ABC):
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/icmp4/phtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PacketHandlerTxIcmp4(ABC):
from pytcp.lib.ip4_address import Ip4Address
from pytcp.lib.packet_stats import PacketStatsTx
from pytcp.protocols.ip4.base import Ip4Payload
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/icmp6/phtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PacketHandlerTxIcmp6(ABC):
from pytcp.lib.tx_status import TxStatus
from pytcp.protocols.ip6.base import Ip6Payload
from pytcp.protocols.ip6_ext_frag.assembler import Ip6ExtFragAssembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip4/assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from pytcp.protocols.ip4.base import Ip4
from pytcp.protocols.ip4.header import IP4_HEADER_LEN, Ip4Header, Ip4Proto
from pytcp.protocols.ip4.options import Ip4Option, Ip4OptionEol, Ip4OptionNop
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler

if TYPE_CHECKING:
from pytcp.protocols.ip4.base import Ip4Payload
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip4/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
if TYPE_CHECKING:
from pytcp.protocols.icmp4.fpa import Icmp4Assembler
from pytcp.protocols.ip4.header import Ip4Header
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip4/packet_handler_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
from pytcp.lib.mac_address import MacAddress
from pytcp.lib.tx_status import TxStatus
from pytcp.protocols.ip4.assembler import Ip4Assembler, Ip4FragAssembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.udp.fpa import UdpAssembler


Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip6/assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from pytcp.protocols.ethernet.header import EthernetType
from pytcp.protocols.ip6.base import Ip6
from pytcp.protocols.ip6.header import IP6_HEADER_LEN, Ip6Header, Ip6Next
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler

if TYPE_CHECKING:
from pytcp.lib.tracker import Tracker
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip6/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
if TYPE_CHECKING:
from pytcp.protocols.icmp6.fpa import Icmp6Assembler
from pytcp.protocols.ip6_ext_frag.assembler import Ip6ExtFragAssembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip6/packet_handler_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
Icmp6NdMessage,
)
from pytcp.protocols.ip6.assembler import Ip6Assembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler


class PacketHandlerTxIp6(ABC):
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip6_ext_frag/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

if TYPE_CHECKING:
from pytcp.protocols.icmp6.fpa import Icmp6Assembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/ip6_ext_frag/packet_handler_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class PacketHandlerTxIp6ExtFrag(ABC):
from pytcp.protocols.icmp6.fpa import Icmp6Assembler
from pytcp.protocols.ip6.assembler import Ip6Assembler
from pytcp.protocols.ip6.base import Ip6Payload
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
# #
############################################################################

# pylint: disable = unused-argument

"""
Module contains Fast Packet Assembler support class for the raw protocol.
Module contains assembler support class for the raw protocol.
pytcp/protocols/raw/fpa.py
pytcp/protocols/raw/assembler.py
ver 2.8
ver 2.9
"""


Expand All @@ -39,7 +40,7 @@

from pytcp.lib.proto import ProtoAssembler
from pytcp.lib.tracker import Tracker
from pytcp.protocols.raw.ps import Raw
from pytcp.protocols.raw.base import Raw


class RawAssembler(Raw, ProtoAssembler):
Expand Down
6 changes: 3 additions & 3 deletions pytcp/protocols/raw/ps.py → pytcp/protocols/raw/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@


"""
Module contains base class for the UDP protccol.
Module contains base class for the RAW protccol.
pytcp/protocols/raw/ps.py
pytcp/protocols/raw/base.py
ver 2.8
ver 2.9
"""


Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/tcp/packet_handler_tx.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PacketHandlerTxTcp(ABC):
from pytcp.protocols.ip4.base import Ip4Payload
from pytcp.protocols.ip6.base import Ip6Payload
from pytcp.protocols.ip6_ext_frag.assembler import Ip6ExtFragAssembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

packet_stats_tx: PacketStatsTx
Expand Down
2 changes: 1 addition & 1 deletion pytcp/protocols/udp/phtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class PacketHandlerTxUdp(ABC):
from pytcp.protocols.ip4.base import Ip4Payload
from pytcp.protocols.ip6.base import Ip6Payload
from pytcp.protocols.ip6_ext_frag.assembler import Ip6ExtFragAssembler
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

packet_stats_tx: PacketStatsTx
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/protocols__ip4__phtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from pytcp.lib.packet_stats import PacketStatsTx
from pytcp.lib.tx_status import TxStatus
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.subsystems.packet_handler import PacketHandler
from tests.unit.mock_network import (
MockNetworkSettings,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/protocols__ip6__phtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from pytcp.lib.packet_stats import PacketStatsTx
from pytcp.lib.tx_status import TxStatus
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.subsystems.packet_handler import PacketHandler
from tests.unit.mock_network import (
MockNetworkSettings,
Expand Down
2 changes: 1 addition & 1 deletion tests_unit_legacy/protocols__ethernet__ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
Ethernet,
EthernetType,
)
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler

ETHERNET__DST = MacAddress("00:11:22:33:44:55")
ETHERNET__SRC = MacAddress("66:77:88:99:AA:BB")
Expand Down
2 changes: 1 addition & 1 deletion tests_unit_legacy/protocols__ip4__fpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
IP4_PROTO_TCP,
IP4_PROTO_UDP,
)
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down
2 changes: 1 addition & 1 deletion tests_unit_legacy/protocols__ip6__fpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from protocols.ethernet.base import EthernetType
from pytcp.protocols.ip6.assembler import Ip6Assembler
from pytcp.protocols.ip6.base import IP6_HEADER_LEN, IP6_NEXT_RAW
from pytcp.protocols.raw.fpa import RawAssembler
from pytcp.protocols.raw.assembler import RawAssembler
from pytcp.protocols.tcp.assembler import TcpAssembler
from pytcp.protocols.udp.fpa import UdpAssembler

Expand Down

0 comments on commit 2b1a10b

Please sign in to comment.