Package net.sourceforge.jpcap.net

Examples of net.sourceforge.jpcap.net.UDPPacket


      } 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();
View Full Code Here

TOP

Related Classes of net.sourceforge.jpcap.net.UDPPacket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.