Lines Matching refs:ip

82 #include <netinet/ip.h>
1241 struct ip *ip;
1243 ip = (struct ip *)ip_ptr;
1244 ip->ip_v = IPVERSION;
1245 ip->ip_hl = 5;
1246 ip->ip_tos = inp->inp_ip_tos;
1247 ip->ip_len = 0;
1248 ip->ip_id = 0;
1249 ip->ip_off = 0;
1250 ip->ip_ttl = inp->inp_ip_ttl;
1251 ip->ip_sum = 0;
1252 ip->ip_p = IPPROTO_TCP;
1253 ip->ip_src = inp->inp_laddr;
1254 ip->ip_dst = inp->inp_faddr;
1271 * Allocates an mbuf and fills in a skeletal tcp/ip header. The only
1306 struct ip *ip;
1320 isipv6 = ((struct ip *)ipgen)->ip_v == (IPV6_VERSION >> 4);
1323 ip = ipgen;
1357 bcopy((caddr_t)ip, mtod(m, caddr_t), sizeof(struct ip));
1358 ip = mtod(m, struct ip *);
1359 nth = (struct tcphdr *)(ip + 1);
1392 bcopy((caddr_t)ip, mtod(n, caddr_t), sizeof(struct ip));
1393 ip = mtod(n, struct ip *);
1394 xchg(ip->ip_dst.s_addr, ip->ip_src.s_addr, uint32_t);
1395 nth = (struct tcphdr *)(ip + 1);
1418 xchg(ip->ip_dst.s_addr, ip->ip_src.s_addr, uint32_t);
1419 nth = (struct tcphdr *)(ip + 1);
1498 ip->ip_len = htons(tlen);
1499 ip->ip_ttl = V_ip_defttl;
1501 ip->ip_off |= htons(IP_DF);
1559 nth->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
1560 htons((u_short)(tlen - sizeof(struct ip) + ip->ip_p)));
1582 TCP_PROBE5(send, NULL, tp, ip, tp, nth);
2369 struct ip *ip = vip;
2389 cmd == PRC_TIMXCEED_INTRANS) && ip)
2398 ip = NULL;
2402 if (ip == NULL) {
2407 icp = (struct icmp *)((caddr_t)ip - offsetof(struct icmp, icmp_ip));
2408 th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2));
2410 inp = in_pcblookup(&V_tcbinfo, faddr, th->th_dport, ip->ip_src,
2440 ntohs(ip->ip_len), 1);
2468 inc.inc_laddr = ip->ip_src;
3106 * Due to header inclusion and ordering limitations the struct ip
3139 struct ip *ip;
3145 ip = (struct ip *)ip4hdr;
3193 } else if (ip && th) {
3194 inet_ntoa_r(ip->ip_src, sp);
3198 inet_ntoa_r(ip->ip_dst, sp);