- printf("version = %x ",ntohs(ip_hdr->ip_v:4));
- printf("header length = %x\n",ntohs(ip_hdr->ip_hl:4));
+ printf("version = %x ",ntohs(ip_hdr->ip_v));
+ printf("header_length = %x \n",ntohs(ip_hdr->ip_hl));
+ // i=0;
+ //printf("service = %x ",*(ip_hdr->ip_tos));
+ //printf("total_length(dec.) = %hu \n",*(ip_hdr->ip_len));
+ //printf("ip_addresses: source = ");
+ //for(i=0;i<4;i++)
+ // printf("%x%s",ntohl(ip_hdr->ip_src),
+ // (i==3?"\n":"."));
+
+