mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-13 21:27:39 +02:00
Convert get_net_namespace_id to the proper convention
This commit is contained in:
@@ -199,7 +199,7 @@ class net_device(objects.StructType):
|
||||
"""
|
||||
return self.flags & self._get_net_device_flag_value("IFF_PROMISC") != 0
|
||||
|
||||
def get_net_namespace_id(self) -> int:
|
||||
def _do_get_net_namespace_id(self) -> int:
|
||||
"""Return the network namespace id for this network interface.
|
||||
|
||||
Returns:
|
||||
@@ -216,6 +216,17 @@ class net_device(objects.StructType):
|
||||
|
||||
return net_ns_id
|
||||
|
||||
def get_net_namespace_id(self) -> Optional[int]:
|
||||
"""Return the network namespace id for this network interface.
|
||||
|
||||
Returns:
|
||||
int: the network namespace id for this network interface
|
||||
"""
|
||||
try:
|
||||
return self._do_get_net_namespace_id()
|
||||
except exceptions.InvalidAddressException:
|
||||
return None
|
||||
|
||||
def get_operational_state(self) -> Union[str, interfaces.renderers.BaseAbsentValue]:
|
||||
"""Return the netwok device oprational state (RFC 2863) string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user