Class EthernetFrame
java.lang.Object
filius.software.ProtocolDataUnit
filius.software.netzzugangsschicht.EthernetFrame
- All Implemented Interfaces:
I18n,Serializable
Diese Klasse implementiert einen Frame auf der Netzzugangsschicht.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEthernetFrame(ProtocolDataUnit daten, String quellMacAdresse, String zielMacAdresse, String typ) Konstruktor zur Initialisierung der Attribute des Frames -
Method Summary
Modifier and TypeMethodDescriptionclone()getDaten()Zugriff auf die Daten, die mit dem Frame verschickt werdenZugriff auf die Absender-MAC-AdressegetTyp()Zugriff auf den Protokolltyp.Methode fuer den Zugriff auf die Ziel-MAC-AdressebooleanbooleansameContent(EthernetFrame frame) Checks if the whole content (which consists ofzielMacAdresse,quellMacAdresseanddaten) of this frame is equal to the frame in the argument.booleansamePayload(EthernetFrame frame, int ttl) If this frame and the frame in the first argument both encapsule an IP packet, this method checks if the packets have the same content and if the IP packet inside this frame has a specific TTL.voidtoHex()toString()Methods inherited from class filius.software.ProtocolDataUnit
getRcvNic, setRcvNic
-
Field Details
-
IP
Protokolltypen der Vermittlungsschicht- See Also:
-
ARP
Protokolltypen der Vermittlungsschicht- See Also:
-
-
Constructor Details
-
EthernetFrame
public EthernetFrame(ProtocolDataUnit daten, String quellMacAdresse, String zielMacAdresse, String typ) Konstruktor zur Initialisierung der Attribute des Frames
-
-
Method Details
-
clone
-
setReadByLauscherForMac
-
isReadByLauscherForMac
-
getDaten
Zugriff auf die Daten, die mit dem Frame verschickt werden -
getQuellMacAdresse
Zugriff auf die Absender-MAC-Adresse -
getTyp
Zugriff auf den Protokolltyp. Zulaessig sind ARP und IP -
getZielMacAdresse
Methode fuer den Zugriff auf die Ziel-MAC-Adresse -
toString
-
sameContent
Checks if the whole content (which consists ofzielMacAdresse,quellMacAdresseanddaten) of this frame is equal to the frame in the argument.- Parameters:
frame- frame to be compared to this frame- Returns:
- true if zielMacAdresse, quellMacAdresse and daten are equal
-
samePayload
If this frame and the frame in the first argument both encapsule an IP packet, this method checks if the packets have the same content and if the IP packet inside this frame has a specific TTL.- Parameters:
frame- the frame whose payload should be compared to this payloadttl- the desired TTL of this frame in the first argument- Returns:
- true if the frame in the first argument has the same payload and the specified TTL
-
toHex
-