pypcapkit 1.1.0__pp39-none-any.whl → 1.1.0.post1__pp39-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pcapkit/__init__.py +1 -1
- pcapkit/const/pcapng/option_type.py +25 -1
- pcapkit/const/reg/apptype.py +25 -1
- {pypcapkit-1.1.0.dist-info → pypcapkit-1.1.0.post1.dist-info}/METADATA +1 -1
- {pypcapkit-1.1.0.dist-info → pypcapkit-1.1.0.post1.dist-info}/RECORD +9 -9
- {pypcapkit-1.1.0.dist-info → pypcapkit-1.1.0.post1.dist-info}/LICENSE +0 -0
- {pypcapkit-1.1.0.dist-info → pypcapkit-1.1.0.post1.dist-info}/WHEEL +0 -0
- {pypcapkit-1.1.0.dist-info → pypcapkit-1.1.0.post1.dist-info}/entry_points.txt +0 -0
- {pypcapkit-1.1.0.dist-info → pypcapkit-1.1.0.post1.dist-info}/top_level.txt +0 -0
pcapkit/__init__.py
CHANGED
@@ -18,7 +18,7 @@ from aenum import StrEnum, extend_enum
|
|
18
18
|
__all__ = ['OptionType']
|
19
19
|
|
20
20
|
if TYPE_CHECKING:
|
21
|
-
from typing import DefaultDict, Optional, Type
|
21
|
+
from typing import Any, DefaultDict, Optional, Type
|
22
22
|
|
23
23
|
|
24
24
|
class OptionType(StrEnum):
|
@@ -53,6 +53,30 @@ class OptionType(StrEnum):
|
|
53
53
|
def __str__(self) -> 'str':
|
54
54
|
return '%s [%d]' % (self.opt_name, self.opt_value)
|
55
55
|
|
56
|
+
def __int__(self) -> 'int':
|
57
|
+
return self.opt_value
|
58
|
+
|
59
|
+
def __lt__(self, other: 'OptionType') -> 'bool':
|
60
|
+
return self.opt_value < other
|
61
|
+
|
62
|
+
def __gt__(self, other: 'OptionType') -> 'bool':
|
63
|
+
return self.opt_value > other
|
64
|
+
|
65
|
+
def __le__(self, other: 'OptionType') -> 'bool':
|
66
|
+
return self.opt_value <= other
|
67
|
+
|
68
|
+
def __ge__(self, other: 'OptionType') -> 'bool':
|
69
|
+
return self.opt_value >= other
|
70
|
+
|
71
|
+
def __eq__(self, other: 'Any') -> 'bool':
|
72
|
+
return self.opt_value == other
|
73
|
+
|
74
|
+
def __ne__(self, other: 'Any') -> 'bool':
|
75
|
+
return self.opt_value != other
|
76
|
+
|
77
|
+
def __hash__(self) -> 'int':
|
78
|
+
return hash(self.opt_value)
|
79
|
+
|
56
80
|
#: opt_endofopt
|
57
81
|
opt_endofopt: 'OptionType' = 0, 'opt_endofopt'
|
58
82
|
|
pcapkit/const/reg/apptype.py
CHANGED
@@ -20,7 +20,7 @@ from pcapkit.utilities.compat import show_flag_values
|
|
20
20
|
__all__ = ['AppType']
|
21
21
|
|
22
22
|
if TYPE_CHECKING:
|
23
|
-
from typing import DefaultDict, Type
|
23
|
+
from typing import Any, DefaultDict, Type
|
24
24
|
|
25
25
|
|
26
26
|
class TransportProtocol(IntFlag):
|
@@ -92,6 +92,30 @@ class AppType(StrEnum):
|
|
92
92
|
def __str__(self) -> 'str':
|
93
93
|
return '%s [%d - %s]' % (self.svc, self.port, self.proto.name)
|
94
94
|
|
95
|
+
def __int__(self) -> 'int':
|
96
|
+
return self.opt_value
|
97
|
+
|
98
|
+
def __lt__(self, other: 'AppType') -> 'bool':
|
99
|
+
return self.opt_value < other
|
100
|
+
|
101
|
+
def __gt__(self, other: 'AppType') -> 'bool':
|
102
|
+
return self.opt_value > other
|
103
|
+
|
104
|
+
def __le__(self, other: 'AppType') -> 'bool':
|
105
|
+
return self.opt_value <= other
|
106
|
+
|
107
|
+
def __ge__(self, other: 'AppType') -> 'bool':
|
108
|
+
return self.opt_value >= other
|
109
|
+
|
110
|
+
def __eq__(self, other: 'Any') -> 'bool':
|
111
|
+
return self.opt_value == other
|
112
|
+
|
113
|
+
def __ne__(self, other: 'Any') -> 'bool':
|
114
|
+
return self.opt_value != other
|
115
|
+
|
116
|
+
def __hash__(self) -> 'int':
|
117
|
+
return hash(self.opt_value)
|
118
|
+
|
95
119
|
#: - [TCP] Reserved
|
96
120
|
#: - [UDP] Reserved
|
97
121
|
reserved_0: 'AppType' = 0, 'reserved', TransportProtocol.get('tcp') | TransportProtocol.get('udp')
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pcapkit/__init__.py,sha256=
|
1
|
+
pcapkit/__init__.py,sha256=JbIEnv7UFnQh-5Wck0vIyepIOEjNyKkSkMeu2Sfgdrg,4097
|
2
2
|
pcapkit/__main__.py,sha256=K_XEsZHJqDUdRfext2dN7jlnno5ub3bqjklwmWrZ8KQ,5581
|
3
3
|
pcapkit/all.py,sha256=vQvbo8IeDW9nzW7dkCnakhgljO8t1lH5OgW0F-iTDwI,6598
|
4
4
|
pcapkit/const/__init__.py,sha256=XpEr66hXmBpBofS5aHiTZXTG8VZlxU7xy0BNXBKCi1Q,3266
|
@@ -111,12 +111,12 @@ pcapkit/const/pcapng/__init__.py,sha256=LMI0L2cKZMozBjwq4rP3AuIW8HwS5FJ_ogiO_5Ip
|
|
111
111
|
pcapkit/const/pcapng/block_type.py,sha256=qFt8ooO98CrWJkk-_LS-bKNo5DVuFkcb-Fec3hzCaW8,5422
|
112
112
|
pcapkit/const/pcapng/filter_type.py,sha256=s4RONv6czf0xS3gMugnM75bwUNDJcKuVRza0ad09PtM,1395
|
113
113
|
pcapkit/const/pcapng/hash_algorithm.py,sha256=uwT_fCyWTwlxmJ-X05NY9HkyxsfzcfJgR1pO1NT02d4,1544
|
114
|
-
pcapkit/const/pcapng/option_type.py,sha256=
|
114
|
+
pcapkit/const/pcapng/option_type.py,sha256=_HDYjyrpBQECM6-YbZ6GXO_0o_Ffx1EuVnDVsAPT_Ys,6307
|
115
115
|
pcapkit/const/pcapng/record_type.py,sha256=4rZytbhhF6u5SPvQ8ew3jx4OhN_rwDQG3I4JlBy9OJ4,1574
|
116
116
|
pcapkit/const/pcapng/secrets_type.py,sha256=n_662aowLtqA25ilbdG6BWb2rYmrdBJt79_SISzfJkw,1578
|
117
117
|
pcapkit/const/pcapng/verdict_type.py,sha256=_jEkN0g6CX-DGshAj-lUiZjiwdK7Fqou2pnzgZ-WyIk,1476
|
118
118
|
pcapkit/const/reg/__init__.py,sha256=xKABPHwDQ0diN2sFA7hkw42FNsb6tx294XemEjTs2g8,1469
|
119
|
-
pcapkit/const/reg/apptype.py,sha256=
|
119
|
+
pcapkit/const/reg/apptype.py,sha256=GQ9iWv3i6hTBNc2QbtGz7tGBjbJGPrGQRO2xkFaR9N8,1426355
|
120
120
|
pcapkit/const/reg/ethertype.py,sha256=MlESESKA5yOSppkNXLkiqTEXUEJI7uTq_8_RSduDK5Q,25954
|
121
121
|
pcapkit/const/reg/linktype.py,sha256=gYGIKpI21d4dpfO5ZAU8efqz1eBLVUiQnSLA1anKits,37247
|
122
122
|
pcapkit/const/reg/transtype.py,sha256=7ZQOWFNGP8toBNRko0NuNih-sh3oo5RgIWBIKFb9bRQ,12872
|
@@ -455,9 +455,9 @@ pcapkit/vendor/tcp/mp_tcp_option.py,sha256=fLtttA2-p3qXRcP-1kI3gA-08F0bhCCgVQTLi
|
|
455
455
|
pcapkit/vendor/tcp/option.py,sha256=8-0kq6GTKFCjHjxnDU3T-IUvjp5XA7MiCr2BN_aDonI,2958
|
456
456
|
pcapkit/vendor/vlan/__init__.py,sha256=qvLktJ0yuoZokas6-_ZGwMJOzbujSCM8pZHQ9jjTegU,674
|
457
457
|
pcapkit/vendor/vlan/priority_level.py,sha256=xVu6M-Ys4pft5I-qPCCxM-KfnMAUnZppD2qPO9gPkVE,2961
|
458
|
-
pypcapkit-1.1.0.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
|
459
|
-
pypcapkit-1.1.0.dist-info/METADATA,sha256=
|
460
|
-
pypcapkit-1.1.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
461
|
-
pypcapkit-1.1.0.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
|
462
|
-
pypcapkit-1.1.0.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
|
463
|
-
pypcapkit-1.1.0.dist-info/RECORD,,
|
458
|
+
pypcapkit-1.1.0.post1.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
|
459
|
+
pypcapkit-1.1.0.post1.dist-info/METADATA,sha256=OyPOdGpKuFfNY-8NBDP1nNRRK6I_GZ_mH6UY3TFkh3k,7692
|
460
|
+
pypcapkit-1.1.0.post1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
461
|
+
pypcapkit-1.1.0.post1.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
|
462
|
+
pypcapkit-1.1.0.post1.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
|
463
|
+
pypcapkit-1.1.0.post1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|