Loading javasrc/com/iskratel/ttcn/tci/codec/IOTCodec/IOTCodec.java +13 −6 Original line number Diff line number Diff line Loading @@ -253,7 +253,11 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { } //else if(value_.getType().getName().equals("GeneralConfigurationRsp")){} else if (value_.getType().getName().equals("SetFilterReq")){ //tcpdump -qns 0 -XX \(\(tcp or sctp\) and host 172.29.13.100 and port 65535 and \(host 192.168.50.81 or 192.168.50.82\) and port 3868\) -r /home/ttcn3/workspace/TTF006_VxLTE/tracefiles/TC_VxLTE_INT_REG_01.pcapng ByteArrayOutputStream filter = new ByteArrayOutputStream(); write(filter,"("); /*type record SetFilterReq { ProtocolFilter protocol, InterfaceInfoList interfaceInfos Loading @@ -263,6 +267,7 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { write(filter," and "); encode_InterfaceInfoList(filter,(RecordOfValue) value_.getField("interfaceInfos")); write(filter,")"); //Implementation due to existing CapturePCO CharstringValue cvfilter =(CharstringValue) charstringType.newInstance(); Loading Loading @@ -436,13 +441,14 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { String protocol="ip"; //default switch (value.getInt()){ case 0:/**/ case 0:protocol= "ip";break; case 1:protocol= "udp";break; case 2:/**/ case 3:protocol= "tcp or sctp";break; case 3:protocol= "(tcp or sctp)";break; default: } protocol="ip"; //default //encode_IntegerValue(out, value.getInt()); write(out, protocol); } Loading Loading @@ -470,8 +476,8 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { //encode_Charstring(out, (CharstringValue)value.getField("domainName")); write(out,"host "); encode_Charstring(out, (CharstringValue)value.getField("IpAddress")); write(out," and "); encode_PortNumberList(out,(RecordOfValue)value.getField("portNumbers")); //write(out," and ");//commented out because of IP fragmentation //encode_PortNumberList(out,(RecordOfValue)value.getField("portNumbers"));//commented out because of IP fragmentation } Loading Loading @@ -505,9 +511,10 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { int len = value.getLength(); for (int i = 0; i < len; i++) { write(out,"("); //RecordValue rv=(RecordValue) value.getField(i); encode_InterfaceInfo(out, (UnionValue)value.getField(i)); write(out,")"); } return; } Loading javasrc/com/iskratel/ttcn/tri/IotConnectionOffline.java +21 −26 Original line number Diff line number Diff line Loading @@ -7,37 +7,25 @@ package com.iskratel.ttcn.tri; import org.apache.log4j.Logger; import org.etsi.ttcn.tci.CharstringValue; import org.etsi.ttcn.tci.IntegerValue; import org.etsi.ttcn.tci.TciModuleParameterId; import org.etsi.ttcn.tci.TciTMProvided; import org.etsi.ttcn.tci.Type; import org.etsi.ttcn.tri.TriAddress; import org.etsi.ttcn.tri.TriCommunicationTE; import org.etsi.ttcn.tri.TriComponentId; import org.etsi.ttcn.tri.TriMessage; import org.etsi.ttcn.tri.TriPortId; import org.etsi.ttcn.tri.TriPortIdList; import org.etsi.ttcn.tri.TriStatus; import com.testingtech.ttcn.tci.TciModuleParameterIdImpl; import com.testingtech.ttcn.tri.TriAddressImpl; import com.testingtech.ttcn.tri.TriMessageImpl; import com.testingtech.ttcn.tri.TriStatusImpl; import de.tu_berlin.cs.uebb.muttcn.runtime.RB; import jpcap.packet.Packet; import java.io.ByteArrayOutputStream; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; import net.sourceforge.jpcap.net.*; public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapterBase { TriCommunicationTE cte = null; Loading Loading @@ -101,7 +89,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter } public String toString(){ return (componentId.getComponentName()+" "+tsiPortId.toString()+" "+filter+"\n" + "packets count: "+packets.size()); return (componentId.getComponentName() + " " + tsiPortId.toString() + " " + ((filter != null) ? filter : "(null)"));// + "\n" + "packets count: " + ((packets != null) ? packets.size() : "(null)")); } } Loading @@ -126,7 +114,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter this.tsiPortId = tsiPortId; ComponentCollection.put(comPortId.getComponent().getComponentName(), tsiPortId); ComponentCollectionCompPort.put(comPortId.getComponent().getComponentName(), comPortId); log.debug(""+ComponentCollection.elements().toString()); //log.debug(""+ComponentCollection.elements().toString()); //result = connect(); result=true; }else{ Loading Loading @@ -176,7 +164,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter if (buffer == null) { return new TriStatusImpl(TriStatus.TRI_ERROR); } log.debug("Send message: "+triMessage.getClass() +"// " + triMessage.toString()); log.debug("Send message: "/*+triMessage.getClass() +"// "*/ + triMessage.toString()); int recv_reply = 0; int iotmsgType = buffer[0]&0xFF | buffer[1]&0xFF << 8; Loading @@ -193,11 +181,11 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter break; case 2: /*SET_FILTER_REQ = 0x0002; /**< ID of SetFilterRequest */ log.info("FilterREQ"); log.info("FilterREQ: " + componentId.getComponentName()); byte[] filterresp= {0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00};/*SET_FILTER_REP = 0x0009; /**< ID of SetFilterReply */ String filter = new String(buffer,10,buffer.length-10); log.debug(filter); log.debug("FilterREQ: filter=" + filter); try { FilterPackets fp = new FilterPackets(filter, componentId,ComponentCollection.get(componentId.getComponentName()+"-data"), this.cte/*tsiPortId*/); ComponentCollectionFilter2Port.put(componentId.getComponentName(), fp); Loading @@ -210,24 +198,26 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter break; case 3:/*START_CAPTURE_REQ = 0x0003; /**< ID of StartCaptureRequest */ log.info("StartCaptureREQ"); log.info("StartCaptureREQ: " + componentId.getComponentName()); log.info("StartCaptureREQ: ComponentCollectionFilter2Port=" + ComponentCollectionFilter2Port.size()); byte[] startcapresp= {0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00};/*START_CAPTURE_REP = 0x0004; /**< ID of StartCaptureReply */ if (!ComponentCollectionFilter2Port.isEmpty()) { Enumeration keys = ComponentCollectionFilter2Port.keys(); //log.info("StartCaptureREQ: keys=" + keys); do { try{ String key = (String) keys.nextElement(); FilterPackets fp = ComponentCollectionFilter2Port.get(key); log.info("StartCaptureREQ: launch ReadCaptureThread for component " + fp.componentId.getComponentName()); ReadCaptureThread t = new ReadCaptureThread (fp.componentId.getComponentName(),log, tracefile,fp); t.join(1000); Thread.sleep(100); }catch(Exception e){ log.debug(e.getMessage()); e.printStackTrace(); } } while (keys.hasMoreElements()); //adapterCollection.clear(); Loading Loading @@ -291,6 +281,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter } catch (Throwable ex) { log.error("Exception: ", ex); System.err.println("Exception: " + ex); } return new TriStatusImpl(TriStatus.TRI_ERROR); } Loading Loading @@ -360,7 +351,11 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter if (iotmsg==1){ //CAPTURE_DATA_IND byte[] packetb = new byte[packetLength-0x1b]; System.arraycopy(buffer,0x1b, packetb, 0, packetLength-0x1b); ippacket = PacketFactory.dataToPacket(1, packetb); ippacket.data = packetb; ippacket.len = packetb.length; ippacket.sec = 1; // FIXME Set DataLink properly //ippacket = PacketFactory.dataToPacket(1, packetb); message = new byte[packetLength-0x45];//SIP or DIAMETER message content System.arraycopy(buffer,0x45, message, 0, packetLength-0x45); }else{ Loading javasrc/com/iskratel/ttcn/tri/ReadCaptureThread.java +302 −234 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ */ package com.iskratel.ttcn.tri; import java.io.IOException; import java.util.HashMap; import java.util.Map; //import java.util.Arrays.*; import org.apache.log4j.Logger; import org.etsi.ttcn.tri.TriAddress; import org.etsi.ttcn.tri.TriMessage; Loading @@ -14,20 +18,23 @@ import com.iskratel.ttcn.tri.IotConnectionOffline.FilterPackets; import com.testingtech.ttcn.tri.TriAddressImpl; import com.testingtech.ttcn.tri.TriMessageImpl; import net.sourceforge.jpcap.capture.CaptureFileOpenException; import net.sourceforge.jpcap.capture.CapturePacketException; import net.sourceforge.jpcap.capture.PacketCapture; import net.sourceforge.jpcap.capture.PacketListener; import net.sourceforge.jpcap.capture.RawPacketListener; import net.sourceforge.jpcap.net.*; import jpcap.JpcapCaptor; import jpcap.PacketReceiver; import jpcap.packet.Packet; //import jpcap.packet.RawIpPacket; import jpcap.packet.IPPacket; import jpcap.packet.TCPPacket; import jpcap.packet.UDPPacket; import jpcap.packet.SCTPPacket; public class ReadCaptureThread extends Thread implements Runnable{ String name; Thread t; Logger log; JpcapCaptor pcap = null; String tf;//tracefilename FilterPackets fp; //filterpackets structure with component and ports Logger log = null; ReadCaptureThread (String threadname){ name = threadname; Loading @@ -36,82 +43,134 @@ public class ReadCaptureThread extends Thread implements Runnable{ } ReadCaptureThread (String threadname,Logger loger, String tracefile,FilterPackets filterpackets){ name = threadname; log = loger; name = threadname; tf = tracefile; fp = filterpackets; if (fp != null) { //log.info("ReadCaptureThread: " + threadname + ": fp=" + filterpackets); } t=new Thread(this,name); t.start(); } public String tracefile=""; private PacketCapture pcap; PacketHandler ph; RawPacketHandler rph; //RawPacketHandler rph; public void run(){ try{ pcap = new PacketCapture(); //try{ // open devices for capturing (requires root) try { pcap.openOffline(this.tf); } catch (CaptureFileOpenException e) { pcap = JpcapCaptor.openFile(this.tf); } catch (IOException e) { log.debug(e.getMessage()); } try{ // add a BPF filter (see tcpdump documentation) if (fp.filter.startsWith("udp")){ pcap.setFilter("(vlan and " + fp.filter+") or ("+fp.filter+")", true); }else{ log.debug("ReadCaptureThread: fp.filter=" + ((fp != null) ? fp.filter : "null")); //if (fp.filter.startsWith("udp")){ //log.info(">>> filter=" + "(vlan and " + fp.filter+") or ("+fp.filter+")"); //pcap.setFilter("(vlan and " + fp.filter+") or ("+fp.filter+")", true); // pcap.setFilter(/*"ip"*/fp.filter, true); //}else{ pcap.setFilter(fp.filter, true); //} } catch (IOException e) { log.debug(this.name+" "+e.getMessage() + "\n");// +e.getStackTrace().toString()); } // create a handler // packet ph = new PacketHandler(fp); pcap.addPacketListener(ph); // ph = new PacketHandler(fp); // pcap.addPacketListener(ph); // raw //rph = new RawPacketHandler("offline"); //pcap.addRawPacketListener(rph); //JpcapCaptor.addRawPacketListener(rph); // capture packets-INFINITE=-1 //***** copied to start capture command pcap.capture(200); // pcap.capture(200); } catch (CapturePacketException e) { try { pcap.loopPacket(-1, new PacketHandler(fp)); } finally { log.debug(this.name+" "+e.getMessage() + "\n");// +e.getStackTrace().toString()); } }catch(/*Interrupted*/Exception e){log.debug(this.name+" "+e.getMessage()+ "\n");} //log.debug("Thread ended! "+name);//+" packets " +fp.packets.size()); //}catch(/*Interrupted*/Exception e){log.debug(this.name+" "+e.getMessage()+ "\n");} log.debug("Thread ended! "+name);//+" packets " +fp.packets.size()); } class PacketHandler implements PacketListener class PacketHandler implements PacketReceiver { String name; private int counter = 0; //private List<Packet> packets; private FilterPackets filterpackets; private Map<Long, _fragmented_packet> _fragments = null; private class _fragmented_packet { Packet _packet; public _fragmented_packet(Packet p_packet) { _packet = p_packet; } public void appendData(final byte[] p_data) { _packet.data = concat(_packet.data, p_data); _packet.len = _packet.data.length; _packet.caplen = _packet.data.length; } public Packet getPacket() { return _packet; } private byte[] concat(byte[]... arrays) { // Determine the length of the result array int totalLength = 0; for (int i = 0; i < arrays.length; i++) { totalLength += arrays[i].length; } // create the result array byte[] result = new byte[totalLength]; // copy the source arrays into the result array int currentIndex = 0; for (int i = 0; i < arrays.length; i++) { System.arraycopy(arrays[i], 0, result, currentIndex, arrays[i].length); currentIndex += arrays[i].length; } return result; } } // End of class _fragmented_packet public PacketHandler(String name) { this.name = name; _fragments = new HashMap<Long, _fragmented_packet>(); } public PacketHandler(FilterPackets filterpackets) { this.name = filterpackets.componentId.getComponentName(); this.filterpackets = filterpackets; _fragments = new HashMap<Long, _fragmented_packet>(); } public void packetArrived(Packet packet) { public void receivePacket(Packet packet) { this.counter++; String type = packet.getClass().getName(); //System.out.println(name + ": Packet(" + counter + ") is of type " + type + "."); //String type = packet.getClass().getName(); //log.debug(name + ": Packet(" + counter + ") is of type " + type +"."); // if (packet instanceof EthernetPacket){ Loading @@ -120,33 +179,42 @@ public class ReadCaptureThread extends Thread implements Runnable{ // //System.err.println(((EthernetPacket)(packet)).getProtocol()); // } Packet new_packet = null; if (packet instanceof IPPacket) { IPPacket ipPacket = (IPPacket) packet; byte[] message = ipPacket.getData();//.getTCPData();//TODO: assume data is in one packet String srcHost = ipPacket.getSourceAddress(); String dstHost = ipPacket.getDestinationAddress(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); log.debug(ipPacket.toColoredString(false)); // TriMessage triMessage =TriMessageImpl.valueOf(message); // TriAddress triAddress = new TriAddressImpl(new byte[] {}); // // synchronized(this.filterpackets.cte) { // log.debug("ENQUE"+this.filterpackets.tsiPortId.toString()+" "+ this.filterpackets.componentId.getComponentName().toString()); // this.filterpackets.cte.triEnqueueMsg(this.filterpackets.tsiPortId, triAddress, this.filterpackets.componentId, triMessage); // } // Check fragmentation if (ipPacket.more_frag == true) { // First or next fragment if (!_fragments.containsKey((long) ipPacket.ident)) { // Create new entry with the first fragment _fragments.put((long) ipPacket.ident, new _fragmented_packet(packet)); } else { // Append the next fragment... _fragments.get((long) ipPacket.ident).appendData(ipPacket.data); } // ...And process next packet return; } else if (ipPacket.dont_frag == false) { // Last segment if (_fragments.containsKey((long) ipPacket.ident)) { // Add last fragment _fragments.get((long) ipPacket.ident).appendData(ipPacket.data); new_packet = _fragments.get((long) ipPacket.ident).getPacket(); //System.out.println("Final packet: " + new_packet.getClass().getName()); // Remove entry _fragments.remove((long) ipPacket.ident); } } else { new_packet = packet; } } if(packet instanceof TCPPacket) { TCPPacket tcpPacket = (TCPPacket)packet; byte[] message = tcpPacket.getData();//.getTCPData();//TODO: assume data is in one packet if(new_packet instanceof TCPPacket) { TCPPacket tcpPacket = (TCPPacket)new_packet; byte[] message= tcpPacket.data;//.getTCPData();//TODO: assume data is in one packet String srcHost = tcpPacket.getSourceAddress(); String dstHost = tcpPacket.getDestinationAddress(); //String srcHost = tcpPacket.src_ip.toString(); //String dstHost = tcpPacket.dst_ip.toString(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(tcpPacket.toColoredString(false)); //log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); TriMessage triMessage =TriMessageImpl.valueOf(message); TriAddress triAddress = new TriAddressImpl(new byte[] {}); Loading @@ -157,15 +225,14 @@ public class ReadCaptureThread extends Thread implements Runnable{ } } if (packet instanceof UDPPacket){ UDPPacket udpPacket = (UDPPacket)packet; byte[] message = udpPacket.getData();//.getUDPData();//TODO: assume data is in one packet if (new_packet instanceof UDPPacket){ UDPPacket udpPacket = (UDPPacket)new_packet; byte[] message = udpPacket.data;//.getUDPData();//TODO: assume data is in one packet String srcHost = udpPacket.getSourceAddress(); String dstHost = udpPacket.getDestinationAddress(); //String srcHost = udpPacket.src_ip.toString(); //String dstHost = udpPacket.dst_ip.toString(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(udpPacket.toColoredString(false)); //log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); TriMessage triMessage =TriMessageImpl.valueOf(message); TriAddress triAddress = new TriAddressImpl(new byte[] {}); Loading @@ -176,20 +243,21 @@ public class ReadCaptureThread extends Thread implements Runnable{ } } if (packet instanceof SCTPPacket){ SCTPPacket sctpPacket = (SCTPPacket)packet; byte[] message = sctpPacket.getData();//.getUDPData();//TODO: assume data is in one packet if (new_packet instanceof SCTPPacket){ SCTPPacket sctpPacket = (SCTPPacket)new_packet; byte[] message = sctpPacket.data;//getData();//.getUDPData();//TODO: assume data is in one packet String srcHost = sctpPacket.getSourceAddress(); String dstHost = sctpPacket.getDestinationAddress(); //String srcHost = sctpPacket.src_ip.toString();//getSourceAddress(); //String dstHost = sctpPacket.dst_ip.toString();//getDestinationAddress(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(sctpPacket.toColoredString(false)); int i=0; while(i < sctpPacket.getChunks().size()) { message = (sctpPacket.getChunks().get(i).getUserData()); while(i < sctpPacket.chunks.length) { if (sctpPacket.chunks[i].type == 0 ) //DATA_CHUNKTYPE { message = java.util.Arrays.copyOfRange(sctpPacket.chunks[i].data, 0+12, sctpPacket.chunks[i].data.length);//12 - length of DATAchunks parameters TriMessage triMessage =TriMessageImpl.valueOf(message); TriAddress triAddress = new TriAddressImpl(new byte[] {}); Loading @@ -198,11 +266,11 @@ public class ReadCaptureThread extends Thread implements Runnable{ log.debug("ENQUE"+this.filterpackets.tsiPortId.toString()+" "+ this.filterpackets.componentId.getComponentName().toString()); this.filterpackets.cte.triEnqueueMsg(this.filterpackets.tsiPortId, triAddress, this.filterpackets.componentId, triMessage); } } i++; } } } // public List<Packet> getPackets(){ Loading @@ -210,7 +278,7 @@ public class ReadCaptureThread extends Thread implements Runnable{ // } } class RawPacketHandler implements RawPacketListener class RawPacketHandler implements PacketReceiver { String name; private int counter = 0; Loading @@ -220,7 +288,7 @@ public class ReadCaptureThread extends Thread implements Runnable{ this.name = name; } public void rawPacketArrived(RawPacket rawPacket) { public void receivePacket(Packet packet) { this.counter++; //rawpackets.add(rawPacket); //System.err.println(rawPacket.getClass().toString()/*rawPacket*/); Loading javasrc/com/iskratel/ttcn/tri/VxlteAdapter.java +20 −11 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ import com.testingtech.ttcn.tri.TriStatusImpl; import de.tu_berlin.cs.uebb.muttcn.runtime.RB; import net.sourceforge.jpcap.capture.PacketCapture; public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, TriPlatformPA, TciEncoding, TestCaseParameterServer { Loading Loading @@ -180,23 +179,23 @@ public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, Tri if (portName.contains("acPort")) { //New test started ... try{ PacketCapture pcap=new PacketCapture(); }catch(Exception e){ loginfo("\nCheck presence of PCAP library on operating system!\n"); return new TriStatusImpl(TriStatus.TRI_ERROR); } // try{ // PacketCapture pcap=new PacketCapture(); // }catch(Exception e){ // loginfo("\nCheck presence of PCAP library on operating system!\n"); // return new TriStatusImpl(TriStatus.TRI_ERROR); // } IotConnectionOffline adapter = new IotConnectionOffline(log, Cte); adapter.setTraceFile(ROOTFOLDERTRACEFILE+this.testcaseName+".pcapng"); baseAdapter = adapter; }else if (portName.contains("eaPort")){ EaPortConnection adapter = new EaPortConnection(Cte); EaPortConnection adapter = new EaPortConnection(/*this.log,*/ Cte); baseAdapter = adapter; }else { loginfo("Port not supported (" + portName +")!\n"); //Init port connection to avoid mapping errors DummyConnection adapter = new DummyConnection(Cte); DummyConnection adapter = new DummyConnection(/*this.log,*/ Cte); baseAdapter = adapter; } Loading Loading @@ -241,7 +240,17 @@ public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, Tri //ComponentCollection.remove(comPortId.getComponent().getComponentName(), tsiPortId); } }else{ baseAdapter = adapterCollection.get(comPortId.getComponent().getComponentName()+portName); baseAdapter = adapterCollection.get(/*comPortId.getComponent().getComponentName()+*/portName); // if (!adapterCollection.isEmpty()) { // Enumeration keys = adapterCollection.keys(); // do { // try{ // String key = (String) keys.nextElement(); // loginfo("triUnmap:adapters left:key="+key +"comPId=" + portName); // }catch(Exception e){} // } while (keys.hasMoreElements()); // // } } if (baseAdapter == null) { Loading Loading @@ -307,7 +316,7 @@ public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, Tri } public TciCDProvided getCodec(String s) { loginfo(">>> TciCDProvided.getCodec for " + portNameForCoding + " = " + ((s != null) ? s : "(null)")); if (s == null || s.equals("")) { loginfo("No codec name for usage!!! Last used port = " + portNameForCoding); Loading javasrc/net/CVS/Entriesdeleted 100644 → 0 +0 −37 Original line number Diff line number Diff line /IPPort.java/1.3/Thu Jun 7 21:50:56 2001// /IPVersions.java/1.1/Wed May 23 02:42:22 2001// /RawPacket.java/1.2/Fri Jun 1 06:30:01 2001// /package.html/1.1/Thu Jun 14 01:21:53 2001// /ICMPMessage.java/1.4/Tue Jun 26 18:46:02 2001// /MACAddress.java/1.3/Tue Jun 26 18:46:03 2001// /TypesOfService.java/1.2/Tue Jun 26 18:46:04 2001// /ICMPMessages.java/1.4/Tue Jun 26 23:07:03 2001// /IPAddress.java/1.4/Tue Jun 26 23:07:03 2001// /ARPFields.java/1.3/Wed Jun 27 02:28:22 2001// /EthernetFields.java/1.3/Wed Jun 27 02:28:22 2001// /EthernetProtocol.java/1.3/Wed Jun 27 02:28:22 2001// /IPFields.java/1.4/Wed Jun 27 02:28:22 2001// /IPPorts.java/1.3/Wed Jun 27 02:28:22 2001// /IPProtocol.java/1.4/Wed Jun 27 02:28:22 2001// /IPProtocols.java/1.4/Wed Jun 27 02:28:22 2001// /TCPFields.java/1.3/Wed Jun 27 02:28:22 2001// /UDPFields.java/1.3/Wed Jun 27 02:28:22 2001// /ARPPacket.java/1.10/Mon Jul 2 00:23:09 2001// /Packet.java/1.6/Mon Jul 2 00:23:14 2001// /LinkLayers.java/1.3/Mon Jul 2 03:25:53 2001// /LinkLayer.java/1.5/Mon Jul 2 04:03:08 2001// /EthernetProtocols.java/1.6/Sat Aug 25 16:39:53 2001// /ICMPFields.java/1.5/Sat Aug 25 16:39:53 2001// /ICMPPacket.java/1.13/Sat Aug 25 16:39:53 2001// /IGMPFields.java/1.1/Mon Jul 30 00:00:02 2001// /IGMPMessage.java/1.1/Mon Jul 30 00:00:02 2001// /IGMPMessages.java/1.1/Mon Jul 30 00:00:02 2001// /IGMPPacket.java/1.1/Mon Jul 30 00:00:02 2001// /PacketFactory.java/1.11/Sat Aug 25 16:39:54 2001// /UDPPacket.java/1.11/Sat Aug 25 16:39:54 2001// /makefile/1.13/Sat Aug 25 16:39:54 2001// /EthernetPacket.java/1.14/Thu Jan 10 00:16:58 2002// /IPPacket.java/1.16/Thu Jan 10 00:16:58 2002// /PacketEncoding.java/1.3/Thu Jan 10 00:16:59 2002// /TCPPacket.java/1.17/Thu Jan 10 00:16:59 2002// D Loading
javasrc/com/iskratel/ttcn/tci/codec/IOTCodec/IOTCodec.java +13 −6 Original line number Diff line number Diff line Loading @@ -253,7 +253,11 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { } //else if(value_.getType().getName().equals("GeneralConfigurationRsp")){} else if (value_.getType().getName().equals("SetFilterReq")){ //tcpdump -qns 0 -XX \(\(tcp or sctp\) and host 172.29.13.100 and port 65535 and \(host 192.168.50.81 or 192.168.50.82\) and port 3868\) -r /home/ttcn3/workspace/TTF006_VxLTE/tracefiles/TC_VxLTE_INT_REG_01.pcapng ByteArrayOutputStream filter = new ByteArrayOutputStream(); write(filter,"("); /*type record SetFilterReq { ProtocolFilter protocol, InterfaceInfoList interfaceInfos Loading @@ -263,6 +267,7 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { write(filter," and "); encode_InterfaceInfoList(filter,(RecordOfValue) value_.getField("interfaceInfos")); write(filter,")"); //Implementation due to existing CapturePCO CharstringValue cvfilter =(CharstringValue) charstringType.newInstance(); Loading Loading @@ -436,13 +441,14 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { String protocol="ip"; //default switch (value.getInt()){ case 0:/**/ case 0:protocol= "ip";break; case 1:protocol= "udp";break; case 2:/**/ case 3:protocol= "tcp or sctp";break; case 3:protocol= "(tcp or sctp)";break; default: } protocol="ip"; //default //encode_IntegerValue(out, value.getInt()); write(out, protocol); } Loading Loading @@ -470,8 +476,8 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { //encode_Charstring(out, (CharstringValue)value.getField("domainName")); write(out,"host "); encode_Charstring(out, (CharstringValue)value.getField("IpAddress")); write(out," and "); encode_PortNumberList(out,(RecordOfValue)value.getField("portNumbers")); //write(out," and ");//commented out because of IP fragmentation //encode_PortNumberList(out,(RecordOfValue)value.getField("portNumbers"));//commented out because of IP fragmentation } Loading Loading @@ -505,9 +511,10 @@ public class IOTCodec extends AbstractBaseCodec implements TciCDProvided { int len = value.getLength(); for (int i = 0; i < len; i++) { write(out,"("); //RecordValue rv=(RecordValue) value.getField(i); encode_InterfaceInfo(out, (UnionValue)value.getField(i)); write(out,")"); } return; } Loading
javasrc/com/iskratel/ttcn/tri/IotConnectionOffline.java +21 −26 Original line number Diff line number Diff line Loading @@ -7,37 +7,25 @@ package com.iskratel.ttcn.tri; import org.apache.log4j.Logger; import org.etsi.ttcn.tci.CharstringValue; import org.etsi.ttcn.tci.IntegerValue; import org.etsi.ttcn.tci.TciModuleParameterId; import org.etsi.ttcn.tci.TciTMProvided; import org.etsi.ttcn.tci.Type; import org.etsi.ttcn.tri.TriAddress; import org.etsi.ttcn.tri.TriCommunicationTE; import org.etsi.ttcn.tri.TriComponentId; import org.etsi.ttcn.tri.TriMessage; import org.etsi.ttcn.tri.TriPortId; import org.etsi.ttcn.tri.TriPortIdList; import org.etsi.ttcn.tri.TriStatus; import com.testingtech.ttcn.tci.TciModuleParameterIdImpl; import com.testingtech.ttcn.tri.TriAddressImpl; import com.testingtech.ttcn.tri.TriMessageImpl; import com.testingtech.ttcn.tri.TriStatusImpl; import de.tu_berlin.cs.uebb.muttcn.runtime.RB; import jpcap.packet.Packet; import java.io.ByteArrayOutputStream; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; import net.sourceforge.jpcap.net.*; public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapterBase { TriCommunicationTE cte = null; Loading Loading @@ -101,7 +89,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter } public String toString(){ return (componentId.getComponentName()+" "+tsiPortId.toString()+" "+filter+"\n" + "packets count: "+packets.size()); return (componentId.getComponentName() + " " + tsiPortId.toString() + " " + ((filter != null) ? filter : "(null)"));// + "\n" + "packets count: " + ((packets != null) ? packets.size() : "(null)")); } } Loading @@ -126,7 +114,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter this.tsiPortId = tsiPortId; ComponentCollection.put(comPortId.getComponent().getComponentName(), tsiPortId); ComponentCollectionCompPort.put(comPortId.getComponent().getComponentName(), comPortId); log.debug(""+ComponentCollection.elements().toString()); //log.debug(""+ComponentCollection.elements().toString()); //result = connect(); result=true; }else{ Loading Loading @@ -176,7 +164,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter if (buffer == null) { return new TriStatusImpl(TriStatus.TRI_ERROR); } log.debug("Send message: "+triMessage.getClass() +"// " + triMessage.toString()); log.debug("Send message: "/*+triMessage.getClass() +"// "*/ + triMessage.toString()); int recv_reply = 0; int iotmsgType = buffer[0]&0xFF | buffer[1]&0xFF << 8; Loading @@ -193,11 +181,11 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter break; case 2: /*SET_FILTER_REQ = 0x0002; /**< ID of SetFilterRequest */ log.info("FilterREQ"); log.info("FilterREQ: " + componentId.getComponentName()); byte[] filterresp= {0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00};/*SET_FILTER_REP = 0x0009; /**< ID of SetFilterReply */ String filter = new String(buffer,10,buffer.length-10); log.debug(filter); log.debug("FilterREQ: filter=" + filter); try { FilterPackets fp = new FilterPackets(filter, componentId,ComponentCollection.get(componentId.getComponentName()+"-data"), this.cte/*tsiPortId*/); ComponentCollectionFilter2Port.put(componentId.getComponentName(), fp); Loading @@ -210,24 +198,26 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter break; case 3:/*START_CAPTURE_REQ = 0x0003; /**< ID of StartCaptureRequest */ log.info("StartCaptureREQ"); log.info("StartCaptureREQ: " + componentId.getComponentName()); log.info("StartCaptureREQ: ComponentCollectionFilter2Port=" + ComponentCollectionFilter2Port.size()); byte[] startcapresp= {0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00};/*START_CAPTURE_REP = 0x0004; /**< ID of StartCaptureReply */ if (!ComponentCollectionFilter2Port.isEmpty()) { Enumeration keys = ComponentCollectionFilter2Port.keys(); //log.info("StartCaptureREQ: keys=" + keys); do { try{ String key = (String) keys.nextElement(); FilterPackets fp = ComponentCollectionFilter2Port.get(key); log.info("StartCaptureREQ: launch ReadCaptureThread for component " + fp.componentId.getComponentName()); ReadCaptureThread t = new ReadCaptureThread (fp.componentId.getComponentName(),log, tracefile,fp); t.join(1000); Thread.sleep(100); }catch(Exception e){ log.debug(e.getMessage()); e.printStackTrace(); } } while (keys.hasMoreElements()); //adapterCollection.clear(); Loading Loading @@ -291,6 +281,7 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter } catch (Throwable ex) { log.error("Exception: ", ex); System.err.println("Exception: " + ex); } return new TriStatusImpl(TriStatus.TRI_ERROR); } Loading Loading @@ -360,7 +351,11 @@ public class IotConnectionOffline extends Thread/*PCAP*/ implements LocalAdapter if (iotmsg==1){ //CAPTURE_DATA_IND byte[] packetb = new byte[packetLength-0x1b]; System.arraycopy(buffer,0x1b, packetb, 0, packetLength-0x1b); ippacket = PacketFactory.dataToPacket(1, packetb); ippacket.data = packetb; ippacket.len = packetb.length; ippacket.sec = 1; // FIXME Set DataLink properly //ippacket = PacketFactory.dataToPacket(1, packetb); message = new byte[packetLength-0x45];//SIP or DIAMETER message content System.arraycopy(buffer,0x45, message, 0, packetLength-0x45); }else{ Loading
javasrc/com/iskratel/ttcn/tri/ReadCaptureThread.java +302 −234 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ */ package com.iskratel.ttcn.tri; import java.io.IOException; import java.util.HashMap; import java.util.Map; //import java.util.Arrays.*; import org.apache.log4j.Logger; import org.etsi.ttcn.tri.TriAddress; import org.etsi.ttcn.tri.TriMessage; Loading @@ -14,20 +18,23 @@ import com.iskratel.ttcn.tri.IotConnectionOffline.FilterPackets; import com.testingtech.ttcn.tri.TriAddressImpl; import com.testingtech.ttcn.tri.TriMessageImpl; import net.sourceforge.jpcap.capture.CaptureFileOpenException; import net.sourceforge.jpcap.capture.CapturePacketException; import net.sourceforge.jpcap.capture.PacketCapture; import net.sourceforge.jpcap.capture.PacketListener; import net.sourceforge.jpcap.capture.RawPacketListener; import net.sourceforge.jpcap.net.*; import jpcap.JpcapCaptor; import jpcap.PacketReceiver; import jpcap.packet.Packet; //import jpcap.packet.RawIpPacket; import jpcap.packet.IPPacket; import jpcap.packet.TCPPacket; import jpcap.packet.UDPPacket; import jpcap.packet.SCTPPacket; public class ReadCaptureThread extends Thread implements Runnable{ String name; Thread t; Logger log; JpcapCaptor pcap = null; String tf;//tracefilename FilterPackets fp; //filterpackets structure with component and ports Logger log = null; ReadCaptureThread (String threadname){ name = threadname; Loading @@ -36,82 +43,134 @@ public class ReadCaptureThread extends Thread implements Runnable{ } ReadCaptureThread (String threadname,Logger loger, String tracefile,FilterPackets filterpackets){ name = threadname; log = loger; name = threadname; tf = tracefile; fp = filterpackets; if (fp != null) { //log.info("ReadCaptureThread: " + threadname + ": fp=" + filterpackets); } t=new Thread(this,name); t.start(); } public String tracefile=""; private PacketCapture pcap; PacketHandler ph; RawPacketHandler rph; //RawPacketHandler rph; public void run(){ try{ pcap = new PacketCapture(); //try{ // open devices for capturing (requires root) try { pcap.openOffline(this.tf); } catch (CaptureFileOpenException e) { pcap = JpcapCaptor.openFile(this.tf); } catch (IOException e) { log.debug(e.getMessage()); } try{ // add a BPF filter (see tcpdump documentation) if (fp.filter.startsWith("udp")){ pcap.setFilter("(vlan and " + fp.filter+") or ("+fp.filter+")", true); }else{ log.debug("ReadCaptureThread: fp.filter=" + ((fp != null) ? fp.filter : "null")); //if (fp.filter.startsWith("udp")){ //log.info(">>> filter=" + "(vlan and " + fp.filter+") or ("+fp.filter+")"); //pcap.setFilter("(vlan and " + fp.filter+") or ("+fp.filter+")", true); // pcap.setFilter(/*"ip"*/fp.filter, true); //}else{ pcap.setFilter(fp.filter, true); //} } catch (IOException e) { log.debug(this.name+" "+e.getMessage() + "\n");// +e.getStackTrace().toString()); } // create a handler // packet ph = new PacketHandler(fp); pcap.addPacketListener(ph); // ph = new PacketHandler(fp); // pcap.addPacketListener(ph); // raw //rph = new RawPacketHandler("offline"); //pcap.addRawPacketListener(rph); //JpcapCaptor.addRawPacketListener(rph); // capture packets-INFINITE=-1 //***** copied to start capture command pcap.capture(200); // pcap.capture(200); } catch (CapturePacketException e) { try { pcap.loopPacket(-1, new PacketHandler(fp)); } finally { log.debug(this.name+" "+e.getMessage() + "\n");// +e.getStackTrace().toString()); } }catch(/*Interrupted*/Exception e){log.debug(this.name+" "+e.getMessage()+ "\n");} //log.debug("Thread ended! "+name);//+" packets " +fp.packets.size()); //}catch(/*Interrupted*/Exception e){log.debug(this.name+" "+e.getMessage()+ "\n");} log.debug("Thread ended! "+name);//+" packets " +fp.packets.size()); } class PacketHandler implements PacketListener class PacketHandler implements PacketReceiver { String name; private int counter = 0; //private List<Packet> packets; private FilterPackets filterpackets; private Map<Long, _fragmented_packet> _fragments = null; private class _fragmented_packet { Packet _packet; public _fragmented_packet(Packet p_packet) { _packet = p_packet; } public void appendData(final byte[] p_data) { _packet.data = concat(_packet.data, p_data); _packet.len = _packet.data.length; _packet.caplen = _packet.data.length; } public Packet getPacket() { return _packet; } private byte[] concat(byte[]... arrays) { // Determine the length of the result array int totalLength = 0; for (int i = 0; i < arrays.length; i++) { totalLength += arrays[i].length; } // create the result array byte[] result = new byte[totalLength]; // copy the source arrays into the result array int currentIndex = 0; for (int i = 0; i < arrays.length; i++) { System.arraycopy(arrays[i], 0, result, currentIndex, arrays[i].length); currentIndex += arrays[i].length; } return result; } } // End of class _fragmented_packet public PacketHandler(String name) { this.name = name; _fragments = new HashMap<Long, _fragmented_packet>(); } public PacketHandler(FilterPackets filterpackets) { this.name = filterpackets.componentId.getComponentName(); this.filterpackets = filterpackets; _fragments = new HashMap<Long, _fragmented_packet>(); } public void packetArrived(Packet packet) { public void receivePacket(Packet packet) { this.counter++; String type = packet.getClass().getName(); //System.out.println(name + ": Packet(" + counter + ") is of type " + type + "."); //String type = packet.getClass().getName(); //log.debug(name + ": Packet(" + counter + ") is of type " + type +"."); // if (packet instanceof EthernetPacket){ Loading @@ -120,33 +179,42 @@ public class ReadCaptureThread extends Thread implements Runnable{ // //System.err.println(((EthernetPacket)(packet)).getProtocol()); // } Packet new_packet = null; if (packet instanceof IPPacket) { IPPacket ipPacket = (IPPacket) packet; byte[] message = ipPacket.getData();//.getTCPData();//TODO: assume data is in one packet String srcHost = ipPacket.getSourceAddress(); String dstHost = ipPacket.getDestinationAddress(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); log.debug(ipPacket.toColoredString(false)); // TriMessage triMessage =TriMessageImpl.valueOf(message); // TriAddress triAddress = new TriAddressImpl(new byte[] {}); // // synchronized(this.filterpackets.cte) { // log.debug("ENQUE"+this.filterpackets.tsiPortId.toString()+" "+ this.filterpackets.componentId.getComponentName().toString()); // this.filterpackets.cte.triEnqueueMsg(this.filterpackets.tsiPortId, triAddress, this.filterpackets.componentId, triMessage); // } // Check fragmentation if (ipPacket.more_frag == true) { // First or next fragment if (!_fragments.containsKey((long) ipPacket.ident)) { // Create new entry with the first fragment _fragments.put((long) ipPacket.ident, new _fragmented_packet(packet)); } else { // Append the next fragment... _fragments.get((long) ipPacket.ident).appendData(ipPacket.data); } // ...And process next packet return; } else if (ipPacket.dont_frag == false) { // Last segment if (_fragments.containsKey((long) ipPacket.ident)) { // Add last fragment _fragments.get((long) ipPacket.ident).appendData(ipPacket.data); new_packet = _fragments.get((long) ipPacket.ident).getPacket(); //System.out.println("Final packet: " + new_packet.getClass().getName()); // Remove entry _fragments.remove((long) ipPacket.ident); } } else { new_packet = packet; } } if(packet instanceof TCPPacket) { TCPPacket tcpPacket = (TCPPacket)packet; byte[] message = tcpPacket.getData();//.getTCPData();//TODO: assume data is in one packet if(new_packet instanceof TCPPacket) { TCPPacket tcpPacket = (TCPPacket)new_packet; byte[] message= tcpPacket.data;//.getTCPData();//TODO: assume data is in one packet String srcHost = tcpPacket.getSourceAddress(); String dstHost = tcpPacket.getDestinationAddress(); //String srcHost = tcpPacket.src_ip.toString(); //String dstHost = tcpPacket.dst_ip.toString(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(tcpPacket.toColoredString(false)); //log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); TriMessage triMessage =TriMessageImpl.valueOf(message); TriAddress triAddress = new TriAddressImpl(new byte[] {}); Loading @@ -157,15 +225,14 @@ public class ReadCaptureThread extends Thread implements Runnable{ } } if (packet instanceof UDPPacket){ UDPPacket udpPacket = (UDPPacket)packet; byte[] message = udpPacket.getData();//.getUDPData();//TODO: assume data is in one packet if (new_packet instanceof UDPPacket){ UDPPacket udpPacket = (UDPPacket)new_packet; byte[] message = udpPacket.data;//.getUDPData();//TODO: assume data is in one packet String srcHost = udpPacket.getSourceAddress(); String dstHost = udpPacket.getDestinationAddress(); //String srcHost = udpPacket.src_ip.toString(); //String dstHost = udpPacket.dst_ip.toString(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(udpPacket.toColoredString(false)); //log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); TriMessage triMessage =TriMessageImpl.valueOf(message); TriAddress triAddress = new TriAddressImpl(new byte[] {}); Loading @@ -176,20 +243,21 @@ public class ReadCaptureThread extends Thread implements Runnable{ } } if (packet instanceof SCTPPacket){ SCTPPacket sctpPacket = (SCTPPacket)packet; byte[] message = sctpPacket.getData();//.getUDPData();//TODO: assume data is in one packet if (new_packet instanceof SCTPPacket){ SCTPPacket sctpPacket = (SCTPPacket)new_packet; byte[] message = sctpPacket.data;//getData();//.getUDPData();//TODO: assume data is in one packet String srcHost = sctpPacket.getSourceAddress(); String dstHost = sctpPacket.getDestinationAddress(); //String srcHost = sctpPacket.src_ip.toString();//getSourceAddress(); //String dstHost = sctpPacket.dst_ip.toString();//getDestinationAddress(); //String isoData = new String(data);//, "ISO-8859-1"); log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(srcHost+" -> " + dstHost );//+ ": " + isoData); //log.debug(sctpPacket.toColoredString(false)); int i=0; while(i < sctpPacket.getChunks().size()) { message = (sctpPacket.getChunks().get(i).getUserData()); while(i < sctpPacket.chunks.length) { if (sctpPacket.chunks[i].type == 0 ) //DATA_CHUNKTYPE { message = java.util.Arrays.copyOfRange(sctpPacket.chunks[i].data, 0+12, sctpPacket.chunks[i].data.length);//12 - length of DATAchunks parameters TriMessage triMessage =TriMessageImpl.valueOf(message); TriAddress triAddress = new TriAddressImpl(new byte[] {}); Loading @@ -198,11 +266,11 @@ public class ReadCaptureThread extends Thread implements Runnable{ log.debug("ENQUE"+this.filterpackets.tsiPortId.toString()+" "+ this.filterpackets.componentId.getComponentName().toString()); this.filterpackets.cte.triEnqueueMsg(this.filterpackets.tsiPortId, triAddress, this.filterpackets.componentId, triMessage); } } i++; } } } // public List<Packet> getPackets(){ Loading @@ -210,7 +278,7 @@ public class ReadCaptureThread extends Thread implements Runnable{ // } } class RawPacketHandler implements RawPacketListener class RawPacketHandler implements PacketReceiver { String name; private int counter = 0; Loading @@ -220,7 +288,7 @@ public class ReadCaptureThread extends Thread implements Runnable{ this.name = name; } public void rawPacketArrived(RawPacket rawPacket) { public void receivePacket(Packet packet) { this.counter++; //rawpackets.add(rawPacket); //System.err.println(rawPacket.getClass().toString()/*rawPacket*/); Loading
javasrc/com/iskratel/ttcn/tri/VxlteAdapter.java +20 −11 Original line number Diff line number Diff line Loading @@ -54,7 +54,6 @@ import com.testingtech.ttcn.tri.TriStatusImpl; import de.tu_berlin.cs.uebb.muttcn.runtime.RB; import net.sourceforge.jpcap.capture.PacketCapture; public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, TriPlatformPA, TciEncoding, TestCaseParameterServer { Loading Loading @@ -180,23 +179,23 @@ public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, Tri if (portName.contains("acPort")) { //New test started ... try{ PacketCapture pcap=new PacketCapture(); }catch(Exception e){ loginfo("\nCheck presence of PCAP library on operating system!\n"); return new TriStatusImpl(TriStatus.TRI_ERROR); } // try{ // PacketCapture pcap=new PacketCapture(); // }catch(Exception e){ // loginfo("\nCheck presence of PCAP library on operating system!\n"); // return new TriStatusImpl(TriStatus.TRI_ERROR); // } IotConnectionOffline adapter = new IotConnectionOffline(log, Cte); adapter.setTraceFile(ROOTFOLDERTRACEFILE+this.testcaseName+".pcapng"); baseAdapter = adapter; }else if (portName.contains("eaPort")){ EaPortConnection adapter = new EaPortConnection(Cte); EaPortConnection adapter = new EaPortConnection(/*this.log,*/ Cte); baseAdapter = adapter; }else { loginfo("Port not supported (" + portName +")!\n"); //Init port connection to avoid mapping errors DummyConnection adapter = new DummyConnection(Cte); DummyConnection adapter = new DummyConnection(/*this.log,*/ Cte); baseAdapter = adapter; } Loading Loading @@ -241,7 +240,17 @@ public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, Tri //ComponentCollection.remove(comPortId.getComponent().getComponentName(), tsiPortId); } }else{ baseAdapter = adapterCollection.get(comPortId.getComponent().getComponentName()+portName); baseAdapter = adapterCollection.get(/*comPortId.getComponent().getComponentName()+*/portName); // if (!adapterCollection.isEmpty()) { // Enumeration keys = adapterCollection.keys(); // do { // try{ // String key = (String) keys.nextElement(); // loginfo("triUnmap:adapters left:key="+key +"comPId=" + portName); // }catch(Exception e){} // } while (keys.hasMoreElements()); // // } } if (baseAdapter == null) { Loading Loading @@ -307,7 +316,7 @@ public class VxlteAdapter extends TestAdapter implements TriCommunicationSA, Tri } public TciCDProvided getCodec(String s) { loginfo(">>> TciCDProvided.getCodec for " + portNameForCoding + " = " + ((s != null) ? s : "(null)")); if (s == null || s.equals("")) { loginfo("No codec name for usage!!! Last used port = " + portNameForCoding); Loading
javasrc/net/CVS/Entriesdeleted 100644 → 0 +0 −37 Original line number Diff line number Diff line /IPPort.java/1.3/Thu Jun 7 21:50:56 2001// /IPVersions.java/1.1/Wed May 23 02:42:22 2001// /RawPacket.java/1.2/Fri Jun 1 06:30:01 2001// /package.html/1.1/Thu Jun 14 01:21:53 2001// /ICMPMessage.java/1.4/Tue Jun 26 18:46:02 2001// /MACAddress.java/1.3/Tue Jun 26 18:46:03 2001// /TypesOfService.java/1.2/Tue Jun 26 18:46:04 2001// /ICMPMessages.java/1.4/Tue Jun 26 23:07:03 2001// /IPAddress.java/1.4/Tue Jun 26 23:07:03 2001// /ARPFields.java/1.3/Wed Jun 27 02:28:22 2001// /EthernetFields.java/1.3/Wed Jun 27 02:28:22 2001// /EthernetProtocol.java/1.3/Wed Jun 27 02:28:22 2001// /IPFields.java/1.4/Wed Jun 27 02:28:22 2001// /IPPorts.java/1.3/Wed Jun 27 02:28:22 2001// /IPProtocol.java/1.4/Wed Jun 27 02:28:22 2001// /IPProtocols.java/1.4/Wed Jun 27 02:28:22 2001// /TCPFields.java/1.3/Wed Jun 27 02:28:22 2001// /UDPFields.java/1.3/Wed Jun 27 02:28:22 2001// /ARPPacket.java/1.10/Mon Jul 2 00:23:09 2001// /Packet.java/1.6/Mon Jul 2 00:23:14 2001// /LinkLayers.java/1.3/Mon Jul 2 03:25:53 2001// /LinkLayer.java/1.5/Mon Jul 2 04:03:08 2001// /EthernetProtocols.java/1.6/Sat Aug 25 16:39:53 2001// /ICMPFields.java/1.5/Sat Aug 25 16:39:53 2001// /ICMPPacket.java/1.13/Sat Aug 25 16:39:53 2001// /IGMPFields.java/1.1/Mon Jul 30 00:00:02 2001// /IGMPMessage.java/1.1/Mon Jul 30 00:00:02 2001// /IGMPMessages.java/1.1/Mon Jul 30 00:00:02 2001// /IGMPPacket.java/1.1/Mon Jul 30 00:00:02 2001// /PacketFactory.java/1.11/Sat Aug 25 16:39:54 2001// /UDPPacket.java/1.11/Sat Aug 25 16:39:54 2001// /makefile/1.13/Sat Aug 25 16:39:54 2001// /EthernetPacket.java/1.14/Thu Jan 10 00:16:58 2002// /IPPacket.java/1.16/Thu Jan 10 00:16:58 2002// /PacketEncoding.java/1.3/Thu Jan 10 00:16:59 2002// /TCPPacket.java/1.17/Thu Jan 10 00:16:59 2002// D