You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some method to get the mac direction?. When I received the buffer, start in internet layer, avoiding the link layer(where is the mac direction).
Ex:
socketIcmp.on ("message", function (buffer, address) {
console.log ("ICMP received " + buffer.length + " bytes from " + address
+ ": " + buffer.toString ("hex"));
});
RESULT =
ICMP received 84 bytes from 127.0.0.1:
45 00 00 54 2f 79 40 00 40 01 0d 2e 7f 00 00 01 7f 00 00 01 08 00 2b 8e 28 9e 00 01 b5 fa 4b 59 00 00 00 00 db ab 08 00 00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
As I see. In Whireshark, start with 00.00.00.00 (source mac) and 00.00.00.00(destination mac). And in the raw socket, this ethernet protocol is avoid. Are some method to rescue it?
The text was updated successfully, but these errors were encountered:
I don't believe you can get a raw socket to return the Ethernet header details, raw sockets return network layer and down not link layer down. You may need to use something like WinPCAP/libpcap.
There are some method to get the mac direction?. When I received the buffer, start in internet layer, avoiding the link layer(where is the mac direction).
Ex:
socketIcmp.on ("message", function (buffer, address) {
console.log ("ICMP received " + buffer.length + " bytes from " + address
+ ": " + buffer.toString ("hex"));
});
RESULT =
ICMP received 84 bytes from 127.0.0.1:
45 00 00 54 2f 79 40 00 40 01 0d 2e 7f 00 00 01 7f 00 00 01 08 00 2b 8e 28 9e 00 01 b5 fa 4b 59 00 00 00 00 db ab 08 00 00 00 00 00 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37
IN WHIRESHARK
00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 00 54 33 62 40 00 40 01 09 45 7f 00 00 01 7f 00
00 01 08 00 3f 09 28 fd 00 01 f4 fa 4b 59 00 00 00 00 8b d1 05 00 00 00 00 00 10 11 12 13 14 15
16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35
36 37
As I see. In Whireshark, start with 00.00.00.00 (source mac) and 00.00.00.00(destination mac). And in the raw socket, this ethernet protocol is avoid. Are some method to rescue it?
The text was updated successfully, but these errors were encountered: