struct ip_packet
{
- uint8_t vers_ihl;
+ /*uint8_t vers_ihl;
uint8_t tos;
uint16_t pkt_len;
uint16_t id;
uint8_t proto;
uint16_t checksum;
uint32_t src_ip;
- uint32_t dst_ip;
+ uint32_t dst_ip;*/
+
+ u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits)
+ u_char tos; // Type of service
+ u_short pkt_len; // Total length
+ u_short id; // Identification
+ u_short flags_frag_offset; // Flags (3 bits) + Fragment offset (13 bits)
+ u_char ttl; // Time to live
+ u_char proto; // Protocol
+ u_short checksum; // Header checksum
+ u_long src_ip; // Source address
+ u_long dst_ip; // Destination address
};
struct icmp_packet