View pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>my-project</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
View pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>my-project</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
View PktsIOStreamsExample001.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.pkts.Pcap; | |
import io.pkts.packet.sip.SipPacket; | |
import io.pkts.streams.SipStream; | |
import io.pkts.streams.Stream; | |
import io.pkts.streams.StreamHandler; | |
import io.pkts.streams.StreamListener; | |
import io.pkts.streams.impl.DefaultStreamHandler; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; |
View PktsIOCoreExample001.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.pkts.PacketHandler; | |
import io.pkts.Pcap; | |
import io.pkts.packet.Packet; | |
import io.pkts.protocol.Protocol; | |
import java.io.IOException; | |
// Step 1 - obtain a new Pcap instance by supplying an InputStream that points | |
// to a source that contains your captured traffic. Typically you may | |
// have stored that traffic in a file so there are a few convenience |