|
| 1 | +from _typeshed import Self |
| 2 | +from typing import ClassVar, SupportsInt, overload |
| 3 | +from typing_extensions import Literal, SupportsIndex |
| 4 | + |
| 5 | +from netaddr.core import DictDotLookup |
| 6 | +from netaddr.ip import IPAddress |
| 7 | +from netaddr.strategy.eui48 import mac_eui48 |
| 8 | +from netaddr.strategy.eui64 import eui64_base |
| 9 | + |
| 10 | +class BaseIdentifier: |
| 11 | + def __init__(self) -> None: ... |
| 12 | + def __int__(self) -> int: ... |
| 13 | + def __long__(self) -> int: ... |
| 14 | + def __oct__(self) -> str: ... |
| 15 | + def __hex__(self) -> str: ... |
| 16 | + def __index__(self) -> int: ... |
| 17 | + |
| 18 | +class OUI(BaseIdentifier): |
| 19 | + records: list[dict[str, object]] |
| 20 | + def __init__(self, oui: str | int) -> None: ... |
| 21 | + def __eq__(self, other: object) -> bool: ... |
| 22 | + def __ne__(self, other: object) -> bool: ... |
| 23 | + @property |
| 24 | + def reg_count(self) -> int: ... |
| 25 | + def registration(self, index: int = ...) -> DictDotLookup: ... |
| 26 | + |
| 27 | +class IAB(BaseIdentifier): |
| 28 | + IAB_EUI_VALUES: ClassVar[tuple[int, int]] |
| 29 | + @classmethod |
| 30 | + def split_iab_mac(cls, eui_int: int, strict: bool = ...) -> tuple[int, int]: ... |
| 31 | + record: dict[str, object] |
| 32 | + def __init__(self, iab: str | int, strict: bool = ...) -> None: ... |
| 33 | + def __eq__(self, other: object) -> bool: ... |
| 34 | + def __ne__(self, other: object) -> bool: ... |
| 35 | + def registration(self) -> DictDotLookup: ... |
| 36 | + |
| 37 | +class EUI(BaseIdentifier): |
| 38 | + def __init__( |
| 39 | + self, addr: EUI | int | str, version: int | None = ..., dialect: type[mac_eui48] | type[eui64_base] | None = ... |
| 40 | + ) -> None: ... |
| 41 | + @property |
| 42 | + def value(self) -> int: ... |
| 43 | + @value.setter |
| 44 | + def value(self, value: str | SupportsInt | SupportsIndex) -> None: ... |
| 45 | + @property |
| 46 | + def dialect(self) -> type[mac_eui48] | type[eui64_base]: ... |
| 47 | + @dialect.setter |
| 48 | + def dialect(self, value: type[mac_eui48] | type[eui64_base] | None) -> None: ... |
| 49 | + @property |
| 50 | + def oui(self) -> OUI: ... |
| 51 | + @property |
| 52 | + def ei(self) -> str: ... |
| 53 | + def is_iab(self) -> bool: ... |
| 54 | + @property |
| 55 | + def iab(self) -> IAB | None: ... |
| 56 | + @property |
| 57 | + def version(self) -> Literal[48, 64]: ... |
| 58 | + @overload |
| 59 | + def __getitem__(self, idx: int) -> int: ... |
| 60 | + @overload |
| 61 | + def __getitem__(self, idx: slice) -> list[int]: ... |
| 62 | + @overload |
| 63 | + def __getitem__(self, idx: int | slice) -> int | list[int]: ... |
| 64 | + def __setitem__(self, idx: int, value: int) -> None: ... |
| 65 | + def __hash__(self) -> int: ... |
| 66 | + def __eq__(self, other: object) -> bool: ... |
| 67 | + def __ne__(self, other: object) -> bool: ... |
| 68 | + def __lt__(self, other: EUI | int | str) -> bool: ... |
| 69 | + def __le__(self, other: EUI | int | str) -> bool: ... |
| 70 | + def __gt__(self, other: EUI | int | str) -> bool: ... |
| 71 | + def __ge__(self, other: EUI | int | str) -> bool: ... |
| 72 | + def bits(self, word_sep: str | None = ...) -> str: ... |
| 73 | + @property |
| 74 | + def packed(self) -> bytes: ... |
| 75 | + @property |
| 76 | + def words(self) -> tuple[int, ...]: ... |
| 77 | + @property |
| 78 | + def bin(self) -> str: ... |
| 79 | + def eui64(self: Self) -> Self: ... |
| 80 | + def modified_eui64(self: Self) -> Self: ... |
| 81 | + def ipv6(self, prefix: str | SupportsInt | SupportsIndex) -> IPAddress: ... |
| 82 | + def ipv6_link_local(self) -> IPAddress: ... |
| 83 | + @property |
| 84 | + def info(self) -> DictDotLookup: ... |
| 85 | + def format(self, dialect: type[mac_eui48] | type[eui64_base] | None = ...) -> str: ... |
0 commit comments