C语言命令行网络数据包分析器开发
指导使用 libpcap 开发网络抓包工具,支持协议解析、流量统计、异常告警及数据导出。
完整提示词
Create a command-line network packet analyzer in C using libpcap. Implement packet capture from network interfaces with filtering options. Add protocol analysis for common protocols (TCP, UDP, HTTP, DNS, etc.). Include traffic statistics with bandwidth usage and connection counts. Implement packet decoding with detailed header information. Add export functionality in PCAP and CSV formats. Include alert system for suspicious traffic patterns. Implement connection tracking with state information. Add geolocation lookup for IP addresses. Include command-line arguments for all options with sensible defaults. Implement color-coded output for better readability.
分类与标签
编程开发、C语言、libpcap、网络抓包、协议分析、流量监测、命令行工具