Registered User mNo edit summary |
Registered User No edit summary |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x | |MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
|MPUs checklist=STM32MP13x,STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}}</noinclude> | }} | ||
<noinclude></noinclude> | |||
== Article purpose == | == Article purpose == | ||
Line 14: | Line 15: | ||
| style="text-align:left;" | '''tcpdump'''<ref name=tcpdumpdotorg>http://www.tcpdump.org/</ref> is a common packet analyzer that runs under the command line. It allows the user to display TCP/IP and other packets being transmitted or received over a network to which the computer is connected. | | style="text-align:left;" | '''tcpdump'''<ref name=tcpdumpdotorg>http://www.tcpdump.org/</ref> is a common packet analyzer that runs under the command line. It allows the user to display TCP/IP and other packets being transmitted or received over a network to which the computer is connected. | ||
| {{Y}} || {{Y}} || {{Y}} | | {{Y}} || {{Y}} || {{Y}} | ||
| {{Y}} || {{ | | {{Y}} || {{N}} || {{Y}} | ||
|- | |- | ||
</onlyinclude> | </onlyinclude> | ||
Line 23: | Line 24: | ||
=== Using the STM32MPU Embedded Software distribution === | === Using the STM32MPU Embedded Software distribution === | ||
'''tcpdump''' is installed by default and ready to be used with all STM32MPU Embedded Software Packages. | '''tcpdump''' is installed by default and ready to be used with all STM32MPU Embedded Software Packages. | ||
{{Board$}} which tcpdump | {{Board$}}which tcpdump | ||
/usr/ | /usr/bin/tcpdump | ||
'''tcpdump''' is integrated in weston image distribution through meta-st package: <code>''meta-st/meta-st-openstlinux/recipes-st/packagegroups/packagegroup-framework-tools.bb''</code>. | '''tcpdump''' is integrated in weston image distribution through meta-st package: <code>''meta-st/meta-st-openstlinux/recipes-st/packagegroups/packagegroup-framework-tools.bb''</code>. | ||
Line 31: | Line 32: | ||
iptables \ | iptables \ | ||
... | ... | ||
RDEPENDS:packagegroup-framework-tools-network = "\ | |||
tcpdump \ | |||
packagegroup-core-full-cmdline-extended \ | |||
... | |||
" | |||
=== Using the STM32MPU Embedded Software distribution for Android™ === | === Using the STM32MPU Embedded Software distribution for Android™ === | ||
'''tcpdump''' is installed by default (/system/ | '''tcpdump''' is installed by default (/system/bin/tcpdump) and is ready to be used with all STM32MPU software packages for Android™, as soon as debug mode is enable (eng or userdebug build variants). Please see <code>''external/tcpdump/Android.mk''</code>. | ||
{{Board$}} which tcpdump | {{Board$}}which tcpdump | ||
/system/ | /system/bin/tcpdump | ||
==Getting started== | ==Getting started== | ||
* Command line description | * Command line description | ||
{{Board$}} tcpdump --help | {{Board$}}tcpdump --help | ||
Usage: tcpdump [-aAbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count ] | Usage: tcpdump [-aAbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count ] | ||
[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] | [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] | ||
Line 49: | Line 55: | ||
[ -Z user ] [ expression ] | [ -Z user ] [ expression ] | ||
* Dump tcp traffic on | * Dump tcp traffic on end0 interface (you can use [[IP Linux command line|''ip addr show'']] command to know the list of network interface available) | ||
{{Board$}} tcpdump -i | {{Board$}}tcpdump -i end0 | ||
tcpdump: verbose output suppressed, use -v or - | tcpdump: verbose output suppressed, use -v or -v[v] for full protocol decode | ||
listening on | listening on end0, link-type EN10MB (Ethernet), capture size 262144 bytes | ||
10:55:33.107716 IP 10.48.2.165.ssh > 10.201.23.91.52308: Flags [P.], seq 4266254400:4266254528, ack 3520172211, win 333, options [nop,nop,TS val 57572827 ecr 260374058], length 128 | 10:55:33.107716 IP 10.48.2.165.ssh > 10.201.23.91.52308: Flags [P.], seq 4266254400:4266254528, ack 3520172211, win 333, options [nop,nop,TS val 57572827 ecr 260374058], length 128 | ||
10:55:33.108933 IP 10.201.23.91.52308 > 10.48.2.165.ssh: Flags [.], ack 128, win 1444, options [nop,nop,TS val 260374095 ecr 57572827], length 0 | 10:55:33.108933 IP 10.201.23.91.52308 > 10.48.2.165.ssh: Flags [.], ack 128, win 1444, options [nop,nop,TS val 260374095 ecr 57572827], length 0 | ||
Line 79: | Line 85: | ||
|} | |} | ||
<noinclude> | |||
{{ ArticleBasedOnModel | Trace and debug tools article model }} | {{ ArticleBasedOnModel | Trace and debug tools article model }} | ||
{{ PublicationRequestId | 9041 | 12Oct'18 }} | {{ PublicationRequestId | 9041 | 12Oct'18 }} | ||
[[Category:Linux monitoring tools]] | [[Category:Linux monitoring tools]] | ||
[[Category:Android]] | |||
</noinclude> |
Latest revision as of 19:19, 5 November 2024
1. Article purpose[edit | edit source]
This article provides the basic information needed to start using the Linux tool: tcpdump[1].
2. Introduction[edit | edit source]
The following table provides a brief description of the tool, as well as its availability depending on the software packages:
: this tool is either present (ready to use or to be activated), or can be integrated and activated on the software package.
: this tool is not present and cannot be integrated, or it is present but cannot be activated on the software package.
Tool | STM32MPU Embedded Software distribution | STM32MPU Embedded Software distribution for Android™ Only supported for STM32MP15x lines ![]() | ||||||
---|---|---|---|---|---|---|---|---|
Name | Category | Purpose | Starter Package | Developer Package | Distribution Package | Starter Package | Developer Package | Distribution Package |
tcpdump | Monitoring tools | tcpdump[1] is a common packet analyzer that runs under the command line. It allows the user to display TCP/IP and other packets being transmitted or received over a network to which the computer is connected. | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
3. Installing the trace and debug tool on your target board[edit | edit source]
3.1. Using the STM32MPU Embedded Software distribution[edit | edit source]
tcpdump is installed by default and ready to be used with all STM32MPU Embedded Software Packages.
which tcpdump
/usr/bin/tcpdump
tcpdump is integrated in weston image distribution through meta-st package: meta-st/meta-st-openstlinux/recipes-st/packagegroups/packagegroup-framework-tools.bb
.
tcpdump \ iptables \ ... RDEPENDS:packagegroup-framework-tools-network = "\ tcpdump \ packagegroup-core-full-cmdline-extended \ ... "RDEPENDS_packagegroup-framework-tools-network = "\
3.2. Using the STM32MPU Embedded Software distribution for Android™[edit | edit source]
tcpdump is installed by default (/system/bin/tcpdump) and is ready to be used with all STM32MPU software packages for Android™, as soon as debug mode is enable (eng or userdebug build variants). Please see external/tcpdump/Android.mk
.
which tcpdump
/system/bin/tcpdump
4. Getting started[edit | edit source]
- Command line description
tcpdump --help
Usage: tcpdump [-aAbdDefhHIJKlLnNOpqStuUvxX#] [ -B size ] [ -c count ]
[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]
[ -i interface ] [ -j tstamptype ] [ -M secret ] [ --number ]
[ -Q in|out|inout ]
[ -r file ] [ -s snaplen ] [ --time-stamp-precision precision ]
[ --immediate-mode ] [ -T type ] [ --version ] [ -V file ]
[ -w file ] [ -W filecount ] [ -y datalinktype ] [ -z postrotate-command ]
[ -Z user ] [ expression ]
- Dump tcp traffic on end0 interface (you can use ip addr show command to know the list of network interface available)
tcpdump -i end0
tcpdump: verbose output suppressed, use -v or -v[v] for full protocol decode
listening on end0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:55:33.107716 IP 10.48.2.165.ssh > 10.201.23.91.52308: Flags [P.], seq 4266254400:4266254528, ack 3520172211, win 333, options [nop,nop,TS val 57572827 ecr 260374058], length 128
10:55:33.108933 IP 10.201.23.91.52308 > 10.48.2.165.ssh: Flags [.], ack 128, win 1444, options [nop,nop,TS val 260374095 ecr 57572827], length 0
...
5. To go further[edit | edit source]
Some usage examples[2].
6. References[edit | edit source]
- Useful external links
Document link | Document Type | Description |
---|---|---|
tcpdump manpage | Standard | linux.die.net |
tcpdump (wikipedia.org) | Standard | wikipedia.org |