@Test public void getLinkTypeEN10MB() { assertEquals(PcapReader.LinkType.EN10MB, reader.getLinkType(1)); }
protected LinkType getLinkType(long linkTypeVal) { switch ((int)linkTypeVal) { case 0: return LinkType.NULL; case 1: return LinkType.EN10MB; case 101: return LinkType.RAW; case 108: return LinkType.LOOP; case 113: return LinkType.LINUX_SLL; } return null; }
PcapReader implements Iterable<Packet> { protected LinkType getLinkType(long linkTypeVal) { switch ((int)linkTypeVal) { case 0: return LinkType.NULL; case 1: return LinkType.EN10MB; case 101: return LinkType.RAW; case 108: return LinkType.LOOP; case 113: return LinkType.LINUX_SLL; } return null; } }
PcapReader implements Iterable<Packet> { protected LinkType getLinkType(long linkTypeVal) { switch ((int)linkTypeVal) { case 0: return LinkType.NULL; case 1: return LinkType.EN10MB; case 101: return LinkType.RAW; case 108: return LinkType.LOOP; case 113: return LinkType.LINUX_SLL; } return null; } PcapReader(DataInputStream is); protected  PcapReader(LinkType lt); }
PcapReader implements Iterable<Packet> { protected LinkType getLinkType(long linkTypeVal) { switch ((int)linkTypeVal) { case 0: return LinkType.NULL; case 1: return LinkType.EN10MB; case 101: return LinkType.RAW; case 108: return LinkType.LOOP; case 113: return LinkType.LINUX_SLL; } return null; } PcapReader(DataInputStream is); protected  PcapReader(LinkType lt); @Override Iterator<Packet> iterator(); }
PcapReader implements Iterable<Packet> { protected LinkType getLinkType(long linkTypeVal) { switch ((int)linkTypeVal) { case 0: return LinkType.NULL; case 1: return LinkType.EN10MB; case 101: return LinkType.RAW; case 108: return LinkType.LOOP; case 113: return LinkType.LINUX_SLL; } return null; } PcapReader(DataInputStream is); protected  PcapReader(LinkType lt); @Override Iterator<Packet> iterator(); static final Log LOG; static final long MAGIC_NUMBER; static final int HEADER_SIZE; static final int PCAP_HEADER_SNAPLEN_OFFSET; static final int PCAP_HEADER_LINKTYPE_OFFSET; static final int PACKET_HEADER_SIZE; static final int TIMESTAMP_OFFSET; static final int TIMESTAMP_MICROS_OFFSET; static final int CAP_LEN_OFFSET; static final int ETHERNET_HEADER_SIZE; static final int ETHERNET_TYPE_OFFSET; static final int ETHERNET_TYPE_IP; static final int ETHERNET_TYPE_IPV6; static final int ETHERNET_TYPE_8021Q; static final int SLL_HEADER_BASE_SIZE; static final int SLL_ADDRESS_LENGTH_OFFSET; static final int IPV6_HEADER_SIZE; static final int IP_VHL_OFFSET; static final int IP_TTL_OFFSET; static final int IP_TOTAL_LEN_OFFSET; static final int IPV6_PAYLOAD_LEN_OFFSET; static final int IPV6_HOPLIMIT_OFFSET; static final int IP_PROTOCOL_OFFSET; static final int IPV6_NEXTHEADER_OFFSET; static final int IP_SRC_OFFSET; static final int IPV6_SRC_OFFSET; static final int IP_DST_OFFSET; static final int IPV6_DST_OFFSET; static final int IP_ID_OFFSET; static final int IPV6_ID_OFFSET; static final int IP_FLAGS_OFFSET; static final int IPV6_FLAGS_OFFSET; static final int IP_FRAGMENT_OFFSET; static final int IPV6_FRAGMENT_OFFSET; static final int UDP_HEADER_SIZE; static final int PROTOCOL_HEADER_SRC_PORT_OFFSET; static final int PROTOCOL_HEADER_DST_PORT_OFFSET; static final int PROTOCOL_HEADER_TCP_SEQ_OFFSET; static final int PROTOCOL_HEADER_TCP_ACK_OFFSET; static final int TCP_HEADER_DATA_OFFSET; static final String PROTOCOL_ICMP; static final String PROTOCOL_TCP; static final String PROTOCOL_UDP; static final String PROTOCOL_FRAGMENT; public byte[] pcapHeader; public byte[] pcapPacketHeader; public byte[] packetData; }