Lines Matching refs:ip
25 struct ip_hdr *ip = (struct ip_hdr *)pkt; in set_icmp_header() local
30 ip->ip_len = htons(IP_ICMP_HDR_SIZE); in set_icmp_header()
31 ip->ip_p = IPPROTO_ICMP; in set_icmp_header()
32 ip->ip_sum = compute_ip_checksum(ip, IP_HDR_SIZE); in set_icmp_header()
82 void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) in ping_receive() argument
84 struct icmp_hdr *icmph = (struct icmp_hdr *)&ip->udp_src; in ping_receive()
90 src_ip = net_read_ip((void *)&ip->ip_src); in ping_receive()
101 ip->ip_sum = 0; in ping_receive()
102 ip->ip_off = 0; in ping_receive()
103 net_copy_ip((void *)&ip->ip_dst, &ip->ip_src); in ping_receive()
104 net_copy_ip((void *)&ip->ip_src, &net_ip); in ping_receive()
105 ip->ip_sum = compute_ip_checksum(ip, IP_HDR_SIZE); in ping_receive()