gaARP_Cache4[i].IP = SWAddr;
}
+ Log("[ARP ] Caching %i.%i.%i.%i (%02x:%02x:%02x:%02x:%02x:%02x) in %i",
+ SWAddr.B[0], SWAddr.B[1], SWAddr.B[2], SWAddr.B[3],
+ HWAddr.B[0], HWAddr.B[1], HWAddr.B[2], HWAddr.B[3], HWAddr.B[4], HWAddr.B[5],
+ i
+ );
+
gaARP_Cache4[i].MAC = HWAddr;
gaARP_Cache4[i].LastUpdate = now();
+ giARP_LastUpdateID ++;
RELEASE(&glARP_Cache4);
}
gaARP_Cache6[i].IP = SWAddr;
gaARP_Cache6[i].LastUpdate = now();
+ giARP_LastUpdateID ++;
RELEASE(&glARP_Cache6);
}
}
break;
+
+ default:
+ Warning("[ARP ] Unknown Request ID %i", ntohs(req4->Request));
+ break;
}
}
hdr->Version = 4;
hdr->HeaderLength = sizeof(tIPv4Header)/4;
hdr->DiffServices = 0; // TODO: Check
+
+ hdr->Reserved = 0;
+ hdr->DontFragment = 0;
+ hdr->MoreFragments = 0;
+ hdr->FragOffLow = 0;
+ hdr->FragOffHi = 0;
+
hdr->TotalLength = htons( bufSize );
hdr->Identifcation = htons( ID ); // TODO: Check
hdr->TTL = DEFAULT_TTL;
hdr = malloc(sizeof(tUDPHeader)+Length);
hdr->SourcePort = htons( Channel->LocalPort );
hdr->DestPort = htons( Channel->RemotePort );
- hdr->Length = htons( Length );
+ hdr->Length = htons( sizeof(tUDPHeader) + Length );
hdr->Checksum = 0; // Checksum can be zero on IPv4
memcpy(hdr->Data, Data, Length);
// Pass on the the IPv4 Layer