Lines Matching refs:iphp

694 	struct ip		*iphp;
718 iphp = (struct ip *)igp->igm_mp->b_rptr;
719 if (iphp->ip_v != IPVERSION) {
721 index, iphp->ip_v);
725 iphlen = iphp->ip_hl << 2;
732 iplen = ntohs(iphp->ip_len);
740 bcopy((caddr_t)&(iphp->ip_dst), (caddr_t)&ipdst,
742 bcopy((caddr_t)&(iphp->ip_src), (caddr_t)&ipsrc,
746 if (ipv4cksum((uint16_t *)iphp, iphlen) != 0) {
769 if (!promiscuous && (iphp->ip_p == IPPROTO_ICMP)) {
770 icmp4(igp, iphp, iphlen, ipsrc);
778 index, ntohs(iphp->ip_id), iphp->ip_p, igp, igp->igm_mp,
795 if ((type == INETBOOT_DGRAM && iphp->ip_p != IPPROTO_UDP) ||
796 (type == INETBOOT_STREAM && iphp->ip_p != IPPROTO_TCP)) {
799 "%d for socket type %d\n", index, iphp->ip_p, type);
814 curr_off = ntohs(iphp->ip_off);
845 ip_id = ntohs(iphp->ip_id);
847 ip_id, iplen, iphlen, iphp->ip_p);
888 ntohs(iphp->ip_id), iplen, iphlen, iphp->ip_p);
895 ntohs(iphp->ip_id));
973 struct ip *iphp;
1000 iphp = (struct ip *)&iphbuffer;
1001 iphp->ip_v = IPVERSION;
1002 iphp->ip_hl = sizeof (struct ip) / 4;
1003 iphp->ip_tos = 0;
1004 iphp->ip_len = htons(ogp->igm_mp->b_wptr - ogp->igm_mp->b_rptr +
1006 iphp->ip_id = htons(++g_ip_id);
1007 iphp->ip_off = htons(IP_DF);
1008 iphp->ip_p = sockets[index].proto;
1009 iphp->ip_sum = htons(0);
1010 iphp->ip_ttl = ttl;
1013 iphp->ip_src = myip;
1014 iphp->ip_dst = ogp->igm_saddr.sin_addr;
1026 if (iphp->ip_dst.s_addr == htonl(INADDR_BROADCAST) ||
1028 iphp->ip_dst.s_addr == (mynet.s_addr | ~netmask.s_addr))) {
1034 ((iphp->ip_dst.s_addr & netmask.s_addr) != mynet.s_addr)) {
1036 if ((rip = ipv4_get_route(RT_HOST, &iphp->ip_dst,
1042 index, inet_ntoa(iphp->ip_dst));
1050 iphp->ip_sum = ipv4cksum((uint16_t *)iphp, sizeof (struct ip));
1052 bcopy((caddr_t)iphp, (caddr_t)(ogp->igm_mp->b_rptr),