When I activate the only_summaries option, I get only one type output:
def printPacket(packet):
print(packet)
capture = pyshark.LiveCapture(interface='any', bpf_filter='udp port 4729', only_summaries=True)
capture.apply_on_packets(printPacket, packet_count=1)
Output:
1 0.0 127.0.0.1 127.0.0.1 LTE RRC PCCH 86 Paging (4 PagingRecords)
Now, how can I get the complete information of this package at the same time that the only_summaries option is active?
As below:
1 0.0 127.0.0.1 127.0.0.1 LTE RRC PCCH 86 Paging (4 PagingRecords)
AND
Packet (Length: 86)
Layer SLL:
Packet type: Unicast to us (0)
Link-layer address type: Loopback (772)
Link-layer address length: 6
Source: 00:00:00:00:00:00
Unused: 0000
Protocol: IPv4 (0x0800)
Layer IP:
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 76
Identification: 0xcd8a (52618)
Flags: 0x40, Don't fragment
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
...0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 64
Protocol: UDP (17)
Header Checksum: 0x6f14 [validation disabled]
Header checksum status: Unverified
Source Address: 127.0.0.1
Destination Address: 127.0.0.1
Layer UDP:
Source Port: 41149
Destination Port: 4729
Length: 56
Checksum: 0xfe4b [unverified]
Checksum Status: Unverified
Stream index: 0
Timestamps
Time since first frame: 0.000000000 seconds
Time since previous frame: 0.000000000 seconds
UDP payload (48 bytes)
Layer GSMTAP:
Version: 2
Header Length: 16 bytes
Payload Type: LTE RRC (13)
Time Slot: 0
..00 0000 0000 0000 = ARFCN: 0
.0.. .... .... .... = Uplink: 0
0... .... .... .... = PCS band indicator: 0
Signal Level: 0 dBm
Signal/Noise Ratio: 0 dB
GSM Frame Number: 0
Antenna Number: 0
Sub-Slot: 0
Layer LTE_RRC:
PCCH-Message
message: c1 (0)
c1: paging (0)
paging
pagingRecordList: 4 items