Browse Source

added parser class

System Administrator 6 years ago
parent
commit
3bcf0f7040

+ 13
- 0
.idea/libraries/Maven__io_pkts_pkts_buffers_3_0_2.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: io.pkts:pkts-buffers:3.0.2">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-buffers/3.0.2/pkts-buffers-3.0.2.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-buffers/3.0.2/pkts-buffers-3.0.2-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-buffers/3.0.2/pkts-buffers-3.0.2-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__io_pkts_pkts_core_3_0_2.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: io.pkts:pkts-core:3.0.2">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-core/3.0.2/pkts-core-3.0.2.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-core/3.0.2/pkts-core-3.0.2-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-core/3.0.2/pkts-core-3.0.2-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__io_pkts_pkts_sdp_3_0_2.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: io.pkts:pkts-sdp:3.0.2">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-sdp/3.0.2/pkts-sdp-3.0.2.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-sdp/3.0.2/pkts-sdp-3.0.2-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-sdp/3.0.2/pkts-sdp-3.0.2-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__io_pkts_pkts_sip_3_0_2.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: io.pkts:pkts-sip:3.0.2">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-sip/3.0.2/pkts-sip-3.0.2.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-sip/3.0.2/pkts-sip-3.0.2-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-sip/3.0.2/pkts-sip-3.0.2-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__io_pkts_pkts_streams_3_0_2.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: io.pkts:pkts-streams:3.0.2">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-streams/3.0.2/pkts-streams-3.0.2.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-streams/3.0.2/pkts-streams-3.0.2-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/io/pkts/pkts-streams/3.0.2/pkts-streams-3.0.2-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__javax_sip_jain_sip_ri_1_2_159.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: javax.sip:jain-sip-ri:1.2.159">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/javax/sip/jain-sip-ri/1.2.159/jain-sip-ri-1.2.159.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/javax/sip/jain-sip-ri/1.2.159/jain-sip-ri-1.2.159-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/javax/sip/jain-sip-ri/1.2.159/jain-sip-ri-1.2.159-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 77
- 61
.idea/workspace.xml View File

@@ -2,20 +2,13 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="a2cd3f2a-ecd9-43c0-a5b7-6ff3b5edd4e5" name="Default" comment="">
5
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__io_pkts_pkts_core_3_0_2.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__io_pkts_pkts_sdp_3_0_2.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__io_pkts_pkts_sip_3_0_2.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__javax_sip_jain_sip_ri_1_2_159.xml" afterDir="false" />
7 9
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
-      <change beforePath="$PROJECT_DIR$/output.pcap" beforeDir="false" afterPath="$PROJECT_DIR$/output.pcap" afterDir="false" />
9 10
       <change beforePath="$PROJECT_DIR$/pcap.iml" beforeDir="false" afterPath="$PROJECT_DIR$/pcap.iml" afterDir="false" />
10
-      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
11
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" afterDir="false" />
12 11
       <change beforePath="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" afterDir="false" />
13
-      <change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
14
-      <change beforePath="$PROJECT_DIR$/target/classes/com/wyds/packets/Capture.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/wyds/packets/Capture.class" afterDir="false" />
15
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
16
-      <change beforePath="$PROJECT_DIR$/target/original-uber-pcap-1.0.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/original-uber-pcap-1.0.0.jar" afterDir="false" />
17
-      <change beforePath="$PROJECT_DIR$/target/pcap-1.0.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/pcap-1.0.0.jar" afterDir="false" />
18
-      <change beforePath="$PROJECT_DIR$/target/uber-pcap-1.0.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/target/uber-pcap-1.0.0.jar" afterDir="false" />
19 12
     </list>
20 13
     <ignored path="$PROJECT_DIR$/target/" />
21 14
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -41,11 +34,11 @@
41 34
   </component>
42 35
   <component name="FileEditorManager">
43 36
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
44
-      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="true">
37
+      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
45 38
         <entry file="file://$PROJECT_DIR$/pom.xml">
46 39
           <provider selected="true" editor-type-id="text-editor">
47
-            <state relative-caret-position="383">
48
-              <caret line="54" column="8" selection-start-line="54" selection-start-column="8" selection-end-line="54" selection-end-column="8" />
40
+            <state relative-caret-position="503">
41
+              <caret line="62" selection-start-line="62" selection-end-line="62" />
49 42
             </state>
50 43
           </provider>
51 44
         </entry>
@@ -54,7 +47,7 @@
54 47
         <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
55 48
           <provider selected="true" editor-type-id="text-editor">
