'dripcap/mac'; import EthEnum from 'dripcap/eth/type'; export default class EthrenetDissector { analyze(packet, parentLayer) { let layer = new Layer(); layer.name = 'Ethernet'; layer.namespace = '::Ethernet'; let destination = parentLayer.payload.slice(0, 6); layer.fields.push({ name: 'MAC destination', attr: 'dst', data: destination }); layer.attrs.dst = new MACAddress(destination); let source = parentLayer.payload.slice(6, 12); layer.fields.push({ name: 'MAC source', attr: 'src', data: source }); layer.attrs.src = new MACAddress(source); ղੳثͷϓϥάΠϯεΫϦϓτʢൈਮʣ