Skip to content

Commit

Permalink
Cleaning up config
Browse files Browse the repository at this point in the history
  • Loading branch information
ccie18643 committed Sep 15, 2024
1 parent d9cdd39 commit 2dbd4b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions pytcp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@

from __future__ import annotations

# IPv4/IPv6 minimum MTU values.
IP4__MIN_MTU = 576 # RFC 791
IP6__MIN_MTU = 1280 # RFC 8200

# TCP/UDP ephemeral port range to be used by outbound connections.
EPHEMERAL_PORT_RANGE = range(32168, 60700, 2)

Expand Down
2 changes: 2 additions & 0 deletions pytcp/protocols/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@
from __future__ import annotations

IP4__DEFAULT_TTL = 64
IP4__MIN_MTU = 576 # RFC 791

IP6__DEFAULT_HOP_LIMIT = 64
IP6__MIN_MTU = 1280 # RFC 8200
2 changes: 1 addition & 1 deletion pytcp/protocols/dhcp4/options/dhcp4_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
from abc import ABC
from typing import override

from pytcp.config import IP4__MIN_MTU
from pytcp.lib.proto_option import ProtoOptions
from pytcp.protocols.defaults import IP4__MIN_MTU
from pytcp.protocols.dhcp4.dhcp4__errors import Dhcp4IntegrityError
from pytcp.protocols.dhcp4.dhcp4__header import DHCP4__HEADER__LEN
from pytcp.protocols.dhcp4.options.dhcp4_option import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
from dataclasses import dataclass, field
from typing import override

from pytcp.config import IP4__MIN_MTU
from pytcp.lib.int_checks import is_uint16
from pytcp.protocols.defaults import IP4__MIN_MTU
from pytcp.protocols.icmp4.icmp4__errors import Icmp4IntegrityError
from pytcp.protocols.icmp4.message.icmp4_message import (
Icmp4Code,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, override

from pytcp.config import IP6__MIN_MTU
from pytcp.lib.int_checks import is_uint16
from pytcp.protocols.defaults import IP6__MIN_MTU
from pytcp.protocols.icmp6.icmp6__errors import Icmp6IntegrityError
from pytcp.protocols.icmp6.message.icmp6_message import (
Icmp6Code,
Expand Down

0 comments on commit 2dbd4b2

Please sign in to comment.