56 49
             <state relative-caret-position="405">
57
-              <caret line="27" column="33" lean-forward="true" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
50
+              <caret line="27" column="33" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
58 51
             </state>
59 52
           </provider>
60 53
         </entry>
@@ -62,8 +55,8 @@
62 55
       <file leaf-file-name="PacketTracker.java" pinned="false" current-in-tab="false">
63 56
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
64 57
           <provider selected="true" editor-type-id="text-editor">
65
-            <state relative-caret-position="240">
66
-              <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
58
+            <state relative-caret-position="285">
59
+              <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="8" />
67 60
               <folding>
68 61
                 <element signature="imports" expanded="true" />
69 62
                 <element signature="e#761#762#0" expanded="true" />
@@ -73,11 +66,23 @@
73 66
           </provider>
74 67
         </entry>
75 68
       </file>
76
-      <file leaf-file-name="PacketParser.java" pinned="false" current-in-tab="false">
69
+      <file leaf-file-name="PacketParserEntity.java" pinned="false" current-in-tab="false">
70
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java">
71
+          <provider selected="true" editor-type-id="text-editor">
72
+            <state relative-caret-position="105">
73
+              <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
74
+            </state>
75
+          </provider>
76
+        </entry>
77
+      </file>
78
+      <file leaf-file-name="PacketParser.java" pinned="false" current-in-tab="true">
77 79
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
78 80
           <provider selected="true" editor-type-id="text-editor">
79
-            <state relative-caret-position="60">
80
-              <caret line="4" selection-start-line="4" selection-end-line="4" />
81
+            <state relative-caret-position="495">
82
+              <caret line="33" column="51" selection-start-line="33" selection-start-column="51" selection-end-line="33" selection-end-column="51" />
83
+              <folding>
84
+                <element signature="imports" expanded="true" />
85
+              </folding>
81 86
             </state>
82 87
           </provider>
83 88
         </entry>
@@ -86,7 +91,7 @@
86 91
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
87 92
           <provider selected="true" editor-type-id="text-editor">
88 93
             <state relative-caret-position="373">
89
-              <caret line="42" column="33" selection-start-line="42" selection-start-column="33" selection-end-line="42" selection-end-column="33" />
94
+              <caret line="42" column="31" selection-start-line="42" selection-start-column="31" selection-end-line="42" selection-end-column="31" />
90 95
               <folding>
91 96
                 <element signature="imports" expanded="true" />
92 97
               </folding>
@@ -110,7 +115,7 @@
110 115
         <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java">
111 116
           <provider selected="true" editor-type-id="text-editor">
112 117
             <state relative-caret-position="120">
113
-              <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
118
+              <caret line="8" selection-start-line="8" selection-end-line="8" />
114 119
             </state>
115 120
           </provider>
116 121
         </entry>
@@ -134,13 +139,14 @@
134 139
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/CoinMiner.java" />
135 140
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/SpringAppStarter.java" />
136 141
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketTracker.java" />
137
-        <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java" />
138 142
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketRepo/packetRepository.java" />
139 143
         <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java" />
140
-        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" />
141
-        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" />
142 144
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
143 145
         <option value="$PROJECT_DIR$/pom.xml" />
146
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java" />
147
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java" />
148
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java" />
149
+        <option value="$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java" />
144 150
       </list>
145 151
     </option>
146 152
   </component>
@@ -293,7 +299,7 @@
293 299
       </list>
294 300
     </option>
295 301
   </component>
296
-  <component name="RunManager" selected="Application.PacketParser">
302
+  <component name="RunManager" selected="Application.PacketParserEntity">
297 303
     <configuration name="CoinMiner" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
298 304
       <option name="MAIN_CLASS_NAME" value="com.wyds.CoinMiner" />
299 305
       <module name="pcap" />
@@ -305,8 +311,8 @@
305 311
         </pattern>
306 312
       </extension>
307 313
     </configuration>
308
-    <configuration name="PacketParser" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
309
-      <option name="MAIN_CLASS_NAME" value="com.wyds.packets.PacketParser" />
314
+    <configuration name="PacketParserEntity" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
315
+      <option name="MAIN_CLASS_NAME" value="com.wyds.packets.PacketParserEntity" />
310 316
       <module name="pcap" />
311 317
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
312 318
       <extension name="coverage">
@@ -383,12 +389,12 @@
383 389
       <item itemvalue="Application.PacketTracker" />
384 390
       <item itemvalue="Application.CoinMiner" />
385 391
       <item itemvalue="Application.SpringAppStarter" />
386
-      <item itemvalue="Application.PacketParser" />
392
+      <item itemvalue="Application.PacketParserEntity" />
387 393
     </list>
388 394
     <recent_temporary>
389 395
       <list>
390 396
         <item itemvalue="Application.PacketTracker" />
391
-        <item itemvalue="Application.PacketParser" />
397
+        <item itemvalue="Application.PacketParserEntity" />
392 398
         <item itemvalue="Application.SpringAppStarter" />
393 399
         <item itemvalue="Application.CoinMiner" />
394 400
       </list>
@@ -405,12 +411,12 @@
405 411
       <option name="presentableId" value="Default" />
406 412
       <updated>1531775306742</updated>
407 413
       <workItem from="1531775309911" duration="2309000" />
408
-      <workItem from="1531779911018" duration="33324000" />
414
+      <workItem from="1531779911018" duration="35716000" />
409 415
     </task>
410 416
     <servers />
411 417
   </component>
412 418
   <component name="TimeTrackingManager">
413
-    <option name="totallyTimeSpent" value="35633000" />
419
+    <option name="totallyTimeSpent" value="38025000" />
414 420
   </component>
415 421
   <component name="ToolWindowManager">
416 422
     <frame x="0" y="0" width="1680" height="1050" extended-state="0" />
@@ -436,8 +442,8 @@
436 442
       <window_info anchor="bottom" id="Run" order="2" weight="0.32923076" />
437 443
       <window_info anchor="bottom" id="Version Control" order="7" />
438 444
       <window_info anchor="bottom" id="Spring" weight="0.32923076" />
439
-      <window_info anchor="bottom" id="Terminal" order="7" visible="true" weight="0.29538462" />
440
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.16971917" />
445
+      <window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.29538462" />
446
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.16971917" />
441 447
       <window_info anchor="right" id="Bean Validation" />
442 448
       <window_info id="Web" side_tool="true" />
443 449
       <window_info anchor="bottom" id="Find" order="1" weight="0.32935324" />
@@ -522,7 +528,7 @@
522 528
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketController/PacketController.java">
523 529
       <provider selected="true" editor-type-id="text-editor">
524 530
         <state relative-caret-position="120">
525
-          <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
531
+          <caret line="8" selection-start-line="8" selection-end-line="8" />
526 532
         </state>
527 533
       </provider>
528 534
     </entry>
@@ -536,20 +542,34 @@
536 542
         </state>
537 543
       </provider>
538 544
     </entry>
539
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
545
+    <entry file="file://$PROJECT_DIR$/pcap.txt">
546
+      <provider selected="true" editor-type-id="text-editor" />
547
+    </entry>
548
+    <entry file="file://$PROJECT_DIR$/output.pcap">
540 549
       <provider selected="true" editor-type-id="text-editor">
541
-        <state relative-caret-position="373">
542
-          <caret line="42" column="33" selection-start-line="42" selection-start-column="33" selection-end-line="42" selection-end-column="33" />
543
-          <folding>
544
-            <element signature="imports" expanded="true" />
545
-          </folding>
550
+        <state relative-caret-position="-33">
551
+          <caret column="21" selection-start-column="21" selection-end-column="21" />
552
+        </state>
553
+      </provider>
554
+    </entry>
555
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
556
+      <provider selected="true" editor-type-id="text-editor">
557
+        <state relative-caret-position="405">
558
+          <caret line="27" column="33" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
559
+        </state>
560
+      </provider>
561
+    </entry>
562
+    <entry file="file://$PROJECT_DIR$/pom.xml">
563
+      <provider selected="true" editor-type-id="text-editor">
564
+        <state relative-caret-position="503">
565
+          <caret line="62" selection-start-line="62" selection-end-line="62" />
546 566
         </state>
547 567
       </provider>
548 568
     </entry>
549 569
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/PacketTracker.java">
550 570
       <provider selected="true" editor-type-id="text-editor">
551
-        <state relative-caret-position="240">
552
-          <caret line="16" column="13" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
571
+        <state relative-caret-position="285">
572
+          <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="8" />
553 573
           <folding>
554 574
             <element signature="imports" expanded="true" />
555 575
             <element signature="e#761#762#0" expanded="true" />
@@ -558,34 +578,30 @@
558 578
         </state>
559 579
       </provider>
560 580
     </entry>
561
-    <entry file="file://$PROJECT_DIR$/pcap.txt">
562
-      <provider selected="true" editor-type-id="text-editor" />
563
-    </entry>
564
-    <entry file="file://$PROJECT_DIR$/output.pcap">
581
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/Capture.java">
565 582
       <provider selected="true" editor-type-id="text-editor">
566
-        <state relative-caret-position="-33">
567
-          <caret column="21" selection-start-column="21" selection-end-column="21" />
583
+        <state relative-caret-position="373">
584
+          <caret line="42" column="31" selection-start-line="42" selection-start-column="31" selection-end-line="42" selection-end-column="31" />
585
+          <folding>
586
+            <element signature="imports" expanded="true" />
587
+          </folding>
568 588
         </state>
569 589
       </provider>
570 590
     </entry>
571
-    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
591
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParserEntity.java">
572 592
       <provider selected="true" editor-type-id="text-editor">
573
-        <state relative-caret-position="405">
574
-          <caret line="27" column="33" lean-forward="true" selection-start-line="27" selection-start-column="33" selection-end-line="27" selection-end-column="33" />
593
+        <state relative-caret-position="105">
594
+          <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
575 595
         </state>
576 596
       </provider>
577 597
     </entry>
578 598
     <entry file="file://$PROJECT_DIR$/src/main/java/com/wyds/packets/PacketParser.java">
579 599
       <provider selected="true" editor-type-id="text-editor">
580
-        <state relative-caret-position="60">
581
-          <caret line="4" selection-start-line="4" selection-end-line="4" />
582
-        </state>
583
-      </provider>
584
-    </entry>
585
-    <entry file="file://$PROJECT_DIR$/pom.xml">
586
-      <provider selected="true" editor-type-id="text-editor">
587
-        <state relative-caret-position="383">
588
-          <caret line="54" column="8" selection-start-line="54" selection-start-column="8" selection-end-line="54" selection-end-column="8" />
600
+        <state relative-caret-position="495">
601
+          <caret line="33" column="51" selection-start-line="33" selection-start-column="51" selection-end-line="33" selection-end-column="51" />
602
+          <folding>
603
+            <element signature="imports" expanded="true" />
604
+          </folding>
589 605
         </state>
590 606
       </provider>
591 607
     </entry>

+ 6
- 0
pcap.iml View File

@@ -90,5 +90,11 @@
90 90
     <orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.7.RELEASE" level="project" />
91 91
     <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.7.RELEASE" level="project" />
92 92
     <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.7.RELEASE" level="project" />
93
+    <orderEntry type="library" name="Maven: io.pkts:pkts-streams:3.0.2" level="project" />
94
+    <orderEntry type="library" name="Maven: io.pkts:pkts-sdp:3.0.2" level="project" />
95
+    <orderEntry type="library" name="Maven: javax.sip:jain-sip-ri:1.2.159" level="project" />
96
+    <orderEntry type="library" name="Maven: io.pkts:pkts-core:3.0.2" level="project" />
97
+    <orderEntry type="library" name="Maven: io.pkts:pkts-buffers:3.0.2" level="project" />
98
+    <orderEntry type="library" name="Maven: io.pkts:pkts-sip:3.0.2" level="project" />
93 99
   </component>
94 100
 </module>

+ 44
- 0
src/main/java/com/wyds/packets/PacketParser.java View File

@@ -1,4 +1,48 @@
1 1
 package com.wyds.packets;
2 2
 
3
+import io.pkts.PacketHandler;
4
+import io.pkts.Pcap;
5
+import io.pkts.packet.Packet;
6
+import io.pkts.protocol.Protocol;
7
+
8
+import java.io.IOException;
9
+
3 10
 public class PacketParser {
11
+
12
+    public static void main(String[] args) throws IOException {
13
+
14
+        final Pcap pcap = Pcap.openStream("output.pcap");
15
+
16
+        pcap.loop(new PacketHandler() {
17
+            @Override
18
+            public boolean nextPacket(Packet packet) throws IOException {
19
+                if(packet.hasProtocol(Protocol.ARP)){
20
+
21
+                }
22
+                if(packet.hasProtocol(Protocol.TCP)){
23
+
24
+                }
25
+                if(packet.hasProtocol(Protocol.UDP)){
26
+
27
+                }
28
+                if(packet.hasProtocol(Protocol.TLS)){
29
+
30
+                }
31
+                if(packet.hasProtocol(Protocol.IPv4)){
32
+
33
+                }
34
+                if(packet.hasProtocol(Protocol.)){
35
+
36
+                }
37
+
38
+
39
+
40
+                return false;
41
+            }
42
+        });
43
+
44
+    }
45
+
46
+
47
+
4 48
 }