fixed autoconf ip addr in HC01

git-svn-id: https://mspsim.svn.sourceforge.net/svnroot/mspsim/mspsim@507 23d1a52b-0c3c-0410-b72d-8f29ab48fe35
This commit is contained in:
joxe 2009-04-02 10:57:59 +00:00
parent b182e7617d
commit 40622da578
3 changed files with 6 additions and 2 deletions

View File

@ -68,7 +68,7 @@ CPUTEST := tests/cputest.firmware
SCRIPTS := ${addprefix scripts/,autorun.sc duty.sc}
BINARY := README.txt license.txt CHANGE_LOG.txt images/*.jpg firmware/*/*.firmware ${SCRIPTS}
PACKAGES := se/sics/mspsim ${addprefix se/sics/mspsim/,core platform platform/esb platform/sky cli ui util chip extutil/highlight extutil/jfreechart}
PACKAGES := se/sics/mspsim ${addprefix se/sics/mspsim/,core platform platform/esb platform/sky cli ui util chip net extutil/highlight extutil/jfreechart}
SOURCES := ${wildcard *.java $(addsuffix /*.java,$(PACKAGES))}

View File

@ -71,7 +71,7 @@ public class DS2411 extends Chip {
private int writePos = 0;
/* max 10 bytes to write back */
private int[] writeBuf = new int[10];
private int[] macID = new int[]{0, 1, 2, 3, 4, 5};
private int[] macID = new int[]{1, 2, 3, 4, 5, 6};
private TimeEvent stateEvent = new TimeEvent(0) {
public void execute(long t) {

View File

@ -197,6 +197,8 @@ public class HC01PacketHandler extends AbstractPacketHandler {
/* infer IID from L2 address */
byte[] linkAddress = getLinkSourceAddress(packet);
System.arraycopy(linkAddress, 0, packet.sourceAddress, 8, 8);
/* TODO: clean autoconf stuff up */
packet.sourceAddress[8] ^= 0x02;
break;
case IPHC_SAM_16:
if((data[pos] & 0x80) == 0) {
@ -254,6 +256,8 @@ public class HC01PacketHandler extends AbstractPacketHandler {
/* figure out a way to pick this up from link-layer !!! */
byte[] destAddress = getLinkDestinationAddress(packet);
System.arraycopy(destAddress, 0, packet.destAddress, 8, 8);
/* cleanup autoconf stuff later ... */
packet.destAddress[8] ^= 0x02;
break;
case IPHC_DAM_16:
if((data[pos] & 0x80) == 0) {