Commit 05109d2e authored by Hejing Li's avatar Hejing Li
Browse files

eth.py: add_ip

parent 47e21d7d
...@@ -42,8 +42,11 @@ class EthChannel(base.Channel): ...@@ -42,8 +42,11 @@ class EthChannel(base.Channel):
class EthSimpleNIC(base.Component): class EthSimpleNIC(base.Component):
def __init__(self, s: base.System) -> None: def __init__(self, s: base.System) -> None:
super().__init__(s) super().__init__(s)
self.ip = None
self.eth_if = EthInterface(self) self.eth_if = EthInterface(self)
def add_ipv4(self, ip: str) -> None:
self.ip = ip
class BaseEthNetComponent(base.Component): class BaseEthNetComponent(base.Component):
def __init__(self, s: base.System) -> None: def __init__(self, s: base.System) -> None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment