netkitty 0.0.20 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/.eslintrc.json +2 -2
  2. package/.idea/inspectionProfiles/Project_Default.xml +2 -1
  3. package/.idea/netkitty.iml +0 -1
  4. package/cpp/nodepcap/deps/include/Packet32.h +429 -429
  5. package/cpp/nodepcap/deps/include/pcap/bluetooth.h +56 -56
  6. package/cpp/nodepcap/deps/include/pcap/bpf.h +292 -292
  7. package/cpp/nodepcap/deps/include/pcap/can_socketcan.h +56 -56
  8. package/cpp/nodepcap/deps/include/pcap/compiler-tests.h +163 -163
  9. package/cpp/nodepcap/deps/include/pcap/dlt.h +1514 -1514
  10. package/cpp/nodepcap/deps/include/pcap/funcattrs.h +325 -325
  11. package/cpp/nodepcap/deps/include/pcap/ipnet.h +43 -43
  12. package/cpp/nodepcap/deps/include/pcap/namedb.h +84 -84
  13. package/cpp/nodepcap/deps/include/pcap/nflog.h +94 -94
  14. package/cpp/nodepcap/deps/include/pcap/pcap-inttypes.h +101 -101
  15. package/cpp/nodepcap/deps/include/pcap/pcap.h +1219 -1219
  16. package/cpp/nodepcap/deps/include/pcap/sll.h +149 -149
  17. package/cpp/nodepcap/deps/include/pcap/socket.h +84 -84
  18. package/cpp/nodepcap/deps/include/pcap/usb.h +143 -143
  19. package/cpp/nodepcap/deps/include/pcap/vlan.h +46 -46
  20. package/cpp/nodepcap/deps/include/pcap-bpf.h +45 -45
  21. package/cpp/nodepcap/deps/include/pcap-namedb.h +40 -40
  22. package/cpp/nodepcap/deps/include/pcap.h +43 -43
  23. package/dist/PcapExports.d.ts +13 -0
  24. package/dist/PcapExports.d.ts.map +1 -1
  25. package/dist/PcapExports.js +16 -1
  26. package/dist/lib/codec/Codec.js +1 -1
  27. package/dist/lib/codec/PacketHeaders.d.ts +5 -0
  28. package/dist/lib/codec/PacketHeaders.d.ts.map +1 -1
  29. package/dist/lib/codec/PacketHeaders.js +13 -1
  30. package/dist/lib/codec/abstracts/BaseHeader.d.ts +2 -2
  31. package/dist/lib/codec/abstracts/BaseHeader.d.ts.map +1 -1
  32. package/dist/lib/codec/abstracts/BaseHeader.js +4 -4
  33. package/dist/lib/codec/headers/EthernetII.js +1 -1
  34. package/dist/lib/codec/headers/Goose.js +5 -5
  35. package/dist/lib/codec/headers/IEC61850SampledValues.js +1 -1
  36. package/dist/lib/codec/headers/IPv4.js +2 -2
  37. package/dist/lib/codec/headers/TLS_Alert.d.ts +10 -0
  38. package/dist/lib/codec/headers/TLS_Alert.d.ts.map +1 -0
  39. package/dist/lib/codec/headers/TLS_Alert.js +624 -0
  40. package/dist/lib/codec/headers/TLS_ApplicationData.d.ts +10 -0
  41. package/dist/lib/codec/headers/TLS_ApplicationData.d.ts.map +1 -0
  42. package/dist/lib/codec/headers/TLS_ApplicationData.js +155 -0
  43. package/dist/lib/codec/headers/TLS_ChangeCipherSpec.d.ts +10 -0
  44. package/dist/lib/codec/headers/TLS_ChangeCipherSpec.d.ts.map +1 -0
  45. package/dist/lib/codec/headers/TLS_ChangeCipherSpec.js +154 -0
  46. package/dist/lib/codec/headers/TLS_Handshake.d.ts +10 -0
  47. package/dist/lib/codec/headers/TLS_Handshake.d.ts.map +1 -0
  48. package/dist/lib/codec/headers/TLS_Handshake.js +339 -0
  49. package/dist/lib/codec/headers/TLS_Heartbeat.d.ts +10 -0
  50. package/dist/lib/codec/headers/TLS_Heartbeat.d.ts.map +1 -0
  51. package/dist/lib/codec/headers/TLS_Heartbeat.js +206 -0
  52. package/dist/lib/codec/headers/VLAN_802dot1Q.js +1 -1
  53. package/dist/lib/pcap/PCAPGenerator.d.ts +2 -2
  54. package/dist/lib/pcap/PCAPGenerator.d.ts.map +1 -1
  55. package/dist/lib/pcap/PCAPGenerator.js +7 -1
  56. package/package.json +1 -1
  57. package/src/PcapExports.ts +16 -0
  58. package/src/lib/codec/Codec.ts +1 -1
  59. package/src/lib/codec/PacketHeaders.ts +7 -0
  60. package/src/lib/codec/abstracts/BaseHeader.ts +4 -4
  61. package/src/lib/codec/headers/EthernetII.ts +1 -1
  62. package/src/lib/codec/headers/Goose.ts +5 -5
  63. package/src/lib/codec/headers/IEC61850SampledValues.ts +1 -1
  64. package/src/lib/codec/headers/IPv4.ts +2 -2
  65. package/src/lib/codec/headers/TLS_Alert.ts +539 -0
  66. package/src/lib/codec/headers/TLS_ApplicationData.ts +145 -0
  67. package/src/lib/codec/headers/TLS_ChangeCipherSpec.ts +146 -0
  68. package/src/lib/codec/headers/TLS_Handshake.ts +313 -0
  69. package/src/lib/codec/headers/TLS_Heartbeat.ts +188 -0
  70. package/src/lib/codec/headers/VLAN_802dot1Q.ts +1 -1
  71. package/src/lib/pcap/PCAPGenerator.ts +8 -3
  72. package/dist/NetKitty.d.ts +0 -1
  73. package/dist/NetKitty.d.ts.map +0 -1
  74. package/dist/NetKitty.js +0 -90
  75. package/src/NetKitty.ts +0 -91
@@ -1,143 +1,143 @@
1
- /*
2
- * Copyright (c) 2006 Paolo Abeni (Italy)
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- *
9
- * 1. Redistributions of source code must retain the above copyright
10
- * notice, this list of conditions and the following disclaimer.
11
- * 2. Redistributions in binary form must reproduce the above copyright
12
- * notice, this list of conditions and the following disclaimer in the
13
- * documentation and/or other materials provided with the distribution.
14
- * 3. The name of the author may not be used to endorse or promote
15
- * products derived from this software without specific prior written
16
- * permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- *
30
- * Basic USB data struct
31
- * By Paolo Abeni <paolo.abeni@email.it>
32
- */
33
-
34
- #ifndef lib_pcap_usb_h
35
- #define lib_pcap_usb_h
36
-
37
- #include <pcap/pcap-inttypes.h>
38
-
39
- /*
40
- * possible transfer mode
41
- */
42
- #define URB_TRANSFER_IN 0x80
43
- #define URB_ISOCHRONOUS 0x0
44
- #define URB_INTERRUPT 0x1
45
- #define URB_CONTROL 0x2
46
- #define URB_BULK 0x3
47
-
48
- /*
49
- * possible event type
50
- */
51
- #define URB_SUBMIT 'S'
52
- #define URB_COMPLETE 'C'
53
- #define URB_ERROR 'E'
54
-
55
- /*
56
- * USB setup header as defined in USB specification.
57
- * Appears at the front of each Control S-type packet in DLT_USB captures.
58
- */
59
- typedef struct _usb_setup {
60
- uint8_t bmRequestType;
61
- uint8_t bRequest;
62
- uint16_t wValue;
63
- uint16_t wIndex;
64
- uint16_t wLength;
65
- } pcap_usb_setup;
66
-
67
- /*
68
- * Information from the URB for Isochronous transfers.
69
- */
70
- typedef struct _iso_rec {
71
- int32_t error_count;
72
- int32_t numdesc;
73
- } iso_rec;
74
-
75
- /*
76
- * Header prepended by linux kernel to each event.
77
- * Appears at the front of each packet in DLT_USB_LINUX captures.
78
- */
79
- typedef struct _usb_header {
80
- uint64_t id;
81
- uint8_t event_type;
82
- uint8_t transfer_type;
83
- uint8_t endpoint_number;
84
- uint8_t device_address;
85
- uint16_t bus_id;
86
- char setup_flag;/*if !=0 the urb setup header is not present*/
87
- char data_flag; /*if !=0 no urb data is present*/
88
- int64_t ts_sec;
89
- int32_t ts_usec;
90
- int32_t status;
91
- uint32_t urb_len;
92
- uint32_t data_len; /* amount of urb data really present in this event*/
93
- pcap_usb_setup setup;
94
- } pcap_usb_header;
95
-
96
- /*
97
- * Header prepended by linux kernel to each event for the 2.6.31
98
- * and later kernels; for the 2.6.21 through 2.6.30 kernels, the
99
- * "iso_rec" information, and the fields starting with "interval"
100
- * are zeroed-out padding fields.
101
- *
102
- * Appears at the front of each packet in DLT_USB_LINUX_MMAPPED captures.
103
- */
104
- typedef struct _usb_header_mmapped {
105
- uint64_t id;
106
- uint8_t event_type;
107
- uint8_t transfer_type;
108
- uint8_t endpoint_number;
109
- uint8_t device_address;
110
- uint16_t bus_id;
111
- char setup_flag;/*if !=0 the urb setup header is not present*/
112
- char data_flag; /*if !=0 no urb data is present*/
113
- int64_t ts_sec;
114
- int32_t ts_usec;
115
- int32_t status;
116
- uint32_t urb_len;
117
- uint32_t data_len; /* amount of urb data really present in this event*/
118
- union {
119
- pcap_usb_setup setup;
120
- iso_rec iso;
121
- } s;
122
- int32_t interval; /* for Interrupt and Isochronous events */
123
- int32_t start_frame; /* for Isochronous events */
124
- uint32_t xfer_flags; /* copy of URB's transfer flags */
125
- uint32_t ndesc; /* number of isochronous descriptors */
126
- } pcap_usb_header_mmapped;
127
-
128
- /*
129
- * Isochronous descriptors; for isochronous transfers there might be
130
- * one or more of these at the beginning of the packet data. The
131
- * number of descriptors is given by the "ndesc" field in the header;
132
- * as indicated, in older kernels that don't put the descriptors at
133
- * the beginning of the packet, that field is zeroed out, so that field
134
- * can be trusted even in captures from older kernels.
135
- */
136
- typedef struct _usb_isodesc {
137
- int32_t status;
138
- uint32_t offset;
139
- uint32_t len;
140
- uint8_t pad[4];
141
- } usb_isodesc;
142
-
143
- #endif
1
+ /*
2
+ * Copyright (c) 2006 Paolo Abeni (Italy)
3
+ * All rights reserved.
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions
7
+ * are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * 2. Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * 3. The name of the author may not be used to endorse or promote
15
+ * products derived from this software without specific prior written
16
+ * permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ *
30
+ * Basic USB data struct
31
+ * By Paolo Abeni <paolo.abeni@email.it>
32
+ */
33
+
34
+ #ifndef lib_pcap_usb_h
35
+ #define lib_pcap_usb_h
36
+
37
+ #include <pcap/pcap-inttypes.h>
38
+
39
+ /*
40
+ * possible transfer mode
41
+ */
42
+ #define URB_TRANSFER_IN 0x80
43
+ #define URB_ISOCHRONOUS 0x0
44
+ #define URB_INTERRUPT 0x1
45
+ #define URB_CONTROL 0x2
46
+ #define URB_BULK 0x3
47
+
48
+ /*
49
+ * possible event type
50
+ */
51
+ #define URB_SUBMIT 'S'
52
+ #define URB_COMPLETE 'C'
53
+ #define URB_ERROR 'E'
54
+
55
+ /*
56
+ * USB setup header as defined in USB specification.
57
+ * Appears at the front of each Control S-type packet in DLT_USB captures.
58
+ */
59
+ typedef struct _usb_setup {
60
+ uint8_t bmRequestType;
61
+ uint8_t bRequest;
62
+ uint16_t wValue;
63
+ uint16_t wIndex;
64
+ uint16_t wLength;
65
+ } pcap_usb_setup;
66
+
67
+ /*
68
+ * Information from the URB for Isochronous transfers.
69
+ */
70
+ typedef struct _iso_rec {
71
+ int32_t error_count;
72
+ int32_t numdesc;
73
+ } iso_rec;
74
+
75
+ /*
76
+ * Header prepended by linux kernel to each event.
77
+ * Appears at the front of each packet in DLT_USB_LINUX captures.
78
+ */
79
+ typedef struct _usb_header {
80
+ uint64_t id;
81
+ uint8_t event_type;
82
+ uint8_t transfer_type;
83
+ uint8_t endpoint_number;
84
+ uint8_t device_address;
85
+ uint16_t bus_id;
86
+ char setup_flag;/*if !=0 the urb setup header is not present*/
87
+ char data_flag; /*if !=0 no urb data is present*/
88
+ int64_t ts_sec;
89
+ int32_t ts_usec;
90
+ int32_t status;
91
+ uint32_t urb_len;
92
+ uint32_t data_len; /* amount of urb data really present in this event*/
93
+ pcap_usb_setup setup;
94
+ } pcap_usb_header;
95
+
96
+ /*
97
+ * Header prepended by linux kernel to each event for the 2.6.31
98
+ * and later kernels; for the 2.6.21 through 2.6.30 kernels, the
99
+ * "iso_rec" information, and the fields starting with "interval"
100
+ * are zeroed-out padding fields.
101
+ *
102
+ * Appears at the front of each packet in DLT_USB_LINUX_MMAPPED captures.
103
+ */
104
+ typedef struct _usb_header_mmapped {
105
+ uint64_t id;
106
+ uint8_t event_type;
107
+ uint8_t transfer_type;
108
+ uint8_t endpoint_number;
109
+ uint8_t device_address;
110
+ uint16_t bus_id;
111
+ char setup_flag;/*if !=0 the urb setup header is not present*/
112
+ char data_flag; /*if !=0 no urb data is present*/
113
+ int64_t ts_sec;
114
+ int32_t ts_usec;
115
+ int32_t status;
116
+ uint32_t urb_len;
117
+ uint32_t data_len; /* amount of urb data really present in this event*/
118
+ union {
119
+ pcap_usb_setup setup;
120
+ iso_rec iso;
121
+ } s;
122
+ int32_t interval; /* for Interrupt and Isochronous events */
123
+ int32_t start_frame; /* for Isochronous events */
124
+ uint32_t xfer_flags; /* copy of URB's transfer flags */
125
+ uint32_t ndesc; /* number of isochronous descriptors */
126
+ } pcap_usb_header_mmapped;
127
+
128
+ /*
129
+ * Isochronous descriptors; for isochronous transfers there might be
130
+ * one or more of these at the beginning of the packet data. The
131
+ * number of descriptors is given by the "ndesc" field in the header;
132
+ * as indicated, in older kernels that don't put the descriptors at
133
+ * the beginning of the packet, that field is zeroed out, so that field
134
+ * can be trusted even in captures from older kernels.
135
+ */
136
+ typedef struct _usb_isodesc {
137
+ int32_t status;
138
+ uint32_t offset;
139
+ uint32_t len;
140
+ uint8_t pad[4];
141
+ } usb_isodesc;
142
+
143
+ #endif
@@ -1,46 +1,46 @@
1
- /*-
2
- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3
- * The Regents of the University of California. All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- * notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- * notice, this list of conditions and the following disclaimer in the
12
- * documentation and/or other materials provided with the distribution.
13
- * 3. All advertising materials mentioning features or use of this software
14
- * must display the following acknowledgement:
15
- * This product includes software developed by the University of
16
- * California, Berkeley and its contributors.
17
- * 4. Neither the name of the University nor the names of its contributors
18
- * may be used to endorse or promote products derived from this software
19
- * without specific prior written permission.
20
- *
21
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
- * SUCH DAMAGE.
32
- */
33
-
34
- #ifndef lib_pcap_vlan_h
35
- #define lib_pcap_vlan_h
36
-
37
- #include <pcap/pcap-inttypes.h>
38
-
39
- struct vlan_tag {
40
- uint16_t vlan_tpid; /* ETH_P_8021Q */
41
- uint16_t vlan_tci; /* VLAN TCI */
42
- };
43
-
44
- #define VLAN_TAG_LEN 4
45
-
46
- #endif
1
+ /*-
2
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3
+ * The Regents of the University of California. All rights reserved.
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions
7
+ * are met:
8
+ * 1. Redistributions of source code must retain the above copyright
9
+ * notice, this list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright
11
+ * notice, this list of conditions and the following disclaimer in the
12
+ * documentation and/or other materials provided with the distribution.
13
+ * 3. All advertising materials mentioning features or use of this software
14
+ * must display the following acknowledgement:
15
+ * This product includes software developed by the University of
16
+ * California, Berkeley and its contributors.
17
+ * 4. Neither the name of the University nor the names of its contributors
18
+ * may be used to endorse or promote products derived from this software
19
+ * without specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
+ * SUCH DAMAGE.
32
+ */
33
+
34
+ #ifndef lib_pcap_vlan_h
35
+ #define lib_pcap_vlan_h
36
+
37
+ #include <pcap/pcap-inttypes.h>
38
+
39
+ struct vlan_tag {
40
+ uint16_t vlan_tpid; /* ETH_P_8021Q */
41
+ uint16_t vlan_tci; /* VLAN TCI */
42
+ };
43
+
44
+ #define VLAN_TAG_LEN 4
45
+
46
+ #endif
@@ -1,45 +1,45 @@
1
- /*-
2
- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3
- * The Regents of the University of California. All rights reserved.
4
- *
5
- * This code is derived from the Stanford/CMU enet packet filter,
6
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8
- * Berkeley Laboratory.
9
- *
10
- * Redistribution and use in source and binary forms, with or without
11
- * modification, are permitted provided that the following conditions
12
- * are met:
13
- * 1. Redistributions of source code must retain the above copyright
14
- * notice, this list of conditions and the following disclaimer.
15
- * 2. Redistributions in binary form must reproduce the above copyright
16
- * notice, this list of conditions and the following disclaimer in the
17
- * documentation and/or other materials provided with the distribution.
18
- * 3. All advertising materials mentioning features or use of this software
19
- * must display the following acknowledgement:
20
- * This product includes software developed by the University of
21
- * California, Berkeley and its contributors.
22
- * 4. Neither the name of the University nor the names of its contributors
23
- * may be used to endorse or promote products derived from this software
24
- * without specific prior written permission.
25
- *
26
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36
- * SUCH DAMAGE.
37
- */
38
-
39
- /*
40
- * For backwards compatibility.
41
- *
42
- * Note to OS vendors: do NOT get rid of this file! Some applications
43
- * might expect to be able to include <pcap-bpf.h>.
44
- */
45
- #include <pcap/bpf.h>
1
+ /*-
2
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3
+ * The Regents of the University of California. All rights reserved.
4
+ *
5
+ * This code is derived from the Stanford/CMU enet packet filter,
6
+ * (net/enet.c) distributed as part of 4.3BSD, and code contributed
7
+ * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
8
+ * Berkeley Laboratory.
9
+ *
10
+ * Redistribution and use in source and binary forms, with or without
11
+ * modification, are permitted provided that the following conditions
12
+ * are met:
13
+ * 1. Redistributions of source code must retain the above copyright
14
+ * notice, this list of conditions and the following disclaimer.
15
+ * 2. Redistributions in binary form must reproduce the above copyright
16
+ * notice, this list of conditions and the following disclaimer in the
17
+ * documentation and/or other materials provided with the distribution.
18
+ * 3. All advertising materials mentioning features or use of this software
19
+ * must display the following acknowledgement:
20
+ * This product includes software developed by the University of
21
+ * California, Berkeley and its contributors.
22
+ * 4. Neither the name of the University nor the names of its contributors
23
+ * may be used to endorse or promote products derived from this software
24
+ * without specific prior written permission.
25
+ *
26
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36
+ * SUCH DAMAGE.
37
+ */
38
+
39
+ /*
40
+ * For backwards compatibility.
41
+ *
42
+ * Note to OS vendors: do NOT get rid of this file! Some applications
43
+ * might expect to be able to include <pcap-bpf.h>.
44
+ */
45
+ #include <pcap/bpf.h>
@@ -1,40 +1,40 @@
1
- /*
2
- * Copyright (c) 1994, 1996
3
- * The Regents of the University of California. All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- * notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- * notice, this list of conditions and the following disclaimer in the
12
- * documentation and/or other materials provided with the distribution.
13
- * 3. All advertising materials mentioning features or use of this software
14
- * must display the following acknowledgement:
15
- * This product includes software developed by the Computer Systems
16
- * Engineering Group at Lawrence Berkeley Laboratory.
17
- * 4. Neither the name of the University nor of the Laboratory may be used
18
- * to endorse or promote products derived from this software without
19
- * specific prior written permission.
20
- *
21
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
- * SUCH DAMAGE.
32
- */
33
-
34
- /*
35
- * For backwards compatibility.
36
- *
37
- * Note to OS vendors: do NOT get rid of this file! Some applications
38
- * might expect to be able to include <pcap-namedb.h>.
39
- */
40
- #include <pcap/namedb.h>
1
+ /*
2
+ * Copyright (c) 1994, 1996
3
+ * The Regents of the University of California. All rights reserved.
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions
7
+ * are met:
8
+ * 1. Redistributions of source code must retain the above copyright
9
+ * notice, this list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright
11
+ * notice, this list of conditions and the following disclaimer in the
12
+ * documentation and/or other materials provided with the distribution.
13
+ * 3. All advertising materials mentioning features or use of this software
14
+ * must display the following acknowledgement:
15
+ * This product includes software developed by the Computer Systems
16
+ * Engineering Group at Lawrence Berkeley Laboratory.
17
+ * 4. Neither the name of the University nor of the Laboratory may be used
18
+ * to endorse or promote products derived from this software without
19
+ * specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
+ * SUCH DAMAGE.
32
+ */
33
+
34
+ /*
35
+ * For backwards compatibility.
36
+ *
37
+ * Note to OS vendors: do NOT get rid of this file! Some applications
38
+ * might expect to be able to include <pcap-namedb.h>.
39
+ */
40
+ #include <pcap/namedb.h>
@@ -1,43 +1,43 @@
1
- /*
2
- * Copyright (c) 1993, 1994, 1995, 1996, 1997
3
- * The Regents of the University of California. All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- * notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- * notice, this list of conditions and the following disclaimer in the
12
- * documentation and/or other materials provided with the distribution.
13
- * 3. All advertising materials mentioning features or use of this software
14
- * must display the following acknowledgement:
15
- * This product includes software developed by the Computer Systems
16
- * Engineering Group at Lawrence Berkeley Laboratory.
17
- * 4. Neither the name of the University nor of the Laboratory may be used
18
- * to endorse or promote products derived from this software without
19
- * specific prior written permission.
20
- *
21
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
- * SUCH DAMAGE.
32
- */
33
-
34
- /*
35
- * For backwards compatibility.
36
- *
37
- * Note to OS vendors: do NOT get rid of this file! Many applications
38
- * expect to be able to include <pcap.h>, and at least some of them
39
- * go through contortions in their configure scripts to try to detect
40
- * OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without
41
- * leaving behind a <pcap.h> file.
42
- */
43
- #include <pcap/pcap.h>
1
+ /*
2
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997
3
+ * The Regents of the University of California. All rights reserved.
4
+ *
5
+ * Redistribution and use in source and binary forms, with or without
6
+ * modification, are permitted provided that the following conditions
7
+ * are met:
8
+ * 1. Redistributions of source code must retain the above copyright
9
+ * notice, this list of conditions and the following disclaimer.
10
+ * 2. Redistributions in binary form must reproduce the above copyright
11
+ * notice, this list of conditions and the following disclaimer in the
12
+ * documentation and/or other materials provided with the distribution.
13
+ * 3. All advertising materials mentioning features or use of this software
14
+ * must display the following acknowledgement:
15
+ * This product includes software developed by the Computer Systems
16
+ * Engineering Group at Lawrence Berkeley Laboratory.
17
+ * 4. Neither the name of the University nor of the Laboratory may be used
18
+ * to endorse or promote products derived from this software without
19
+ * specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31
+ * SUCH DAMAGE.
32
+ */
33
+
34
+ /*
35
+ * For backwards compatibility.
36
+ *
37
+ * Note to OS vendors: do NOT get rid of this file! Many applications
38
+ * expect to be able to include <pcap.h>, and at least some of them
39
+ * go through contortions in their configure scripts to try to detect
40
+ * OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without
41
+ * leaving behind a <pcap.h> file.
42
+ */
43
+ #include <pcap/pcap.h>
@@ -14,4 +14,17 @@ export { PcapParser } from './lib/pcap/PcapParser';
14
14
  * Types
15
15
  */
16
16
  export { type IPcapPacketInfo } from './lib/pcap/interfaces/IPcapPacketInfo';
17
+ export type { GeneratePCAPInputPacket, GeneratePCAPPacket } from './lib/pcap/PCAPGenerator';
18
+ /**
19
+ * Generate PCAP header
20
+ */
21
+ export { GeneratePCAPHeader } from './lib/pcap/PCAPGenerator';
22
+ /**
23
+ * Generate PCAP Data
24
+ */
25
+ export { GeneratePCAPData } from './lib/pcap/PCAPGenerator';
26
+ /**
27
+ * Generate PCAP file with full data
28
+ */
29
+ export { GeneratePCAP } from './lib/pcap/PCAPGenerator';
17
30
  //# sourceMappingURL=PcapExports.d.ts.map