|
1 | 1 | import { IpAddress } from "./ip"; |
2 | 2 | import { ARP_PROTOCOL_TYPE, FramePayload, MacAddress } from "./ethernet"; |
| 3 | +import { TOOLTIP_KEYS } from "../utils/constants/tooltips_constants"; |
3 | 4 |
|
4 | 5 | const ETHERNET_HTYPE = 1; |
5 | 6 | const IPv4_PTYPE = 0x0800; |
@@ -94,15 +95,15 @@ export abstract class ArpPacket implements FramePayload { |
94 | 95 | // eslint-disable-next-line |
95 | 96 | getDetails(_layer: number): Record<string, string | number | object> { |
96 | 97 | return { |
97 | | - HTYPE: this.htype, |
98 | | - PTYPE: this.ptype, |
99 | | - HLEN: this.hlen, |
100 | | - PLEN: this.plen, |
101 | | - OP: this.op, |
102 | | - SHA: this.sha.toString(), |
103 | | - SPA: this.spa.toString(), |
104 | | - THA: this.tha.toString(), |
105 | | - TPA: this.tpa.toString(), |
| 98 | + [TOOLTIP_KEYS.HTYPE]: this.htype, |
| 99 | + [TOOLTIP_KEYS.PTYPE]: this.ptype, |
| 100 | + [TOOLTIP_KEYS.HLEN]: this.hlen, |
| 101 | + [TOOLTIP_KEYS.PLEN]: this.plen, |
| 102 | + [TOOLTIP_KEYS.OP]: this.op, |
| 103 | + [TOOLTIP_KEYS.SHA]: this.sha.toString(), |
| 104 | + [TOOLTIP_KEYS.SPA]: this.spa.toString(), |
| 105 | + [TOOLTIP_KEYS.THA]: this.tha.toString(), |
| 106 | + [TOOLTIP_KEYS.TPA]: this.tpa.toString(), |
106 | 107 | }; |
107 | 108 | } |
108 | 109 | } |
|
0 commit comments