README.pcap 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. PCAP:
  2. U-boot supports live Ethernet packet capture in PCAP(2.4) format.
  3. This is enabled by CONFIG_CMD_PCAP.
  4. The capture is stored on physical memory, and should be copied to
  5. a machine capable of parsing and displaying PCAP files (IE. wireshark)
  6. If networking works properly one can copy the capture file from physical memory
  7. using tftpput, or save it to local storage with (sf write, mmc write, fatwrite, etc)
  8. the pcap capturing requires maximum buffer size.
  9. when the buffer is full an error message will be displayed and then packets
  10. will silently drop.
  11. the actual capture file size is populate in the environment variable "pcapsize".
  12. Usage example:
  13. # Initialize pcap capture to physical address (0x100000) with maximum size of
  14. # 100000 bytes.
  15. # Start capture
  16. pcap start
  17. # Initialize network activity
  18. env set ipaddr 10.0.2.15; env set serverip 10.0.2.2; tftp uImage64
  19. # Stop capture
  20. pcap stop
  21. # pcap init 0x100000 100000
  22. PCAP capture initialized: addr: 0xffffffff80100000 max length: 100000
  23. # pcap start
  24. # env set ipaddr 10.0.2.15; env set serverip 10.0.2.2; tftp uImage64
  25. eth0@10000000: PHY present at 0
  26. eth0@10000000: link up, 1000Mbps full-duplex (lpa: 0x7c00)
  27. Using eth0@10000000 device
  28. TFTP from server 10.0.2.2; our IP address is 10.0.2.15
  29. Filename 'uImage64'.
  30. Load address: 0xffffffff88000000
  31. Loading: #################################################################
  32. #################################################################
  33. #################################################################
  34. #################################################################
  35. !!! Buffer is full, consider increasing buffer size !!!
  36. #################################################################
  37. #################################################################
  38. #################################################################
  39. #################################################################
  40. #################################################################
  41. #
  42. 18.2 MiB/s
  43. done
  44. Bytes transferred = 8359376 (7f8dd0 hex)
  45. PCAP status:
  46. Initialized addr: 0xffffffff80100000 max length: 100000
  47. Status: Active. file size: 99991
  48. Incoming packets: 66 Outgoing packets: 67
  49. # pcap stop
  50. # tftpput 0xffffffff80100000 $pcapsize 10.0.2.2:capture.pcap