src/net/java/sip/communicator/impl/packetlogging/PacketLoggingServiceImpl.java
/**
     * Creates pcap file global header.
     * @throws IOException
     */
Creates pcap file global header.
Creates pcap file global header .
private void createGlobalHeader()
            throws IOException
    {
        /* magic number(swapped) */
        outputStream.write(0xd4);
        outputStream.write(0xc3);
        outputStream.write(0xb2);
        outputStream.write(0xa1);
        /* major version number */
        outputStream.write(0x02);
        outputStream.write(0x00);
        /* minor version number */
        outputStream.write(0x04);
        outputStream.write(0x00);
        /* GMT to local correction */
        outputStream.write(0x00);
        outputStream.write(0x00);
        outputStream.write(0x00);
        outputStream.write(0x00);
        /* accuracy of timestamps */
        outputStream.write(0x00);
        outputStream.write(0x00);
        outputStream.write(0x00);
        outputStream.write(0x00);
        /* max length of captured packets, in octets */
        outputStream.write(0xff);
        outputStream.write(0xff);
        outputStream.write(0x00);
        outputStream.write(0x00);
        /* data link type(ethernet) */
        outputStream.write(0x01);
        outputStream.write(0x00);
        outputStream.write(0x00);
        outputStream.write(0x00);
    }
private void createGlobalHeader ( ) throws IOException { /* magic number(swapped) */ outputStream . write ( 0xd4 ) ; outputStream . write ( 0xc3 ) ; outputStream . write ( 0xb2 ) ; outputStream . write ( 0xa1 ) ; /* major version number */ outputStream . write ( 0x02 ) ; outputStream . write ( 0x00 ) ; /* minor version number */ outputStream . write ( 0x04 ) ; outputStream . write ( 0x00 ) ; /* GMT to local correction */ outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; /* accuracy of timestamps */ outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; /* max length of captured packets, in octets */ outputStream . write ( 0xff ) ; outputStream . write ( 0xff ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; /* data link type(ethernet) */ outputStream . write ( 0x01 ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; outputStream . write ( 0x00 ) ; }
Creates pcap file global header.
Creates pcap file global header .