I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 1eda9e90 authored by zzz's avatar zzz
Browse files

set ethertype to IPv4

parent e1c533e9
No related branches found
No related tags found
No related merge requests found
...@@ -49,10 +49,10 @@ public class PcapWriter { ...@@ -49,10 +49,10 @@ public class PcapWriter {
0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, (byte) 0xff, (byte) 0xff, 0, 0, 0, 1 }; 0, 0, (byte) 0xff, (byte) 0xff, 0, 0, 0, 1 };
/** dummy macs and ethertype */ /** dummy macs, IPv4 ethertype */
private static final byte[] MAC_HEADER = { 1, 2, 3, 4, 5, 6, private static final byte[] MAC_HEADER = { 1, 2, 3, 4, 5, 6,
1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6,
(byte) 0x80, 0 }; (byte) 0x08, 0 };
private static final byte[] IP_HEADER_1 = { 0x45, 0 }; // the length goes after this private static final byte[] IP_HEADER_1 = { 0x45, 0 }; // the length goes after this
private static final byte[] IP_HEADER_2 = { 0x12, 0x34, 0x40, 0, 64, 6 }; // ID, flags, TTL and TCP private static final byte[] IP_HEADER_2 = { 0x12, 0x34, 0x40, 0, 64, 6 }; // ID, flags, TTL and TCP
private static final byte[] UNK_IP = { (byte) 0xff, 0, 0, 0}; private static final byte[] UNK_IP = { (byte) 0xff, 0, 0, 0};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment