Update of /cvsroot/javanetsim/javaNetSim/core
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv29527/core
Modified Files:
Node.java WiFiPort.java
Log Message:
Index: Node.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/Node.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Node.java 27 Sep 2008 08:38:22 -0000 1.22
--- Node.java 27 Sep 2008 10:16:37 -0000 1.23
***************
*** 374,378 ****
NetworkInterfacetable.put(interfaceName,new WiFiInterface(core.Simulation.UIDGen++,interfaceName,this));
}else{
! NetworkInterfacetable.put(interfaceName,new WiFiAPPort(core.Simulation.UIDGen++,interfaceName,this));
}
break;
--- 374,378 ----
NetworkInterfacetable.put(interfaceName,new WiFiInterface(core.Simulation.UIDGen++,interfaceName,this));
}else{
! NetworkInterfacetable.put(interfaceName,new WiFiPort(core.Simulation.UIDGen++,interfaceName,this));
}
break;
Index: WiFiPort.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/WiFiPort.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** WiFiPort.java 27 Sep 2008 08:38:22 -0000 1.2
--- WiFiPort.java 27 Sep 2008 10:16:37 -0000 1.3
***************
*** 4,8 ****
import core.protocolsuite.tcp_ip.IP_packet;
! public abstract class WiFiPort extends EthernetNetworkInterface {
protected int channel = 1;
--- 4,8 ----
import core.protocolsuite.tcp_ip.IP_packet;
! public class WiFiPort extends EthernetNetworkInterface {
protected int channel = 1;
***************
*** 11,18 ****
protected String SSID = "default";
! boolean active = false;
! protected int Mode = 0; // 0 - AP, 1 - Station
public WiFiPort(long UID, String inName, Node inParent) {
--- 11,22 ----
protected String SSID = "default";
+
+ protected boolean active = false;
! protected int Mode = 0; // 0 - AP, 1 - Station, 2 - Repeater
! protected boolean shared_auth = false; // true -- shared, false -- open
!
! protected String WEP_keys[] = {"", "", "", ""};
public WiFiPort(long UID, String inName, Node inParent) {
***************
*** 22,26 ****
BSSID = MACAddress;
! channel = 0;
}
--- 26,30 ----
BSSID = MACAddress;
! //channel = 0;
}
***************
*** 94,102 ****
"Link", "Recieved and accepted packet at interface " + MACAddress);
! Packet temp = tempPacket.getData();
!
! boolean allowReceive = true;
!
! if(active){
NetworkLayerDevice device = (NetworkLayerDevice) parentNode;
if(device!=null && getACLin()!=0 && temp instanceof IP_packet && !(temp instanceof ARP_packet)){
--- 98,109 ----
"Link", "Recieved and accepted packet at interface " + MACAddress);
! boolean allowReceive = true;
!
! Packet temp = tempPacket;
!
! if(active){
!
! temp = tempPacket.getData();
!
NetworkLayerDevice device = (NetworkLayerDevice) parentNode;
if(device!=null && getACLin()!=0 && temp instanceof IP_packet && !(temp instanceof ARP_packet)){
***************
*** 140,144 ****
Ethernet_packet tempPacket = new Ethernet_packet(inPacket,inMacAddress, MACAddress);
! sendPacket(inPacket);
}
--- 147,151 ----
Ethernet_packet tempPacket = new Ethernet_packet(inPacket,inMacAddress, MACAddress);
! sendPacket(tempPacket);
}
|