Package org.krakenapps.pcap.util

Examples of org.krakenapps.pcap.util.Buffer


        return globalHeader;
    }

    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


    private Buffer readPacketData(int packetLength) throws IOException {
        byte[] packets = new byte[packetLength];
        is.readFully(packets);
        offset += packetLength;

        Buffer payload = new ChainBuffer();
        payload.addLast(packets);
        return payload;
    }
View Full Code Here

        IpDecoder ipDecoder = new IpDecoder();
        UdpProcessor udpProcessor = new UdpProcessor() {
            @Override
            public void process(UdpPacket p) {
                try {
                    Buffer buf = p.getData();
                    byte[] data = new byte[buf.readableBytes()];
                    buf.gets(data);
                    dns = new Message(data);
                    valid = true;
                } catch (IOException e) {
                    e.printStackTrace();
                    clear();
View Full Code Here

        IpDecoder ipDecoder = new IpDecoder();
        UdpProcessor udpProcessor = new UdpProcessor() {
            @Override
            public void process(UdpPacket p) {
                try {
                    Buffer buf = p.getData();
                    byte[] data = new byte[buf.readableBytes()];
                    buf.gets(data);
                    dns = new Message(data);
                    valid = true;
                } catch (IOException e) {
                    e.printStackTrace();
                    clear();
View Full Code Here

TOP

Related Classes of org.krakenapps.pcap.util.Buffer

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.