} else if(packet instanceof UDPPacket) {
//Log.debug("["+this.getClass().getName()+"] packet is a UDPPacket");
carnipacket.strTransportProtocol = Constants.strUDP;
carnipacket.intTransportProtocol = Constants.intUDP;
UDPPacket udpPacket = (UDPPacket)packet;
//carnipacket.senderAddress = (IPAddress) IPAddress.getByName(udpPacket.getSourceAddress());
//carnipacket.receiverAddress = (IPAddress) IPAddress.getByName(udpPacket.getDestinationAddress());
carnipacket.senderAddress = new IPAddress(udpPacket.getSourceAddress());
carnipacket.receiverAddress = new IPAddress(udpPacket.getDestinationAddress());
carnipacket.senderPort = udpPacket.getSourcePort();
carnipacket.receiverPort = udpPacket.getDestinationPort();
carnipacket.data = packet.getData();
carnipacket.ipHeader = ((IPPacket)packet).getIPHeader();
carnipacket.tcpHeader = packet.getHeader();
carnipacket.date = packet.getTimeval().getDate();
carnipacket.ipIdentification = ((IPPacket)packet).getId();