Affichage:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 char ip_fmt[INET_ADDRSTRLEN]; printf(" Source: %s\n", inet_ntop(AF_INET, &ip->saddr, ip_fmt, sizeof ip_fmt)); printf("Destination: %s\n", inet_ntop(AF_INET, &ip->daddr, ip_fmt, sizeof ip_fmt)); printf("Type de service: %hx\n", &ip->tos); printf("Longeur datagramme: %hx\n", &ip->tot_len); printf("ID: %hx\n", &ip->id); printf("Offset: %hx\n", &ip->frag_off); printf("TTL: %hx\n", &ip->ttl); printf("Checksum: %hx\n", &ip->check);
Paquet Numero 8:
Source: 192.168.1.2
Destination: 74.125.39.103
Type de service: d685
Longeur datagramme: d686
ID: d688
Offset: d68a
TTL: d68c
Checksum: d68e
L'adresse IP source est destination sont juste mais pour les autres champs je crois que c'est faux ?!
Merci.
Partager