diff --git a/src/types/devices/device.ts b/src/types/devices/device.ts index 31970d8..76f4fcc 100644 --- a/src/types/devices/device.ts +++ b/src/types/devices/device.ts @@ -134,7 +134,7 @@ export abstract class Device extends Sprite { // TODO: Most probably it will be different for each type of device handlePacket(packet: Packet) { switch (packet.type) { - case "ICMP-8": + case "ICMP-8": { const destinationDevice = this.viewgraph.getDeviceByIP( packet.rawPacket.sourceAddress, ); @@ -154,6 +154,7 @@ export abstract class Device extends Sprite { ); } break; + } default: console.warn("Packet’s type unrecognized"); } diff --git a/src/types/packet.ts b/src/types/packet.ts index ac286b6..0cc57ea 100644 --- a/src/types/packet.ts +++ b/src/types/packet.ts @@ -10,7 +10,7 @@ import { circleGraphicsContext, Colors, ZIndexLevels } from "../utils"; import { RightBar, StyledInfo } from "../graphics/right_bar"; import { Position } from "./common"; import { ViewGraph } from "./graphs/viewgraph"; -import { IpAddress, IPv4Packet } from "../packets/ip"; +import { IPv4Packet } from "../packets/ip"; import { EchoRequest, EchoReply } from "../packets/icmp"; import { DeviceId, isRouter } from "./graphs/datagraph"; import { Device } from "./devices";