Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/ARPLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ private class _ARP_HEADER {
_IP_ADDR srcIp; // Sender's protocol Address
_ETHERNET_ADDR dstMac; // Target's hardware Address
_IP_ADDR dstIp; // Target's protocol Address

String x = "dd";

public _ARP_HEADER() { // 28 Bytes
this.macType = new byte[2]; // 2 Bytes / 0 ~ 1
this.ipType = new byte[2]; // 2 Bytes / 2 ~ 3
Expand Down Expand Up @@ -264,6 +265,11 @@ public ARP_Send_Thread(byte[] input, String dstIP,int portNum) {
public void run() {
GetUnderLayer().Send(input, input.length, portNum);
while(true) {
try {
Thread.sleep(100);
}catch (Exception e){
e.printStackTrace();
}
_ARP_Cache_Entry temp = ARP_Cache_table.get(dstIp);
if(temp.status == true){
break;
Expand Down