How c4gerges/projet_service_reseaux works
This is a command-line packet analyzer: a user selects a live interface or pcap file, may supply a capture filter and verbosity, and the program captures packets for protocol decoding and printed summaries. The visible code shows IPv4 dispatch to transport/control protocols; the tree also contains Ethernet, IPv6, ARP/RARP, BOOTP/DHCP, DNS, and TCP application analyzers. The README is empty, and several dispatchers were not excerpted, so links between those modules are omitted rather than inferred.
Main entry points: ip.c IPv4 and IPv6 · main.c CLI and capture · icmp.c ICMP and ICMPv6 · ethernet.c Ethernet decoder
Components 19
Capture
- CLI and capture
main.c
Network decoding
- Ethernet decoder
ethernet.c - IPv4 and IPv6
ip.c - ARP and RARP
arp.c - ICMP and ICMPv6
icmp.c
Transport decoding
- TCP decoder
tcp.c - UDP decoder
udp.c
Application protocols
- BOOTP and DHCP
bootp.c - BOOTP definitions
bootp.h - DNS decoder
dns.c - FTP decoder
ftp.c - HTTP decoder
http.c - SMTP decoder
smtp.c - IMAP decoder
imap.c - POP3 decoder
pop.c - Telnet decoder
telnet.c
Other components
- User
- Packet source
- libpcap
Connections 8
- User → CLI and capture: configures capture
main.c - Packet source → libpcap: supplies packets
- CLI and capture → libpcap: opens and filters
main.c - libpcap → Ethernet decoder: dispatches packets
- IPv4 and IPv6 → TCP decoder: dispatches IPv4
ip.c - IPv4 and IPv6 → UDP decoder: dispatches IPv4
ip.c - IPv4 and IPv6 → ICMP and ICMPv6: dispatches IPv4
ip.c - IPv4 and IPv6 → ICMP and ICMPv6: dispatches IPv6