virtual void SetIfIndex (const uint32_t index) = 0;<br>virtual uint32_t GetIfIndex (void) const = 0;
virtual Ptr<Channel> GetChannel (void) const = 0;<br><font color="#0076b3">return the channel this NetDevice is connected to. The value<br>returned can be zero if the NetDevice is not yet connecte</font><br>
virtual void SetAddress (Address address) = 0;<br>virtual Address GetAddress (void) const = 0;<br><font color="#0076b3">Set the address of this interface</font><br>
virtual bool SetMtu (const uint16_t mtu) = 0;<br>virtual uint16_t GetMtu (void) const = 0;<br><font color="#0076b3">Override for default MTU defined on a per-type basis.<br>根据每种类型定义最大传输单元</font><br>
<font color="#0076b3"><font color="#000000">virtual bool IsLinkUp (void) const = 0;</font><br>return true if link is up; false otherwise</font><br>
这里有一系列判断是否广播,单播和桥接等
virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) = 0;<br><font color="#0076b3">Called from higher layer to send packet into Network Deviceto the specified destination Address</font><br>
virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber) = 0;<br><font color="#0076b3">Called from higher layer to send packet into Network Devicewith the specified source and destination Addresses.</font><br>
virtual Ptr<Node> GetNode (void) const = 0;<br>virtual void SetNode (Ptr<Node> node) = 0;<br><font color="#0076b3">returns the node base class which contains this networkinterface.</font><br>