Package org.krakenapps.pcap.packet

Examples of org.krakenapps.pcap.packet.PcapPacket


    }

    private PcapPacket readPacket(int magicNumber) throws IOException {
        PacketHeader packetHeader = readPacketHeader(magicNumber);
        Buffer packetData = readPacketData(packetHeader.getInclLen());
        return new PcapPacket(packetHeader, packetData);
    }
View Full Code Here


            return true;
        }

        try {
            // keep going until the decoder says it found a good one.
            PcapPacket packet;

            do {
                packet = is.getPacket();
                eth.decode(packet);
            } while (!valid);

            long tv_sec = packet.getPacketHeader().getTsSec();
            long tv_usec = packet.getPacketHeader().getTsUsec();
            long ts = tv_sec * 1000 + tv_usec / 1000;
            key = new Date(ts).getTime() / 1000;

            int id = dns.getHeader().getID();
            String mode = dns.getHeader().getFlag(Flags.QR) ? "response" : "question";
View Full Code Here

            // oh, hadoop :(
        }

        taskAttemptContext.progress();

        PcapPacket packet;

        try {
            packet = is.getPacket();
        } catch (NegativeArraySizeException ignored) {
            return null;
View Full Code Here

                ipData = tcpData = udpData = null;
                ipPacket = null;
                tcpPacket = null;
                udpPacket = null;

                PcapPacket packet = is.getPacket();
                eth.decode(packet);

                if (filter.matches(packet, ipPacket, tcpPacket, udpPacket)) {
                    switch (filter.getProto()) {
                        case InternetProtocol.TCP:
View Full Code Here

            return true;
        }

        try {
            // keep going until the decoder says it found a good one.
            PcapPacket packet;

            do {
                packet = is.getPacket();
                eth.decode(packet);
            } while (!valid);

            long tv_sec = packet.getPacketHeader().getTsSec();
            long tv_usec = packet.getPacketHeader().getTsUsec();
            long ts = tv_sec * 1000 + tv_usec / 1000;
            key = new Date(ts).getTime() / 1000;

            int id = dns.getHeader().getID();
            String mode = dns.getHeader().getFlag(Flags.QR) ? "response" : "question";
View Full Code Here

TOP

Related Classes of org.krakenapps.pcap.packet.PcapPacket

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.